VOGONS


First post, by Malik

User metadata
Rank l33t
Rank
l33t

Note : The original post has been moved to a separate thread called "The ALS4000 PCI Sound Card - PCI SB Compatibility in Newer Systems", since there are other discussions here which required their own space and did not conform the the original thread title.

I have changed the title of this thread to focus on the matters discussed here within.

Last edited by Malik on 2011-05-07, 02:51. Edited 1 time in total.

5476332566_7480a12517_t.jpgSB Dos Drivers

Reply 1 of 20, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

I had some pretty nice results running an ALS4000 on two Pentium IIIs, one at 500MHz, the other at 1GHz. The one problem I found with the ALS4000 was a common problem on every single sound card I've used with a real Yamaha YMF262, my HP AZT1008(contains an ASIC-based clone of the YMF262) and my SoundBlaster 16 Value model CT2770(contains a YMF262 within the CT1747): if I play the floppy disk edition of Star Wars X-Wing on fast computers, using the AdLib, SoundBlaster or SoundBlaster Pro and compatibles sound options cause the YMF262 to output a mess of garbage notes. The AZT1008 seems more resilient to this problem as I've only gotten the card to screw up when I used it on a CPU faster than 750MHz, but the other two are considerably more sensitive. All sound cards I've used with a YMF262 on them(OPTi 82C929A, SoundBlaster Pro 2.0, SoundBlaster Vibra16 model CT2260) will output garbage when used on a CPU faster than 133MHz and the SoundBlaster 16 Value's ASIC-based YMF262 will screw up past 400MHz. The ALS4000's YMF262 did the same thing on every computer I used it on, which include a 266MHz Pentium II, a 500MHz Pentium III and a 1GHz Pentium III. I'd like to see what would happen with the ALS4000 on a Pentium 4. One thing's for sure: I could not get the ALS4000 to work with any DOS version of MAME on a 1.8GHz Pentium 4.

Creator of The Many Sounds of:, a collection of various DOS games played using different sound cards.

Reply 2 of 20, by Mau1wurf1977

User metadata
Rank l33t++
Rank
l33t++

Interesting!

Must get myself one of these 😁

My website with reviews, demos, drivers, tutorials and more...
My YouTube channel

Reply 3 of 20, by dvwjr

User metadata
Rank Member
Rank
Member

Hey Ace,

I have read on VOGONs and other forums about your problems with the game Star Wars X-Wing (floppy version) using sound cars with the Yamaha YMF262 OPL3 FM synthesis sound chip. Specifically that a CPU processor speed above 133 Mhz for an Intel Pentium will cause a Creative Sound Blaster Pro 2 (or clone) will cause the YMF262 OPL3 output to become corrupted.

Perhaps a test to possibly isolate the OPL3 output problem of the Sound Blaster Pro 2 (and clones) on 'faster' CPUs on DOS ISA based systems. If this test can reproduce you X-Wing OPL3 problems, then it might be fixable...

I have attached a ZIP file named TESTxSBP.ZIP which contains two files:

1.) The original v1.91 TEST-SBP.EXE file from Creative for testing the Sound Blaster Pro 2 sound card in 2 Operator FM music, 4 Operator FM music and Digitized sound.

2.) A patched version v1.91X TESTxSBP.EXE which has additional delay in between OPL3 register writes.

If you have the time, could you please try both DOS executables on a DOS PC (ISA) with a Creative Sound Blaster Pro2 with a 'slow' CPU speed that will allow both versions of the Test program to execute. Then please execute those same two Test programs on the fastest DOS based CPU system (ISA) you can provide - perhaps the patched version TESTxSBP.EXE will not have the OPL3 FM output corrupted.

I have tested a Sound Blaster Pro 2 on both a Dell Optiplex GXi (200MHz Pentium) and an Intel 440BX with a 1.4GHz Tulatin Celeron and the OPL3 output functioned properly on both systems with the patched version of the Creative diagnostic program.

Hope this can help,

dvwjr

Attachments

  • Filename
    TESTxSBP.zip
    File size
    90.71 KiB
    Downloads
    444 downloads
    File comment
    Contains original TEST-SBP.EXE and patched version TESTxSBP.EXE
    File license
    Fair use/fair dealing exception

Reply 4 of 20, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

