gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS Misc > bspatch and bsdiff problems

#99509 - DimondEdge - Tue Aug 22, 2006 3:07 am

I am writing a quick, 1kb patcher for a game, and am trying to apply it
with bspatch.

I generate a .bdf file with
Code:
bsdiff file1.nds hack.out patch.bdf

that works, then I do
Code:
dspatch file1.nds MKDS.nds patch.bdf

in two seconds, I get "MKDS.nds" but it's exactly the
same as hack.out, a 1kb file.

Whats going on?

DE

#99596 - josath - Tue Aug 22, 2006 4:31 pm

If I understand correctly, 'patch.bdf' should store the differences between 'file1.nds' and 'hack.out'

So when you apply 'patch.bdf' to 'file1.nds', the output should be 'hack.out'.

file1.nds + patch.bdf = hack.out

So what exactly is the problem then?

#99653 - DimondEdge - Tue Aug 22, 2006 11:07 pm

Well, what I'm trying to do is apply the patch, so that adds it, kinda like a
trainer.

DE

#99775 - josath - Wed Aug 23, 2006 10:27 pm

This forum doesn't really deal with this kind of stuff, but here goes anyway:

What you need is:
1. a copy of the entire file WITHOUT the changes you've maed ("clean.nds")
2. a copy of the entire file WITH the changes you've made ("hacked.nds");

then run:
Code:
bsdiff clean.nds hacked.nds patch.bdf


This will create the file 'patch.bdf'

Then you can give patch.bdf to someone else who has the original game ("clean.nds"), and then they can type:

Code:
bspatch clean.nds hacked.nds patch.bdf


And then it will create hacked.nds for them, which will be the same as your hacked.nds (assuming they started from the same clean.nds)