pouët.net

Watcom compiled executables not working

category: offtopic [glöplog]
Hi, I've been trying to get our next production(see you at asm) to run on my 486 computer. It seems that my 486 won't run ANY Watcom compiled executables, I wonder why?
Also HIMEM.SYS test seems to complete the memory test but then dos freezes so I had to use the /TESTMEM:OFF parameter to skip memory test.
I've tried changing the memory and jumper settings, nothing seems to fix the problem.

Current config:
Osborne LP4S-25C
486DX2 AMD 80Mhz
32 MB RAM
AMI BIOS
Unknown motherboard
DOS 6.22


I really need to get this fixed before Assembly...
added on the 2013-07-14 17:13:43 by branch branch
have you tried if himem works with less memory?
32mb is quite a lot for 486, thus not all combinations of memory and mainboard are likely to work well
added on the 2013-07-14 19:27:01 by T$ T$
Do you use dos4gw.exe?
added on the 2013-07-14 21:08:17 by Adok Adok
t$, yup, i tried 4, 8 and 16mb setups. no luck.
adok, it doesn't matter which extender i use.
added on the 2013-07-14 22:05:03 by branch branch
Define "won't run". Which version of Watcom do you use? Do you use PMODE/W? In short, please give more information.
added on the 2013-07-14 22:07:32 by trc_wm trc_wm
Quote:
Define "won't run".

Freezes, does nothing, hangs.
Quote:
Which version of Watcom do you use

1.9
Quote:
Do you use PMODE/W?

yes, but as i said it doesn't matter which extender i use.
added on the 2013-07-14 22:22:49 by branch branch
Which command line arguments do you use to compile your .exe?

My first guess is that the compiler is generating Pentium instructions instead of 486 only.
added on the 2013-07-14 22:33:37 by trc_wm trc_wm
I can't help, but I'm suddenly feeling the urge to know what dos4gw means.
It turns out the information seems nowhere to be found.
This makes me anxious :)
Anyone here can help? Pretty please?

I found there is a dos/4G aside from dos/4GW.
4G is 4 gigabytes? I'd like that. However seems that dos/4G only allows for 64MB or so, but maybe still in regard of address space. In that case, how about the 'G'?
I also found there is a dos/16M! wat?


As a bonus, I may try to help.
How about running it in bochs?
Maybe it's got step by step or instruction logging or something along those lines.
Maybe also you'll have a nice bochs message indicating exactly what went wrong at the system level.

(Story) One day that way I solved crash in some low level executable on current hardware, a crash I had absolutely not the slightest insight about the cause, the day I ran it in bochs: it simply produced the error: "8259 mode not supported" or something. Message was by bochs; on real hardware it was a hang.
Then I patched the exe and it worked.
okay, the 'w' in 4gw is likely for watcom.
@HeLLoWorld:

Back in the DOS days, the PC CPU ran in the 16-bit mode, which limited the memory range to 1MB. Even though the 80386 had a 32-bit mode, due to DOS being 16-bit, the 32-bit mode couldn't be used directly.

DOS extenders, like DOS4GW, provided a way around the 1MB memory limitation by putting the CPU into 32-bit mode, either temporarily or permanently, but still allowing 16-bit DOS code (for disk access etc) to be called. The 32-bit mode allows a total address space of 4GB.

DOS4GW was not as popular as PMODE/W for making demos.
added on the 2013-07-15 04:13:18 by trc_wm trc_wm
wow.
Let's just say I was asking what 4GW means. :)
Well, 4G now.
If I recall correctly, Rational Software made this product called "DOS/4G" which is a "dos extender", letting you write dos-like applications (with interrupt calls and all), but run in protected mode, accessing all the memory in the computer in a linear fashion (breaking the 1MB "barrier"). Watcom made a deal with them and shipped a "limited" version of the extender, called DOS/4GW, with their compilers. The Rational Software business plan here, I suppose, was to up-sell the "complete" version.

PMODE/W is one of the demoscene-originated dos4gw-replacements.

