The CK Guy's Keen 5 Level Pack

Request patches for Keens 4-6.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Hehe.. :)
Can't wait -- by the way, are you using those patches to modify pogo in this release?
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

Post by ckguy »

I don't know, it didn't seem to work - when I dis-assembled the .exe, it wasn't a conditional jump command at that point ($eb = unconditional jump, which is what it was being patched to). Maybe it was for keen 5 version 1.0 (which I don't have on me) so I don't know if that was the problem. Yes, I also checked at offset $8d7d (or whatever it was) from the begining in the UNLZEXE'd exe, and it wasn't a conditional jump there, either.

So, I guess I'll want to get my hands on the version 1.4 --> version 1.0 patcher to check that out.

Oh, while I was trying some different patches around that offset in the exe, I came across this, which seems to turn off all the shooting gun things:

%patch $8d92 $eb

Interesting, but not what I was looking for. There are lots of CMPs and conditional jumps in that part of the code, I wonder what the other ones are for ... ?
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Hmmm, that pretty interesting!
xtraverse
Patch Crafter
Posts: 290
Joined: Tue Sep 02, 2003 6:42 pm
Location: Easter Island
Contact:

...

Post by xtraverse »

You should keep all releases to the version 1.4 EXE.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Hmmm, I don't think Dan makes patches for 1.0. So, it probably just isn't right, as he said that he hasn't tried and so on. Edit: Or maybe there's typo somewhere?
theoddone33
Posts: 5
Joined: Thu Sep 23, 2004 5:14 am

Post by theoddone33 »

I just checked, I have 1.4...

Edit: Just some more info, to translate the hex number I gave to the actual address in the executable you should add 0x2c00 (not 0x2e00 like Keen 4). Maybe this will help you find the correct address, but I can also give you a string of bytes if that will help you find it

...

Ok here goes. The offset in the unlzexe'd executable is 0xB97D. Subtract 0x2C00 like I said and you get 0x8D7D. Here's what I have, starting a little earlier, just so you can find the right bytes:

Code: Select all

0000B974  EB1D              jmp short 0xb993
0000B976  EB1B              jmp short 0xb993
0000B978  833E6C6F01        cmp word [0x6f6c],byte +0x1
0000B97D  750B              jnz 0xb98a  ; This is the jmp to change!! 0x75 to 0xEB
0000B97F  56                push si
Those jmp shorts should help you find it... two in a row like that don't happen often. You might make a guess that 0x6f6c is the spot that stores the difficulty level. You'd be correct.

Hope that helps.

Alright one more edit. Search for the EB 1D EB 1B string of bytes. Even if the offsets are different in our executables for some reason, that will still be the same. That string of bytes only occurs twice in the whole thing, so it should be pretty easy to find. Just find the correct offset in your .exe, subtract 0x2C00, and that's your patch.

I don't know what happened to my exe. When I backed up the 3drealms download-purchase thing I didn't back up the real executable, just my unlzexe'd copy. It says 1.4 in it, but something odd may have happened. As a result all the offsets may be different, it's hard to say.
User avatar
adurdin
Site Founder
Posts: 549
Joined: Fri Aug 29, 2003 11:27 pm
Location: Edinburgh, Scotland
Contact:

Post by adurdin »

Hey Dan -- the CKxPatch utils use an offset relative to the .exe memory image, while a hex editor obviously has offsets relative to the start of the .exe file. The size of the exe header & relocation tables is the difference; I use UNP (http://andy.durdin.net/unp.exe) with the "i" parameter to tell me the size of the header.
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

Post by ckguy »

Ha! Maybe you're using version 1.4 BY GOODTIMES SOFTWARE! Does it say something about goodtimes software on the startup screen for your version?

I just searched for EB 1D EB 1B in version 1.0 unpacked with UNP (don't have version 1.4 with me at the moment), but couldn't find it ...

[edit:] Yup! I found that whole series of bytes in keen5 v1.4 by goodtimes software! I was able to find this...

eb 3a
eb 38
83 3e 6c 6f 01
75 0b

...in the version 1.4 *not by goodtimes software* code. The difference in the bytes is probably because the distance is different. Now, I just need to test it ...

[edit]: third edit (edit above was re-editting first edit) - success!!!!!! whew ... next, I'll figure out the *exact* CK5PATCH code...

[edit:] okay, here it is

%patch $5808 $eb

This is for keen 5 version 1.4 NOT by Goodtimes Software. If this doesn't work, search for the bytes above, and change $75 to $EB. I'm pretty sure *that* is right ...
theoddone33
Posts: 5
Joined: Thu Sep 23, 2004 5:14 am

Post by theoddone33 »

Glad that you found it.

There's no mention of GOODTIMES anything on my startup screen. I think I got ripped off, either way. My Keen 5 executable doesn't run in Dosbox. :(
Admiral_Bob
Posts: 7
Joined: Thu Mar 25, 2004 5:58 pm
Location: Melbourne, Australia

Post by Admiral_Bob »

adurdin wrote:Hey Dan -- the CKxPatch utils use an offset relative to the .exe memory image, while a hex editor obviously has offsets relative to the start of the .exe file. The size of the exe header & relocation tables is the difference; I use UNP (http://andy.durdin.net/unp.exe) with the "i" parameter to tell me the size of the header.
Don't forget that you can also get CKPatch to produce a dump of just the image part of the .EXE, sans header; the offsets in the resulting keenx.img file will then be exactly the same as what CKPatch wants.

Code: Select all

%ext ck5
%dump keen5.img
%abort
%end
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

Post by ckguy »

The %dump thing is what I do ...

Anyway, AAARRRRGGGGHHHHH! I think I'm going insane, I went home, and tried that patch there. The offset I gave is wrong, and when I searched for the bytes and changed it, it *still* didn't work ...
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

Post by ckguy »

Alright, I guess I'm just not gonna use that patch ... but release four is nearl done - I'm on the doc-writing stage now ... Hopefully no problems show up - keep your fingers crossed!!
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

Post by ckguy »

YAHOO! Release four of my level pack (which I have re-named Keen 5.5) has been officially been completed for 30 hours. It has only been uploaded now (didn't have Internet access). Tell me what you guys think!!!!

[edit:] Whoops, get it from the downloads section of my website.

[edit again:] I emailed Andy, KeenRush, and Xtraverse asking them if they could upload the level pack, so if you want you could wait and download it from one of them instead of from my insanely slow host. No, I won't be emailing it to anyone else.

[admin edit:] Download it here!
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Yes, phinally some cool to play! :) I'll try soon.

And about hosting -- I add it to Grid when I sometime get the level section finished.
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

Post by ckguy »

KeenRush - PATCH NOW!!!!! I want some feedback ...
Post Reply