Is there any programs that shows the differences of two copies of the same file?

Started by Zanerus, January 14, 2019, 10:07:01 PM

Previous topic - Next topic


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

Yes there is.

Hex Workshop has a file comparison feature.

In my copy, it's under:

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


Have you tried something like the following command in a Windows .bat file?

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.
I once wrote a blog.  Maybe you'll find something in it useful?



Quote from: eskayelle on January 14, 2019, 10:23:40 PMHxD 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.
Cigarettes, ice-cream, figurines of the Virgin Mary...



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.



I'm aware this basically a 2 year necro but:
wxHexEditor will do exactly what the OP asked for: "compares differences in the hex of a file and list the offsets where those differences lie". It's cross-platform and handles large files (2GB+).