Binary->patch converter

Tools, assembly, and file formats.
Post Reply
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Binary->patch converter

Post by levellass »

Uploaded and given a topic here for the Doctor.

This will scan a patch file with %patchfile commands and convert these to the equivalent patch, that doesn't require external files. (If you want to be utterly mad, you can even convert patch storytext, etc this way.)

It's quite old now (3 years) and hasn't been exhaustively debugged, but should work. I hope it can be used to make file-free versions of simple patches like those Lemm churns out, that have those impenetrable (to the uninitiated) binary files.

Get it here: http://levellord.rewound.net/PATNARY.zip
User avatar
Tulip
Posts: 394
Joined: Mon Jun 16, 2008 2:40 pm
Location: Heidelberg, Germany
Contact:

Post by Tulip »

woo, this could prove useful for me in the future.
Dr. Kylstein
Posts: 120
Joined: Wed Dec 16, 2009 5:20 pm

Post by Dr. Kylstein »

This doesn't handle the seek and length parameters of %patchfile. Is there chance of those being added?
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Post by Fleexy »

Hmm... interesting. If I can get EZPATCH's PatchArray modification to work, it will be able to spit out these binary files from it's massive PBF.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

The who and what parameters? If you can explain them, I can add them I'm sure.
Dr. Kylstein
Posts: 120
Joined: Wed Dec 16, 2009 5:20 pm

Post by Dr. Kylstein »

[3.3.1.3] %patchfile (Load patch data from file)

%patchfile <offset> <file> [seek [length]]

Loads the file specified by <file> into the executable image in
memory at the offset given by <offset>. [seek] and [length] are
both optional integer arguments that specify the starting file
offset (0 is the start of file) and maximum number of bytes to read
into memory.
If the [seek] and [length] arguments are both omitted,
then the entire file is read into memory starting from the
beginning.
My assembler outputs a single binary file and I place the relevant pieces into their places in the game using these parameters.
Dr. Kylstein
Posts: 120
Joined: Wed Dec 16, 2009 5:20 pm

Post by Dr. Kylstein »

I made my own converter to get Ceillick's patch done. It came out a bit funny...
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Sorry, internet was removed due to lack of money. But I'm back now.


The working Patnary can be got at: http://dl.dropbox.com/u/3940020/Patnary.zip
Dr. Kylstein
Posts: 120
Joined: Wed Dec 16, 2009 5:20 pm

Post by Dr. Kylstein »

The link appears to be broken...
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Are you sure? It's downloading fine for me. My internet has been a bit spotty, do you think that might affect it?

Can anyone else download this? Just click n' see.
User avatar
troublesomekeen
Posts: 223
Joined: Fri Feb 03, 2012 7:56 pm
Location: Shadowlands
Contact:

Post by troublesomekeen »

levellass wrote:Can anyone else download this? Just click n' see.
It's working for me. Incidentally, I get maybe 20KB/sec and that was the fastest download I ever had!
Dr. Kylstein
Posts: 120
Joined: Wed Dec 16, 2009 5:20 pm

Post by Dr. Kylstein »

It's working now.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Oh thank goodness, my internet has been terrible lately. (Lack of funds notwithstanding.)
Post Reply