VOGONS


SBEMU: Sound Blaster emulation on AC97

Topic actions

Reply 20 of 1347, by zyzzle

User metadata
Rank Member
Rank
Member
digger wrote on 2023-03-06, 00:49:

But yeah, native DOS compatibility is well and truly on its way out. And honestly, it's amazing that it was preserved this long, when you think about it.

But in the meantime, I'm also quite curious to see some records shattered with Quake and other games in DOS running on as modern as possible hardware in all their audiovisual glory. 🙂

Well, I'll admit that 35 years was a good run. BUT, but, it would have "cost" so very little to continue to keep it alive. Why the hell just "delete" legacy hardware compatibility of 40+ years of great programs? To save a few cents. Because of "security" reasons?! (hah, hah!). Or because, more rightly, you've got two very greedy companies who love their walled gardens and abstractions layers / locking things down?

DOS video support has been imperfect, even broken for a long time in "new" systems, however. All the missing / incomplete VGA modes, imperfect VGA and VBE3 support, etc. Especially for onboard video in laptops (which use Intel Onboard Graphics).

Quake works well on baremetal DOS. However, to get good speed, you'll need a newer "modern" system on which you can use RayeR's MTRRLFBE video MTRR writeback-combining program to get max speed out of Quake's high-resolution VESA modes.
There's even a wonderful DOS port of Quake 2! One of my "newer" intel core systems gets 83 fps at 1920x1080 resolution with it in DOS... and SBEMU works very well with it!

And, thanks for the info on current efforts being made to surmount UEFI's non-legacy boot limitations / castration. I'll look into the project you mention, and be following it closely. God speed to it and to others for sake of the Retro Scene.

Reply 22 of 1347, by rasteri

User metadata
Rank Member
Rank
Member
zyzzle wrote on 2023-03-06, 06:48:

I've been trying to figure this out myself. Information is very scant and often conflicting. I remember using a 10th Gen core i5 laptop (Costco price mistake about 3 years ago), and it actually booted into legacy mode (DOS), but its VGA drivers were entirely absent, which made it useless for DOS, and especially for DOS games (most of which are 320x200 - 640x400).

For built-in graphics yeah, but I recently tried DOS games on an RTX 3080 and they mostly worked great. So I'm guessing that using an external card may allow VGA modes?

Reply 24 of 1347, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++
dragonkn wrote on 2023-03-06, 12:28:

Hi, this project is great! Thanks!
Is it known issue that cd-audio music is not working?

I'm using SB Live, Dos 7, Monkey island 1 cd-audio not working in game

Does it have a physical analog connection between the analog out header on the CD-ROM to a header on the soundcard? Because that's what DOS expects to be able to play CD audio. Ripping the track on the fly digitally through the ATA bus and playing it is a later Windows thing.

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.

Reply 25 of 1347, by dragonkn

User metadata
Rank Newbie
Rank
Newbie

Yes, i can confirm i have analog connection between the analog out header on the CD-ROM to a header on the soundcard.
also analog audio is working OK on Dos via default creative live dos driver, can it be a problem with sbemu parameters setup?

Reply 26 of 1347, by zyzzle

User metadata
Rank Member
Rank
Member
rasteri wrote on 2023-03-06, 12:40:

For built-in graphics yeah, but I recently tried DOS games on an RTX 3080 and they mostly worked great. So I'm guessing that using an external card may allow VGA modes?

... if you can get into legacy boot in the first place. The 3080 must have a Compatibility Support Module (CSM) which means it still retains the legacy 16-bit vBIOS code within its video BIOS. The problem then becomes: Does your system support the loading of a CSM from that video card, and does the system have a legacy BIOS which isn't UEFI-only? This would allow booting into bare metal DOS. And, of course also enable the VGA modes (and VBE3 modes) in the tables of the 3080's 16-bit vBIOS. And along with SBEMU, you'd have a super souped-up DOS gaming experience...

Reply 27 of 1347, by Kamerat

User metadata
Rank Oldbie
Rank
Oldbie

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.

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

Reply 28 of 1347, by keenmaster486

User metadata
Rank l33t
Rank
l33t

10-15 years ago this was my unobtanium, unicorn software that I wished existed and scoured the entire Internet for years trying to find something that would do this for me. I can hardly believe my eyes.

Now of course these days I don't need it any more, since I have computers with normal DOS sound cards anyway, but I'm looking forward to testing this nonetheless.

World's foremost 486 enjoyer.

Reply 30 of 1347, by keenmaster486

User metadata
Rank l33t
Rank
l33t

First impressions:

