Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sound stops working in games after running any program that uses DOS32A or D3X dos extrender. #130

Open
CandyMan30 opened this issue Aug 17, 2024 · 4 comments

Comments

@CandyMan30
Copy link

After loading SBEMU, everything works as it should. However, when I run any program using DOS32A or D3X dos extender, the sound stops working in 32-bit mode. This may be due to some incompatibility of these dos extenders or a change in some settings. Please check what is causing this.

Here are testing programs:
d3x-dos32a.zip

Thanks.

@volkertb
Copy link
Collaborator

There is indeed a known issue with the DOS/32A DOS extender, which was noticed by the developer of FastDoom.

Can you try the following:

  • If you are using JEMMEX or JEMM386, load it with the NOVCPI option
  • If you are testing this in a machine with a lot of RAM: Load HDPMI32i with the -x option

Please let me know if either (or both) of these workarounds have any effect on this problem.

Thanks!

@volkertb
Copy link
Collaborator

volkertb commented Aug 18, 2024

@CandyMan30 Today I've been troubleshooting an integration test in the CI/CD pipeline for SBEMU. A test kept failing with a protected mode sound (WAV) player that I had set up to use DOS/32A. The sound player didn't crash or anything, but it complained about not detecting a Sound Blaster card.

After trying a few other things (including the workarounds I shared in my previous reply, neither of which helped) I tried using the original DOS/4GW DOS extender (version 1.97) instead, and presto, the test passed. 🥳 This was less than half an hour ago.

So there may be more compatibility issues going on between DOS/32A and SBEMU.

As for the D3X DOS extender, I was not yet familiar with that DOS extender. (Thanks for introducing me to it, by the way!)

However, from what I read here, it's a "ring 0" DOS extender. If that means that it's running the application code in ring 0, that probably explains why SBEMU isn't working, since the application or game needs to run at a lower privilege level (typically ring 3) in order for SBEMU to trap and emulate I/O access to the sound card. At least, that's how it works as far as I understand.

I guess in the meantime, the advice is to just keep the original DOS/4GW DOS extender that comes with the games that you want to use with SBEMU. Although if you're emulating a Sound Blaster 16, you might want to upgrade to DOS/4GW version 1.97, since that version of the DOS extender includes a high DMA fix for 16-bit sound cards.

I hope this helps with your use case(s).

@CandyMan30
Copy link
Author

Problem solved. The DOS extenders in question were run in VCPI mode instead of DPMI. I ran JEMM* with the NOVCPI parameter and now everything works.
Thanks a lot.

P.S: I use D3X dos extender in Necromancer's Dos Navigator (NDN for DOS32/64).

Here my working configuration:

SET BLASTER=A220 I7 D1
JEMM386.EXE LOAD MAX=32768 NOEMS X=C000-FFFF VCPI
HDPMI32I.EXE -r -x
JLOAD.EXE QPIEMU.DLL
IF ERRORLEVEL 1 GOTO ERR
SBEMU.EXE /I7
JEMM386.EXE NOVCPI
:ERR
CD C:\GAMES\DOOM
DOOM.EXE
JEMM386.EXE VCPI

@volkertb
Copy link
Collaborator

Cool! Thanks for sharing your working configuration. Does this work with the D3X DOS extender as well as DOS/32A?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants