Page 1 of 3

CKPatch extended for other games: Released!

Posted: Mon Jun 25, 2007 4:31 pm
by Shadow Master
Thanks to Levellass for pressing me into doing this, Admiral Bob for CKPatch's source code, and the chocolate god for chocolate.

Now, onto the thing:

Binaries (116 KB): http://shadowm.rewound.net/src/ckpatch- ... xt-bin.zip
Source code (Pascal - DOS, 55 KB): http://shadowm.rewound.net/src/ckpatch- ... rc.tar.bz2

These include the original CKnPatch, of course. So it goes, about the %ext command:

- The originals remain the same
- Bio Menace 1 uses %ext BM1, 2 uses BM2, and so on.
- Dangerous Dave 2 uses %ext DD2
- Dangerous Dave 3 uses %ext DD3
- Shadow Knights uses %ext NIN

It will only recognize the freeware Bio Menace that you can find at 3D Realms download page. About the other games added, only Levellass knows for sure.

Since I'm using more generic loader code for these games, I'm pretty sure you can now extend this tool for even more games, as long as you know the exe file length (- header) of your game; I added code for getting that info, you'll know when it doesn't recognize an exe. :P

Enjoy!

EDIT: ah, Important Note, you must UNLZEXE your game's exe before using the patchers. You can get UNLZEXE here (9 KB zip).
EDIT2: oh, and please don't tell me to LZEXE or UPX the binaries; I'm just too lazy to do it right now. Next weekend, right? :p

Posted: Mon Jun 25, 2007 4:36 pm
by levellass
Is this awesome or what? If anyone has any version issues and unrecognized EXEs, do tell me and I'll try and see what's up.

And I have a collection of patches for said games too if anyone is ever interested.

Oooh.

Posted: Tue Jun 26, 2007 12:11 am
by CommanderSpleen
Wow, nice work! I didn't know anyone managed to get the source code. When did that happen?

By the way, I just saved you 20 seconds of next weekend:
UPXed Binaries (108kb): ckpatch-0.9.0-ext-bin-upx.zip