My modern computer (Intel 12th gen with RTX 3070 Ti) actually does support legacy BIOS booting. I booted from a floppy disk with DOS, but Commander Keen loaded with just the teal border and no graphics (no EGA support on the RTX apparently), so I'm leaving off on that for now.

Tried SBEMU next on an IBM Thinkpad T41. DOOM and Wolfenstein 3D both work perfectly. Sounds exactly like it should, both OPL music and SB sound effects working correctly.

Commander Keen would not load, however, with or without SBEMU or HDPMI loaded. Not sure if this is something to do with JEMM, but I have JEMM loaded on all of my DOS systems and haven't had issues with Keen on them. Keen works fine in Windows 98 on this system.

Any chance of getting a version of this that loads inside of Windows 9x?

Last edited by keenmaster486 on 2023-03-06, 19:36. Edited 1 time in total.

World's foremost 486 enjoyer.

Reply 31 of 1347, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
dragonkn wrote on 2023-03-06, 13:27:

Yes, i can confirm i have analog connection between the analog out header on the CD-ROM to a header on the soundcard.
also analog audio is working OK on Dos via default creative live dos driver, can it be a problem with sbemu parameters setup?

This is most likely a mixer problem. SB Live DOS driver enables the CD Audio mixer source but SBEMU does not. Actually I would say it's not even expected to do that since it's not an SB Live specific utility and there is no general way to enable different mixer sources on different sound cards. I'm not even sure that HD Audio devices have such a mixer source anymore as CD-Audio. So settings this would require an SB Live/Audigy specific option.
But there is an SB Live specific DOS utility that can enable any mixer sources without using the Creative DOS drivers:
Multichannel DOS mixer for DOS sound builds v0.49 for Live, v1.01 for Audigy

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 33 of 1347, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++

Dang, trying to remember what I was doing in 1996 to just turn on CD input to a card all the time, so if you were in DOS and stuck a CD and hit play on the drive, you just heard it, no messing. So I'd hope, that would stick in a game that just put out CD audio and hoped you had it turned on.

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.

Reply 34 of 1347, by keenmaster486

User metadata
Rank l33t
Rank
l33t

Further game testing on IBM Thinkpad T41:

Jazz Jackrabbit: exits with message "Loader Error (0025): cannot initialize" (before you ask, yes, my version is patched to fix the high speed CPU error)
Hocus Pocus: everything works
Epic Pinball: something weird is going on with the samplerates. I have to select the lowest one for it to sound correct. The others play too fast.
Duke Nukem 3D: everything works
Sonic Robo Blast 2 version 4.35 (last compiled for DOS - this is interesting because it's an Allegro-based game): ASETUP causes JEMM to crash with an exception. Does not happen on my other systems with JEMM.
Adlib Tracker II: crashes with an error loading its timer function (works fine with JEMM in my other systems)

World's foremost 486 enjoyer.

Reply 37 of 1347, by digger

User metadata
Rank Oldbie
Rank
Oldbie
zyzzle wrote on 2023-03-06, 14:38:
rasteri wrote on 2023-03-06, 12:40:

For built-in graphics yeah, but I recently tried DOS games on an RTX 3080 and they mostly worked great. So I'm guessing that using an external card may allow VGA modes?

... if you can get into legacy boot in the first place. The 3080 must have a Compatibility Support Module (CSM) which means it still retains the legacy 16-bit vBIOS code within its video BIOS. The problem then becomes: Does your system support the loading of a CSM from that video card, and does the system have a legacy BIOS which isn't UEFI-only? This would allow booting into bare metal DOS. And, of course also enable the VGA modes (and VBE3 modes) in the tables of the 3080's 16-bit vBIOS. And along with SBEMU, you'd have a super souped-up DOS gaming experience...

I believe you're mixing up CSMs with Option ROMs. The CSM is an optionally integrated component of UEFI, which adds legacy BIOS compatibility. The problem is that since (I believe) 2020 or so, UEFI systems no longer ship with a CSM, and unfortunately it's not something you can load afterwards. Apparently, it needs to be compiled in when the UEFI BIOS image is built by the manufacturer. So if your system doesn't come with a CSM, you'd have to rely on the manufacturer to eventually release a BIOS update that upgrades the UEFI to a version that was compiled with a CSM. But they probably won't do that if they haven't shipped it with one in the first place.

The part that must be provided by the graphics card in order to be able to boot into DOS and support legacy VGA graphics and such is called an Option ROM. So in rasteri's case, the RTX 3080 apparently turned out to have a proper Option ROM for legacy BIOSes. This seems like a modular mature firmware component that NVIDIA has carried over from generation to generation with little cost, and continues to work well. That's nice, but I don't expect them to put serious effort in tracking down DOS game compatibility issues with it. I wouldn't be surprised if their Option ROM code has hardly been touched since the early GeForce days. 🙂

By the way, it's not just graphics cards that can have Option ROMs. It's also present on bootable disk controllers, such as SATA and SCSI controllers, as well as NICs that support network booting. There is even at least one modern NVMe SSD drive that has an Option ROM to allow it to boot into DOS and other pre-UEFI operating systems: the Samsung 950 Pro. However, that's a rare exception that fills a modest niche, since the industry's migration to UEFI was already well underway when the first NVMe drives started to appear on the market.

Option ROMs are mapped to the UMB area (the top most part of the first 1MB of RAM, which is accessible in Real Mode). Upon startup, the legacy BIOS (or in the case of a UEFI bios, the CSM) scans the memory for these Option ROMs and loads them as it finds them, before starting the boot process.

Tkchia's biefircate project that I mentioned earlier is intended to be an alternative solution to CSMs that, unlike those, can be installed on a UEFI system without having to be built with it from the factory. UEFI will simply boot it as if it were an OS. Biefircate will then try to set up the legacy BIOS API services itself, after which it will try to boot pre-UEFI operating systems in the same way that a legacy BIOS would. As part of this process, it will actually scan the UMB area for Option ROMs and if it finds any, it will try to load them. That's pretty cool.

But to summarize, as long as biefircate isn't ready yet, the following things are necessary for a modern (UEFI) PC to be able to boot DOS natively:

  • The UEFI must have been built with a CSM
  • The graphics card must have an Option ROM that will offer Video BIOS extensions, including legacy VGA compatibility and preferably also Vesa BIOS extensions (VBE)
  • There must be a bootable controller with an Option ROM installed, either a drive controller or a NIC (or both).

Reply 38 of 1347, by LSS10999

User metadata
Rank Oldbie
Rank
Oldbie
rasteri wrote on 2023-03-06, 12:40:

For built-in graphics yeah, but I recently tried DOS games on an RTX 3080 and they mostly worked great. So I'm guessing that using an external card may allow VGA modes?

How does RTX 3080 (or Ampere in general) perform in DOS? Do you have any noticeable graphical glitches?

My personal experience with recent nVidia video card generations has been abysmal, even on legacy BIOS systems.

Especially since Maxwell, a good amount of video modes are broken (glitches or outright errors), and it was even worse with Turing (more functions broken/unusable). Not all games were affected, however.

The last generation whose video BIOS can be considered sane for me (with no major glitches or errors) is Fermi.

EDIT: Technically this is off-topic. While sound has always been a major blocker for relatively modern PCs to run DOS games, which SBEMU aims to address, graphics is also increasingly starting to become another major blocker as VESA/VGA bios becomes increasingly worse, to the point of being completely absent.

Last edited by LSS10999 on 2023-03-07, 02:24. Edited 2 times in total.

Reply 39 of 1347, by digger

User metadata
Rank Oldbie
Rank
Oldbie
zyzzle wrote on 2023-03-06, 07:03:
digger wrote on 2023-03-06, 00:49:

But yeah, native DOS compatibility is well and truly on its way out. And honestly, it's amazing that it was preserved this long, when you think about it.

But in the meantime, I'm also quite curious to see some records shattered with Quake and other games in DOS running on as modern as possible hardware in all their audiovisual glory. 🙂

Well, I'll admit that 35 years was a good run. BUT, but, it would have "cost" so very little to continue to keep it alive. Why the hell just "delete" legacy hardware compatibility of 40+ years of great programs? To save a few cents. Because of "security" reasons?! (hah, hah!). Or because, more rightly, you've got two very greedy companies who love their walled gardens and abstractions layers / locking things down?

Yes, it's actually for security reasons. The legacy boot mechanism of yore is a build-up of old standards that were never seriously designed with computer security in mind.

It's just a fact of life that more complexity means more vulnerabilities. And getting rid of the legacy BIOS gets rid of a lot of complexity.

As retro gamers we may not like it, but it is what it is.

I do believe however, that secure boot mechanisms should always be implemented in a way that allows owners to install whatever OS they want on their devices, and also to disable such security features if they want to. Offered as a feature? Yes. Enabled by default? Yes. Forced upon the user whether they want it or not? F🤬k, no.

Sorry. I keep going off-topic here. Although it's clear that these topics are related. Ultimately this is about preserving native DOS gaming compatibility on as many kinds of hardware as possible, for as long as possible. On a modern legacy-free PC, ISA sound card emulation is one important part, but somehow being able to boot DOS from UEFI is another.

But crazii, if you prefer, we could move such discussions to a broader topic.