VOGONS


SBEMU: Sound Blaster emulation on AC97

Topic actions

Reply 1120 of 1379, by digger

User metadata
Rank Oldbie
Rank
Oldbie
dr.zeissler wrote on 2024-01-26, 12:49:

are there any plans to offer a sbemu win9x edition to get sound working in a dos-environment within win9x?

That's what VDMSound is for. It would make more sense to resurrect that project and continue improving that than to extend SBEMU, which is really focused on providing legacy sound card emulation in native DOS.

Reply 1121 of 1379, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
wierd_w wrote on 2024-01-26, 18:39:

The problem, is that we are implementing a dirty hack here, not implementing a VXD, which traps all interrupts in protected mode using a totally different mechanism that integrates with the NTVDM and WoW subsystems.

Yes, a pure virtualized DPMI need at least all basic drivers (PIC/PIT/KBD/MOUSE/VIDEO etc) to work, which is provided by windows itself through VXD, IO ports are trapped in a totally different way from HDPMI. While HDPMI is a DOS host which utilizes all existing real mode drivers provided by the BIOS.

wierd_w wrote on 2024-01-26, 18:39:

If we could get Crazii to use the Quarterdeck DPMI provider (or write a suitable surrogate that fakes it good enough), we could maybe get around it, but windows would NOT like having stuff done behind its back. I would say that they don't use that approach for important reasons.

I didn't know that, so win3.x/win9x can run within Quarterdeck DPMI? Are there any incompatibility problems?
Even if it is possible, windows kernels and drivers are running in ring0 in which IO ports cannot be trapped, so we may still need a VXD to support all sound card and provide SB emulation.
But if dos programs can run under the DPMI host we provide instead of windows' own DPMI, there might be chance to do that without VXD drives - but I highly doubt that.

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 1122 of 1379, by zyzzle

User metadata
Rank Member
Rank
Member

Mysterious happenings... Is it OK to post here as opposed to Github?
With one of my netbooks, based upon Apollolake chipset, the latest SBEMU at Github from 2024-01-24 reports:

Autodetecting/testing available outputs/soundcards, please wait...
Intel HDA: Switching to PIO.
1: Intel HDA: Intel SKL (Broxton-P) (80865A98) -> Realtek (10EC0269) (max 192kHz/24bit/8ch)
Autodetecting finished... Exiting...

But, regardless of which -A, -I, and -D values I select, the program crashes with a sigfault saying "IRQ 25... trying to select a proper IRQ"

Now, with the 2014-01-14 version posted by crazii here, the autodetection works, and SBEMU does not sigfault nor report an error with autodetecting IRQ 25, but detects proper settings: A220, I7, D1 as it should.

However, no games work with the detected settings. Only silence, not even a click or a pop. This is with all versions of SBEMU I've tried, since 1.0beta3 was released - and in trying -O0 and -O1 settings with either IRQ 5 or 7.

It seems something broke in the "autodetection" code in the latest user-posted versions at Github for Intel HDA cards. Not sure what!

Note that MPxPlay 1.67 code detects this Intel HDA soundcard perfectly fine, and I can change from headphone jack output or laptop speaker output by the -scc 1 flag. Mpxplay 1.66 did not detect the Intel SKL Broxton PCI soundcard at all.

Any hints? I'd love to get it working, and there's hope, especially since MPXPlay detects it just fine.

Reply 1123 of 1379, by wierd_w

User metadata
Rank Member
Rank
Member
crazii wrote on 2024-01-26, 21:58:
Yes, a pure virtualized DPMI need at least all basic drivers (PIC/PIT/KBD/MOUSE/VIDEO etc) to work, which is provided by windows […]
Show full quote
wierd_w wrote on 2024-01-26, 18:39:

The problem, is that we are implementing a dirty hack here, not implementing a VXD, which traps all interrupts in protected mode using a totally different mechanism that integrates with the NTVDM and WoW subsystems.

Yes, a pure virtualized DPMI need at least all basic drivers (PIC/PIT/KBD/MOUSE/VIDEO etc) to work, which is provided by windows itself through VXD, IO ports are trapped in a totally different way from HDPMI. While HDPMI is a DOS host which utilizes all existing real mode drivers provided by the BIOS.

wierd_w wrote on 2024-01-26, 18:39:

If we could get Crazii to use the Quarterdeck DPMI provider (or write a suitable surrogate that fakes it good enough), we could maybe get around it, but windows would NOT like having stuff done behind its back. I would say that they don't use that approach for important reasons.

I didn't know that, so win3.x/win9x can run within Quarterdeck DPMI? Are there any incompatibility problems?
Even if it is possible, windows kernels and drivers are running in ring0 in which IO ports cannot be trapped, so we may still need a VXD to support all sound card and provide SB emulation.
But if dos programs can run under the DPMI host we provide instead of windows' own DPMI, there might be chance to do that without VXD drives - but I highly doubt that.

A possible minefield, in many respects.

I know that windows loads just fine with QDPMI running.

I DO NOT know if windows takes over (qdpmi disables itself), or if windows is faked out into thinking that qdomi is its own dpmi provider.

It kinda very much matters which is true.

Regardless, windows would very much hate having stuff done behind its back.

Reply 1125 of 1379, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
zyzzle wrote on 2024-01-27, 01:59:

But, regardless of which -A, -I, and -D values I select, the program crashes with a sigfault saying "IRQ 25... trying to select a proper IRQ"

Is it IRQ 25 or 255? this IRQ is your sound card IRQ, not the emulated IRQ. can you confirm your sound card IRQ?

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 1126 of 1379, by wierd_w

User metadata
Rank Member
Rank
Member

Checking more carefully, qdpmi disables itself when windows loads.

Sbemu would be able to 'tolerate' windows booting, but would do nothing, if it targetted qdpmi.

You need a universal sb16 emulation vxd to work inside windows.

Reply 1127 of 1379, by 4xtx

User metadata
Rank Member
Rank
Member

For the SBEMU compatibility reports list you can add EPIA-ML (6000EA) containing Via VT8235 south bridge and VT1616 codec. Works reliably.

YT: https://www.youtube.com/@techdistractions

Reply 1128 of 1379, by zyzzle

User metadata
Rank Member
Rank
Member
crazii wrote on 2024-01-27, 05:44:

Is it IRQ 25 or 255? this IRQ is your sound card IRQ, not the emulated IRQ. can you confirm your sound card IRQ?

Yes, my PCI soundcard IRQ is 25, not emulated IRQ.
It is Realtek ALC269, device vendor ID=8086: devid=5a98
However, the 24-Jan version of SBEMU and those since 13-Jan seem to not even get to the step of assigning an emulated IRQ, since it thinks my real IRQ of 25 is invalid. It gives this message:
"Intel HDA detected"
"Invalid Sound card IRQ:25. Trying to assign a valid IRQ..."

Then it crashes, with a segfault. Strange, it's as if SBEMU can't see that the IRQ of 25 for my PCI soundcard (Realtek ALC269) *is* the real, valid one, and stops cold.

Is this a bug or a "feature". Is there something wrong with IRQ 25?!

Reply 1129 of 1379, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
zyzzle wrote on 2024-01-27, 07:35:

Is this a bug or a "feature". Is there something wrong with IRQ 25?!

Legacy ISA IRQs ranges from 0 to 15, that assumption is recently added to SBEMU. BTW I never seen an IRQ 25 on a DOS system. I'm curious about your laptop:
1. Is the IRQ configured by your BIOS? or some other tools?
2. Have you enabled IO-APIC?
3. What's the DOS edition & version are you using?
4. What's the maximum IRQ num on your DOS?

I can fix the code but before doing that I need a little more details, thanks.

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 1130 of 1379, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
wierd_w wrote on 2024-01-27, 05:44:

Checking more carefully, qdpmi disables itself when windows loads.

Sbemu would be able to 'tolerate' windows booting, but would do nothing, if it targetted qdpmi.

You need a universal sb16 emulation vxd to work inside windows.

OK cool. So what about the SB emulation provided by the WDM sound card driver? Is there any compatibility list? I ran to some problems with some DOS games using it.

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 1132 of 1379, by zyzzle

User metadata
Rank Member
Rank
Member
crazii wrote on 2024-01-27, 10:34:
Legacy ISA IRQs ranges from 0 to 15, that assumption is recently added to SBEMU. BTW I never seen an IRQ 25 on a DOS system. I' […]
Show full quote

