VOGONS


SBEMU: Sound Blaster emulation on AC97

Topic actions

Reply 360 of 1369, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
stamasd wrote on 2023-04-01, 11:11:
crazii wrote on 2023-04-01, 06:00:
Baron von Riedesel wrote on 2023-04-01, 03:41:

This symptom indicates that there's still a "power state" issue. Attached a version that might fix this problem.

Great! Have you found more power states related problem? if the fix tested working, plz share the modifications. 😁

Yes, bug him to reveal the secrets because the fix works.

Yes, I'm waiting for him to tell the secret. meanwhile I'm digging the HDA spec and find something interesting, the power states might need a double reset.

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 361 of 1369, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
stamasd wrote on 2023-04-01, 11:11:
crazii wrote on 2023-04-01, 06:00:
Baron von Riedesel wrote on 2023-04-01, 03:41:

This symptom indicates that there's still a "power state" issue. Attached a version that might fix this problem.

Great! Have you found more power states related problem? if the fix tested working, plz share the modifications. 😁

Yes, bug him to reveal the secrets because the fix works.

Just cannot wait for the answer 😁. I made a test build that tries fixing the power, can you test it? It might not work with the binaries that Baron von Riedesel posted, you need the binaries that posted in the 1 post (HDPMI32i.exe in 1.0 beta2 zip)

Filename
SBEMU_HDA_Power.zip
File size
204.66 KiB
Downloads
57 downloads
File license
CC-BY-4.0

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 362 of 1369, by Baron von Riedesel

User metadata
Rank Member
Rank
Member
crazii wrote on 2023-04-01, 06:00:

Great! Have you found more power states related problem? if the fix tested working, plz share the modifications. 😁

On previous versions I had set the power state for all widgets involved ( pin, mixer, dac ), but forgotten the AFG itself. That has been added in mixer_init()

	snd_hda_codec_write(card, card->afg_root_nodenum, 0, AC_VERB_SET_POWER_STATE, 0 );

Reply 363 of 1369, by Baron von Riedesel

User metadata
Rank Member
Rank
Member
stamasd wrote on 2023-04-01, 11:10:

Duke3d: sound setup program works, sound tests fine inside it for both music and effects. The game however doesn't launch, black screen at startup

Since Duke3d works on all machines that I tested: does it run if sbemu isn't loaded? Perhaps it's a SVGA issue...

Reply 364 of 1369, by stamasd

User metadata
Rank l33t
Rank
l33t
Baron von Riedesel wrote on 2023-04-01, 12:54:
stamasd wrote on 2023-04-01, 11:10:

Duke3d: sound setup program works, sound tests fine inside it for both music and effects. The game however doesn't launch, black screen at startup

Since Duke3d works on all machines that I tested: does it run if sbemu isn't loaded? Perhaps it's a SVGA issue...

Indeed it doesn't. With no SBEMU loaded, and sound disabled (otherwise it complains "can't find FM chip") indeed Duke3D ends up in that same blank screen.
The same may happen with the other games that get a blank screen when launched in my tests above (Dune and Dune2) on this machine. They all work fine on other, older computers. This one uses the iGPU from the i5-6600T which is IIRC a HD530.

Last edited by stamasd on 2023-04-01, 13:12. Edited 1 time in total.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 365 of 1369, by stamasd

User metadata
Rank l33t
Rank
l33t
crazii wrote on 2023-04-01, 12:30:
stamasd wrote on 2023-04-01, 11:11:
crazii wrote on 2023-04-01, 06:00:

Great! Have you found more power states related problem? if the fix tested working, plz share the modifications. 😁

Yes, bug him to reveal the secrets because the fix works.

Just cannot wait for the answer 😁. I made a test build that tries fixing the power, can you test it? It might not work with the binaries that Baron von Riedesel posted, you need the binaries that posted in the 1 post (HDPMI32i.exe in 1.0 beta2 zip)
SBEMU_HDA_Power.zip

This version doesn't work for me with either the binaries from von Riedesel's package, nor the ones from your beta2. In both cases it gives me: "Internal stack error. System halted"

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 366 of 1369, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
Baron von Riedesel wrote on 2023-04-01, 12:49:
On previous versions I had set the power state for all widgets involved ( pin, mixer, dac ), but forgotten the AFG itself. That […]
Show full quote
crazii wrote on 2023-04-01, 06:00:

Great! Have you found more power states related problem? if the fix tested working, plz share the modifications. 😁

On previous versions I had set the power state for all widgets involved ( pin, mixer, dac ), but forgotten the AFG itself. That has been added in mixer_init()

	snd_hda_codec_write(card, card->afg_root_nodenum, 0, AC_VERB_SET_POWER_STATE, 0 );

Hmm, interesting, but I already did that in the beta2c release, also tested working by Kamerat. reported here: Re: SBEMU: Sound Blaster emulation on AC97

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 367 of 1369, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
stamasd wrote on 2023-04-01, 13:08:
crazii wrote on 2023-04-01, 12:30:
stamasd wrote on 2023-04-01, 11:11:

Yes, bug him to reveal the secrets because the fix works.

Just cannot wait for the answer 😁. I made a test build that tries fixing the power, can you test it? It might not work with the binaries that Baron von Riedesel posted, you need the binaries that posted in the 1 post (HDPMI32i.exe in 1.0 beta2 zip)
SBEMU_HDA_Power.zip

This version doesn't work for me with either the binaries from von Riedesel's package, nor the ones from your beta2. In both cases it gives me: "Internal stack error. System halted"

So I wonder which binary you used for the initial test, from here: Re: SBEMU: Sound Blaster emulation on AC97
is it a beta2c binary or a binary previously posted by von Riedesel?

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 368 of 1369, by stamasd

User metadata
Rank l33t
Rank
l33t
crazii wrote on 2023-04-01, 13:13:

So I wonder which binary you used for the initial test, from here: Re: SBEMU: Sound Blaster emulation on AC97
is it a beta2c binary or a binary previously posted by von Riedesel?

I used the exact binaries contained in that package. Replaced all of the binaries I was previously using on my DOS drive with those (hdpmi32i.exe, qpiemu.dll, sbemu.exe) in the package he posted.

Here is the batch file I use to enable SB emulation:

@echo off
SET DPMIMEM=MAXMEM 16383
SET HDPMI=2048
jload qpiemu.dll
lh hdpmi32i -x
rem set blaster=A220 I7 D1 T5
set blaster=A220 I7 D1 H5 T6
sbemu

(I added the 2 extra env variables to make JJFFE not crash)

Last edited by stamasd on 2023-04-01, 13:32. Edited 3 times in total.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 369 of 1369, by tercio

User metadata
Rank Newbie
Rank
Newbie
crazii wrote on 2023-04-01, 12:30:
stamasd wrote on 2023-04-01, 11:11:
crazii wrote on 2023-04-01, 06:00:

Great! Have you found more power states related problem? if the fix tested working, plz share the modifications. 😁

Yes, bug him to reveal the secrets because the fix works.

Just cannot wait for the answer 😁. I made a test build that tries fixing the power, can you test it? It might not work with the binaries that Baron von Riedesel posted, you need the binaries that posted in the 1 post (HDPMI32i.exe in 1.0 beta2 zip)
SBEMU_HDA_Power.zip

One Must Fall2097 now works great in my eeepc 701!!!

Twitter @tercio_miranda

Reply 370 of 1369, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
stamasd wrote on 2023-04-01, 13:21:
crazii wrote on 2023-04-01, 13:13:

So I wonder which binary you used for the initial test, from here: Re: SBEMU: Sound Blaster emulation on AC97
is it a beta2c binary or a binary previously posted by von Riedesel?

I used the exact binaries contained in that package. Replaced all of the binaries I was previously using on my DOS drive with those (hdpmi32i.exe, qpiemu.dll, sbemu.exe) with the ones in the package he posted.

OK, that explains the power states issue. but it remains unsolved that the beta2c binary is not working, dammit. there should be no big difference except SETPVI 😁

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 371 of 1369, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
tercio wrote on 2023-04-01, 13:23:
crazii wrote on 2023-04-01, 12:30:
stamasd wrote on 2023-04-01, 11:11:

Yes, bug him to reveal the secrets because the fix works.

Just cannot wait for the answer 😁. I made a test build that tries fixing the power, can you test it? It might not work with the binaries that Baron von Riedesel posted, you need the binaries that posted in the 1 post (HDPMI32i.exe in 1.0 beta2 zip)
SBEMU_HDA_Power.zip

One Must Fall2097 now works great in my eeepc 701!!!

I think there's some emulation bugs fixed during the fix of Epic Pinball, it is a temp release though, will be uploaded in the 1st post later with a version bump.

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 372 of 1369, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
stamasd wrote on 2023-04-01, 13:21:

(I added the 2 extra env variables to make JJFFE not crash)

Basically there're 2 ways to set a SB16 emulation, 1. use BLASTER env with T6 (before loading SBEMU) as you did; 2. use /t6 option of SBEMU, and SBEMU will update the BLASTER env automatically.

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 373 of 1369, by stamasd

User metadata
Rank l33t
Rank
l33t
crazii wrote on 2023-04-01, 13:30:
stamasd wrote on 2023-04-01, 13:21:

(I added the 2 extra env variables to make JJFFE not crash)

Basically there're 2 ways to set a SB16 emulation, 1. use BLASTER env with T6 (before loading SBEMU) as you did; 2. use /t6 option of SBEMU, and SBEMU will update the BLASTER env automatically.

No I was talking about
SET DPMIMEM=MAXMEM 16383
SET HDPMI=2048
Those help make JJFFE run properly. Albeit on this machine without sound despite SBEMU being loaded.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 374 of 1369, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
stamasd wrote on 2023-04-01, 13:34:
No I was talking about SET DPMIMEM=MAXMEM 16383 SET HDPMI=2048 […]
Show full quote
crazii wrote on 2023-04-01, 13:30:
stamasd wrote on 2023-04-01, 13:21:

(I added the 2 extra env variables to make JJFFE not crash)

Basically there're 2 ways to set a SB16 emulation, 1. use BLASTER env with T6 (before loading SBEMU) as you did; 2. use /t6 option of SBEMU, and SBEMU will update the BLASTER env automatically.

No I was talking about
SET DPMIMEM=MAXMEM 16383
SET HDPMI=2048

OK, My bad. I saw this advice earlier. 🤣

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 375 of 1369, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
stamasd wrote on 2023-04-01, 13:34:

Albeit on this machine without sound despite SBEMU being loaded.

I'm not sure whether this problem is fixed or not, because you're using the binary that Baron von Riedesel posted, I don't know the detail difference of emulation code between his and mine - whether he merges code from mine or something else - if yes, which revision of the last merge. It's a little bit confusing though. It's like the power states issue that I've already fixed in the beta2c release - that already confused me just now.

I can check if the game works with the beta2c release, if not, I'll try to fix it.

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 376 of 1369, by stamasd

User metadata
Rank l33t
Rank
l33t

On this machine (Optiplex 3050m) I get no sound in JJFFE with either your binaries nor his. Other games get sound with his binaries, but not with either of yours including the betas.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 377 of 1369, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
stamasd wrote on 2023-04-01, 13:51:

Other games get sound with his binaries, but not with either of yours including the betas.

Yeah that's the point, why this happens still confuses me. I don't know any big differences between the two.

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 379 of 1369, by crazii

User metadata
Rank Oldbie
Rank
Oldbie

@Baron von Riedesel, I think at least an open sourced repo will help diff the code. 😁
What do you think?

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