CKPatch extended for other games: Released!

CKPatch is a set of patching tools for all Keen episodes.
User avatar
Shadow Master
Posts: 129
Joined: Fri Oct 20, 2006 3:14 pm
Location: Santiago, Chile
Contact:

CKPatch extended for other games: Released!

Post 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
Last edited by Shadow Master on Mon Jun 25, 2007 5:54 pm, edited 2 times in total.
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post 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.
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Oooh.

Post 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...)
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Now *that* is spooky!
User avatar
Shadow Master
Posts: 129
Joined: Fri Oct 20, 2006 3:14 pm
Location: Santiago, Chile
Contact:

Re: Oooh.

Post 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.
User avatar
CommanderSpleen
Posts: 1017
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Post 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.
User avatar
Shadow Master
Posts: 129
Joined: Fri Oct 20, 2006 3:14 pm
Location: Santiago, Chile
Contact:

Post 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.
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post 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.
NY00123
Posts: 85
Joined: Thu Sep 24, 2009 8:03 am

Post 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!
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post 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.
NY00123
Posts: 85
Joined: Thu Sep 24, 2009 8:03 am

Post 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?
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post 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.
NY00123
Posts: 85
Joined: Thu Sep 24, 2009 8:03 am

Post 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...
User avatar
Malvineous
Posts: 113
Joined: Sat Mar 13, 2004 12:54 am
Location: Brisbane, Australia
Contact:

Post 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 :-)
Mink
Posts: 192
Joined: Sat Nov 03, 2007 4:08 pm
Location: Providence, RI, US

Post 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.
Post Reply