VOGONS


First post, by swapjim

User metadata
Rank Newbie
Rank
Newbie

I'm trying to run DOOM under FreeDOS in QEMU. Whenever I enable sb16 DOOM doesn't have visual. The last thing I see is just the init text. The game actually starts and I can hear sounds and music, albeit with shuttering. The game is responsive and I can quit and return to DOS prompt.

I've tried these two commands:

qemu-system-i386 -m 16 -rtc base=localtime -soundhw sb16 -hda freedos.img -boot order=c
qemu-system-i386 -m 16 -rtc base=localtime -device sb16 -hda freedos.img -boot order=c

and they both cause the problem. If I remove the sb16 device, I have visual, but with no sound:

qemu-system-i386 -m 16 -rtc base=localtime -hda freedos.img -boot order=c

I've tried with QEMU 4.1.0 and 4.2.0 under Windows. Additionally I've tried 3.1.0 and 4.2.0 under Debian x64.

I already asked at the FreeDOS mailing list, and I got some tips, but I couldn't solve the problem. Jim Hall (the leader of FreeDOS) reports running DOOM with sb16 in a desktop PC and a Raspberry 3.

So, I'm here. If anyone has any idea, share it. I'm willing to try anything.

I've set up a small HDD image (10MB download, 20MB uncompressed) that has just FreeDOS and DOOM Shareware (version 1.9) in case anyone wants to give it a shot.

Reply 2 of 8, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

I just checked DOOM v1.9 shareware on QEMU with SB16. Both music and soundfx work, but I used Win98SE DOS 7.1 instead of FreeDOS. If you run QEMU Windows build, then version 4.2.0 has issue with host audio backends on Windows. You can apply the patch from here or go back to version 4.1.1.

Though SB16 works in QEMU for DOOM, QEMU SB16 emulation is not very good. You should really be using DOSBox for its simplicity and superb audio hardware emulation.

Reply 3 of 8, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

I checked out your FreeDOS image. QEMU SB16 works after removing the FDCONFIG.SYS and AUTOEXEC.BAT.
Create a 1-liner AUTOEXEC.BAT "set BLASTER=A220 I5 D1 H5 T6", restart QEMU and re-configure DOOM music and soundfx.

$ ./i386-softmmu/qemu-system-i386 -L pc-bios -soundhw adlib,sb16 -drive format=raw,file=freedos-ml.img

Reply 5 of 8, by swapjim

User metadata
Rank Newbie
Rank
Newbie

I'm trying to setup a vintage emulation machine on a Raspberry, and DOSBox is amazing for games but it's a mixed bag for software. Otherwise, I would use that.

kjliew wrote on 2020-02-07, 01:56:
I checked out your FreeDOS image. QEMU SB16 works after removing the FDCONFIG.SYS and AUTOEXEC.BAT. Create a 1-liner AUTOEXEC.BA […]
Show full quote

I checked out your FreeDOS image. QEMU SB16 works after removing the FDCONFIG.SYS and AUTOEXEC.BAT.
Create a 1-liner AUTOEXEC.BAT "set BLASTER=A220 I5 D1 H5 T6", restart QEMU and re-configure DOOM music and soundfx.

$ ./i386-softmmu/qemu-system-i386 -L pc-bios -soundhw adlib,sb16 -drive format=raw,file=freedos-ml.img

Did exactly that, and nothing changed. If I remove sb16, the game has visual. Tried in QEMU 4.2.0 and 4.1.0 under Windows, both 64-bit builds. I can't find a 4.1.1 build for Windows. Also tried with 4.2.0 under Debian 64-bit. I don't know how to patch and recompile a program so that I could try with 4.1.1, but if nothing else is left to do, I could also attempt to learn how to do that.

Do you see a point in trying under Win98 DOS? Using FreeDOS instead of MS-DOS one of my goals for this project. If you think that trying MS-DOS could yield important data, I can do that.

mrau wrote on 2020-02-07, 00:23:

only game with issues? other dos working better? what's your cpu? tried alternative doom engines?

My host CPU is i7 6700.

Just tried Vavoom and it crashes. Tried with MBF. I have full sound (no shuttering) but no visual. If I disable sound on the game (but still keep sb16 on QEMU), I have visual.

I tried the following games with the same setup:

- Quake: Runs with disabled sound. Freezes with sound enabled.
- Destruction Derby: Freezes even with sound disabled. Setup cannot detect the soundcard.
- Duke 3D: Runs with disabled sound. Freezes with sound enabled, but I can hear midi music (with sb16 as the midi card). The setup program has a sound test which outputs garbled sound.
- Warcraft 2: Says "There has been an error attempting to initialize the card you selected. Please choose a different card.". The game itself crashes even with no sound.

Reply 6 of 8, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie
swapjim wrote on 2020-02-09, 12:27:

I'm trying to setup a vintage emulation machine on a Raspberry, and DOSBox is amazing for games but it's a mixed bag for software. Otherwise, I would use that.

Everything you had mentioned was DOS games related, not sure how it can have anything to do with setting up Raspberry while you were checking out QEMU on x86 PC.

Anyway, if you don't compile your own QEMU, then you could have questionable compiled binary. The sound and display libraries can vary depends on who compiled it. I compiled my own QEMU and I knew mine was configured for DirectSound as audio backend with SDL2 library.

Reply 7 of 8, by swapjim

User metadata
Rank Newbie
Rank
Newbie
kjliew wrote on 2020-02-09, 15:18:

Everything you had mentioned was DOS games related, not sure how it can have anything to do with setting up Raspberry while you were checking out QEMU on x86 PC.

If I manage to make it work in QEMU under Windows, it'll also work in QEMU under RPi, no?

kjliew wrote on 2020-02-09, 15:18:

Anyway, if you don't compile your own QEMU, then you could have questionable compiled binary. The sound and display libraries can vary depends on who compiled it. I compiled my own QEMU and I knew mine was configured for DirectSound as audio backend with SDL2 library.

So you're telling that the problem is the binary? Can you give me your binaries, just to test this?

Reply 8 of 8, by swapjim

User metadata
Rank Newbie
Rank
Newbie

I've managed to compile QEMU on Debian. I tried both, 4.1.1 and 4.2.0, and I used this configuration:

configure --target-list=i386-softmmu --disable-vnc --enable-sdl

I then run the VM without autoexec.bat and config.sys, just with the BLASTER environment var.

With both versions of QEMU, I've got visual on DOOM but sound is garbled. This is clearly progress but I'm not there yet. Anything else I can try?