News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: How to patch Niji no Silkroad?  (Read 1981 times)

Zynk

  • Hero Member
  • *****
  • Posts: 903
  • WIP Roll-chan: The Wily Wars
    • View Profile
How to patch Niji no Silkroad?
« on: January 25, 2014, 10:15:51 am »
I'm trying to play Rainbow Silkroad on FCEUX & VirtuaNES with Gaijin Productions' patch, but it doesn't work. However, the patched rom works with NESticles. How come?  :(

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6844
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: How to patch Niji no Silkroad?
« Reply #1 on: January 25, 2014, 10:43:47 am »
The first thing you should do whenever an NES hack doesn't work is to open the ROM in a hex editor and check for garbage in the header (most commonly "DiskDude!"). Zero it out. The fact you say it works Nesticle makes this very likely (as Nesticle, at least the most common version, only supports up to mapper 15, thus it ignores byte 7 of the header, the high bits of the mapper, which pretty much every good emulator since then does use)
Zero out that junk.
"My watch says 30 chickens" Google, 2018

Zynk

  • Hero Member
  • *****
  • Posts: 903
  • WIP Roll-chan: The Wily Wars
    • View Profile
Re: How to patch Niji no Silkroad?
« Reply #2 on: January 25, 2014, 11:02:47 pm »
I didn't find "DiskDude!", but I compared some trained roms with a clean rom.
In a hex editor, I found that the trained roms have the zeroes next to the NES header (after "C"). The clean rom had this hexadecimals in place of the zeroes (FF FF FF 4E 69 30 33 33 30). I zeroed it all then applied the patch, then the hack worked. I think the clean rom had the garbage.  :P And it seems that Musashi used a trained rom for his patch.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6844
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: How to patch Niji no Silkroad?
« Reply #3 on: January 26, 2014, 06:44:26 pm »
From my NES patched ROMs folder (apparently patched since 2002):
Original ROM
Code: [Select]
393,232 bytes = header, no trainer
CRC32 A09197DF
MD5 D09CDB8FB37DAF9132F36CE50B439E43
SHA 544F3CA83C2094D1E556458CC4A3E492E29A6FDC
Working patched ROM
Code: [Select]
393,232 bytes = header, no trainer
CRC32 AE303BA5
MD5 39FAB9EB2F877E631E9ACE098BC1A7EE
SHA A5D4B7EA70F7C72840A1E48F26328C553B87F2EB
The header garbage is "...Ni0330", which a very common header corruption pattern. That is the second most common header garbage.
I've never seen a trained ROM but it would be an additional 512 bytes above the file size listed if it did exist.
"My watch says 30 chickens" Google, 2018

Zynk

  • Hero Member
  • *****
  • Posts: 903
  • WIP Roll-chan: The Wily Wars
    • View Profile
Re: How to patch Niji no Silkroad?
« Reply #4 on: January 26, 2014, 08:19:33 pm »
The header garbage is "...Ni0330", which a very common header corruption pattern. That is the second most common header garbage.
I've never seen a trained ROM but it would be an additional 512 bytes above the file size listed if it did exist.
That "...Ni0330" is what the hexadecimal "FF FF FF 4E 69 30 33 33 30" is.