Weird impy thing
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Has anyone tried porting Chocolate-Doom to DOS?
 
Author
All times are GMT. The time now is 13:13. Post New Thread    Post A Reply
printz
CRAZY DUMB ZEALOT


Posts: 8812
Registered: 06-06


Since there's no source code for Doom.exe, has anyone tried to port Chocolate-Doom back to the limits of DOS mode? Too bad the sound library would still have to be emulated.

Reason I ask? To have the source code to a vanilla Doom engine that can be run in DOSBox. The idea sounds odd, but it's all about the portability, so that if someone makes their own Chocolate-Doom fork, they would simply produce one DOS binary, capable of being executed on any platform that can run DOSBox.

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 08-14-12 21:20 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
exp(x)


Posts: 2595
Registered: 04-04


Chocolate Doom should be just as portable as DOSBox.

Old Post 08-14-12 21:21 #
exp(x) is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8812
Registered: 06-06


Don't you still need to release a binary specific for each platform?

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 08-14-12 21:29 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Xtife
Member


Posts: 422
Registered: 04-05


I think you're missing the point of chocolate doom

Old Post 08-14-12 21:30 #
Xtife is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11037
Registered: 07-07



printz said:
it's all about the portability, so that if someone makes their own Chocolate-Doom fork

Don't fork Choco, then. Fork Mocha.

That way, you'll produce only one single "binary", that can be run on any platform that can run a JVM.

Old Post 08-14-12 21:31 #
Gez is online now Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
exp(x)


Posts: 2595
Registered: 04-04



printz said:
Don't you still need to release a binary specific for each platform?

Yes, but using a crippled DOS binary in DOSBox seems exceedingly lazy.

Old Post 08-14-12 21:32 #
exp(x) is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 12365
Registered: 07-06



Gez said:
That way, you'll produce only one single "binary", that can be run on any platform that can run a JVM.


...and even for that one, I needed to code in some hacks to handle the differences between the unequal handling of AWT/Swing/mouse/Java2D/sound between platforms, or provide alternatives (in particular for sound) so that eventually one that works might be picked, even if not ideal.

Only the "core" functionality (everything not directly related to the video/audio/user input) is guaranteed to be portable across compliant JVMs. Luckily, this includes practically all gameplay code and multithreading/HiColor hacks. However, in order for it to e.g. work with Android, Swing components must be swapped for Views.

For a hypothetical DOS JVM, it would depend on how AWT/Swing/Java2D/Java Sound would be implemented.

Last edited by Maes on 08-14-12 at 21:48

Old Post 08-14-12 21:41 #
Maes is online now Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8812
Registered: 06-06



Gez said:

Don't fork Choco, then. Fork Mocha.

That's a good point. It would also help beta test Maes' project.

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 08-14-12 21:42 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
_bruce_
Senior Member


Posts: 1285
Registered: 11-07



Xtife said:
I think you're missing the point of chocolate doom


x2

Old Post 08-14-12 22:15 #
_bruce_ is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
chungy
Senior Member


Posts: 1833
Registered: 06-05



printz said:
Don't you still need to release a binary specific for each platform?

Don't you still need to release a binary specific for each platform, for DOSBox?

Moving what's being ported (DOSBox or Chocolate Doom) seems like a stupid idea. Plus, no, unless fraggle changed things since last I checked, Chocolate Doom only comes in three flavors: Windows binary, Mac OS X binary, source code. Linux distributions sometimes make their own precompiled Chocolate Doom binaries, but there is a very large overlap between people wanting to use Chocolate Doom and people capable of compiling it themselves.

Old Post 08-15-12 01:52 #
chungy is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
CODOR
Forum Regular


Posts: 836
Registered: 02-06


I've thought about this before, as one of those "because it was there" sorts of things. Sound would definitely be the hardest part, although starting with SB16 would support many legacy systems as well as DOSBox.

HX DOS Extender might be something to try with the existing Win32 binaries. I remember being unable to get other GUI applications working (can't remember what they were or if any used SDL), but that was several years ago...

Old Post 08-15-12 02:15 #
CODOR is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
MP2E
Junior Member


Posts: 157
Registered: 09-07


I'm not understanding the advantages here.

Cross platform support off of one binary sure, but dosbox still requires a different binary per platform. Also you can currently do this with good old doom2.exe. The novelty of having a full source replica of the vanilla doom source would be cool, but that's just it. It wouldn't be a replica. The sound system would need to be rewritten so that would be different, and chocolate doom is only 99.9% accurate to doom2.exe. The other .1% could perhaps be emulated because AFAIK most of them involve DOS trashing memory with direct writes to ram.. but it would be quite tedious and platform specific to a binary that you could only run in an emulator.

It'd just make the source harder to use and be a huge pain for something that seems to only be reinventing the wheel. Perhaps efforts would be better suited to more ports of chocolate doom?(I'm assuming you must run dosbox on a platform that isn't a PC operating system)

Old Post 08-15-12 03:28 #
MP2E is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Archy
Forum Regular


Posts: 672
Registered: 11-09



printz said:
Has anyone tried porting Chocolate-Doom to DOS?

Yes.

Old Post 08-15-12 04:58 #
Archy is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8812
Registered: 06-06



chungy said:
Chocolate Doom only comes in three flavors: Windows binary, Mac OS X binary, source code.
Let's be clear here: does Chocolate Doom's codebase allow me to change it ONCE, and there are automated processes to compile the Windows binary and the OS X binary (at least from user's endpoint)? I don't want to need to have two computers available.

__________________
Automatic Wolfenstein - Version 1.0 - also on Android

Old Post 08-15-12 09:23 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
fraggle
Filled with the code of Doom


Posts: 7510
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.

Old Post 08-15-12 10:07 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 12365
Registered: 07-06


And after doing all of that, try making the broken Alpha v0.4 HiColor mode working properly in DOS with VESA ;-)

Old Post 08-15-12 18:19 #
Maes is online now Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 5991
Registered: 08-00


BTW, a large amount of the original DOS code is available in Heretic and Hexen (now GPL), which would offer some ideas on how to do a few things that vanilla did.

Unfortunately that doesn't include DOOM's original video code, since Raven rewrote it in Heretic. Seeing how that was done requires reverse engineering (it is very standard "Mode Y" though - VGA is divided into four virtual screens, which are made the active screen buffer in a round-robin fashion - the screens are not linear, so the write pattern is planar in I_FinishUpdate).

Old Post 08-15-12 20:15 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 13:13. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Has anyone tried porting Chocolate-Doom to DOS?

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.