I guess I'll try this out with my SoundBlaster Pro 2.0 on my overclocked 1GHz Pentium III(it's been overclocked to 1.13GHz). First thing's first: I need to install the game on that computer. If it works, that patch should be applied to the drivers of sound cards with this issue(ALS4000, OPTi 82C929A, OPTi 82C930, SoundBlaster 16(those with the CT1747 are more tolerant of higher clock speeds and mess up past 400MHz) and any other sound cards with a YMF262). And a little FYI, the floppy disk edition of X-Wing only has OPL2 music. There's no OPL3 in the game. I've had no problems with OPL3 on sound cards with discrete YMF262s, only in OPL2 and only with X-Wing. Man, that game is so problematic to get the sound working correctly. Most of the time, only the AdLib sound option works(the SoundBlaster sound options result in complete silence on certain sound cards) and when you use a sound card with true OPL2 or OPL3 on a fast computer, the game outputs garbage.

Should this work, would it be possible to provide a patch of this kind for Windows 95 as well? I've got a hybrid Windows 9x/DOS machine running Windows 95 which could use some authentic OPL2 and OPL3(this one runs on a 533MHz Celeron).

As a side-note, I have a clone of the original SoundBlaster Pro, an Audio Excel AV300, which uses twin YM3812 clones that behave exactly like the YMF262 on all the sound cards I have: they too will output garbage when the CPU is too fast.

I guess I've now got an excuse to get a second SoundBlaster Pro 2.0. 😀

Before I forget, here's another issue I have with sound cards on fast computers: when using the AdLib sound option for music in the Collector's CD-ROM editions of X-Wing and TIE Fighter(this is OPL2, by the way), the music is noticeably slower and the game stutters A LOT. This happens no matter what sound card I use. Got an explanation for this?

EDIT: I can confirm the OPL2 is screwed up in TEST-SBP just like it's screwed up in the floppy disk edition of Star Wars X-Wing. I will now try the modified TEST-SBP. I'm using a 1GHz Pentium III for my tests.

EDIT 2: Nope, even with the modified TEST-SBP, OPL2 causes a bunch of garbage to be output from the YMF262. Then again, the sound card is on a motherboard with a VIA chipset, so I'm really not surprised. I'll try on a computer with an Intel chipset on the motherboard.

EDIT 3: Actually, scratch that. OPL2 is now working just fine. I don't know what happened to make the SoundBlaster Pro 2.0 screw up like it did on the stock TEST-SBP.

EDIT 4: It seems the OPL2 test on the modified TEST-SBP is very inconsistent. Sometimes it works flawlessly while on other occasions, it outputs garbage or hits false notes, either as soon as the test is started or during the test. I'm pretty sure the chipset is at fault in this situation. I'll have to confirm this with my IBM Personal Computer 300PL, which is where I'd like to stick a sound card with true OPL3.

Reply 5 of 20, by dvwjr

User metadata
Rank Member
Rank
Member

Ace,

Here are the patch offsets for the TESTxSBP.EXE file. Feel free to hex edit the two file locations to play with the 8254 PIT values. The OPL3 write register delay is supposedly around 3.3 us (OPL2 around 26 us) and is usually done in-line with successive IO port reads. The 8254 PIT delays are for the FM inter-data timing to the OPL3 write-registers.

Comparing files TEST-SBP.EXE and TESTxSBP.EXE
0000590F: 40 80
00005914: 40 80

Try hex values > 0x80, but do not go too high, say above 0x100-0x120. You may find that higher delay values might work on the VIA chipsets where lower values might work on Intel based chipsets. Also, if your BIOS has available the following, you might wish to maximize your "8-bit IO Recovery time" value for a Sound Blaster Pro 2.0 on your 'fast' DOS PC

For DOS games that did their own FM sound routines, I suppose a patch for the 8254 PIT timing could be found, many early DOS games incorporated the Creative FMDRV code, which is what is in the TEST-SBP.EXE file. As to any Windows drivers, if it can be done in DOS, there is a way in VxD drivers to also correct problems. Later DOS games which used 3rd party DOS sound drivers such as MILES and HMI probably did not have these problems.

