VOGONS


SBEMU: Sound Blaster emulation on AC97

Topic actions

Reply 880 of 1405, by jtchip

User metadata
Rank Member
Rank
Member
dr.zeissler wrote on 2023-09-15, 21:14:

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

What was the setting of the "Line HP Swap Switch" in the mixer? Try toggling it with sound playing and check if the position needs to be different from the other systems in order to get sound.

dr.zeissler wrote on 2023-09-15, 21:14:

For DOSSOUND see:

It's missing the G =100 so the program was only assembled but not executed.

Reply 881 of 1405, by rasz_pl

User metadata
Rank l33t
Rank
l33t
jtchip wrote on 2023-09-15, 21:42:

It's missing the G =100 so the program was only assembled but not executed.

this! 😀 and after executing it exit debug.exe and try playing some wav file with "dosamp.exe" from DOSSOUND package

dr.zeissler wrote on 2023-09-15, 21:14:

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

is there a way to soft restart from Linux back to booting dos? with any luck Linux will leave your sound card initialized and sbemu will work after such restart ;]

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

Reply 882 of 1405, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

After G =100 the machine always freezes, regardless what I do.

DOSSOUND will probably not work on IRQ5 as well as SBEMU does not work on IRQ5 because of the IRQ sharing with SMBuscontroller, newer OS can handle that, but DOS does not.
So all these machines (E600,C610,E620,S2) share the IRQ5 between "AC97" and ""SMBusCTrl",
BUT all the other machines produce sound when SBEMU is routed to I7 (SET BLASTER=A220 I7 D1) accept the E600 that machine is still muted or routed wrong.

I don't think that IRQ5 with DOSSOUND will do anything, but I recheck DOSSOUND on the other machines where SBEMU is working on IRQ7.

Sorry

Retro-Gamer 😀 ...on different machines

Reply 883 of 1405, by rasz_pl

User metadata
Rank l33t
Rank
l33t

we dont care about irq5, it would only matter if you tried running something expecting sound blaster. g=100 freezing means either DOSSOUND doesnt like this computer, debug is not a right tool or DOSSOUND is just poo

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

Reply 886 of 1405, by dr.zeissler

User metadata
Rank l33t
Rank
l33t
rasz_pl wrote on 2023-09-13, 00:33:
Eexecute DOSSOUND.COM, then debug.exe and type: […]
Show full quote

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

First programm freezes the C610 after G =100, I am not able to run it with "r".

Doc

Retro-Gamer 😀 ...on different machines

Reply 887 of 1405, by rasz_pl

User metadata
Rank l33t
Rank
l33t

thats good, means debug.exe is not a right tool for the job... or I screwed up by not terminating the program 🙁, try:

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

alternatively DOSSOUND /samples includes some .bas basic examples, but I dont know how to execute them. QuickBASIC, GW-BASIC, QBasic? TurboBasic, PowerBasic? google confirms that at least the last two use this syntax and in theory should work with DOSSOUND :

reg 1,&H3000
reg 4,&H0076
call interrupt &H64
print reg(1)
reg 1,&H3100
reg 3,&H0400
reg 4,&H0076
call interrupt &H64

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

Reply 888 of 1405, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

Thx I have to test and report later... in short: tested Knoppix 3.7 with Kernel 2.4x...and sound does not work even if it is detected...so with Knoppix 4.x witch kernel 2.6x it worked right out of the box. Is that helpful? to me it looks like there is something fixed between linux kernel 2.4 and 2.6..afaik amithlon should use kernel 2.4...but I am not sure about this... will have to look that up. Thx...seeya later...

Retro-Gamer 😀 ...on different machines

Reply 889 of 1405, by dr.zeissler

User metadata
Rank l33t
Rank
l33t
rasz_pl wrote on 2023-09-17, 10:41:
thats good, means debug.exe is not a right tool for the job... or I screwed up by not terminating the program :(, try: […]
Show full quote

thats good, means debug.exe is not a right tool for the job... or I screwed up by not terminating the program 🙁, try:

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

Tested both, results in the picture, sound still muted. (both with only himem.sys, qemm and jemmex give me freezes/glitches)

Attachments

  • IMG_1644.jpeg
    Filename
    IMG_1644.jpeg
    File size
    1.56 MiB
    Views
    1396 views
    File license
    Public domain
  • IMG_1646.jpeg
    Filename
    IMG_1646.jpeg
    File size
    1.55 MiB
    Views
    1396 views
    File license
    Public domain

Retro-Gamer 😀 ...on different machines

Reply 890 of 1405, by rasz_pl

User metadata
Rank l33t
Rank
l33t

Did I mention I dont know what Im doing? well with every step I know little more than nothing 😀. INT 20 was terminating successfully, but eating our registers.

execute on laptop with working sound:

A 100
MOV AX,3000
MOV DX,0076
INT 64
INT 20
<press Enter>
T=100

T does tracing, it will show registers at every step. We are interested in AX directly after int 64:

xxxx:0106 CD64  int 64
AX=THIS

On laptop without sound try below code, but this time instead of '0400' we will use 'THIS' number you got above in AX, we will put it in 'HERE'

a 100
MOV AX,3100
MOV DX,0076
MOV CX,HERE
INT 64
INT 20
<press Enter>
g =100
q
dr.zeissler wrote on 2023-09-17, 18:24:

sound still muted

Just to confirm and clarify. On a laptop with working sound you:
-run dossound
-run dosamp.exe some.wav
and hear audible sound?

Now on a laptop with sound you will:
-run dossound
-run 'dosamp.exe some.wav' just to make sure codec is initialized and playing sound
-do the first debug (MOV AX,3000) with T100 for tracing
-write down/take a picture of AX after 'int 64' line

On a laptop with no sound you will:
-load dossound
-do the second debug (MOV AX,3100) with number from above in place of 'HERE'
-q to quit debug.exe
-try playing some wav with dosamp.exe
-just for good measure do the first debug (MOV AX,3000) again here with T100 for tracing to check if we actually changed that register

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

Reply 891 of 1405, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

Working machine C610...

I don't get that part with the trace...what do you mean?
Do I have to restart debug after T =100 or do I have to INT 64 again within the debug session? Where can I see the trace?

Attachments

  • IMG_1655.jpeg
    Filename
    IMG_1655.jpeg
    File size
    1.72 MiB
    Views
    1326 views
    File license
    Public domain
Last edited by dr.zeissler on 2023-09-18, 17:09. Edited 1 time in total.

Retro-Gamer 😀 ...on different machines

Reply 892 of 1405, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

Have you seen that the NUMBAR's are different?

C610 i865gv D1980 (working sound)
NAMBAR: 2C00 NAMBAR 2800 IRQ5

E600 i865g D1980 (not working sound)
NAMBAR 2800 NAMBAR 2400 IRQ5

Retro-Gamer 😀 ...on different machines

Reply 893 of 1405, by Kenpachi

User metadata
Rank Newbie
Rank
Newbie

Looks like NAMBAR register holds all the mute registers (from the i865 datasheet):
Primary offset _ Secondary Offset _ NAMBAR Exposed Registers (D31:F5)
00h 80h Reset
02h 82h Master Volume Mute
04h 84h Headphone Volume Mute
06h 86h Master Volume Mono Mute
08h 88h Master Tone (R & L)
0Ah 8Ah PC_BEEP Volume Mute
0Ch 8Ch Phone Volume Mute
0Eh 8Eh Mic Volume Mute
10h 90h Line In Volume Mute
12h 92h CD Volume Mute
14h 94h Video Volume Mute
16h 96h Aux Volume Mute
18h 98h PCM Out Volume Mute
1Ah 9Ah Record Select
1Ch 9Ch Record Gain Mute
1Eh 9Eh Record Gain Mic Mute
20h A0h General Purpose
22h A2h 3D Control
24h A4h AC’97 RESERVED
26h A6h Powerdown Ctrl/Stat
28h A8h Extended Audio
2Ah AAh Extended Audio Ctrl/Stat
(Continued on the next page of the datasheet)

Reply 894 of 1405, by rasz_pl

User metadata
Rank l33t
Rank
l33t

NAMBAR is just dynamic address in memory, its normal that its different between different computers

dr.zeissler wrote on 2023-09-18, 16:57:

I don't get that part with the trace...what do you mean?
Do I have to restart debug after T =100 or do I have to INT 64 again within the debug session? Where can I see the trace?

damn! I replicated everything on my end to make sure code works before posting ... but then I copy&pasted the code snippet out of laziness 😒 🙁
again:

a
mov ax,3000
mov dx,76
int 64
int 20
<press Enter>
t100

"T=100" will only execute one instruction, you have to keep pressing Enter to step thru the code , "t100" will execute whole thing and print every step of the way
You were so close from the solution, two more Enter presses from learning correct register 76 contents 😒

Edit: or copying from mkarcher this

a
mov ax,3000
mov dx,76
int 64
int 3
<press Enter>
g

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

Reply 896 of 1405, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

Working sound on C610 shows lot's of registers after t100 I think it must be sent to a file to check the entries..

seems that I can't upload images anymore?

https://ibb.co/rcVTC1m

Retro-Gamer 😀 ...on different machines

Reply 897 of 1405, by rasz_pl

User metadata
Rank l33t
Rank
l33t
dr.zeissler wrote on 2023-09-19, 17:49:

seems that I can't upload images anymore?

temporary maintenance

dr.zeissler wrote on 2023-09-19, 17:49:

hmm, AX is zero 🙁 Was that debug after you played sound on C610? either way it doesnt good for the theory 76h is the address of volume mixer that needed to be specifically patched.

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

Reply 898 of 1405, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

I tested Linux (DebianSarge 3.1 Kernel 2.4.x) nearly the same Kernel that Amithlon uses before switching to the 68k-emulation.
Linux tells me that "810-soc is disabled during configuration" and the message-log shows that it shares his irq with another device (SMBusCtrl.).
Beside that the codec reports 6channel Audio support but switched in 2 channel mode.
I only installed Base-System (x-window-system-core enlightenment desktop) als well as "mc" and some games....what do you think happens if I play a game with sound?
The sound comes clearly from the pc-spk and not from line-out or any other port.
To bad this is not the same in MSDOS and in Amithlon....but it shows some thing is going on here...so perhaps a routing and not a muting thing?

Attachments

  • IMG_1665.jpeg
    Filename
    IMG_1665.jpeg
    File size
    1.33 MiB
    Views
    1151 views
    File license
    Public domain
  • IMG_1664.jpeg
    Filename
    IMG_1664.jpeg
    File size
    1.96 MiB
    Views
    1151 views
    File license
    Public domain

Retro-Gamer 😀 ...on different machines