@branch: you said *none* of the dos4gw or pmodew apps work - not even hello world? That sounds weird.
added on the 2013-07-15 10:20:14 by sol_hsa sol_hsa
Branch, have you tried running memtest to see if your ram (or bios setup) is bad? (btw 32mb is just fine for a 486, that's not the problem). Also, have you gone into BIOS setup and chosen "load (fail-safe) defaults"? Finally, have you removed ALL cards from the system except for sound, ide, and video?
added on the 2013-07-15 11:12:36 by trixter trixter
I vaguely recall reading somewhere that the "4GW" stood for "For Graphics Workstations", but that's probably not right :)
At least this source confirms that the W stands for Watcom: http://www.tenberry.com/dos4g/faq/basics.html#01
Which means we still need to figure out what "4G" is.
But yes, a reference to the 4 GB address space in 386 mode is likely.
added on the 2013-07-15 12:26:34 by Scali Scali
On another note... Not that it may help your specific problem, since you say you can't run ANY pmode stuff...

But in recent years I've been using Japheth's HX extender for 32-bit DOS stuff: http://www.japheth.de/HX.html
This extender can be used together with Visual Studio 2010 (and probably also VS2012, although I have not tried that yet), so you have a recent compiler with up-to-date optimizations and language extensions.

(And funny enough one of the examples that Japheth included was from an ancient tutorial I wrote on how to do simple DirectDraw stuff in Win32ASM. HX Extender has limited emulation of things like DDraw, so you can run it in DOS).
added on the 2013-07-15 12:32:33 by Scali Scali
-w4 -e25 -zq -os -of+ -s -ol -ol+ -oc -om -d2 -fp3 -3r -bt=ods -fo=.obj -mf



Quote:
@branch: you said *none* of the dos4gw or pmodew apps work - not even hello world? That sounds weird.

all the executables that has been compiled with WATCOM and uses 32-bit extender do not work, not even hello world or press any key. i tried running anataus 3 which i know has been compiled with watcom, it didn't work. but many demos DO run; for example: trangression 2, jest and jamdawn run just fine.
added on the 2013-07-15 19:19:50 by branch branch
i tried removing cards = still no progress.
i ran memory test programs, ram seems to be just fine.


maybe i should find another copy of ms-dos?
added on the 2013-07-15 19:22:58 by branch branch
Well, if other pmode stuff works, then it's probably because of a configuration problem.
EMM386, himem.sys, not enough conventional memory free...

A different version of MS-DOS might work... Newer versions of MS-DOS take up slightly more memory, so some software that requires a huge amount of free conventional memory will be physically impossible to run.

I would say that MS-DOS 5 to 6.22 are the best.
Then it's up to you to find the magic combination of the above memory management thingies (and using UMBs, using LOADHIGH etc... blah).
Just try to make the boot sequence as clean and simple as possible first (eg, don't load mouse drivers, network, audio, CD-ROM and that sort of stuff).
added on the 2013-07-15 19:28:13 by Scali Scali
If you're using DOS4GW you probably don't even need HIMEM or EMM loaded at all (it is a dos extender, after all).

Dumb question, but does the regular shareware version of DOOM work? That's a good litmus test of "hardware is ok".
added on the 2013-07-15 21:14:04 by trixter trixter
i've installed 6.21 dos

now those executables compiled with watcom crash and force the system to reboot.
also now some of the stuff that i've compiled on djgpp won't work any more.


[config.sys]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE
DOS=HIGH, UMB
COUNTRY=358,,C:\DOS\COUNRTY.SYS
DEVICE=C:\DOS\DISPLAY.SYS CON=(EGA,,1)
FILES=30
added on the 2013-07-15 22:07:37 by branch branch
When you use a DOS extender, you don't need himem.sys or emm386.exe, and in some cases it's better to disable them. I would try to experiment with that.
Also, country.sys (there's a typo there) and display.sys are not required obviously.
Have you tried running the executables in Dosbox?
added on the 2013-07-15 23:04:36 by Scali Scali
or not trying to make a dos demo without knowing anything about it ;)
added on the 2013-07-15 23:08:43 by superplek superplek
That too... I guess DOS is by far the most difficult 'retro' platform to get into, if you don't have prior experience.
Even for experienced demosceners it was often a struggle to get every demo running on their box.

I mean, my 486 has some shit like this:
Code: CONFIG.SYS ========== [MENU] MENUCOLOR=7,1 MENUDEFAULT=FULL,5 MENUITEM=FULL,Full configuration (No EMS) MENUITEM=DEMO,EMS configuration (Autosizing EMS/XMS memory) MENUITEM=DEMO2,Standard configuration (No EMS/v86 mode) MENUITEM=NOCD,Standard configuration without CD-ROM drivers (No EMS/v86 mode) MENUITEM=BASIC,Basic configuration for DOS extenders (No EMS/XMS/v86 mode) MENUITEM=BASIC2,Basic configuration without CD-ROM drivers (No EMS/XMS/v86 mode) rem MENUITEM=LINUX,Start Linux RedHat 5.0 [BOOT] DOS=UMB DEVICEHIGH=C:\DOS\HIMEM.SYS /TESTMEM:OFF [UMBMEM] DEVICEHIGH=C:\DOS\EMM386.EXE NOEMS HIGHSCAN [EMM] DEVICEHIGH=C:\DOS\EMM386.EXE AUTO RAM HIGHSCAN [STDRV] DEVICEHIGH=C:\PIONEER\ATAPI_CD.SYS /D:PIONEER [FULL] INCLUDE=BOOT INCLUDE=UMBMEM INCLUDE=STDRV rem DEVICE=C:\DOS\HHSCAND.SYS /A=340/I=5/D=3 [DEMO] INCLUDE=BOOT INCLUDE=EMM INCLUDE=STDRV [DEMO2] DEVICEHIGH=C:\DOS\HIMEM.SYS /TESTMEM:OFF INCLUDE=STDRV [NOCD] DEVICEHIGH=C:\DOS\HIMEM.SYS /TESTMEM:OFF [BASIC] INCLUDE=STDRV [BASIC2] [COMMON] rem DEVICE=C:\SOUND\DRV\CTSBPRO.SYS /UNIT=0 /BLASTER=A:220 I:7 D:1 rem DEVICE=C:\SOUND\DRV\CTMMSYS.SYS COUNTRY=31,437,C:\DOS\COUNTRY.SYS SWITCHES=/F DOS=HIGH FILES=50 BUFFERS=30 LASTDRIVE=Z INSTALL=C:\DOS\FDREAD.EXE SHELL=C:\DOS\COMMAND.COM C:\DOS /E:512 /P DEVICEHIGH=C:\DOS\MOUSE.SYS rem DEVICEHIGH=C:\SCANMAN\HHSCAND.SYS /A=340/I=5/D=3 rem DEVICEHIGH=C:\DOS\DRVSPACE.SYS /MOVE [LINUX] [COMMON] rem DEVICEHIGH=D:\WINDOWS\COMMAND\DRVSPACE.SYS /MOVE


And:
Code: AUTOEXEC.BAT ============ @ECHO OFF rem SET ULTRA16=32C,0,0,1,0 SET MGA=C:\MGA\SETUP\ SET PATH=C:\DOS;C:\WIN95\COMMAND;C:\WIN95;C:\PCTOOLS;C:\ARCHIVE;C:\SOUND; SET TEMP=C:\TEMP SET ULTRADIR=C:\SOUND SET SOUND=C:\SOUND LH /L:2,6384 C:\DOS\DOSKEY.COM MEM=MEM.EXE $* /C /P LH C:\DOS\DOSKEY.COM DIR=DIR $* /P rem LH C:\DOS\MOUSE.COM SET COMSPEC=C:\DOS\COMMAND.COM GOTO %CONFIG% :LINUX C:\DOS\LINUX.BAT :DEMO LH /L:1,36224 C:\DOS\MSCDEX.EXE /D:PIONEER /E /K /M:15 /L:E GOTO BASIC2 :FULL LH C:\DOS\SMARTDRV.EXE 2048 128 /N :DEMO2 :BASIC LH /L:1,36224 C:\DOS\MSCDEX.EXE /D:PIONEER /K /M:15 /L:E :NOCD :BASIC2 rem CALL C:\DOS\SWITCH.BAT SET BLASTER=A240 I7 D1 T5 SET ULTRASND=220,6,7,11,5 C:\ULTRASND\EXTREME\ULTRINIT -ej


Good luck writing such a configuration for your box in 2013, if you have no clue about DOS :)
added on the 2013-07-16 00:14:26 by Scali Scali

login