As to the 'stutter' with the AdLib sound option, my guess would be that the DOS "sound driver" code for the AdLib YMF3812 produces the required write register delay via 42 IO reads of an AdLib data IO port (vs 8 IO reads for for the YMF262) and interrupts were disabled?!? 😳

We'll see...

dvwjr

Reply 6 of 20, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

Just as a little note: I stuck my SoundBlaster Pro 2.0 in my 300PL with a 533MHz Intel Celeron and I could not get any garbage output from the SoundBlaster Pro 2.0's YMF262 using the 2-Op FM test with the stock TEST-SBP. It seems the output of garbage from the YMF262 is dependent on the delay values coded into the program.

Wonder where the hex locations for X-Wing's delay values are. Would you be able to tell me where they are in the floppy disk edition's executable?

A bit of an off-topic question, but why would the floppy disk edition of X-Wing not output any sound when using the SoundBlaster, SoundBlaster Pro and compatibles, Roland with SoundBlaster and General MIDI with SoundBlaster sound options? I have this problem on numerous sound cards, including the SoundBlaster Pro 2.0 when used in conjunction with a SoundBlaster AWE64. Several PCI sound cards have this issue as well.

Reply 7 of 20, by dvwjr

User metadata
Rank Member
Rank
Member

Ace,

Attached is the file TestYsbp.ZIP which contains the following files:

a.) TestAsbp.exe (has delay of 0x10)
b.) TestBsbp.exe (has delay of 0x20)
c.) TestCsbp.exe (has delay of 0x30)
d.) TestYsbp.exe (has delay of 0x120)

Please try files a,b,c on your IBM 300PL (Intel 440BX?) 550MHz PC with the Sound Blaster Pro 2.0 and see which one fails (if any) on the 2-OP FM test. You could then further narrow down the failure range by self-patching the file values. Knowing this value might be of some help to find where to look in a disassembly of the Star Wars X-Wing (floppy) executable.

Please try file d.) TestYsbp.exe on your 1.13 GHz Pentium III VIA with the Sound Blaster Pro 2.0 system to see if the larger delay value will allow the test to succeed.

Without disassembly of the Star Wars X-Wing (floppy) DOS executable, there is no telling where any patch point exists. While the programmers probably used and modified the Creative stock FMDRV, I do not have a copy of the game so I can not help you in that regard.

As to why the Star Wars X-WIng (floppy) DOS executable does not detect a Sound Blaster, Sound Blaster Pro or compatbiles, the probable reason is the detection method used, which can be done in various ways. My guess is that there is another timing delay problem with the detection code and that the various Sound Blaster I/O port values are not being initialized to the correct values, so that no sound is output. I am curious as to the game sound output - if one has a Sound Blaster Pro 2.0, does the game output any stereo sound? Or does the game just treat all Sound Blasters and compatibles as a mono Sound Blaster?

Let me know,

dvwjr

Attachments

  • Filename
    TestYsbp.zip
    File size
    181.4 KiB
    Downloads
    450 downloads
    File comment
    Various patched TEST-SBP.EXE diagnostic test files.
    File license
    Fair use/fair dealing exception

Reply 8 of 20, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

I'm not home right now, so I can't test the modified TEST-SBP files. But when I do, I'll try out all those TEST-SBP files.

By the way, what's the delay value on a stock TEST-SBP? With a stock TEST-SBP, the 2-Op FM test is successful on the IBM 300PL(I'm not sure what chipset is used, but I assume it's the 440BX because the 300GL I have uses the 440BX).