Legacy ISA IRQs ranges from 0 to 15, that assumption is recently added to SBEMU. BTW I never seen an IRQ 25 on a DOS system. I'm curious about your laptop:
1. Is the IRQ configured by your BIOS? or some other tools?
2. Have you enabled IO-APIC?
3. What's the DOS edition & version are you using?
4. What's the maximum IRQ num on your DOS?

1. IRQ controlled by BIOS
2. That's also done by my BIOS. I don't see any option to enable it or disable it. However, APIC is enabled according to Astra v. 7.00. Also, it lists something interesting called "x2APIC Implementation" which is also enabled. Not sure what that is.
3. Using good old MS-DOS 7.1, the same DOS which works in 3 of my other laptops with Intel HDA cards and SBEMU.
4. That's strange, as I also thought DOS only provided from IRQ 0 to 15 for legacy. However, downloading and running Astra 7.00 for DOS told me I have IRQs allocated up to IRQ 31! This is Astra Sysinfo Tool link, which is the best "hardware detector" for DOS I've ever seen:
http://www.sysinfolab.com/download.htm
It seems like there's some sort of PCI-steering going on, as the laptop I'm using this on is a dual UEFI / BIOS config. Apollolake chipset... with Intel SoC chip, etc. This is the last legacy BIOS Intel chipset before Geminilake went to a UEFI-only system. I love this little DOS wonder, as it only consumes 3 watts in DOS!

Reply 1133 of 1379, by wbahnassi

User metadata
Rank Member
Rank
Member
4xtx wrote on 2024-01-26, 03:37:

I'm curious how you got stunts to work with sbemu
In my (limited) testing I get the "reservememory - OUT OF MEMORY RESERVING polyinfo P=28b HW=f02" when trying to load the game.
It seems to happen only after HDPMI32I is loaded and no combination of switches or arguments seem to make any positive difference

Nothing out of the ordinary. I just retested it again and it worked just fine. I have the original game disks but for this test I grabbed an online copy and it also worked, so nothing specific about the game. I've attached my Autoexec/Config for the SBEMU boot disk I use, along with a listing of the disk's contents and SBEmu output to allow you to identify the specific versions I'm using. Good luck!

Attachments

  • Filename
    SBEmuCfg.zip
    File size
    1.79 KiB
    Downloads
    34 downloads
    File license
    Public domain

Reply 1134 of 1379, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
zyzzle wrote on 2024-01-27, 13:29:
1. IRQ controlled by BIOS 2. That's also done by my BIOS. I don't see any option to enable it or disable it. However, APIC is en […]
Show full quote
crazii wrote on 2024-01-27, 10:34:
Legacy ISA IRQs ranges from 0 to 15, that assumption is recently added to SBEMU. BTW I never seen an IRQ 25 on a DOS system. I' […]
Show full quote

Legacy ISA IRQs ranges from 0 to 15, that assumption is recently added to SBEMU. BTW I never seen an IRQ 25 on a DOS system. I'm curious about your laptop:
1. Is the IRQ configured by your BIOS? or some other tools?
2. Have you enabled IO-APIC?
3. What's the DOS edition & version are you using?
4. What's the maximum IRQ num on your DOS?

1. IRQ controlled by BIOS
2. That's also done by my BIOS. I don't see any option to enable it or disable it. However, APIC is enabled according to Astra v. 7.00. Also, it lists something interesting called "x2APIC Implementation" which is also enabled. Not sure what that is.
3. Using good old MS-DOS 7.1, the same DOS which works in 3 of my other laptops with Intel HDA cards and SBEMU.
4. That's strange, as I also thought DOS only provided from IRQ 0 to 15 for legacy. However, downloading and running Astra 7.00 for DOS told me I have IRQs allocated up to IRQ 31! This is Astra Sysinfo Tool link, which is the best "hardware detector" for DOS I've ever seen:
http://www.sysinfolab.com/download.htm
It seems like there's some sort of PCI-steering going on, as the laptop I'm using this on is a dual UEFI / BIOS config. Apollolake chipset... with Intel SoC chip, etc. This is the last legacy BIOS Intel chipset before Geminilake went to a UEFI-only system. I love this little DOS wonder, as it only consumes 3 watts in DOS!

That's really interesting... Usually there's APIC on non ISA machine, but not enabled by BIOS by default.
Currently IRQ above 15 is treated as invalid, I'll change to 0xFF instead, on next release. 😀

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 1135 of 1379, by 4xtx

