VOGONS


SBEMU: Sound Blaster emulation on AC97

Topic actions

Reply 1160 of 1341, by vico

User metadata
Rank Newbie
Rank
Newbie
crazii wrote on 2024-02-08, 04:44:

I tried that too, and I got the same results as yours. so I use Rufus to write its builtin FreeDOS image to the disk, and copy sbemu manually to the disk 🤣 . You may ask @digger how to use the image in a proper way.

Using MiniTool Partition Wizard I extended the partition of my USB device to 2GB and it worked, the file system was not corrupted, I was able to add the games, Freedos and SBEMU loaded correctly.
I don't know if I can extend it to 4GB since I haven't tried.

However, using the build UserBuild_2024.02.08_01-48 I couldn't hear the sound of any games, so I replaced the SBEMU files with those from build 1.0 beta 3 and with that I was able to hear the sound of the games on my HDA properly.

Reply 1161 of 1341, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
vico wrote on 2024-02-08, 20:33:
Using MiniTool Partition Wizard I extended the partition of my USB device to 2GB and it worked, the file system was not corrupte […]
Show full quote
crazii wrote on 2024-02-08, 04:44:

I tried that too, and I got the same results as yours. so I use Rufus to write its builtin FreeDOS image to the disk, and copy sbemu manually to the disk 🤣 . You may ask @digger how to use the image in a proper way.

Using MiniTool Partition Wizard I extended the partition of my USB device to 2GB and it worked, the file system was not corrupted, I was able to add the games, Freedos and SBEMU loaded correctly.
I don't know if I can extend it to 4GB since I haven't tried.

However, using the build UserBuild_2024.02.08_01-48 I couldn't hear the sound of any games, so I replaced the SBEMU files with those from build 1.0 beta 3 and with that I was able to hear the sound of the games on my HDA properly.

Thanks for the report, currently there're code changes that are not fully tested, there might be bugs. Have you use all the files in the UserBuild_2024.02.08_01-48 , including HDPMI32i.EXE?

Can you test with this one? please use all other files in the zip of UserBuild_2024.02.08_01, and use sbemu.exe from this zip.

Filename
sbemu.zip
File size
183.63 KiB
Downloads
35 downloads
File license
GPL-2.0-or-later

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 1162 of 1341, by vico

User metadata
Rank Newbie
Rank
Newbie
crazii wrote on 2024-02-08, 23:42:

Thanks for the report, currently there're code changes that are not fully tested, there might be bugs. Have you use all the files in the UserBuild_2024.02.08_01-48 , including HDPMI32i.EXE?

Can you test with this one? please use all other files in the zip of UserBuild_2024.02.08_01, and use sbemu.exe from this zip.
sbemu.zip

I copied all the files from the build UserBuild_2024.02.08_01-48 to my USB device and then replaced sbemu.exe with the one from your last comment, now the sound is working.

Although I should mention that using T5 the game Hocus Pocus returns "Divide error", this does not happen with build 1.0 beta 3.

Reply 1163 of 1341, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
vico wrote on 2024-02-09, 01:18:
crazii wrote on 2024-02-08, 23:42:

Thanks for the report, currently there're code changes that are not fully tested, there might be bugs. Have you use all the files in the UserBuild_2024.02.08_01-48 , including HDPMI32i.EXE?

Can you test with this one? please use all other files in the zip of UserBuild_2024.02.08_01, and use sbemu.exe from this zip.
sbemu.zip

I copied all the files from the build UserBuild_2024.02.08_01-48 to my USB device and then replaced sbemu.exe with the one from your last comment, now the sound is working.

Although I should mention that using T5 the game Hocus Pocus returns "Divide error", this does not happen with build 1.0 beta 3.

Cool, thanks, I'll check it again for any cause for the divide error.

BTW can test it with the /FIXTC switch to see there's any divide error, that might help locate the bugs.
Without /FIXTC there's some untested code paths / cases.

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 1164 of 1341, by vico

User metadata
Rank Newbie
Rank
Newbie
crazii wrote on 2024-02-09, 01:56:

BTW can test it with the /FIXTC switch to see there's any divide error, that might help locate the bugs.
Without /FIXTC there's some untested code paths / cases.

Using /FIXTC1 together with T5 Hocus Pocus also returns "Divide error", but I just realized this also happens with version 1.0 beta 3, sorry for giving wrong feedback.

Other things that I could verify that the sound in this new version seems accelerated and even distorted, I have noticed this in the SFX of Hocus Pocus that go very fast, this is more noticeable in the "yahoo" that are distorted. The sound is more faithful using version 1.0 beta 3.

Reply 1165 of 1341, by vico

User metadata
Rank Newbie
Rank
Newbie

Additionally, I did some tests in Dosbox and I found out that when Hocus Pocus finds T5 in the BLASTER variable, it returns the "Divide error", so it is not an error from SBEMU, but from the game itself, sorry again.

Reply 1166 of 1341, by crazii

User metadata
Rank Oldbie
Rank
Oldbie

OK, cool, I remember SBEMU won't set T in BLASTER env except for SB16 (T6), for some problem reported here by someone.
Have your set it manually after running SBEMU? normally you don't need set it again after running SBEMU, as SBEMU will set it after loaded.

I did made some changes on the sound resample couple days ago, I'll confirm this later.

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 1167 of 1341, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
vico wrote on 2024-02-09, 05:55:

Other things that I could verify that the sound in this new version seems accelerated and even distorted, I have noticed this in the SFX of Hocus Pocus that go very fast, this is more noticeable in the "yahoo" that are distorted. The sound is more faithful using version 1.0 beta 3.

You can use /FIXTC this time to see the problem still exists, beta3 has no /FIXTC options but it behave as /FIXTC is on.

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 1168 of 1341, by tiagotarifa

User metadata
Rank Newbie
Rank
Newbie

Just reporting that sbemu works on a IBM Thinkpad x41

Version used: UserBuild_2024.02.07_20-53

System Specs:

  • IBM Thinkpad x41
  • Chipset: Intel 915GM
  • Multimedia device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 audio controller (rev 03)
  • Bios date: 12/14/2006

Load sbemu with these parameters:

sbemu /FIXTC1 /VOL9
  • /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: Music only works with Sound Blaster. Sound Blaster AWE it didn't;
  • Epic Pinball: Works with Sound Blaster Pro;
  • Duke Nukem 2: Works automatic;

Reply 1169 of 1341, by vico

User metadata
Rank Newbie
Rank
Newbie
crazii wrote on 2024-02-09, 06:29:

OK, cool, I remember SBEMU won't set T in BLASTER env except for SB16 (T6), for some problem reported here by someone.
Have your set it manually after running SBEMU? normally you don't need set it again after running SBEMU, as SBEMU will set it after loaded.

I did made some changes on the sound resample couple days ago, I'll confirm this later.

I have to do it manually because some games don't work if they don't find the T value in the Blaster variable, Hocus Pocus is one of them.

Reply 1170 of 1341, by vico

User metadata
Rank Newbie
Rank
Newbie
crazii wrote on 2024-02-09, 06:40:
vico wrote on 2024-02-09, 05:55:

Other things that I could verify that the sound in this new version seems accelerated and even distorted, I have noticed this in the SFX of Hocus Pocus that go very fast, this is more noticeable in the "yahoo" that are distorted. The sound is more faithful using version 1.0 beta 3.

You can use /FIXTC this time to see the problem still exists, beta3 has no /FIXTC options but it behave as /FIXTC is on.

Testing on my HDA, even with /FIXTC1 the sfx of Hocus Pocus are distorted.

I also did tests with my SB0100 and using /FIXTC1 the sound volume is lower than with /FIXTC0, in both cases the Hocus Pocus sfx are very accelerated.

Reply 1171 of 1341, by veelstekel

User metadata
Rank Newbie
Rank
Newbie

If anyone has issues with Doom, use the following work-around:
- Ensure your BLASTER environment is set
- Edit the default.cfg and change the SB_IRQ to 0
- Start Doom

You'll have to repeat it everytime you start; since Doom on Exit will update the CFG file 😉
(Might work for other games as well which uses ID Tech 1)

If you use Doom 1.1 it will work out of the box w/o this workaround. (Older version of DMX)

Reply 1172 of 1341, by RayeR

User metadata
Rank Oldbie
Rank
Oldbie

Did you tried to set RO attribute to CFG file? It may prevent changes but under DOS it's not sure.

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

Reply 1175 of 1341, by Baron von Riedesel

User metadata
Rank Member
Rank
Member
rasz_pl wrote on 2024-02-08, 07:22:
crazii wrote on 2024-02-08, 04:41:
rasz_pl wrote on 2024-02-08, 03:32:

wouldnt hijacking 0x40-47 timer accesses solve this?

