FPATCH - New Patching Utility!

Tools, assembly, and file formats.
Post Reply
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

FPATCH - New Patching Utility!

Post by Fleexy »

I've developed a simple patcher called FPATCH. I'm making some utilites to make using it easier, but for now it's good for small patches (NOT text).

http://dl.dropbox.com/u/3771470/FPATCH.EXE

It requires these things:
- The Keen executable to be called FDATA.BIN
- The patch file to be called FDATA.DAT

The FDATA.DAT file is in this simple format: a big list of three-number (i.e. leading 0s) value, a space, and then the address to assign that value. Both values whould be in decimal. Again, the coming utilites will help.

~-FLEEXY-~
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Post by Fleexy »

lemm
Posts: 554
Joined: Sun Jul 05, 2009 12:32 pm

Post by lemm »

documentation
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Post by Fleexy »

FPATCH:

1)
Get FPATCH and rename it to whatever you want "PLAY", "GO", "KEEN", etc.

2)
Rename the Keen .EXE to FDATA.BIN

3)
Create FDATA.DAT:
The FDATA.DAT file is in this simple format: a big list of three-number (i.e. leading 0s) value, a space, and then the address to assign that value. Both values whould be in decimal. Comment lines start with a &

FPTEXT:

1)
Get the program and place it in the FDATA.DAT directory.

2)
Run it, entering what it tells you to.

-

:)
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Post by Fleexy »

FPHEXDEC

Hexadecimal to decimal converter. Very easy to use.

...get used to leading 0s...
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

CKPatch had 0x as well as $ for hex values, and people still use that for some reason. And I always have leading 0s for values like $0ACD, just so it looks neater.
gerstrong
Posts: 63
Joined: Sun Jan 25, 2009 3:21 pm

Post by gerstrong »

I like that idea, but it should be compatiable to ckpatch.

Is there a way to take the source code of ckpatch and make that new patch tool really a better alternative.

We have a good knowledge about Keen and the formats here, we should not reinvent the wheel.
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Post by Fleexy »

The last thing I need for the converter (FPCK2F) is the CKPATCH offset. Anyone know how many bytes?
lemm
Posts: 554
Joined: Sun Jul 05, 2009 12:32 pm

Post by lemm »

512
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Post by Fleexy »

Thanks!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

FFPFILE2F

Basically a utility to emulate %patchfile, but after using it you can delete the external file (it embeds the file's contents). Just follow the program's instructions.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

FPATCH now can safely patch and call beyond the default end of the executable (wheeee!). Same link.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

FPTEXT and FPFILE2F now mark their inserted segments in a comment ("FPFILE2F segment START [file]"). Same links.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-Fleexy
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

This doesn't permanently modify the renamed executable does it? That's illegal.
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Post by CommanderSpleen »

Hmm, it looks to be a pretty trippy grey area to me. Providing the means of patching the EXE directly on the client side technically doesn't count as distributing a modified EXE...
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Post by Fleexy »

It copies FDATA.BIN to FEXE.EXE, then patches and runs FEXE.EXE. When shutting down it deletes FEXE.EXE. I am developing a /perm command to apply changes to FDATA.BIN.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

You know, I made a BASIC program that does the exact same thing. Great minds must think alike.
Post Reply