VOGONS


SBEMU: Sound Blaster emulation on AC97

Topic actions

Reply 2021 of 2029, by Angel Of Nemesis

User metadata
Rank Newbie
Rank
Newbie

Many thanks to the author! Works on the MSI H87-G41 PC Mate motherboard. I am using the VDPMI experimental build and tested on all games by ID and games on the build engine. I also have an Audigy 2 zs sound card, but unfortunately, motherboard won’t start with it.

Reply 2022 of 2029, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
DoZator wrote on 2026-11-20, 16:42:
crazii wrote on 2026-11-20, 16:06:

That seems a critical bug and what's your sound card?

Yamaha YMF754

What feature's do you use? OPL and SB, any MPUs or PC speakers? I'm check the commits and there are MPU changes and PC speaker added in it.

EDIT: there's a FPU state issue in PC speaker and I've fixed in the VDPMI build, I will add it to the HDPMI32i build and you can test it.

Angel Of Nemesis wrote on 2026-11-21, 09:40:

Many thanks to the author! Works on the MSI H87-G41 PC Mate motherboard. I am using the VDPMI experimental build and tested on all games by ID and games on the build engine. I also have an Audigy 2 zs sound card, but unfortunately, motherboard won’t start with it.

You're welcome. Please wait and there could be a all-drivers-in build, but might may take long.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 2023 of 2029, by crazii

User metadata
Rank Oldbie
Rank
Oldbie

@DoZator, I've added tiny changes on PC speakers, it's currently always active and it's code has FPU maths so that might be the cause if it messes up the game's FPU state.

It's now conditionally active so its sample generator won't get called if unnecessary, also saves FPU states for IO and sample gen.
It's a quick change and different from the VDPMI build but I think it behaves the same.

The attachment sbemu-HDPMI32i-1.0.0-beta.7rc2-fix.zip is no longer available

If it woks fine, then I will commit it to the main branch.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 2024 of 2029, by crazii

User metadata
Rank Oldbie
Rank
Oldbie

@RayeR,

I've been thinking about your broken BIOS VDS problem today, and here're some ideas.

Because VDPMI uses 1:1 identity maps (mostly), with only rare exceptions likesome tiny portion of VDPMI core memory, or DPMI client request for physical memory mapping usually for drivers/SVGA LFB writes, which won't be involved in disk IO, and VDPMI also always handles the IO for UMB/EMS in int13h hook for BIOS buggy USBs, which also handles the IDE UDMA case, I thought it would work with your SATA3 HDD with out XHDD.SYS

I've queried google AI about the IDE UDMA transfer requirement, alignment, size etc. the only possibility that VDPMI won't work for your SATA3 HDD is that

  1. the BIOS does not handle buffer alignment / 64K boundaries AT ALL for low memory
  2. or it writes the incorrect PCI memory addresses.

in the first case, I can add an "Transfer Buffer Always On" flag in the CFG file so that the int13h hook fixes every BIOS int13h request.
for the second case, I think DOS won't work at all instantly after an EMM installed, which is not likely your case.

The internal transfer buffer used by VDPMI is at low memory and aligned to 16B, usually at ~10k location (if loaded from CONFIG.SYS) with a 4K size so I think it will be safe enough for IDE DMA.

This is a hard coded "Transfer Buffer Always On" build for you to test, if it works, I will add it to the CFG.
EDIT: this build also includes the fix for RAMDSK64; you can set "VIntFlag=0" in VDPMI.CFG to test.
EDIT2: don't test the HDD yet, I've never enabled it fully and I will test it first, otherwise it will waste your time.
EDIT3: it's ready to test now. I've updated the attachment.

The attachment vdpmi_tb_always_on.zip is no longer available
Last edited by crazii on 2026-11-22, 05:26. Edited 3 times in total.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 2025 of 2029, by DoZator

User metadata
Rank Member
Rank
Member
crazii wrote on 2026-11-21, 10:28:

What feature's do you use? OPL and SB, any MPUs or PC speakers? I'm check the commits and there are MPU changes and PC speaker added in it.

In this case, only SBPRO is used, since the game only features digital sounds and music. I also thought about the new features (PC speaker), but I couldn’t find a way to disable them during the check to more accurately pinpoint the issue.

crazii wrote on 2026-11-21, 10:52:
@DoZator, I've added tiny changes on PC speakers, it's currently always active and it's code has FPU maths so that might be the […]
Show full quote

@DoZator, I've added tiny changes on PC speakers, it's currently always active and it's code has FPU maths so that might be the cause if it messes up the game's FPU state.

It's now conditionally active so its sample generator won't get called if unnecessary, also saves FPU states for IO and sample gen.
It's a quick change and different from the VDPMI build but I think it behaves the same.

The attachment sbemu-HDPMI32i-1.0.0-beta.7rc2-fix.zip is no longer available

If it woks fine, then I will commit it to the main branch.

Thank you, I’ll try this and let you know.

UPD: It seems you’ve hit the nail on the head with the accurate diagnosis! The test results for the new, corrected version of SBEMU turned out to be very positive - the problem no longer occurred. I also connected GLIDULATOR, and even all of this together works well.

