VOGONS


First post, by vanfanel

User metadata
Rank Member
Rank
Member

Hello there,

It seems that Tyrian always uses WSS address $530, but on my card (CS4237 chip) it's $534.
Since SETUP.EXE has no way to change WSS address from $530, it's evident that the $530 address is hardcoded somewhere in TYRIAN executable code.

I have edited TYRIAN.EXE and FILE0001.EXE with HEXEDIT, but I can't see anything that indicates where that dreaded $530 is hardcoded. I take I should look for hex 530, but maybe I should look for 02 12 instead which is 530 in hex?
I mean, the sound card addresses in DOS are hex already, but maybe they are stored as decimal converted to hex on the executables?

Any ideas, please?

Reply 1 of 5, by carlostex

User metadata
Rank l33t
Rank
l33t

Your CS4237 card is probably showing the CODEC address which is always BASE address + 4.

Most common WSS addresses:

Base: 530h
CODEC: 534h

Base :604h
CODEC: 608h

Base: E80h
CODEC: E84h

Base: F40h
CODEC: F44h

On the GUS PnP, for instance:

GUS Base: 260h
Crystal 4231 compatible Base: 368h
Crystal CODEC: 36C

Reply 2 of 5, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

I became curious and tried setting up Tyrian (GOG version) for WSS.
Getting no sound.
Getting sound just fine in Cyril Cyberpunk with the same setup.

When I change WSS address to 604h from 530h with my soundcard configuration utility,
I still get no sound in Tyrian, and still have it in Cyril Cyberpunk.

What I have noticed, however, was that Tyrian was actually outputting the correct base address both times when after starting it has not yet switched to graphics mode, and I did not have to change anything in SETUP.EXE for this.

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 3 of 5, by vanfanel

User metadata
Rank Member
Rank
Member

I opened an issue on the OpenTyrian github about this, since the guys there are the biggest experts on the Tyrian code:
https://github.com/opentyrian/opentyrian/issues/83
....and they came to the conclusion that the problem is DMA number, which is 1 on my board but should be 0, and that should make Tyrian run with WSS sound.

However, Tyrian uses some lib called LOUDNESS that is built into the game binary in FILE0001.EXE, but apparently changing DMA to 0 in that file isn't that easy.

Reply 4 of 5, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

Reading the linked issue, I think the folks are also hinting to this LOUDNESS library not detecting your soundchip as a proper WSS implementation.
I am curious if for your case you could share what Tyrian itself outputs about sound system while it's still in text mode at the very start...

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 5 of 5, by ludicrous_peridot

User metadata
Rank Member
Rank
Member

Well, anyway, this bit of information you've provided on DMA channel used seemed quite interesting, so I decided to investigate this with my own computer.

First thing I noticed was that while for Sound Blaster compatible cards one could select DMA channel in SETUP.EXE, there was no such choice with WSS. I was curious what was happening under the hood, so I modified FILE0001.EXE to print out DMA channel instead of codec version information. I was able to confirm thus, that while for Sound Blaster the value provided by SETUP.EXE was used, for WSS it was DMA 0, in accordance with what you've written. Then I was able to confirm that for WSS DMA channel number included in TYRIAN.CFG was ignored.

So I borrowed Sound Blaster DMA configuration routine for DMA 1, and copied it to be used by WSS-related code. The result was DMA 1 selected, and sound being played via WSS.

Going to prepare a PatchMaker patch file, and will include with this post later.

One last observation I have is that while changing WSS base address via my sound card setup program seems to work with Tyrian,
SETUP.EXE hangs at startup unless default 0x530 address is configured. Again, setting up sound for WSS via SETUP.EXE while it's configured for 0x530 and THEN switching the card to a different address works, but not the other way around.

UPD:
Attached the patch.

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)