User metadata
Rank Member
Rank
Member
wbahnassi wrote on 2024-01-27, 17:18:
4xtx wrote on 2024-01-26, 03:37:

I'm curious how you got stunts to work with sbemu
In my (limited) testing I get the "reservememory - OUT OF MEMORY RESERVING polyinfo P=28b HW=f02" when trying to load the game.
It seems to happen only after HDPMI32I is loaded and no combination of switches or arguments seem to make any positive difference

Nothing out of the ordinary. I just retested it again and it worked just fine. I have the original game disks but for this test I grabbed an online copy and it also worked, so nothing specific about the game. I've attached my Autoexec/Config for the SBEMU boot disk I use, along with a listing of the disk's contents and SBEmu output to allow you to identify the specific versions I'm using. Good luck!

Cheers I will have another go!

YT: https://www.youtube.com/@techdistractions

Reply 1137 of 1379, by tiagotarifa

User metadata
Rank Newbie
Rank
Newbie

Just reporting that sbemu works on a IBM Thinkcentre M51

System Specs:

  • IBM ThinkCentre M51 8141RPA
  • Chipset: Intel 915G
  • Multimedia device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 audio controller (rev 03)
  • Bios date: 01/21/2008

Load sbemu with these parameters:

sbemu /FIXTC1 /VOL9

. Without /FIXTC1 it's makes some noises like some echoes and pops. /VOL9 is optional.

Games tested:

  • Doom: Music only works with Sound Blaster. Sound Blaster AWE it didn't;
  • Epic Pinball: Works with Sound Blaster Pro.

Version used
UserBuild_2024.01.14_11-11

IMPORTANT: Mono speaker inside of thinkcentre cabinet doesn't work (it's not the pc speaker). I tried with /O0 and /O1 parameters.

Last edited by tiagotarifa on 2024-02-03, 21:23. Edited 2 times in total.

Reply 1138 of 1379, by tiagotarifa

User metadata
Rank Newbie
Rank
Newbie

Reporting that sbemu works using CMI8738 PCI sound card.

Version used: UserBuild_2024.01.14_11-11

System:

  • AMD Athlon X2 240
  • GA-78LMT-s2 rev1.1(Sound onboard is disabled - doesn't work)
  • CMI8738/PCI-6CH-LX PCI card
  • Bios v6.00PG (2012)

sbemu command used

sbemu /I5 /FIXTC1 /VOL9 
  • /I5: Without explanation, only works using IRQ5 on this motherboard;
  • /FIXTC1: It improves the sound quality. Without it, the sound makes some kind of noise in the end of any sound (not happen with the music);
  • /VOL9: Default volume (7) is too low;

Games tested

  • Doom: Sound and Music works with Sound Blaster. Sound Blaster AWE it didn't;
  • Epic Pinball: Sound and music works with Sound Blaster Pro;

IMPORTANT : This test was made running sbemu disk image booted from PXE. I didn't installed freedos on a hard disk using this motherboard. I don't know if it's possible.

Pictures of the card

Attachments

  • back.jpg
    Filename
    back.jpg
    File size
    163.27 KiB
    Views
    747 views
    File comment
    back
    File license
    Public domain
  • front-rotated.jpg
    Filename
    front-rotated.jpg
    File size
    186.13 KiB
    Views
    747 views
    File comment
    front
    File license
    Public domain

Reply 1139 of 1379, by tiagotarifa

User metadata
Rank Newbie
Rank
Newbie

Reporting that sbemu worked using Realtek ACL662

Version used: UserBuild_2024.01.14_11-11

System:

  • AMD C-60 APU
  • ECS HDC-M C-60 v1.0
  • Realtek ACL662 Azalia (Intel HDA)
  • Bios v4.6.4 02/25/2012

sbemu command used

sbemu /I5 /VOL9 
  • /I5: Without explanation, only works using IRQ5 on this motherboard;
  • /VOL9: Default volume (7) is too low;

Games tested

  • Doom: Sound and Music works with Sound Blaster. Sound Blaster AWE it didn't;
  • Epic Pinball: Sound and music works with Sound Blaster Pro;

IMPORTANT : This test was made running sbemu disk image booted from PXE. I didn't installed freedos on a hard disk using this motherboard. There is a option on bios to change SATA AHCI to SATA IDE, probably works.