fraggle
Super Moderator

Posts: 6568
Registered: 07-00 |
It's something I have thought about in the past. GhostlyDeath hacked together a DOS port a while back, but never released it publicly, and from what little I know, he did it by stubbing out the SDL API as a wrapper around Allegro, which is completely the wrong approach to take. You can see for example that at the end of the video, when the ENDOOM screen pops up it's using libtextscreen's half size font - ie. it's actually emulating a DOS text screen under DOS!
Doing a proper DOS port ought to be fairly straightforward and a fun project for anyone who's interested. In terms of the main code, to get a basic port running you need to implement DOS equivalents of i_video.c, i_timer.c and i_swap.h. None of these are hugely difficult to implement (I even have some old bits of code that I wrote a long time ago that show how to do DOS VGA/timer/mouse stuff). With a little bit of effort you'll get a working port without any sound.
Chocolate Doom has several "mini libraries" that emulate DOS hardware - textscreen (the emulated text-mode display), pcsound (emulated PC speaker) and opl (emulated OPL/Adlib card). Each of these basically needs a single file added for DOS support, and because you already have the DOS hardware available to you, they should be trivial thin wrappers.
Do all this and you'll get you music but no digital sound effects, so you'd have to write some SoundBlaster interface code and probably a mixer to get something "complete". That's probably the most difficult part, in fact. After that it's a polishing job of implementing other less important things: joystick support, networking, other sound devices, etc.
If you're lazy you could use Allegro to do some of these things, but having used Allegro in the distant past, my general opinion is that it's probably more trouble than it's worth.
|