Hi, quick reply here while feeling sleepy:
I used to work a long time ago on porting games for a well-known game company (20 years back).
I've downloaded and checked the source code and files you mentioned.
This isn't a modified or cloned Doom engine; it's entirely built from scratch, not compatible with or based on Doom clones.
In the pack I downloaded from
https://www.dosgamesarchive.com/file/kaos/kaos:
info.doc has detailed info, all in Italian, spanning 10 pages; I haven't translated it all yet.
Documentazione/ contains 3 folders:
Grafica/
LBM files are Deluxe Paint files, an old MS DOS tool. I managed to view them using
IrfanView with the right plugin; perhaps GIMP can handle them too. You likely won't need to edit them since the data is already generated and packed. Editing might be needed only if you plan to create new content or follow the path I describe later. You can get more info about LBM files here:
https://moddingwiki.shikadi.net/wiki/LBM_Format
Suoni/
WAV files can be edited with Audacity; these are the game's sounds.
Testi/
Appears to be documentation about development, all in Italian. Try using DeepL to translate it. There are many .nic files that seem to be plain text; .nic might stand for Nicosoyt (Valentini Domenico), but they're text files.
Source code is in C++; it seems they used Borland Turbo C++ (check the .PRJ files).
I did a quick check; it seems to use fast fixed math in
fixed.c with assembler (not ideal for porting to modern systems; you'd need to recreate the math, but it's not hard as ASM is ancient art now). They also use their own memory allocation routines, also in assembler in
fastmem.cpp, which should be replaced with modern routines for your port to work on Windows.
As a quick example (might not be entirely accurate; I'm quite sleepy):
In
fastmem.cpp,
Code: Select all
void fmove(void far *dest, void far *sorg, word bytes) {
asm {
LDS SI, sorg
LES DI, dest
MOV CX, bytes
CLD
REP MOVSB
// !!! SS==DS !!!
MOV BX, SS
MOV DS, BX
}
}
could be replaced with modern C++ (the standard has changed many times over the years):
Code: Select all
#include <cstring> // memcpy
void fmove(void* dest, void* sorg, unsigned int bytes) {
std::memcpy(dest, sorg, bytes);
}
Unfortunately, the code has a lot of assembler in many places; it'll be challenging to port to modern systems easily, but not impossible.
kaos.cpp is the main entry point, also quite large and could be split into smaller files.
You have several options:
1. You could attempt to use the Allegro game library and a GCC compiler to port it; your new engine would then run on Linux and Windows, replacing all hardware and assembler calls with Allegro calls. For instance, in lgraph.cpp and vgatool3.cpp, you'd call Allegro routines instead of assembler routines to set up the screen, etc. It's a significant task, basically rewriting this particular engine, but like eating an elephant, piece by piece.
2. Extract the sounds, assets like sprites, etc. (LBM and WAV files), check the maps in the included editor, and
recreate maps, enemies, weapons in a modern Doom engine already ported to Windows. This wouldn't replicate the original game exactly but would be easier--a recreation rather than a direct port (this approach is common in the industry). You'd reuse an engine and focus on recreating enemies, weapons, maps, sounds, as a homage.
3. Simply bundle the game with DOSBOX and call it a day--some old games on Steam are sold this way. The original companies repackage them with DOSBOX to make a quick buck.
4. Just enjoy it on DOSBOX and be done with it.
Some .doc files mention DirectX and Direct3D; it seems they had a Windows version or were considering it--all in Italian, which I can't read. Check the doc and rtf files in Documentazione/Testi, like
Kaos72.rtf.
Have fun! English isn't my native language, by the way.