VOGONS


SBEMU: Sound Blaster emulation on AC97

Topic actions

Reply 1480 of 1596, by DarthSun

User metadata
Rank Member
Rank
Member
RayeR wrote on 2024-06-28, 11:30:

Maybe in 2050 will M$ release sources of Win98 and it will be possible to modify it's memory manager to cooperate with SBEMU 😀

Maybe, but not sure. He didn't even give the source of win3.1x. Recently, the DOS4 became has free a source code.
NV do published GTX1xxx and larger card registers to someone write a Win98/XP driver for them.

The 3 body problems cannot be solved, neither for future quantum computers, even for the remainder of the universe. The Proton 2D is circling a planet and stepping back to the quantum size in 11 dimensions.

Reply 1481 of 1596, by georgel

User metadata
Rank Member
Rank
Member
RayeR wrote on 2024-06-28, 11:30:

Maybe in 2050 will M$ release sources of Win98 and it will be possible to modify it's memory manager to cooperate with SBEMU 😀

It is not the memory manager that is required, it is the CPU hypervisor. Under win98 you are free to write a VxD that can trap I/O ports and do whatever you need https://www-user.tu-chemnitz.de/~heha/vxd/vxd.htm. There is no need but you can even explore the kernel if you wish, or your VxD with the greatest debugger - SoftICE.

Reply 1482 of 1596, by digger

User metadata
Rank Oldbie
Rank
Oldbie
wierd_w wrote on 2024-06-28, 03:55:

The dealbreakers are 'windows will ONLY ALLOW emm386 as EMS provider' and 'Windows will ONLY ALLOW VMM32 as HDPMI host'.

The latter part can't be helped, but the former part, 'windows will ONLY ALLOW emm386 as EMS provider', is not accurate. Windows 3.x supports an API called "Global EMM Import Specification" (GEMMIS), which handles the handover of memory management from the EMM when Windows is started from DOS. For this to work, the EMM (what you call the EMS provider) needs to support GEMMIS.

Microsoft's EMM386 obviously supports GEMMIS (from a certain version onwards), as do later versions of QEMM and 386MAX. Unfortunately, Jemm currently lacks support for GEMMIS. There is a pending feature request for it, but Baron von Riedesel, the maintainer, is so far not convinced that it's worth the effort. I really hope he can be convinced, or that someone else will try adding that support to Jemm, since to my knowledge GEMMIS is the one still missing feature that would make Jemm a complete replacement for EMM386 and QEMM.

This is somewhat off-topic though, since making Jemm compatible with Windows 3.x in 386 Enhanced Mode would still not make SBEMU compatible with Windows. And honestly, I don't think that's necessary, since there are other projects for that, such VDMSound. Running games with sound in native DOS on newer hardware has always been the focus of SBEMU.

Reply 1483 of 1596, by RayeR

User metadata
Rank Oldbie
Rank
Oldbie

If I remember well, also Win9x could run with QEMM 9, that replaced EMM386, many years I had this setup wit win95...

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

Reply 1484 of 1596, by wierd_w

User metadata
Rank Oldbie
Rank
Oldbie

But... GEMMIS is not...

It's an API by which the DOS EMM gets recognized by windows' VMM/Kernel based memory management, then disabled, so the windows one can take over.

It's most certainly NOT an API that lets the DOS EMM continue functioning while windows is running.

Reply 1485 of 1596, by digger

User metadata
Rank Oldbie
Rank
Oldbie
RayeR wrote on 2024-06-29, 11:47:

If I remember well, also Win9x could run with QEMM 9, that replaced EMM386, many years I had this setup wit win95...

Yes, I think I remember running Win9x with QEMM loaded in config.sys as well, without problems. I believe that's because Win9x continued to support GEMMIS.

Reply 1486 of 1596, by RayeR

User metadata
Rank Oldbie
Rank
Oldbie
georgel wrote on 2024-06-28, 18:00:

Under win98 you are free to write a VxD that can trap I/O ports and do whatever you need https://www-user.tu-chemnitz.de/~heha/vxd/vxd.htm...

Thx for interesting docs about VXD, a reading for long winternights... Also there's mention about writting VXD in C that debunk a myth it can be done only in ASM...

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

Reply 1487 of 1596, by jtchip

User metadata
Rank Member
Rank
Member
bmwsvsu wrote on 2024-06-17, 19:51:

I have a question I'm hoping somebody can answer. I'm using a CMI8738 sound card (specifically, a PCI card made by AOPEN - the AW840). I have SBEMU working just fine and am getting audio as expected, but my 15-pin gameport is not correctly configured for use as a joystick port (games won't recognize joysticks). If I run the original driver initializer for the card, then that gets the gameport working with a joystick, but then the sound stops working. I've tried loading everything in various orders but no matter what I do I end up with either non-working sound or a non-working joystick. Any suggestions?

Looks like the joystick port is not enabled in the code, try this (not even compile-tested, I still haven't set up a build environment, but should work):

diff --git a/mpxplay/au_cards/sc_cmi.c b/mpxplay/au_cards/sc_cmi.c
index fcf6532..b998438 100644
--- a/mpxplay/au_cards/sc_cmi.c
+++ b/mpxplay/au_cards/sc_cmi.c
@@ -585,6 +585,9 @@ static void cmi8x38_chip_init(struct cmi8x38_card *cm)
/* Set Bus Master Request */
snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_BREQ);

+ /* Enable joystick */
+ snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN);
+
/* Assume TX and compatible chip set (Autodetection required for VX chip sets) */
switch(cm->pci_dev->device_id) {
case PCI_DEVICE_ID_CMEDIA_CM8738:

Reply 1488 of 1596, by georgel

User metadata
Rank Member
Rank
Member
RayeR wrote on 2024-06-30, 22:55:
georgel wrote on 2024-06-28, 18:00:

Under win98 you are free to write a VxD that can trap I/O ports and do whatever you need https://www-user.tu-chemnitz.de/~heha/vxd/vxd.htm...

Thx for interesting docs about VXD, a reading for long winternights... Also there's mention about writting VXD in C that debunk a myth it can be done only in ASM...

It is mostly done in C. Here is the DDK, you can check hundreds of examples there https://www.mediafire.com/?p97txz6y6z151ij

Reply 1489 of 1596, by n1ghttr4p

User metadata
Rank Newbie
Rank
Newbie
crazii wrote on 2024-05-04, 02:50:
Here's early test edition of SBEMU with new DPMI (let's call it 1.1-alpha1 release candidate 1 for now), which includes the new […]
Show full quote

Here's early test edition of SBEMU with new DPMI (let's call it 1.1-alpha1 release candidate 1 for now),
which includes the new DPMI I'm working intensively on for more than 2 months.
It's been tested by veelstekel for couple of days but now he is temporarily unavailable, so I post the zip here for an early testing.

works on my T540p, with a tiny set of previous game tested, with this new version, there're some changes:

  • JEMMEX & QPIEMU is now essentially needed, even for PM games, the dependency of JEMMEX will be made optional by adding extra simplified v86 module later.
  • warcraft2 works without crash on modern laptop
  • Mortal Kombat II works
  • Jazz jackrabbit (GOG edition) and Tyrian 2000 (GOG edition works)
  • DOS4G exceptions passed to games as expected, and games terminate themselves 'normally'
Filename
sbemu-1.1apha1-rc1.zip
File size
283.93 KiB
Downloads
73 downloads
File license
CC-BY-4.0

and the latest features of SBEMU 1.0 beta4 are not merged yet, including the new linux drivers.
and also the source of the dpmi is not opened yet, but is guaranteed to open when it is more stable & complete. Currently there're some temporary codes that needs to be refactored, even the name is not determined. (initially named super386 which means a supervisor, and also vm386/vmm386 considered, which means a virtual machine or vm manager, later changed to vdpmi which indicates the planned 'vxd' and 'v86' feature).

This works fantastically for getting Jazz and Tyrian to work on my P4 / ICH5 / 865PE / YMF744 / 1GB setup. However, Duke3D and I'm sure many others crash when I attempt to load the game but does play sounds and MIDI in setup. Tried every JEMMEX setting I could think of. The 1.04/HDPMI32I setup runs Duke3D just fine. I'm sticking to the recommended settings in the readme now (just the necessary DLLs/EXEs loaded, X2MAX, NOEMS.) Of note, VDPMI.EXE doesn't seem to like MAXEXT set low in JEMMEX. Not sure how much it requires exactly, but there are games that only want up to 63 or 31m of extended memory visible.

For now I'm left having to use 2 exit-to-DOS shortcuts (for 1.04+HDPMI and 1.1+VDPMI) depending on which games I need to run. Any suggestions for the current release, or is it just something you're working the bugs out on?

Last edited by n1ghttr4p on 2024-07-03, 16:21. Edited 1 time in total.

Reply 1490 of 1596, by n1ghttr4p

User metadata
Rank Newbie
Rank
Newbie
Baron von Riedesel wrote on 2024-06-12, 11:49:
Aladdin is picky abou XMS, it should be a bit less than 32 MB - try MAXEXT=31744 […]
Show full quote
xtreger wrote on 2024-06-10, 17:19:

My config.sys:
DEVICEHIGH=C:\SBEMU\JEMMEX.EXE MAXEXT=32768

Aladdin is picky abou XMS, it should be a bit less than 32 MB - try MAXEXT=31744

However, the problem is most likely due to a page frame that uses non-free address space. You can try to force Jemm to use E000 or D800 as page frame ( i.e. option FRAME=E000 ). Jemm has found writeable memory there, and therefore excluded it as page frame candidate, but you'll loose nothing to try it nevertheless.

Finally, worth a try is to disable USB in setup...

Any plans to support YMF or implement crazii's sbemu code for it in VSBHDA?

Reply 1492 of 1596, by tauro

User metadata
Rank Member
Rank
Member

This is an update to my previous report (link). I was previously using version SBEMU.1.0beta3.

My hardware:
VIA EPIA TC10000
CLE266+VT8235M
VT1612A
VIA C3 1GHz

Warcraft II used to work, albeit with problems. Sound volume is low and music plays slower than normal. The FM volume increases while a PCM sound is being played.
Now with the latest version (1.0beta4) PCM sound doesn't work at all. The system crashes when a PCM sound is played. I tried with T4, T5, T6, makes no difference. FM music works inside the setup though.

Edit: I managed to solve this using DOS32A!

Overall, there's always clipping in the PCM audio (all the software I tried), while FM works well, but In some games it plays at a slower speed than normal.

Reply 1493 of 1596, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

Have got some exposure to more recent versions of both SBEMU and VSBHDA due to tinkering with a Laptop that has *8086:9c20, Intel 8 Series HD Audio Controller (Rev 4)*. Installed FreeDOS and DJGPP there and compiled both utilities from github main roughly couple weeks ago.

The outcome is very good, although Jemmex operation depended a little on which of the USB slots the pendrive was inserted into. Once I figured that out, SB16 and SBPro emulation was working and I was using both utilities interchangeably at the start. E.g. Cryo's Dune, Adventures of Robbo worked just fine. Then having Wacky Wheels play sound and music in Setup , but game itself crashing with SBEMU made me focus on VSBHDA and I found it absolutely stellar. The new things that I was excited to see were /O and /BS command line arguments. /O is used to specify Intel HD output channel, and allows to select either laptop speakers, or audio jack - or both in my case. Sadly could not get sound output via HDMI, but I am not sure that's possible with however BIOS arranges for output of VGA via HDMI at all.

/BS allows to specify sound buffers size in chunks of 4k, which is nice way to control this parameter without having to recompile the tool every time. What I noticed was that depending on the game behavior, bigger (e.g. 14 blocks for Cyrill Cyberpunk) or smaller (e.g. 7 blocks for Wacky Wheels) buffer size was working best on my machine. In the past (builds from very early this year) I was adjusting this to reduce the noticeable sound latency, I have not noticed this latency with recent build though, even at default parameter.

So far I've tested successfully: Gods, Magic Pockets, Adventures of Robbo, XQuest 2, Cyrill Cyberpunk Full, Dune 2, Malcolm's Revenge, Lands of Lore, Inherit the Earth, Doom 2 (vanilla and DJGPP/liballeg based port), Quake (via Engoo), Hexen 2 (via Hammers of Thyrion), Hexen (via DJGPP/liballeg based Bernewfie), Wacky Wheels Shareware.

What I noticed was that for some games (Inherit the Earth, Malcolm's Revenge) sound output was garbage unless the emulated card was reinitialized between loading VSBHDA and running the game. Not sure if there's an option for this in VSBHDA itself, I have been using a "one liner" allegro-based house tool for this even on my main desktop, and it did the trick on the laptop as well.

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - YMF744 (Cobra) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 1494 of 1596, by tauro

User metadata
Rank Member
Rank
Member
ludicrous_peridot wrote on 2024-07-14, 15:31:

game itself crashing with SBEMU made me focus on VSBHDA and I found it absolutely stellar

Thank you for reporting all this! I tried VSBHDA on my setup and it's working so much better than SBEMU.

ludicrous_peridot wrote on 2024-07-14, 15:31:

What I noticed was that for some games (Inherit the Earth, Malcolm's Revenge) sound output was garbage unless the emulated card was reinitialized between loading VSBHDA and running the game. Not sure if there's an option for this in VSBHDA itself, I have been using a "one liner" allegro-based house tool for this even on my main desktop, and it did the trick on the laptop as well.

I faced something similar. If I load VSBHDA and then a game, I get sound but there's a strong distortion, like a static noise. This happens in all games. If I close the game, uninstall/reload VSBHDA, then it works reliably with all compatible games/software. Sometimes I have to repeat the process a few times until I get clean sound. I want to script it but I couldn't automate it yet. What's been your definitive one liner solution?

Reply 1495 of 1596, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

Well, technically, I noticed this one line was sufficient to get it work. I can share the built exe, if you would like. Then I simply add it to my AUTOEXE.BAT/FDAUTO.BAT, e.g. on my desktop machine:

CALL DSXGDMMY
LH D:\SOUND\VSBHDA\HDPMI32I.EXE -R -X
CALL VSBHDA
D:\SOUND\ALINIT TEST

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - YMF744 (Cobra) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 1496 of 1596, by tauro

User metadata
Rank Member
Rank
Member
ludicrous_peridot wrote on 2024-07-15, 16:31:
Well, technically, I noticed this one line was sufficient to get it work. I can share the built exe, if you would like. Then I […]
Show full quote

Well, technically, I noticed this one line was sufficient to get it work. I can share the built exe, if you would like. Then I simply add it to my AUTOEXE.BAT/FDAUTO.BAT, e.g. on my desktop machine:

CALL DSXGDMMY
LH D:\SOUND\VSBHDA\HDPMI32I.EXE -R -X
CALL VSBHDA
D:\SOUND\ALINIT TEST

That would be great! Would you please share the .exe?

Reply 1497 of 1596, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

Hey, sure.

Attachments

GA-G41M-Combo G41/ICH7 - Core 2 Quad Q9550 - DDR3 1033 - Radeon RX570 - YMF744 (Cobra) - X3MB (Buran)
Beetle/M/i815+ICH2 - Celeron 566Mhz - Opti 924 (Typhoon Media)

Reply 1498 of 1596, by DarthSun

User metadata
Rank Member
Rank
Member
ludicrous_peridot wrote on 2024-07-16, 19:27:

Hey, sure.

Thank you, I saved this too. For me, modern desktops are currently a popular retro title ok, but if I had a problem would beat some point, I'll try it.

The 3 body problems cannot be solved, neither for future quantum computers, even for the remainder of the universe. The Proton 2D is circling a planet and stepping back to the quantum size in 11 dimensions.