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

Author Topic: Comparing roms  (Read 676 times)

ThegreatBen

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
Comparing roms
« on: May 19, 2020, 08:36:26 pm »
What's the easiest way to compare a patched ROM to an unpatched one to see only the bytes that have been changed?

eskayelle

  • Full Member
  • ***
  • Posts: 132
  • NBA Jam 2Kxx / TMNT of Rage / Pong de las TMNT Dev
    • View Profile
Re: Comparing roms
« Reply #1 on: May 19, 2020, 08:50:11 pm »
If the patch is small enough, and an IPS file, I sometimes open it in a hex editor and analyze.  Otherwise, I make a .bat file using Notepad and use these commands:

Code: [Select]
fc /B "ORIGINAL FILE.XXX" "PATCHED FILE.XXX" > compare.txt
@pause

Replace the names in quotes with your files, and the compare.txt file is your result.

FAST6191

  • Hero Member
  • *****
  • Posts: 2958
    • View Profile
Re: Comparing roms
« Reply #2 on: May 19, 2020, 10:08:38 pm »
Depends what system. For something with a filesystem (basically anything on Windows, arguably some arcade stuff, anything on a floppy disc, the DS on upwards and anything that came on optical media) then if everything gets rebuilt, or possibly even encrypted again (the wii is the most notable for a lot of this but is hardly the only one).
Even on the older systems you do also have the different formats, headers and whatever else to account for, though for a simple patched vs unpatched it is not so bad.

Personally I like the compare feature hex workshop has, and it can also attempt to compare things and has a more advanced more where it will try to see if it picks up the trail again after an insertion or deletion.

Bonus tip in case of iso based stuff.
Unpack the original and patched versions, and then hash all the files within them and compare hashes. Anything that is different will show up there and you can go with simpler tools.
Bonus 2.
In the case of the DS, and various other programs for other systems, you have a tool called crystaltile2. Its hex window will happily tell you what file that given selection/cursor placement belongs to.

sics

  • Sr. Member
  • ****
  • Posts: 338
  • Contact me!
    • View Profile
    • Deviantart: Terwilf
Re: Comparing roms
« Reply #3 on: May 19, 2020, 10:29:39 pm »
I recommend you try the Fairdell HexCmp2, and to complete it HxD Hex Editor :thumbsup:


(This capture was made for other purposes)


ThegreatBen

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
Re: Comparing roms
« Reply #4 on: May 20, 2020, 07:03:15 am »
Thanks this should do the trick