Reply 2026 of 2029, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
DoZator wrote on 2026-11-21, 13:41:

UPD: It seems you’ve hit the nail on the head with the accurate diagnosis! The test results for the new, corrected version of SBEMU turned out to be very positive - the problem no longer occurred. I also connected GLIDULATOR, and even all of this together works well.

Ha, that's because I've done that when I was merge it to VDPMI branch. thought it was no big deal, but turns out it matters.

DoZator wrote on 2026-11-21, 13:41:

In this case, only SBPRO is used, since the game only features digital sounds and music. I also thought about the new features (PC speaker), but I couldn’t find a way to disable them during the check to more accurately pinpoint the issue.

The PC speaker should have and option to enable/disable it, some legacy PC like my legacy HP T5700 thin client has PC speaker.
I've added option to the VDPMI build with default enabled, but not added to the HDPMI32i build yet. will add that option and commit.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 2027 of 2029, by crazii

User metadata
Rank Oldbie
Rank
Oldbie

New plans: add QEMM port trap API.

Because VDPMI works most like Win9x, it has a unified IO bitmap for both v86 and DPMI. so like w9x, a real mode driver can install port traps only via v86 interface and it will work for Protected mode games.
That may help some drivers like OPL2LPT so that it does not need patch PM games.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 2028 of 2029, by RayeR

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for new testing version, I hope I grabbed the right one (file date 22.11. 13:24) and quickly test it.
1) Himemex+ramdsk64 now works fine with Sysenter method (booted to windows, having swap file on ramdisk)
2) Without loading XHDD.SYS I still have problems. It's interesting that it not hangs at every read but maybe once there are more read request or in faster sequence. E.g. when I let it boot normal way executing startup files it even doesn't finish and hangs at loading some TSR from autoexec. But when I use F8 and step the startup files it finish the boot. Then I can even run simple commands like dir but when try e.g. fdisk (version from freedos - a simple realmode program) it hangs. But it not hangs completly. When I wait enough I can see HDD LED flashes for a moment after 30s. Then again after next 10-20s. After 2 minutes the fdisk shown welcome message. When I had other program hang and waited cca 1min. it ended with Read disk error: abort/retry/fail and after abort it went back to DOS prompt.
So I guess some INT13h routine for read sectror is timeouting and after cca 30s it returns with error. But it seems not happen on some isolated single read sector but some bursts or more sectors count - no idea...

Gigabyte GA-P67-DS3-B3, Core i7-2600K @4,5GHz, 8GB DDR3, 128GB SSD, GTX970(GF7900GT), SB Audigy + YMF724F + DreamBlaster combo + LPC2ISA

Reply 2029 of 2029, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
Plombo wrote on 2026-11-19, 20:02:

[*]The SB16 driver installer (sbbasic.exe from here) detects "sbemu /T6" as a Sound Blaster 16 (good), but crashes with a VDPMI error during installation. The installer does work with SBEMU+QEMM+HDPMI, so this is a VDPMI issue.
[*]Going back to VDPMI and running Windows after this, it's unable to load the SB16 driver, so I still don't get any sound. Windows says to make sure the file exists, but I'm guessing it's actually the driver failing somehow?

I tested the sbbasic driver it installs fine for me. the diagnose.exe reports some error probably because sb16 emulation is not complete. the mixer utility works fine.
why you need the Sb16 driver? sbemu works without it. is it that you try to make it work in windows?

RayeR wrote on Today, 04:25:
Thanks for new testing version, I hope I grabbed the right one (file date 22.11. 13:24) and quickly test it. 1) Himemex+ramdsk6 […]
Show full quote

Thanks for new testing version, I hope I grabbed the right one (file date 22.11. 13:24) and quickly test it.
1) Himemex+ramdsk64 now works fine with Sysenter method (booted to windows, having swap file on ramdisk)
2) Without loading XHDD.SYS I still have problems. It's interesting that it not hangs at every read but maybe once there are more read request or in faster sequence. E.g. when I let it boot normal way executing startup files it even doesn't finish and hangs at loading some TSR from autoexec. But when I use F8 and step the startup files it finish the boot. Then I can even run simple commands like dir but when try e.g. fdisk (version from freedos - a simple realmode program) it hangs. But it not hangs completly. When I wait enough I can see HDD LED flashes for a moment after 30s. Then again after next 10-20s. After 2 minutes the fdisk shown welcome message. When I had other program hang and waited cca 1min. it ended with Read disk error: abort/retry/fail and after abort it went back to DOS prompt.
So I guess some INT13h routine for read sectror is timeouting and after cca 30s it returns with error. But it seems not happen on some isolated single read sector but some bursts or more sectors count - no idea...

That's very weird.

so the IO works in real mode.
it should probably works wit DOS=HIGH and put DOS in HMA.
have you tested any EMM with UMB/EMS disabled, e.g. remove most regions using X=aaaa-bbbb?
To me it seems the BIOS code / iomap for the IDE controller is in UMA and it has no proper signature so it is memory mapped/shadowed by EMM page mapping..
I cannot think of any other reason that cause the problem.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD