VOGONS

Common searches


First post, by jwt27

User metadata
Rank Oldbie
Rank
Oldbie

I've been trying to figure out why The Horde won't use the WSS interface on my sound card (YMF719). The SB support is flawed since it plays every new sound on a random stereo channel which is annoying. It also seems limited to four simultaneous sound channels, and since the music is 4-channel MOD already, playing any sound effects will cut out music notes. I wonder if this is different when using 16-bit mixing.

Normally the game detects a sound card on startup (and as we all know, autodetecting and assuming anything about hardware configuration in DOS is generally a Bad Thing to do), there doesn't seem to be any way to force any specific setup. By debugging I've found that the game understands one command line argument: /S:<card>, where <card> is either SILENT, SBLASTER, GRAVIS, MICRO or PAS (possibly more). You can also specify environment variable SET BOBSOUND=<card>. You won't find this information in the game manual, or anywhere else!

When trying to detect WSS this game does some really weird things. Like writing an IRQ/DMA configuration to 530h (which is read-only) and setting the Mode Change Enable bit without actually specifying a new mode, then setting a new mode without the MCE bit enabled. It also doesn't seem to check if all these port writes actually do anything, and after resetting the sound card 4 times, it gives up and uses SB instead.

Has anyone here ever seen WSS support working in The Horde? I don't think it could possibly work, but then I don't have any documentation about WSS and all these weird things it does might actually work on other sound cards.

Not sure if anyone even cares about this. I should probably just be playing the game and worry about other things. Oh well.

Reply 3 of 10, by jwt27

User metadata
Rank Oldbie
Rank
Oldbie
gerwin wrote:

Horde.exe /S:MICRO locks up at startup, when using a CMI8330 sound card.

Thank you. Where does it crash exactly, before the game starts or at the copy protection screen? Do you have WSS set to use IRQ11, by any chance?
Does it crash without cmd line parameters, too? The /S switch doesn't actually force anything; if your selected sound card is not detected the game will still fall back to the first supported sound card. Detection order is GUS->WSS->SB (don't know about the other sound card types yet)

Also found another sound card switch: /S:SM2, for Covox Sound Master 2, I presume. There's a /G:BIOS too, not sure what it does. Not relevant to WSS, in any case.

Reply 4 of 10, by gerwin

User metadata
Rank l33t
Rank
l33t

It locks up at the copy protection screen. Without parameters it goes on to to game screen. The CMI8330 is like a SB16 and WSS on a single card, with separate resources. I don't know the IRQ by head.
Can also try a CS4232 card later today.

--> ISA Soundcard Overview // Doom MBF 2.04 // SetMul

Reply 5 of 10, by jwt27

User metadata
Rank Oldbie
Rank
Oldbie

On mine it locks up at the copy protection screen too, if WSS is set to IRQ11 (both with or without the /S switch). Do you get any sound there at all when using /S:MICRO or does it lock up as soon as you move the mouse over the compass?

Just to make sure we're testing the same version, here are links to v1.1. I only have the floppy version.
http://www.gamefront.com/files/902213 (Floppy version)
http://www.gamefront.com/files/902212 (CD version)

Reply 6 of 10, by gerwin

User metadata
Rank l33t
Rank
l33t

On a CS4232 it does not matter what parameters are passed. It it will always just run with sound. I suspect it resorts to Sound Blaster mode with this card.

I don't know what version of horde it is. In fact, consider the game deleted after doing these two tests. 😉

--> ISA Soundcard Overview // Doom MBF 2.04 // SetMul

Reply 7 of 10, by jwt27

User metadata
Rank Oldbie
Rank
Oldbie

Got WSS to work already, by single-stepping through the initialization procedure and plugging the right IRQ/DMA values in CPU registers manually. The stereo flipping issue is resolved with WSS, but I wouldn't call it an improvement over SB by any means. It sounds HORRIBLE.

Reply 9 of 10, by jwt27

User metadata
Rank Oldbie
Rank
Oldbie

I used OpenWatcom debugger, not the best if you don't have source but it gets along very well with DOS4GW programs. I also kept 386SWAT in the background to set debug registers (break on IO port access). Make sure to unbind DOS4GW from the game exe first, then run WD with /TRAP=RSI.

If you want to debug this game too (or if anyone else does), I can give you some pointers:

From the entry point (EP), main() is located at EP-23CF8.
On EP-8B3 you'll find an OUT 04, 30 instruction to enable the timer. I had to skip over this since it breaks the keyboard. I think you're supposed to unmask the keyboard IRQ here first.
The procedure that checks for the /S: command line switch is located at EP-3AD4 and calls all sound card detection routines from EP-39E3 or EP-39C0. (depending on whether you use /S: / BOBSOUND or not)
The WSS detection routine is located at EP+73E0. EP+742E to EP+7458 contains the first check to determine the base I/O port. It's looking for 04 on the lower 6 bits from port base+3, which is hardwired (on YMF, at least), so this test should always work.
Next is the IRQ detection. It'll try to write an IRQ configuration to base+0 (which is read-only) and then on EP+74D1, check if bit 6 on base+3 is 1 (it's hardwired to 0). The game checks IRQ 7->9->10->11, in this order, so once it's selected your sound card's real IRQ, make sure this TEST AL,40h passes.
I'm not entirely sure how DMA channel detection works, I figured TEST AL,80h on EP+7508 did this but on a second look this doesn't appear to be the final check at all. It'll skip checking a DMA channel if this TEST fails though, but this bit is always 1 if your card is in a 16-bit slot. It looks like it's trying channels 0->1->3 and running half the initialization procedure to find out if it works or not.

...while the proper way to get WSS configuration, is to simply read it from the base port... It's right there!

Reply 10 of 10, by gerwin

User metadata
Rank l33t
Rank
l33t

I tried the OpenWatcom debugger yesterday. A dos based text-mode executable called WD.exe. It may be caused by my limited knowledge of it, but I don't like it. If only because I cannot see the raw hex values that represent the decoded instructions. I need that to be displayed right beside the instructions themselves.
It is also missing a goto (line) function.

--> ISA Soundcard Overview // Doom MBF 2.04 // SetMul