PDA

View Full Version : Compiling Duke3D in Watcom


MusicallyInspired
03-25-2009, 04:39 PM
When I try it lists a whole slew of warnings (which I guess don't really matter) but then ends saying that one of the object files returned a bad status. So far it's either been actors.obj or game.obj that returns a bad status. What does that mean anyway? I'm using Open Watcom in Win95 on my 486 like the source readme says to use. I've also tried using wmake to compile the makefile in DOS. Same result.

EDIT: Just realized I have version 1.8 of Open Watcom and not version 1.0 which is probably the problem from what I've been reading. Does anyone have a link to version 1.0? I've been googling but found nothing yet.

MusicallyInspired
03-25-2009, 08:19 PM
Ok. I've finally located Open Watcom 1.0 and I've successfully compiled a DOS executable. Only problem is when it starts up it says that it's "Duke Nukem 3D V1.4 Atomic Edition" at the top. Why does it say 1.4? Also, randomly it crashes.

hightreason
03-25-2009, 08:58 PM
Hmm, i heard of a similar issue in SWP where it was detecting shareware as full. Presumably it would crash because of the version mismatch. I dont think it would work well with the 1.3 .grp either. Difference between 1.4 and 1.5 was mostly down to the .exe file, i never tried compiling the original source code so i dont know it it's a problem in that.

EDIT:

Ah, had game.c open on my machine (working on something myself right now)
Looks like it is just told that it's that version, and i dont think changing it would make much difference.
The only 1.5 specific thing i seem to be able to find seems (at a glance) to be demo-related, if it's crashing on the demo, try deleting the demo files.

I know it can't be the .con files, they are the same in both 1.4 and 1.5. Also noticed an interesting line that refers to a 1.4 beta.

Also where did you find Open Watcom 1.0?

MusicallyInspired
03-26-2009, 09:21 AM
So this isn't fixable at all? I thought this was supposed to be 1.5's source, as it says in the readme. It's not the demos as they just don't play. It crashes just a couple seconds after starting a new game. I did remove the copy protection from the source, though. Could that be it?

I found Open Watcom 1.0 along with all the versions (including Watcom 11.0c) in the Open Watcom website's ftp in the archive folder. I'm on my Wii right now so I can't give the exact link.

hightreason
03-26-2009, 12:03 PM
it could be down to removing that, all you need to do to bypas copy protection is open a text editor (if you are in DOS, EDIT will do the job) and type the directory of duke 3d in there (like C:\DUKE3D\) and save it in the duke 3d directory as CDROM.INI - at least, that worked on my IBM (which doesnt have a CD drive in it)

MusicallyInspired
03-27-2009, 06:09 PM
I tried the CDROM.INI thing but it didn't work. It just sends me back to the DOS prompt. So I tried copying the 400+Mb DUKE3D.IDF file that CDROM.INI normally points to and that didn't work either.

I also tried compiling the source just straight without altering anything and it still says V1.4 Atomic Edition and it still crashes a few seconds after moving around in a new game.

supergoofy
03-27-2009, 06:26 PM
why you don't want to the original duke3d.exe

you can also replace DOS4GW with DOS/32 Advanced
http://dos32a.narechk.net/index_en.html
http://www.dosbox.com/wiki/TOOLS:DOS32A
http://www.rollypolly.net/index.php/DOS/32#Replace_DOS4GW_with_DOS32A
http://dos32a.narechk.net/manual/html/user/3.htm
http://vogons.zetafleet.com/viewtopic.php?t=6260

And to replace DOS4GW within the exe:
SB /R /BNduke3d.new duke3d.exe

I haven't tried it. Read the pages I pointed you for more info

MusicallyInspired
03-27-2009, 06:43 PM
I just want to successfully compile a Duke3d.exe straight from the source as I'd like to mess around with it and change some things.

TerminX
03-28-2009, 04:23 AM
Try it with Watcom C/C++ 10.6 or 11.0...

MusicallyInspired
03-28-2009, 08:59 AM
It compiles fine without any errors. It's just that when I run the game it says V1.4 - Atomic Edition. Would using 11.0c fix something like that? I have that too...

supergoofy
03-28-2009, 09:38 AM
Question: Does the compiled exe load the dos extender DOS4GW? Maybe the source is not 100% complete, because of copyright issues with the dos extender, sound or other libraries that were used. Thus, the part for the dos extender is removed? Also what sound libraries were used?

I don't have a dos machine. Now you are making me wanted to install DOS in VMware or VirtualPC. But I'm very very bored, plus it's been 10+ years since the last time I used dos.

TerminX
03-28-2009, 12:36 PM
It compiles fine without any errors. It's just that when I run the game it says V1.4 - Atomic Edition. Would using 11.0c fix something like that? I have that too...
Dude, who really gives a shit what version it says it is? The only issue here is the crashing.

MusicallyInspired
03-28-2009, 08:44 PM
Well I just thought it was crashing because it was saying it's V1.4. Someone mentioned earlier up in the thread that he heard of a similar issue with the game crashing because it thought it was the wrong version.

As far as DOS4GW.EXE goes, that could very well be. At first it didn't work at all and the game crashed on startup before ever seeing the Nuke animation. So I copied a DOS4GW.EXE file I had into the source directory and compiled it and it did say that it was incorporated into the compiling. But I copied DOS4GW.EXE to the Duke3d game directory anyway just in case and I'm where I'm at now. Is that not enough? What should I be doing with the DOS extender?

MusicallyInspired
03-29-2009, 01:07 PM
Ok, when I run duke3d with DOS32A, instead of just crashing and returning to the prompt it resets the whole computer. I also tried running the game and then quitting it without starting a new game and beneath the 3DR promotional screen it says:


nflicting DMA channel.
Make sure the 16-bit DMA channel is correct.

But the sound ran fine and detected fine in setup. I don't know why that shows up at all. Happens with DOS4GW as well.

TerminX
03-29-2009, 01:11 PM
Did you try using 10.6 or 11.0 yet?

Qbix
03-29-2009, 02:13 PM
if you want to have some more indication about the sound. Try running without sound to see if that solves it.

MusicallyInspired
03-29-2009, 02:48 PM
No, I havn't tried 11.0c yet. I have to install Watcom over a parrallel LPT connection with my WinXP machine and it takes forever. I can burn it on a CD, though, and install from there so I'll do that sometime soon.

In the meantime I'll try running without any sound and see what happens.

EDIT: Well, well, well! That solved the problem! I turned off the sound in the setup and now the game runs fine without crashing when I start a new game.

TerminX
03-29-2009, 05:06 PM
The sound might work properly if you build with the older version of the compiler... I know the DOS Duke source has a bunch of stuff that only exists as old object files (no source), so there might be benefits to building the rest of it with an equally old compiler.

MusicallyInspired
03-31-2009, 11:42 AM
Ok, I finally got around to installing Watcom 11.0c and compiling it but it didn't work. Same problem. Crashes when I start moving in a new game with the sound active.

Helixhorned
04-03-2009, 07:06 PM
Hm, I've compiled it successfully in OpenWatcom 1.0 (in Windows XP) and had no problems playing on a Pentium and a SB16 (played E2L1 and E2L2 with keyboard only, just as in the old days!). I used the DOS4GW from Ken's site (http://www.advsys.net/ken/utils.htm).
Have you tried to narrow down the cause? A few random suggestions would be:
- disabling only the music, or the sound
- compiling without optimizations (the /otexan switch in the makefile)
- running it under DOSBox with the emulated sound card set the same as your real one (if applicable)

MusicallyInspired
04-03-2009, 11:02 PM
A few random suggestions would be:
- disabling only the music, or the sound
- compiling without optimizations (the /otexan switch in the makefile)
- running it under DOSBox with the emulated sound card set the same as your real one (if applicable)

Well by golly! That did it! I compiled without optomizations (commented that line out in the makefile) and it compiled and I tried it and it runs just swimmingly with sound and music and everything! No crashing! Thank you very much!