X-Wing seems very picky about your sound card setup. I replaced the SoundBlaster Pro 2.0 in the 300PL with my SoundBlaster 16 Value model CT2770 and X-Wing works with everything but the SoundBlaster Pro and compatibles sound option(the SoundBlaster 16 Value doesn't like the SoundBlaster Pro and compatibles sound option in X-Wing and crashes the game), however, while I figure out where the OPL2 delay values are in the executable, I'll use the CQM in my SoundBlaster AWE64 Value model CT4520. However, the SoundBlaster Pro 2.0 works perfectly fine with X-Wing when combined with an Ensoniq Soundscape. I'm really not sure why X-Wing refuses to output sound with any of the SoundBlaster sound options on certain sound cards and why it won't output sound with certain dual sound card setups.

And no, X-Wing does not support Stereo sound out of the SoundBlaster Pro. Only the Collector's CD-ROM edition does. The floppy disk edition doesn't.

Creator of The Many Sounds of:, a collection of various DOS games played using different sound cards.

Reply 9 of 20, by dvwjr

User metadata
Rank Member
Rank
Member

Ace,

No problem, test whenever you have time. 😉

The default delay value of TEST-SBP.EXE is 0x40. If you have access to a BIOS setup screen on your IBM 300PL, then you might want to check for the "8-bit IO Recovery time" value. If this is available on your VIA based chipset, might also help there in addition to increasing the PIT delay values.

When it comes to having two sound-cards respond to a detection routine, you might have some problems if the dual cards are not setup to identical ISA resources. For a Sound Blaster Pro 2.0 alone, the TEST-SBP.EXE diagnostic executable can be run manually via the "/M" command-line switch. You might wish to try the TEST-SBP.EXE on a sound-card setup which fails using the X-Wing sound-card setup, if the TEST-SBP.EXE can recognize the Sound Blaster (or clone) while the X-Wing code produces no sound - that implies that a different sound-blaster detection method is being used...

About the mono vs stereo sound in the X-Wing game, if the floppy version only supports mono FM sound, then why do did LucasArts make a point of supporting the Sound Blaster Pro? It seems that all Sound Blasters are treated as a mono Sound Blaster (1.0, 1.5. 2.0, Pro 1 and Pro 2). Now in the CD-ROM version do you get stereo FM sound or GM MIDI or RedBook CD audio for music if one has a Sound Blaster Pro or Sound Blaster 16+???

If you narrow down the delay range for the 8254 PIT value, then this can give you a leg up on any disassembly of the main DOS executable. If you are conversant with using the excellent DOSBox 'heavy' debugger then you might fairly quickly narrow down the search for the Sound Blaster detection routine and the inter-FM 2-OP data delay. If not you might zip up the installed X-Wing directory and I cound take a brief look. Or you could contact one of VOGONs resident DOSBox code/game fixer such as ripsaw8080 and have him take a gander...

dvwjr

Reply 10 of 20, by Ace

User metadata
Rank Oldbie
Rank
Oldbie
dvwjr wrote:

The default delay value of TEST-SBP.EXE is 0x40. If you have access to a BIOS setup screen on your IBM 300PL, then you might want to check for the "8-bit IO Recovery time" value. If this is available on your VIA based chipset, might also help there in addition to increasing the PIT delay values.

This seems sufficient for the SoundBlaster Pro 2.0 to not screw up on the IBM 300PL. So X-Wing must use a smaller delay value to screw up that badly.

dvwjr wrote:

When it comes to having two sound-cards respond to a detection routine, you might have some problems if the dual cards are not setup to identical ISA resources. For a Sound Blaster Pro 2.0 alone, the TEST-SBP.EXE diagnostic executable can be run manually via the "/M" command-line switch. You might wish to try the TEST-SBP.EXE on a sound-card setup which fails using the X-Wing sound-card setup, if the TEST-SBP.EXE can recognize the Sound Blaster (or clone) while the X-Wing code produces no sound - that implies that a different sound-blaster detection method is being used...

I'll have to try that out. I know one thing for sure: on my overclocked 1.13GHz Pentium III, I can't use TEST-SBP without underclocking the CPU back down to 1GHz, otherwise, TEST-SBP either completely fails to detect the card or fails to detect the DMA settings of the SoundBlaster Pro 2.0.

dvwjr wrote:

About the mono vs stereo sound in the X-Wing game, if the floppy version only supports mono FM sound, then why do did LucasArts make a point of supporting the Sound Blaster Pro? It seems that all Sound Blasters are treated as a mono Sound Blaster (1.0, 1.5. 2.0, Pro 1 and Pro 2). Now in the CD-ROM version do you get stereo FM sound or GM MIDI or RedBook CD audio for music if one has a Sound Blaster Pro or Sound Blaster 16+???

Actually, the floppy disk edition has Stereo General MIDI, but at the same time has Mono OPL2 music and Mono digital sound. The Collector's CD-ROM edition has Stereo everything: music(except in OPL2, and the Stereo separation isn't too noticeable in X-Wing's OPL3) and sound effects(there's no RedBook audio on the disc).

dvwjr wrote:

If you narrow down the delay range for the 8254 PIT value, then this can give you a leg up on any disassembly of the main DOS executable. If you are conversant with using the excellent DOSBox 'heavy' debugger then you might fairly quickly narrow down the search for the Sound Blaster detection routine and the inter-FM 2-OP data delay. If not you might zip up the installed X-Wing directory and I cound take a brief look. Or you could contact one of VOGONs resident DOSBox code/game fixer such as ripsaw8080 and have him take a gander...

I was thinking of doing this since I have no clue how to use a debugger. First thing's first: give me some advice on how to use DOSBox's debugger. I might be able to find the FM delay values myself with a bit of help.

EDIT: I think it'd be easier to zip up the X-Wing directory and send it off to you. In fact, I'll do that now.

EDIT 2: WTF?! Somehow, DOSBox has done the EXACT SAME THING with X-Wing as on a real DOS/Windows 95 PC! Now even in DOSBox, X-Wing refuses to output sound with the SoundBlaster sound options. Talk about a game with a very poorly-coded sound engine. Jeez.

EDIT 3: The directory is zipped(it's not the directory I have on my DOS/Windows 95 PCs, but the files are the same between the various computers). I will now PM the ZIP. Or can I simply attach the ZIP? I don't know the VOGONS policy on things like this.

Reply 11 of 20, by Malik

User metadata
Rank l33t
Rank
l33t

The "8-bit I/O Recovery Time" option in bios seems to help sound problems. Worth checking into.

Setting it to 8 solved my LAPC-I distortions in a couple of systems I have tested.

5476332566_7480a12517_t.jpgSB Dos Drivers

Reply 12 of 20, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

IBM's crap-tacular BIOSes don't have any of those 8-bit I/O Recovery Time options. Not on my 300PL nor on my 300GL. Would there be some kind of alternate BIOS I could use on the 300PL or am I stuck with IBM's really crappy BIOS?

Creator of The Many Sounds of:, a collection of various DOS games played using different sound cards.

Reply 13 of 20, by dvwjr

User metadata
Rank Member
Rank
Member

Ace,

You could upload the ZIP file to a file hosting service and then PM me with the file location. As long as the directory structure will function while loaded under DOSBox, then I can use the debugger version and take a look. I think that might be easier than introducing you to the DOSBox debugger to solve this particular problem. Though if you are interested in dubugging older DOS applicatons/games then by all mean there are some good static debugging/analysis tools in addition to dynamic ones such as the DOSBox heavy debug version.

While looking at the various time delay methods used in X-wing will help, the patching might be a little more extensive than just changing some values - but that's half the fun... 😁

Looking at the game code together with the results of your Test?SBP.exe executions on your Intel and VIA platforms will help narrow down possible solutions. It's just a matter of time and effort.

Let me know how you want to proceed,

dvwjr

Reply 14 of 20, by Ace

User metadata
Rank Oldbie
Rank
Oldbie

Meh... I can't use debug tools on any emulator. I'll send you the zipped X-Wing directory later today.

Creator of The Many Sounds of:, a collection of various DOS games played using different sound cards.

Reply 16 of 20, by Mau1wurf1977

User metadata
Rank l33t++
Rank
l33t++

Games I found to be difficult are Sierra VGA games with speech. E.g. SQ4, SQ1 VGA and so on.

Basically all the really old games which speech. Modern games, with modern drivers are much better. Games such as Descent or Duke Nukem 3D seem to work on every card I have tried so far, be it ISA or PCI.

I wonder about two things:

1. Does this card also work in other modern systems. E.g. what about a modern Phenom 2 or i5 system?

2. Does the card fall apart when you disable L1 cache (because it uses the CPU to process information just like the AudioPCI and Live!)

My website with reviews, demos, drivers, tutorials and more...
My YouTube channel

Reply 19 of 20, by gerwin

User metadata
Rank l33t
Rank
l33t

Very suprising that there is no memory footprint for the Dos Driver.

Compatibility
• Yamaha OPL4 Wavetable Synthesizer

What does this mean, is there any midi in pure dos? Or does an external module work with it?

Warcraft I not working means trouble, as it uses miles soundsystem sound drivers, like many other games. You can still try to add later versions of the drivers to the game, maybe then it will work.

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