VOGONS


SBEMU: Sound Blaster emulation on AC97

Topic actions

Reply 80 of 1347, by Yoghoo

User metadata
Rank Member
Rank
Member

Tried it yesterday on an IBM Thinkpad T42 laptop which has a Analog Devices AD1981A AC'97 SoundMAX Codec (Full-duplex) sound card.

Saw that Wolfenstein 3D didn't detect an Adlib card but SB worked great. And Duke Nukem 3D worked great in mono mode. In stereo I could hear sound from the left and center speaker test but it was silent from the right speaker test. Further than that it worked very nice with the games I tested. Thanks!

What SB modes does it support btw? I guess only SB/SB Pro but not SB 16?

Reply 81 of 1347, by L4MD4

User metadata
Rank Newbie
Rank
Newbie
Baron von Riedesel wrote on 2023-03-09, 07:42:
The instruction bytes translate to […]
Show full quote

The instruction bytes translate to

mov cr4, eax
smsw ax
...

It's imprecisely coded in hdpmi32, because this code "should" only be executed in real-mode - however, it's executed in v86-mode ( and causes the crash then ) if no VCPI API has been detected. In any case hdpmi32 is unable to continue and has to terminate.

Thanks, for the reply (and excellent software!).

It isn't imperative that I use Qemm. I was just looking to test every option, with SBEMU.

This only seems to happen when I use the option "NOEMS". Qemm has fastboot. With a fast (re)boot the problem is not there. With just "DEVICE=C:\QEMM\QEMM386.SYS" there is no issue.

It happens with a "Power On" boot, that includes the "NOEMS" option.

Reply 82 of 1347, by Kamerat

User metadata
Rank Oldbie
Rank
Oldbie
Yoghoo wrote on 2023-03-09, 14:07:

Tried it yesterday on an IBM Thinkpad T42 laptop which has a Analog Devices AD1981A AC'97 SoundMAX Codec (Full-duplex) sound card.

Saw that Wolfenstein 3D didn't detect an Adlib card but SB worked great. And Duke Nukem 3D worked great in mono mode. In stereo I could hear sound from the left and center speaker test but it was silent from the right speaker test. Further than that it worked very nice with the games I tested. Thanks!

What SB modes does it support btw? I guess only SB/SB Pro but not SB 16?

Use the /T6 option for Sound Blaster 16 support.

DOS Sound Blaster compatibility: PCI sound cards vs. PCI chipsets
YouTube channel

Reply 83 of 1347, by Kamerat

User metadata
Rank Oldbie
Rank
Oldbie
Kamerat wrote on 2023-03-08, 20:49:
Still no sound with /VOL9. […]
Show full quote
crazii wrote on 2023-03-08, 07:51:
Kamerat wrote on 2023-03-06, 17:09:
Nice piece of software! […]
Show full quote

Nice piece of software!

Did some initial testing on a few systems:
AMD B450 (MSI B450M MORTAR TITANIUM): Working, used front panel audio connector.
AMD RS880M (Toshiba Satllite C660D-113): Intializes with /I5 option, Duke Nukem 3D and Doom starts without complaining but i hear no audio. Tried the /O option for chainging output without success.
Intel HM175 (MSI GT72VR 7RD Dominator): Partially working, laptop only output sound on bass (?) port. /O0 option works as it should with headphones.
Lenovo Thinkpad X390: Locks when SBEMU tries to initialize.

Emmm, yet another PCs that reported not working. Can you try /VOL9 on the AMD RS880M to make sure it is not a volume problem?

Still no sound with /VOL9.

I also get no sound with MPXPLAY even that it detects IHD. Maybe the driver from MPXPLAY is the problem?

This is the device:

 Bus 0 (PCI Express), Device Number 20, Device Function 2
Vendor 1002h Advanced Micro Devices, Inc. [AMD/ATI]
Device 4383h SBx00 Azalia (Intel HDA)
Subsystem ID FF1E1179h Unknown
Subsystem Vendor 1179h Toshiba Corporation
System IRQ 7, INT# A

It looks like it uses the Conexant CX20585 HDA Codec.

Found the information using an utility called Unmute:
Unmute - PCBEEP to headphone - Written by TomCat/Abaddon - v1.1/2017
--------------------------------------------------------------------
HDA mixer volume: 01F.
HDA device id: 4383, vendor id: 1002.
- i/o base found at F2300000, mapped to 00211000, selector: 137.
HDA codec id: 5069, vendor id: 14F1.
- codec address found at 00000000, first widget id: 010, last widget id: 025.
- BEEP generator widget id: 013 DISABLED.
- PC speaker widget id: 01F MUTED.
- headphone widget id: 019 UNMUTED.
- PCBEEP widget not found.

Edit: Found a temporary workaround to make the codec on the Toshiba Satllite C660D-113 laptop happy with the HDAplay utility.

  • Boot into DOS and run "hdaplay -s sample.wav".
  • Type exit then hit enter.
  • Run "sbemu /I5 /T6 /K44100" (must load all the other stuff first).
  • Enjoy games.

Edit 2: Attached an archive with the binaries of HDAplay and HDAstat.

Edit 3: Attached logs from HDAstat, one for loading SBUEMU only and one where I run HDAplay before I load SBEMU.

Attachments

  • Filename
    AFTER_HDAPLAY_SBEMU.TXT
    File size
    16.69 KiB
    Downloads
    84 downloads
    File license
    Public domain
  • Filename
    AFTER_SBEMU.TXT
    File size
    16.7 KiB
    Downloads
    69 downloads
    File license
    Public domain
  • Filename
    HDAutils_v1.0.zip
    File size
    15.4 KiB
    Downloads
    81 downloads
    File license
    Fair use/fair dealing exception

DOS Sound Blaster compatibility: PCI sound cards vs. PCI chipsets
YouTube channel

Reply 85 of 1347, by L4MD4

User metadata
Rank Newbie
Rank
Newbie
sergio_prado wrote on 2023-03-10, 00:39:

Sorry if this is a dumb question, but this could be used on Win9x?

I'm sure you are not the only one wondering this.

My system doesn't work with SBEMU, yet. So, I am no authority on it.

Windows says it cannot run, because a protected-mode software is running. That would be Jemmex. But you can load Windows with Qemm, Hdpmi32i, and SBEMU. If your audio card is not disabled, driver installed or not, Windows will likely lock up.

Protected mode SBEMU might then be running, after Windows loads. Unless Windows alters the situation.

But even with that, I find it unlikely that Windows can be made to use it. Maybe Win3x (even with Jemmex).

Reply 86 of 1347, by stamasd

User metadata
Rank l33t
Rank
l33t

So here's the results of some quick testing I did.

First, a quick question for the author. Where did you get the jemmex.exe and jload.exe that come in the package? They are version 5.84. Even on the official jemmex github, the latest version is 5.83. I first tried it with a full installation of the latest release of freedos from December, which comes with jemmex 5.79. It complained that jload isn't compatible. So I replaced the jemmex.exe that freedos installs with your version - and it seems that it's not fully compatible with the older one. First of all, this version 5.84 does not enable UMBs, and as a result I get less free conventional memory (613kB with 5.84, vs 627kB with 5.79).

Freedos does not install jload.exe by default, so I downloaded version 5.79 of jload and restored jemmex 5.79. With this done, sbemu does install correctly per instructions, says OPL3 emulation and SB emulation are enabled. My test system is a Zotac Zbox ID80 https://www.zotac.com/us/product/mini_pcs/id80 which has a Realtek AC97 chip. It was detected as Intel HDA.

But so far nothing I tried with it works.
Adlib Tracker II http://adlibtracker.net/ crashes at start
FFE (Frontier First Encounters https://en.wikipedia.org/wiki/Frontier:_First_Encounters ) also crashes at start (it doesn't crash if I don't load SBEMU). So does its sound setup program.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 87 of 1347, by Baron von Riedesel

User metadata
Rank Member
Rank
Member
stamasd wrote on 2023-03-10, 02:13:

First, a quick question for the author.

I'm not the author, but the maintainer of jemmex.

Where did you get the jemmex.exe and jload.exe that come in the package? They are version 5.84. Even on the official jemmex github, the latest version is 5.83.

These are preliminary variants, supplied to make sbemu work with it. Not fully tested so far...

So I replaced the jemmex.exe that freedos installs with your version - and it seems that it's not fully compatible with the older one. First of all, this version 5.84 does not enable UMBs, and as a result I get less free conventional memory (613kB with 5.84, vs 627kB with 5.79).

Well, v5.84 "should" enable UMBs - On the systems I tested so far it does indeed.

...so I downloaded version 5.79 of jload and restored jemmex 5.79. With this done, sbemu does install correctly per instructions, says OPL3 emulation and SB emulation are enabled. My test system is a Zotac Zbox ID80 https://www.zotac.com/us/product/mini_pcs/id80 which has a Realtek AC97 chip. It was detected as Intel HDA.

But so far nothing I tried with it works.

Jemmex versions < v5.84 cannot work because the port trapping doesn't work for ISA DMA there.

Reply 88 of 1347, by stamasd

User metadata
Rank l33t
Rank
l33t

Ah OK that clarifies a few things. By "author" I meant the author of SBEMU and the OP in this thread.
FWIW, I did test also with version 5.84 of jemmex and jload. The same crashes happened.

Last edited by stamasd on 2023-03-11, 15:08. Edited 1 time in total.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 89 of 1347, by L4MD4

User metadata
Rank Newbie
Rank
Newbie
stamasd wrote on 2023-03-10, 02:13:

My test system is a Zotac Zbox ID80 https://www.zotac.com/us/product/mini_pcs/id80 which has a Realtek AC97 chip. It was detected as Intel HDA.

Are you sure its an AC97? I haven't seen many devices supporting both USB3 and AC97. Intel introduced the HDA replacement specification in 2004. Granted, it probably took 4-6 years before everyone dropped AC97.

I will be the first to admit, I could totally be wrong here. Being wrong is one of my hobbies.

You might try MPXPlay, and share your results. It isn't the most useful information, but its something.

I haven't gotten around to building SBEMU, myself. But I have wondered if generic USB audio could be used here. There are some opensource Dos USB audio tools, out there. Might make for a temporary fix, if possible. I'm only vaguely familiar with the restraints here.

Reply 90 of 1347, by stamasd

User metadata
Rank l33t
Rank
l33t

.

Last edited by stamasd on 2023-03-11, 15:06. Edited 1 time in total.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 91 of 1347, by keenmaster486

User metadata
Rank l33t
Rank
l33t

Update: I figured out that my problems with Keen were due to JEMM not enabling EMS page frame. I had to disable some stuff in the BIOS for JEMM to be able to use EMS.

Keen works now but Jazz Jackrabbit, Adlib Tracker II, and SRB2 are still broken.

I fixed Epic Pinball by enabling SB16 mode and setting the native samplerate to 44100 on SBEMU.

World's foremost 486 enjoyer.

Reply 92 of 1347, by L4MD4

User metadata
Rank Newbie
Rank
Newbie
stamasd wrote on 2023-03-10, 04:00:

DOS USB audio tools? I wasn't able to find any.

Your right. It (they) was (were) intended for Win3x. But the driver is Dos based, and Windows uses it.
It/they may need adjusted to a more generic standard. Here.

Reply 93 of 1347, by Baron von Riedesel

User metadata
Rank Member
Rank
Member
stamasd wrote on 2023-03-10, 04:00:

I'm trying (and failing) to build jemmex from source. Using msys2/mingw64, I installed from source jwasm, found a binary of jwlink (1.9) and using nmake from VS community 2019; nmake complains of operands of unequal sizes in JEMM32.asm
src\JEMM32.ASM(293) : Error A2048: Operands must be the same size: 2 - 4
src\JEMM32.ASM: 2615 lines, 1 passes, 37 ms, 0 warnings, 27 errors

Better use a precompiled binary of jwasm ... must be a long time since I tried mingw64: https://github.com/Baron-von-Riedesel/JWasm/r … _v216_win32.zip

Reply 94 of 1347, by RayeR

User metadata
Rank Oldbie
Rank
Oldbie

Hi, I just tested the latest ver. SBEMU from github but it doesn't work on my system (in signature) with SB Audigy1. Anybody else had a success on a SB card?

It detected PCI device SB Audigy but after messages that "RM and PM support: enabled" it beeped from speaker and ended with "Internal stack overflow, System halted" message and push HW reset button was necessary. I loaded JEMMEX and HX from the SBEMU package. Any idea waht to try?

UP: I tried run it also without JEMM/QEMM - just himem and it halted too.

BTW what should numbers 00:00:00.000 mean? A soundcard PCI bus/dev/func address? Then it shouldn't be all 0...
should be:
PCI device #24 found at bus: 6, dev: 0, func: 0
Vendor ID: 1102h (Creative Labs)
Device ID: 0004h, Revision ID: 3, Class: 04h (multimedia device)
Sub-Class: 01h (audio device)
DB name: EMU10k2/CA0100/CA0102/CA10200 [Sound Blaster Audigy Series]
IRQ: 19, INTA, Cache line size: 0 Bytes, Latency: 32, max 5us, Status: 0290h
BAR: 0000FFE1h, 00000000h, 00000000h, 00000000h, 00000000h, 00000000h
ROM base: 00000000h, Cardbus CISptr: 00000000h, Subs.VID: 1102h, Subs.ID: 0053h
CMD: IntDis-,FB2B-,SERREn-,WCC-,PER-,VGAPS-,MemWIEn-,SCE-,BusMa+,MemSEn-,IOSEn+

Attachments

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

Reply 96 of 1347, by Baron von Riedesel

User metadata
Rank Member
Rank
Member
RayeR wrote on 2023-03-10, 06:30:

Hi, I just tested the latest ver. SBEMU from github but it doesn't work on my system (in signature) with SB Audigy1. Anybody else had a success on a SB card?

Yes - me, at least ... both a SB Live and a SB Audigy 2.

It detected PCI device SB Audigy but after messages that "RM and PM support: enabled" it beeped from speaker and ended with "Internal stack overflow, System halted"

That message isn't displayed by hdpmi or jemmex, and AFAIK, neither from sbemu.

BTW what should numbers 00:00:00.000 mean? A soundcard PCI bus/dev/func address? Then it shouldn't be all 0... should be: PCI de […]
Show full quote

BTW what should numbers 00:00:00.000 mean? A soundcard PCI bus/dev/func address? Then it shouldn't be all 0...
should be:
PCI device #24 found at bus: 6, dev: 0, func: 0
Vendor ID: 1102h (Creative Labs)
Device ID: 0004h, Revision ID: 3, Class: 04h (multimedia device)
Sub-Class: 01h (audio device)
DB name: EMU10k2/CA0100/CA0102/CA10200 [Sound Blaster Audigy Series]
IRQ: 19, INTA, Cache line size: 0 Bytes, Latency: 32, max 5us, Status: 0290h
BAR: 0000FFE1h, 00000000h, 00000000h, 00000000h, 00000000h, 00000000h
ROM base: 00000000h, Cardbus CISptr: 00000000h, Subs.VID: 1102h, Subs.ID: 0053h
CMD: IntDis-,FB2B-,SERREn-,WCC-,PER-,VGAPS-,MemWIEn-,SCE-,BusMa+,MemSEn-,IOSEn+

Hm, IRQ 19 doesn't sound too good, comes from APIC, I guess ( DOS-compatible IRQs are restricted to 0-15 )

Any idea waht to try?

Well, yes, of course. I had problems with those SB PCI cards on a second machine that I tried. Turned out that it's not a good idea to enable interrupts for the sound card before the sbemu IRQ handler is installed. So I modified sbemu a bit and it worked ...

Reply 97 of 1347, by Kamerat

User metadata
Rank Oldbie
Rank
Oldbie
L4MD4 wrote on 2023-03-10, 02:03:
I'm sure you are not the only one wondering this. […]
Show full quote
sergio_prado wrote on 2023-03-10, 00:39:

Sorry if this is a dumb question, but this could be used on Win9x?

I'm sure you are not the only one wondering this.

My system doesn't work with SBEMU, yet. So, I am no authority on it.

Windows says it cannot run, because a protected-mode software is running. That would be Jemmex. But you can load Windows with Qemm, Hdpmi32i, and SBEMU. If your audio card is not disabled, driver installed or not, Windows will likely lock up.

Protected mode SBEMU might then be running, after Windows loads. Unless Windows alters the situation.

But even with that, I find it unlikely that Windows can be made to use it. Maybe Win3x (even with Jemmex).

If you want audio in Windows 9x on newer systems you can always use an USB audio adapter. You can also get PCIe based CMI 8738 off Ebay that should support Windows 9x, but don't expect Sound Blaster emulation to be working inside Windows when using VxD drivers. I'm pretty sure SBEMU never were intended for use with Windows 9x

DOS Sound Blaster compatibility: PCI sound cards vs. PCI chipsets
YouTube channel

Reply 98 of 1347, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
stamasd wrote on 2023-03-10, 03:00:

Ah OK that clarifies a few things. By "author" I meant the author of SBEMU and the OP in this thread.
FWIW, I did test also with version 5.84 of jemmex and jload. The same crashes happened.

(and indeed on my test system - the Zotac Zbox - version 5.84 does not enable UMBs whereas previous versions do)

It's originally posted by Baron von Riedesel, the author of jemm, in another thread. Which is mentioned in the first post of this thread.

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 99 of 1347, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
RayeR wrote on 2023-03-10, 06:30:
Hi, I just tested the latest ver. SBEMU from github but it doesn't work on my system (in signature) with SB Audigy1. Anybody els […]
Show full quote

Hi, I just tested the latest ver. SBEMU from github but it doesn't work on my system (in signature) with SB Audigy1. Anybody else had a success on a SB card?

It detected PCI device SB Audigy but after messages that "RM and PM support: enabled" it beeped from speaker and ended with "Internal stack overflow, System halted" message and push HW reset button was necessary. I loaded JEMMEX and HX from the SBEMU package. Any idea waht to try?

UP: I tried run it also without JEMM/QEMM - just himem and it halted too.

BTW what should numbers 00:00:00.000 mean? A soundcard PCI bus/dev/func address? Then it shouldn't be all 0...
should be:
PCI device #24 found at bus: 6, dev: 0, func: 0
Vendor ID: 1102h (Creative Labs)
Device ID: 0004h, Revision ID: 3, Class: 04h (multimedia device)
Sub-Class: 01h (audio device)
DB name: EMU10k2/CA0100/CA0102/CA10200 [Sound Blaster Audigy Series]
IRQ: 19, INTA, Cache line size: 0 Bytes, Latency: 32, max 5us, Status: 0290h
BAR: 0000FFE1h, 00000000h, 00000000h, 00000000h, 00000000h, 00000000h
ROM base: 00000000h, Cardbus CISptr: 00000000h, Subs.VID: 1102h, Subs.ID: 0053h
CMD: IntDis-,FB2B-,SERREn-,WCC-,PER-,VGAPS-,MemWIEn-,SCE-,BusMa+,MemSEn-,IOSEn+

00:00:00.000 is the timestamp(since app startup) of the mpxplay's log.
Stack overflow indicates we may miss some ACK on soundcard IRQ handler.

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