(Haha, they're actually marginally smaller when unzipped...)

Posted: Tue Jun 26, 2007 3:21 am
by levellass
Now *that* is spooky!

Re: Oooh.

Posted: Tue Jun 26, 2007 12:42 pm
by Shadow Master
CommanderSpleen wrote:Wow, nice work! I didn't know anyone managed to get the source code. When did that happen?

By the way, I just saved you 20 seconds of next weekend:
UPXed Binaries (108kb): ckpatch-0.9.0-ext-bin-upx.zip

(Haha, they're actually marginally smaller when unzipped...)
Thanks for that. :P What are you talking about? I found the source code hidden somewhere at dosclassics.com, and you can get it even easier now that Andy has tidied up stuff in keenmodding:

http://files.keenmodding.org/ckpatch090src.zip

It was released under the GNU GPL, btw.

Posted: Tue Jun 26, 2007 1:16 pm
by CommanderSpleen
I recall a time when there was some trouble acquiring the source to CKPatch and/or contacting AdmiralBob. *shrugs*

I wasn't aware of that files subdomain... I guess I don't pay enough attention around here sometimes.

Posted: Tue Jun 26, 2007 2:08 pm
by Shadow Master
CommanderSpleen wrote:I wasn't aware of that files subdomain... I guess I don't pay enough attention around here sometimes.
That because Andy hasn't published anything about it yet... I found it because he gave me a link to tedsetup source code which pointed there.

Posted: Tue Jun 26, 2007 9:06 pm
by adurdin
First: great work, Shadow Master, on extending CKPatch.
Shadow Master wrote:
CommanderSpleen wrote:I wasn't aware of that files subdomain... I guess I don't pay enough attention around here sometimes.
That because Andy hasn't published anything about it yet... I found it because he gave me a link to tedsetup source code which pointed there.
Way back in the dark ages, there used to be a whole lot of files (mostly the same lot, in fact) at http://files.keenmodding.org/... -- they've now been moved to files.keenmodding.org (with a redirect) so that old links still work. Oh, and http://files.keenmodding.org/ supports directory browsing so you can see what's there.

Posted: Fri Mar 11, 2011 8:48 pm
by NY00123
So, I've got a "little" reason to bump this thread after almost 4 years, and, apparently, the whole "CKPatch" forum after more than a whole year :o

I've done very(!) basic changes for Bio Menace support in the extended version of CKPatch. It should now accept BMENACE1.EXE as coming with the Shareware release, version 1.1. Furthermore, all supported executables should be patchable when they're LZEXE'd (at least as originally released by Apogee Software / 3D Realms).

To summarize, the supported Bio Menace executables should now be:
- Bio Menace 1, Freeware and Shareware releases, v1.1.
- Bio Menace 2 and 3, Freeware release, v1.1.
- LZEXE'd compressed forms (at least the original releases) as well as uncompressed forms.

Thanks to Mink for uploading the files! Here are links to updated binaries and sources:
Binaries: http://files.commanderkeen.org/users/mi ... t2-bin.zip
Sources: http://files.commanderkeen.org/users/mi ... t2-src.zip

Thanks to anybody involved in the work into CKPatch so far, from Admiral Bob with CKPatch, Shadow Master with the additions and others I may have forgotten and/or not aware of. (Sorry in that case!!)
Have fun with applying patches!

Posted: Mon Mar 14, 2011 3:50 am
by levellass
So let me get this straight; we now have support for..

Keen 1-3 v1.1 and 1.31 compressed and decompressed
Keen 4-6 v 1.4 compressed and decompressed
Keen Dreams v1.13
Biomenace 1-3 and shareware, compressed and decompressed
Dangerous Dave 2 compressed and decompressed
Dangerous Dave 3 compressed and decompressed
Shadow Knights compressed and decompressed


Yes?

Also, how's the %egahead and %tileinfo stuff? I notice these executables are smaller than the last release.

Posted: Mon Mar 14, 2011 8:00 am
by NY00123
Unfortunately, I haven't added any more than the following: The ability to patch BM1 as coming with the shareware release (v1.1), and support for compressed Bio Menace executables (at least as originally distributed by Apogee/3DR).
In the case of BM1, you can tell BM1PATCH to apply patches for a specific version using the %version command: 1.1 for the freeware release (as before) and 1.1s for the shareware release.

And yes, to the ones who wonder, the BMENACE1.EXE file as coming with the freeware release isn't identical to the shareware one, even when we limit ourselves to version(s) 1.1.

I haven't touched any other game. The executables are probably smaller because they've been packed with UPX.

Now I don't know about %tileinfo and haven't really used it. As for %egahead, though, I've seen that Bio Menace comes with its own EGAHEAD files. Could it be that these files don't need to be patched at all, just like how one doesn't need to apply any patch in order to play user-made levels in BM?

Posted: Tue Mar 15, 2011 4:57 am
by levellass
They don't indeed. Biomenace uses external files for everything.

I was wondering though, since there has been another release recently, allowing KDPatch to use relative words\long and doing the same for other game patchers. I am not sure you based this update on that release or an older one.

Posted: Tue Mar 15, 2011 7:40 am
by NY00123
For reasons of simplicity, I based the little update on the extended CKPatch, v0.9.0, as originally modified by Shadow Master long ago.
Does the version with Keen Dreams support also has the support for Bio Menace? If yes then I've missed it, indeed.
Now when I think about it, it could be useful to have a *generic* patcher for "other games" - practically working with any game of any version, if it's not yet supported. I do realize the issues one may encounter with it (upon patching the wrong version or game), though...

Posted: Tue Mar 15, 2011 12:10 pm
by Malvineous
I've got plans to eventually extend CKPatch into a universal patcher one day, once Camoto is at the stage where you can use it to edit more than one game. Probably the easiest way to avoid patching the wrong version is to make it print a CRC of the .exe file which you then stick into your %version command, then it will only patch .exe files that match the same CRC.

Of course that would allow people to release mods against obscure versions of games, so it might be nice to preload some common ones as well/instead to encourage modders to use common versions of games!

Also to your post above, one big reason why the freeware and shareware versions of BM are different is because the freeware release has the cheat codes re-enabled :-)

Posted: Fri Apr 15, 2011 8:52 pm
by Mink
BMPatch (and every other -Patch) can now do relative patches, just like CKPatch!

http://www.0x27.com/downloads/ckpatch-0.11.0.zip

Note that this doesn't yet incorporate NY's improvements - I'll be adding those in a little while (Yeah, I know it would involve close to zero actual work on my part, just like this) but figured it would be best to post this now given NY's great patching efforts on the Modding Wiki.

[Also note that this is an unofficial extension of an unofficial extension. ;-p]

edit: In the quickest update ever, NY's changes are in! Download updated.