With IO port trapping to 0x40-0x47, we can skip the reprogramming part, but with or without port trapping of the timer, the most tricky part is how to override and call games' handler in a reliable manner.

Yes, You would have to prevent client software from being allowed to change int handler, can we trap on write attempt to IVT?

Sounds too complex to me. I'd rather use the onchip APIC timer. It's not used in DOS and pretty easy to access and init. The only (small) problem is that its interval depends on the CPU frequency, so you'll have to do a few calculations to get a proper init value. The APIC timer exists since P54C, IIRC.

Reply 1176 of 1341, by georgel

User metadata
Rank Member
Rank
Member
Baron von Riedesel wrote on 2024-02-12, 17:45:
rasz_pl wrote on 2024-02-08, 07:22:
crazii wrote on 2024-02-08, 04:41:

With IO port trapping to 0x40-0x47, we can skip the reprogramming part, but with or without port trapping of the timer, the most tricky part is how to override and call games' handler in a reliable manner.

Yes, You would have to prevent client software from being allowed to change int handler, can we trap on write attempt to IVT?

Sounds too complex to me. I'd rather use the onchip APIC timer. It's not used in DOS and pretty easy to access and init. The only (small) problem is that its interval depends on the CPU frequency, so you'll have to do a few calculations to get a proper init value. The APIC timer exists since P54C, IIRC.

To speed up this approach which is quite nice initially SB emulator can accept the divider/bus frequency as a command line parameter.

Reply 1177 of 1341, by veelstekel

User metadata
Rank Newbie
Rank
Newbie
tiagotarifa wrote on 2024-02-03, 22:44:
Reporting that sbemu worked using Realtek ACL662 […]
Show full quote

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.

Thanks for the tip on the /I5! Now it also works with my AMD C-60 APU with the VT1708S chipset!

Reply 1178 of 1341, by DarthSun

User metadata
Rank Newbie
Rank
Newbie

DOS 7.1 universal disk image is ready. It can be written to external internal drives, flash drives, SSDs, HDDs.
Tested configurations:
775/6800GT AGP+RagePro PCI/SB060
AM3/GTX580PCIe/motherboard sound
AM3+/GTX1060PCIe/motherboard sound
X99/GTX1650+HD6850/motherboard sound
Zen2/GTX1650+7900GS/SB060+motherboard sound

MasterBoot was a bit more difficult, but I stole the Hirens DVD boot sector. Linux loader loads the plain MBR, then the basic menu, and from there on the menued DOS.
4TB external SSD under DOS...yes, the modern Loew driver sees the capacity under DOS up to 32768TB. Of course, DosLfn also handles long file names.
The USB Image Tool pendrive for writing is free, but PowerISO (attached) for HDD/SSD is no longer available, and the image also contains copyrights, so I can't share it here, maybe privately...?
Of course, SBEmu works perfectly here as well, sound and video are ok, in protected mode the UEFI only video card is ok, and in real mode even the HD6850 - of course you need to slow down, CPUSpd, David Chee's excellent program, with which the modern machine also XT/ It can be slowed down to 386/486 speed.
After preparing a 4TB SSD, the result can be seen in MiniPWizzard under Win:

71eefor4tb.jpg
Filename
71eefor4tb.jpg
File size
253.52 KiB
Views
650 views
File license
Fair use/fair dealing exception

The remaining 3633GB can be formatted to FAT32, of course, easily with Master Loew's driver, and no GPT partition is needed.
Of course, DOS doesn't need such a large drive, I only tried to see if the master's driver works.

Reply 1179 of 1341, by vanfanel

User metadata
Rank Newbie
Rank
Newbie

Hello!

I have a MiniPC with Celeron N3350, on which SBEMU is almost working... but shows a very strange error:

Sound card: Intel HDA
Invalid Sound Card IRQ: 25, Trying to assign a valid IRQ...
Failed to assign a valid IRQ for sound card, abort.

With sbemu /SCL it's listed like:

Intel HDA: Intel SKL (Broxton-P) (80865A98) -> Unknown (00000000) 

Is it supposed to be working? Is there something else I can try?

I already disabled everything I could (network, misc PCI devices etc..) on the BIOS, to free up IRQs, but made no difference.

It seems to be the same problem that @zyzzle is having!
Did you get it working, @zyzzle?

Attachments

  • sbemuuu.jpg
    Filename
    sbemuuu.jpg
    File size
    69.32 KiB
    Views
    554 views
    File license
    Public domain