Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Compilation Woes: A study in frustration. (Emulation)

posted by Rugxulo(R) Homepage, Usono, 27.03.2014, 15:47

> I'm trying my utmost to compile the MS-DOS version of Marat Fayzullin's
> ColEm 2.6 under DGJPP using pure DOS 6.22:

If you're impatient, see the far bottom of this post. I did get "something" to compile, but I have no idea if it really works. (I don't have a Colecovision machine, never tried any emulators, and I'm not sure of the legality in U.S. of getting the .ROMs without permission.)

> since I can't run the precompiled binary included in the distribution, due
> to its using the DOS/32A extender and the binary being compressed by
> DOS32A's SC.EXE executable compression program.
> So, I wanted to compile an unstubbed, *uncompressed* binary using GCC 4.73
> under DJGPP. The source is all portable C. Then, it could be stubbed with
> CWSDPMI or even DOS 4GW or PMODE/W. Anything but DOS32A!

Why can't you use the pre-existing binary? I blindly (but maybe incorrectly) assume the DOS port was tested to work correctly for whoever compiled it officially back in the day.

Maybe the real problem is your machine setup? Have you tried under DOSBox, DOSEMU, WinXP, etc.? Have you tried fiddling with your memory managers (i.e. no EMM386)? Have you tried other DOS clones (FreeDOS, EDR-DOS) or even other physical computers (old 486)? Try to isolate the problem.

> I can't even get MAKE to process the makefile, it errors out with an
> unrecognized redundency in the $OBJECTS part. I edited the makefile under
> the /colem/msdos directory, commented out the part where SC.EXE was invoked
> to compress the compiled DOS 32a COLEM.exe.
> I'm using GCC 4.73, bnu 2.24, make 3.79, and DJGPP 2.03 of course. I
> believe it also uses the Allergo library, which I've downloaded and
> compiled as well.

It's not really portable in the sense that any compiler or OS or Make is automatically supported. In fact, as has already been mentioned here, it's not able to compile with DJGPP for DOS (by default), only OpenWatcom. I don't see any references to Allegro at all, and it actually says "NMAKE" re: EMULib for MSDOS. I'm not sure if that means OpenWatcom's WMake in some compatibility mode or not. Even if target DOS is supported, that doesn't mean it automatically can be built under any host OS.

> I wrote the author, and he could not provide any help, and couldn't
> remember which version of GCC the DOS port was originally compiled under,
> and had moved on from DOS in 2010.

You're not wrong to ask DOS users here. But it seems more likely to get help from one of several others places. Presumably somebody would have to be experienced with either OpenWatcom and/or EMULib itself. So if the original author (who ported it back in the day) can't remember or be bothered to try again (and it can't be that hard for him, but I guess he's busy), you'll have a much much harder time with it.

Though he does have a Google Group about all his emulators, which is still very active, so you may have better luck asking all others there:!forum/EMUL8

Otherwise I dunno. Besides us here, you could ask on one of the FreeDOS mailing lists. Or the OpenWatcom newsgroups. Or new://comp.os.msdos.programmer or similar. I'm just saying, keep your options open.

> The author says in the docs that he switched from DOS 4GW to DOS32a in
> Colem v. 2.20.

Of course in this case (also) using UPX would've been safer since you can unpack.

> Can anyone provide some gracious help in getting a DOS binary of ColEm
> compiled without compression and using any DOS extender other than DOS
> 32A?

Have you tried other Coleco emulators? Also, Wikipedia mentions two commercial ones (Windows) from way back (1997, 1998). Also, do you not have a real Colecovision machine? Can't you get one on eBay? Again, I'm just listing some more possibilities here.

Oh, I almost forgot, you can try to search GameFAQs to see if whatever game you want to play was ported to another machine you have (or is better supported). Though in that case, it's probably easier to use a pre-existing (working, supported) port of ColEm like Windows or Android.

But "Just use ...", I hate advice like that! :-P Still, anything is better than nothing.

> Many thanks, I've been pulling my hair out trying to get this to compile!
> ............
> Alright, I tried Open Watcom and I can get further, but using the supplied
> makefile under the directory /COLEM/MSDOS, when I execute WMAKE, I get
> "The command list is not part of any target" error.
> I'm stumped.

Maybe he used NMAKE and not WMAKE. Maybe he had a quirky layout, but I don't see any obvious hints on which subdir to sit in when running wmake -f whatever. The few things I tried also didn't work. Maybe the sources are broken and don't compile out of the box. It may be a mistake to assume it works at all if he hasn't maintained it lately.

Okay, so here's what I did. I grepped for "main(" to find the main source file. I compiled and linked that and checked the linker errors. Then I'd grep for such a function to find what file it was in. Then I compiled and linked that. Rinse and repeat, and eventually it builds. Granted, you have to be somewhat careful, just because it compiles and links doesn't mean it works. And obviously supporting multiple OSes means duplicate functions. But anyways, that's what I did.

Here's a quick .BAT, may not work 100%, caveat emptor, but at least it seems to build.

@echo off
echo unix wget
if "%WATCOM%"=="" goto end
md colem
cd colem
unzip -qCjn ..\
for %%a in (colem coleco menu msdos sound libmsdos console emulib z80 image tms9918 drv9918 sn76489) do ren %%a.c *.c~
del *.exe >NUL
del *.c >NUL
ren *.c~ *.c
wcl386 -zq -zp4 -5r -otexan -l=dos4g -fe=colem.exe -DBPP16 -DMSDOS -DCOLEM *.c
if exist colem.exe dir colem.exe
REM COLEM    EXE       219,362  03-27-14  9:28a colem.exe


Complete thread:

Back to the forum
Board view  Mix view
15108 Postings in 1358 Threads, 246 registered users, 8 users online (0 registered, 8 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum