VOGONS


SBEMU: Sound Blaster emulation on AC97

Topic actions

Reply 860 of 1388, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

The AD chip is directly under the power supply, very hard to impossible to measure...so instead I am browsing here to find something useful: https://ez.analog.com

Retro-Gamer 😀 ...on different machines

Reply 861 of 1388, by rasz_pl

User metadata
Rank l33t
Rank
l33t

as already stated earlier make codec register dumps in windows, preferably of not working e600 and one of the working ones for comparison.
You could also try a trick of booting to windows where sound works, then exit to dos with hopefully properly initialized codec/sound routing and then try sbemu

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 862 of 1388, by dr.zeissler

User metadata
Rank l33t
Rank
l33t
dr.zeissler wrote on 2023-09-10, 13:24:
I rechecked: - FSC S2 => AC97 working in SBEMU - FSC E600 => AC97 routed wrong or muted (on all output jacks) - FSC E620 => AC97 […]
Show full quote

I rechecked:
- FSC S2 => AC97 working in SBEMU
- FSC E600 => AC97 routed wrong or muted (on all output jacks)
- FSC E620 => AC97 working in SBEMU
- FSC E5905 => AC97 working in SBEMU
- FSC C610 => AC97 working in SBEMU

C610 nearly equals E600 on chipset (i865g, i865gv) and has the same AS1980 AC97codec, so best way should be checking in DOS how the AC97 is different. Could PCISET.EXE be usefull for this?
PCISET.ZIP Small tools to change PCI registers https://www.uwe-sieber.de/files/pciset.zip

Retro-Gamer 😀 ...on different machines

Reply 863 of 1388, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

Here is the comparison. I am thinking about these readed values.

60! looks interesting!!

Attachments

  • Filename
    PCISET.pdf
    File size
    128.54 KiB
    Downloads
    59 downloads
    File comment
    ALLREGS PCISET E600vsC610vsS2
    File license
    Public domain

Retro-Gamer 😀 ...on different machines

Reply 865 of 1388, by dr.zeissler

User metadata
Rank l33t
Rank
l33t
rasz_pl wrote on 2023-09-11, 20:48:

well, have you tried setting it to 1 with pciset?

No not yet...I don't know what I have to do.

E600 => 60, 00 = 0000.0000 C610=> 60, 08 = 0000.1000 S2 => 60, 08 = 0000.1000

I don't know how to read that values. It's simple a comparison of values that the tool ALLREGS stated and the right one are from machines that have working AC97 in dos.
I don't know what "60" is, I don't know what "08" is, I don't know if that has anything to do with the AC97 controller or if that is only coincidence.

So let us assume it is the right thing...so how to set the values?

PCSET requiers:

PCISET device vendor register mask value
hex hex hex bin bin

Device and Vendor? That is what SNIPCI reports ?

Now what?
Is it Vendor 8086h Intel or is it 1734h Fujitsu ??
Is it Device 24D5h AC'97 Audio Controller or is it ID 10201734h Unknown ??

PCISET can not be used with long device-id's

If PCISET is used in this way: e.g. pciset 7110 8086 4a 0011.0000 0000.0000

How do I translate that on my purpose? Where is 00 to 08 in that ? I don't get it.

PCISNIF:

Vendor 8086h Intel Corporation Device 24D5h 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller Command 0007h (I/O Access, Memory A […]
Show full quote

Vendor 8086h Intel Corporation
Device 24D5h 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller
Command 0007h (I/O Access, Memory Access, BusMaster)
Status 0290h (Has Capabilities List, Supports Back-To-Back Trans., Medium Timing)
Revision 02h, Header Type 00h, Bus Latency 00h
Self test 00h (Self test not supported)
PCI Class Multimedia, type Audio
Subsystem ID 10201734h Unknown
Subsystem Vendor 1734h Fujitsu Siemens Computers
Address 0 is an I/O Port : 00002800h
Address 1 is an I/O Port : 00002400h
Address 2 is a Memory Address (anywhere in 0-4Gb) : D0000C00h
Address 3 is a Memory Address (anywhere in 0-4Gb) : D0000800h
System IRQ 5, INT# B
New Capabilities List Present:
Power Management Capability
Supports power state D1
Current Power State : D0 (Device operational, no power saving)

Retro-Gamer 😀 ...on different machines

Reply 867 of 1388, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

Not so easy...

PCISET 24D5 8086 60 0000.0000 0000.1000 => does not change value for 60 (it's still 0000.0000)
PCISET 24D5 1734 60 0000.0000 0000.1000 => device for vendor not found
PCISET 1020 1734 60 0000.0000 0000.1000 => device for vendor not found

So in short, AC97 Intel does not change, Fujitsu device -id not correct, perhaps need to convert the sub-id?

Retro-Gamer 😀 ...on different machines

Reply 868 of 1388, by matti157

User metadata
Rank Member
Rank
Member
urbanus wrote on 2023-03-15, 12:20:
SBEMU + Windows 98SE + Boot menu […]
Show full quote

SBEMU + Windows 98SE + Boot menu

Example of how to setup a boot menu for Windows 9x so that the SBEMU driver ++ is only loaded when booting DOS.

Windows will fail to load if jemmex is loaded for instance.
Tested on Windows 98SE, but I believe it will also work on 95 and 98.
The following code assumes the files in SBEMU.zip have been extracted to the folder: C:\SBEMU\

AUTOEXEC.BAT

@ECHO OFF
GOTO %CONFIG%

:WINDOWS
rem Commands here are only run with Windows
GOTO END

:DOS
C:\SBEMU\jload C:\SBEMU\qpiemu.dll
C:\SBEMU\hdpmi32i -r -x
C:\SBEMU\sbemu
rem Commands here are only run with DOS

:END
rem Commands here are run with both DOS and Windows


rem Keep C:\WINDOWS\WIN.COM at the end if the file
if %config%==WINDOWS C:\WINDOWS\WIN.COM

CONFIG.SYS

[MENU]
menuitem=DOS, Start DOS (SBEMU)
menuitem=WINDOWS, Start Windows
menudefault=WINDOWS, 10

[DOS]
DEVICE=C:\SBEMU\jemmex.exe

[WINDOWS]

MSDOS.SYS
Change the BootGUI value from 1 to 0.

...
BootGUI=0
...

The MSDOS.SYS might not be editable or visible, to fix this use the following command:

attrib -r -s -h MSDOS.SYS

For your information, I tried it on an IBM T42
-DOOM: It works
-KEEN4: It freezes as soon as I start the game (if I disable sbemu it works)
-STUNTS (4d sports driving) "out of memory" and crashes

Reply 869 of 1388, by rasz_pl

User metadata
Rank l33t
Rank
l33t

disclaimer: I dont know what Im doing 😀

first one would be correct, but I dont think this is the way it works 🙁 You should be reprogramming AD1980 hanging off of Intel AC'97 Audio Controller
https://www.analog.com/media/en/technical-doc … eets/AD1980.pdf
"76h Misc Control Bits" lines up with linux patches for that codec https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=140591
but Intel ich5 AC ’97 Audio Controller Registers https://static6.arrow.com/aropdfconversion/b0 … 36/25251601.pdf page 533 shows its more complicated than that.
looking at https://github.com/crazii/SBEMU/blob/0c857cfe … S/SC_ICH.C#L413
snd_intel_codec_write uses NAMBAR to access AC97 registers
now the confusion, are we talking to Intel AC97 registers defined on page 546 or to AD1980 registers???
looking at Re: Can anybody with AC'97 audio please help me test a DOS player? 😊 this will talk to AD1980. btw dr.zeissler you were active in that thread too 😀
Now I question what exactly is PCISET.pdf you uploaded representing, how did you generate that exactly?

So tldr: you cant use pciset to get the codec Volume mixer register values after all, you can use it to get the NAMBAR address tho. "Access to these registers will be decoded by the AC ’97 controller and forwarded over the AC-link to the codec."
I dont know how to get from having NAMBAR address to easily reading its contents with easily available universal programs 🙁
Maybe you could use http://www.georgpotthast.de/dossound/ and its internal API to read out volume mixer?
'AH=30h - Read Codec Register Value' http://www.georgpotthast.de/dossound/dossound.htm
http://www.georgpotthast.de/dossound/ Samples directory has some basic and nasm assembler examples, but debug.exe from dos will be easiest. Eexecute DOSSOUND.COM, then debug.exe and type:

A 100
MOV AX,3000
MOV DX,0076
INT 64
<press Enter>
G =100
r

assuming everything worked AX will show currently stored value. To change it to 400 like in the patch:

A 100
MOV AX,3100
MOV DX,0076
MOV CX,0400
INT 64
<press Enter>
G =100

If everything went well after this dossound.com should be able to produce audio, and maybe sbemu too

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 870 of 1388, by jtchip

User metadata
Rank Member
Rank
Member
rasz_pl wrote on 2023-09-13, 00:33:

Maybe you could use http://www.georgpotthast.de/dossound/ and its internal API to read out volume mixer?
'AH=30h - Read Codec Register Value' http://www.georgpotthast.de/dossound/dossound.htm
http://www.georgpotthast.de/dossound/ Samples directory has some basic and nasm assembler examples, but debug.exe from dos will be easiest.

I think this would work, I haven't used dossound before and didn't know it had an API to read and write AC97 codec registers. Of course, @dr.zeissler try at your own risk.
The PCISET.pdf looks like a dump of the PCI configuration registers, which isn't relevant, and they're a dump of the wrong devices anyway, offsets 00-04 are the vendor and device ID and these are 8086:2570 for the E600/C610 and 8086:2560 for the S2 (offset 00 is actually missing but it's fairly obvious in this context that it's 86h). These are "82865G/PE/P DRAM Controller/Host-Hub Interface" and "82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface", respectively.

Reply 871 of 1388, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

PCISET.PDF is a simple excel-sheet where I copied the "allregs >info.txt" of these three machines "E600/C610/S2" side by side.
Because C610 and S2 are working with SBEMU I locked for different values and for value "60" the E600 was different to C610 and S2 which were the same.
So I thought about that this could be the issue, not knowing what I really see here...that was of course a lazy try and error...but it got me to nothing.

My knowledge on that level is nearly zero...so I have to do try and error hoping to find the right switch in the right spot which is obviously not going to happen...

Last edited by dr.zeissler on 2023-09-13, 07:24. Edited 1 time in total.

Retro-Gamer 😀 ...on different machines

Reply 872 of 1388, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

and yes I was active on this thread too, not knowing that the "sbemu" existed. Therefore I wanted to unmute Line-In to get external LPT Devices to work for dos.
I changed the purpose to "not using external LPT devices" and using SBEMU instead. I had not expected that there could be an issue with muting and or routing, because the other machines did not show that. And as I said before...SBEMU is nice and adressing the issue in SBEMU could help to perhaps fix that in Amithlon too.

But this hole thing seems to be going down the rabbit hole...which confuses me...

Thx for the infos!

Last edited by dr.zeissler on 2023-09-13, 10:06. Edited 1 time in total.

Retro-Gamer 😀 ...on different machines

Reply 873 of 1388, by rasz_pl

User metadata
Rank l33t
Rank
l33t
dr.zeissler wrote on 2023-09-13, 07:16:

PCISET.PDF is a simple excel-sheet where I copied the "allregs >info.txt" of these three machines "E600/C610/S2" side by side.

yeah, thats useless, sorry. The only differences relevant here are in AC97 registers.
try dossound with debug.exe

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 874 of 1388, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

debug ?

how do I get to line 2, after A 100 <enter> it looks like this and freezes before I can type "r"

Attachments

Retro-Gamer 😀 ...on different machines

Reply 875 of 1388, by rasz_pl

User metadata
Rank l33t
Rank
l33t

thats with dossound loaded? never used it so I dont know how it works. What happen if you execute
dossound.com somerandom.wav
try to use dosamp.exe on somerandom.wav
of course you will need some .wav file there

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 876 of 1388, by matti157

User metadata
Rank Member
Rank
Member
matti157 wrote on 2023-09-13, 00:11:
For your information, I tried it on an IBM T42 -DOOM: It works -KEEN4: It freezes as soon as I start the game (if I disable sbem […]
Show full quote
urbanus wrote on 2023-03-15, 12:20:
SBEMU + Windows 98SE + Boot menu […]
Show full quote

SBEMU + Windows 98SE + Boot menu

Example of how to setup a boot menu for Windows 9x so that the SBEMU driver ++ is only loaded when booting DOS.

Windows will fail to load if jemmex is loaded for instance.
Tested on Windows 98SE, but I believe it will also work on 95 and 98.
The following code assumes the files in SBEMU.zip have been extracted to the folder: C:\SBEMU\

AUTOEXEC.BAT

@ECHO OFF
GOTO %CONFIG%

:WINDOWS
rem Commands here are only run with Windows
GOTO END

:DOS
C:\SBEMU\jload C:\SBEMU\qpiemu.dll
C:\SBEMU\hdpmi32i -r -x
C:\SBEMU\sbemu
rem Commands here are only run with DOS

:END
rem Commands here are run with both DOS and Windows


rem Keep C:\WINDOWS\WIN.COM at the end if the file
if %config%==WINDOWS C:\WINDOWS\WIN.COM

CONFIG.SYS

[MENU]
menuitem=DOS, Start DOS (SBEMU)
menuitem=WINDOWS, Start Windows
menudefault=WINDOWS, 10

[DOS]
DEVICE=C:\SBEMU\jemmex.exe

[WINDOWS]

MSDOS.SYS
Change the BootGUI value from 1 to 0.

...
BootGUI=0
...

The MSDOS.SYS might not be editable or visible, to fix this use the following command:

attrib -r -s -h MSDOS.SYS

For your information, I tried it on an IBM T42
-DOOM: It works
-KEEN4: It freezes as soon as I start the game (if I disable sbemu it works)
-STUNTS (4d sports driving) "out of memory" and crashes

Fixed KEEN4 by putting NOEMS option on JEMMEX. Does anyone have any ideas for the third game? (Stunts)

Reply 877 of 1388, by dr.zeissler

User metadata
Rank l33t
Rank
l33t
rasz_pl wrote on 2023-09-13, 20:19:

thats with dossound loaded? never used it so I dont know how it works. What happen if you execute dossound.com somerandom.wav try to use dosamp.exe on somerandom.wav
of course you will need some .wav file there

YES, but SBEMU was loaded before. This is what happens when SBEMU is not loaded.

So in short:
- SBEMU complains IRQ5 conflict, so IRQ7 is used but muted or routed wrong
- DOSSOUND uses IRQ5 and perhaps get's the IRQ conflict.

So perhaps configuring DOSSOUND to IRQ7 `?

Tested my E620 D1844, SBEMU works on IRQ7...would switch to that if E620 if it had a full floppy, but it has slimline and therefore no catweasel-controller usable, no catweasel-controller means free pci-slot for a soundcard, but therefore much less usable for me...E600 does not work, C610, S2, E620 do work....what a dumb thing!

Attachments

  • IMG_1633.jpeg
    Filename
    IMG_1633.jpeg
    File size
    1.51 MiB
    Views
    1273 views
    File license
    Public domain

Retro-Gamer 😀 ...on different machines

Reply 878 of 1388, by rasz_pl

User metadata
Rank l33t
Rank
l33t

Try again without jemmx. not everything at once, lets fist establish if setting register 76 fixes your 0 volume situation.
First just DOSSOUND some.wav to see if it can play anything.
If its silent just load DOSSOUND, do the debug

MOV     AX,3100
MOV DX,0076
MOV CX,0400
INT 64

followed by dosamp.exe somerandom.wav

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 879 of 1388, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

Can confirm sound working out of the box with linux games-knoppix 4.02 live-dvd.

For DOSSOUND see:

Attachments

  • IMG_1637.jpeg
    Filename
    IMG_1637.jpeg
    File size
    1.54 MiB
    Views
    1180 views
    File license
    Public domain

Retro-Gamer 😀 ...on different machines