Commander Keen in ... "Keen Meets the Meats"

You can discuss anything about fan-made Commander Keen games here.
User avatar
szemi
Vorticon Elite
Posts: 1637
Joined: Sun Jan 11, 2009 15:19
Location: Hungary
Contact:

Post by szemi » Fri Dec 05, 2014 19:13

Will something happen? I mean fixing the game crash problem.
Yeah, piece of cake!

User avatar
Fleexy
Tool Smith
Posts: 1370
Joined: Fri Dec 12, 2008 1:21
Location: Abiathar C&C
Contact:

Post by Fleexy » Fri Dec 05, 2014 20:05

Not if nobody does anything about it. I think the answer may lie in the source code. Once a fix can be made in the source, it could be easily translated to patching. Or, better, all of the mod's patches could be integrated into the source code, creating a single modified executable file for distribution.

User avatar
Levellass
S-Triazine
Posts: 5261
Joined: Tue Sep 23, 2008 6:40

Post by Levellass » Sat Dec 06, 2014 3:19

Indeed and I thought it was a simple matter to tweak a variable and compile the code but apparently it's akin to getting fire from the gods.
What you really need, not what you think you ought to want.

NY00123
Vorticon Elite
Posts: 455
Joined: Sun Sep 06, 2009 19:36

Post by NY00123 » Sat Dec 06, 2014 8:41

Not sure if this should go in the Keen Dreams source code release thread or here (or both), guess it'll be here for now...
Levellass wrote:Indeed and I thought it was a simple matter to tweak a variable and compile the code but apparently it's akin to getting fire from the gods.

Well, I guess it's just a bit more involved. It basically goes like this:

- Have a Keen Dreams source tree ready (if you want a version other than 1.93 then you should pick the correct GIT branch/revision).
- Edit MAXBLOCKS in id_mm.h as suggested by Multimania in the source release topic mentioned above.
- I'm not sure it's necessary, but kd_main:InitGame has a memory check. Maybe you want to increase the required memory here (this is not checked in CGA builds, though).
- Start DOSBox with a ready Borland C++ 2.0 (or compatible) installation, having the Keen Dreams source tree mounted somewhere. Note that a "Turbo C++" installation may fail in this process, so it's really better to get Borland C++.
- Enter "static" directory and type "make.bat" (requires Borland C++). This should prepare a few resource object files (like EGAHEAD.KDR -> ..\KDREHEAD.OBJ) for linking.
- Finally go pack to the source tree's root, type "BC" (the PATH environment variable should be adjusted so it includes the Borland C++ BIN directory), load and build the project. You may need to adjust the INCLUDE and LIB dirs in the project settings. Once you get the EXE you can optionally pack it with LZEXE91 if you wish.
- If you want (or need) to, you can further build LOADSCN.EXE from the "lscn" subdirectory (I think it's unused in non-shareware releases).

User avatar
DoomJedi
Vorticon Elite
Posts: 720
Joined: Mon Dec 14, 2009 11:22
Location: Israel

Post by DoomJedi » Sat Dec 06, 2014 19:00

VikingBoyBilly wrote:You're still not looking at my PM.
I've seen it, just didn't know what to answer, not being that much involved in the project lately beside checking latest tilesets and art of DropBox updates.

User avatar
VikingBoyBilly
Vorticon Elite
Posts: 4155
Joined: Sat Jan 05, 2008 2:06
Location: The spaghetti island of the faces of dinosaur world for a vacation

Post by VikingBoyBilly » Sat Dec 06, 2014 22:12

DoomJedi wrote:
VikingBoyBilly wrote:You're still not looking at my PM.
I've seen it, just didn't know what to answer, not being that much involved in the project lately beside checking latest tilesets and art of DropBox updates.
So it's basically been left at the mercy of Szemi?
Image
"I don't trust players. Not one bit." - Levellass

User avatar
Levellass
S-Triazine
Posts: 5261
Joined: Tue Sep 23, 2008 6:40

Post by Levellass » Sun Dec 07, 2014 0:48

And in the ever increasing ire of me.
What you really need, not what you think you ought to want.

User avatar
szemi
Vorticon Elite
Posts: 1637
Joined: Sun Jan 11, 2009 15:19
Location: Hungary
Contact:

Post by szemi » Sun Dec 07, 2014 21:41

Levellass wrote:And in the ever increasing ire of me.
Same here.
Yeah, piece of cake!

NY00123
Vorticon Elite
Posts: 455
Joined: Sun Sep 06, 2009 19:36

Post by NY00123 » Mon Dec 22, 2014 19:16

Wait, has anybody tried going through the steps I've given above? Maybe it's even possible to patch something into an original EXE later once a new EXE with the above modification is built, although it should theoretically result in a larger (decompressed) EXE image.

Furthermore, the Borland IDE/linker should spit out a KDREAMS.MAP file with the exact locations of functions and variables in the EXE image (as seg:off addresses). If it doesn't, or there aren't a lot of these details, it may be configurable from the IDE itself.

Finally, it's just an idea, but maybe you can patch into Keen Dreams some ID_MM code from Keen 4-6 or Catacomb 3-D? If it's better (and doesn't require much more space) then it may be a possible path.

If, however, it's just the game code not having enough, say, uncaching calls, that's a different story.

User avatar
Levellass
S-Triazine
Posts: 5261
Joined: Tue Sep 23, 2008 6:40

Post by Levellass » Wed Dec 24, 2014 2:08

As far as I know nobody's tried your method. I don't even know where to begin.

We're not using the DICTS so these can be overwritten, resulting in an equal size EXE image. Not entirely sure what the problem is but it seems to relate to iffy and poorly optimized caching causing a shortfall when one shouldn't happen.
What you really need, not what you think you ought to want.

NY00123
Vorticon Elite
Posts: 455
Joined: Sun Sep 06, 2009 19:36

Post by NY00123 » Wed Dec 24, 2014 19:16

Well, you should first clone the Keen Dreams source code(s) repository with git, then change to a specific branch or commit in order to get sources and static data for a specific version (the "git log --all" command should let you see a list of the commits from the multiple branches). Apparently GitHub also lets you download the contents of a specific branch/commit from a repository like this as a ZIP file.

Then you should get a ready Borland C++ setup for DOS. I tried Borland C++ 2.0, which is also what was originally used, but the README says 3.1 can also build these. As said before you'll need to call MAKE.BAT. I should've clarified that the Borland tools should already be in the PATH at this point.

What follows is a matter of fiddling with the files and the IDE.

User avatar
Levellass
S-Triazine
Posts: 5261
Joined: Tue Sep 23, 2008 6:40

Post by Levellass » Fri Dec 26, 2014 1:29

I know those words, most of them, but somehow the more I stare at them the less they make sense.
What you really need, not what you think you ought to want.

User avatar
szemi
Vorticon Elite
Posts: 1637
Joined: Sun Jan 11, 2009 15:19
Location: Hungary
Contact:

Post by szemi » Mon Dec 29, 2014 12:51

Will something happen with this mod?
Yeah, piece of cake!

User avatar
Fleexy
Tool Smith
Posts: 1370
Joined: Fri Dec 12, 2008 1:21
Location: Abiathar C&C
Contact:

Post by Fleexy » Mon Dec 29, 2014 16:28

Fleexy wrote:Not if nobody does anything about it.

User avatar
VikingBoyBilly
Vorticon Elite
Posts: 4155
Joined: Sat Jan 05, 2008 2:06
Location: The spaghetti island of the faces of dinosaur world for a vacation

Post by VikingBoyBilly » Mon Dec 29, 2014 20:41

Just nobody continue doing anything about it until I feel arsed to complete the beefburgarian and lambchopper sprites the right way, complete with shurikens and what have you.
Image
"I don't trust players. Not one bit." - Levellass

Post Reply