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

Author Topic: Is there any programs that shows the differences of two copies of the same file?  (Read 657 times)

Zanerus

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Title says it all. There are so very minor saga frontier hacks out there I'd like to use as learning experinces by reverse eneginering them. I know which files in the disk were edited but not the offsets, so I'd like to know if there are tools to compares differences in the hex of a file and list the offsets where those differences lie

NERV Agent

  • Restricted Access
  • Sr. Member
  • *
  • Posts: 497
  • Eva Unit 01
    • View Profile
    • Watch my anime shitposts on YouTube! Smell them, too!
Yes there is.

Hex Workshop has a file comparison feature.

In my copy, it's under:

Tools --> Compare --> Compare Files...

eskayelle

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Have you tried something like the following command in a Windows .bat file?

Code: [Select]
fc /B a.smc b.smc > hexcompare.txt

Here, a.smc and b.smc are two SNES roms being compared.  Output is to a text file called hexcompare.

HxD does some offset-by-offset comparisons too.
« Last Edit: January 15, 2019, 08:05:26 am by eskayelle »

Zanerus

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Thank you both, i'll try these out over the course of the week.

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2915
  • 2 + 2 = 5
    • View Profile
HxD does some offset-by-offset comparisons too.

Yeah, I use this all the time. Recently allowed me to fix someone's patch that was incompatible with others simply because it unnecessarily included a ROM expansion, which had the side-effect of overwriting everything in the expanded portion. That created a lot of problems because the original ROM had very little free space, so many of the hacks for said game utilize that new space. Comparing two ROMs allowed me to find the problem pretty quickly.

Edit: While it might not be as accurate as the method described above (would kind of vary from case to case), another quick and perhaps easier method of comparing differences might be to make IPS patches and then open them in a program like IPS Peek which will tell you what was changed and where. This allows you to see the changes in a more organized fashion.
« Last Edit: January 15, 2019, 08:13:24 am by SunGodPortal »
War is Peace. Freedom is Slavery. Ignorance is Strength.

STARWIN

  • Sr. Member
  • ****
  • Posts: 444
    • View Profile
I've used vbindiff, in case you need an alternative.

dshadoff

  • Full Member
  • ***
  • Posts: 152
    • View Profile
    • Homepage (really old)
Total Commander (Windows) and some of its many homages (for example, Krusader on Linux) have a "compare by content" selection under the "Files" menu item.  This package is a split-window file explorer made for fast navigation/copying/other file operations between one place and another.

The "Compare by content" item will do a line-by-line text diff for text-type files, or show binary differences for anything else.

You would select a file from each of the windows to effect the comparison.
It's particularly effective if you are comparing two directories (using "Synchronize Dirs"), and find that one of the files is 'different'; you can find out what changed.

Dave