VOGONS

Common searches


First post, by zbiggy

User metadata
Rank Newbie
Rank
Newbie

Hi!

This patch adds to dosbox support for the following sound cards:
LPT DAC
Covox Speech Thing
Intersound MDO

Compability with Disney Sound Source is preserved. After applying patch and setting disney=true in dosbox.conf all this hardware is emulated.

Patch tested with today's CVS version. The previous dosboxes should work with this patch too.

I tested this patch using following DOS module players:
mp219b.zip
iplay122.zip

After running mp.com from mp219b.zip press c to select output device: 'D/A on LPT1' because by default SoundBlaster is autoselected.

When using iplay122.zip first run isetup.exe and choose: 'Covox/DAC8 on Printerport' and save settings. Then run iplay.exe.

have a nice day,
Zbigniew 'zbiggy' Luszpinski

Attachments

  • Filename
    disney.cpp.diff
    File size
    689 Bytes
    Downloads
    243 downloads
    File license
    Fair use/fair dealing exception
Last edited by zbiggy on 2006-07-05, 20:50. Edited 1 time in total.

Reply 2 of 14, by zbiggy

User metadata
Rank Newbie
Rank
Newbie

Nice! Good work! Cool

Thanks 😁

There is still missing support for stereo on LPT. I do not know if any game makes use of it. If not there is no need for digging support for it.

I found so far 4 types of stereo on LPT:
Method 1:
2 DACs on 2 LPT ports = 2 channels = stereo (which LPT is left/right signal?)
The emulation is easy by cloning current code of disney.c on second LPT port 0x278. I will not do that because several places in dosbox must be changed - developers of dosbox should decide if they would like to add such stereo support.

Method 2 and 3:
2 DACs on 1 LPT port = stereo (left/right keying using control port of LPT. LPT base+2 = control port. bits: strobe,auto feed)
bit strobe turns on/off right channel DAC
bit auto feed turns on/off left channel DAC
these bits should be set in inverted form:
0 - turn on DAC
1 - turn off DAC
Pin numbers on physical LPT port are 1 (strobe) and 14 (auto feed)

There is another project which shifts DACs using only strobe signaling (instead of on/off there is left/right)

Many DOS applications used some kind of autodetection of stereo DACs:
(taken from Linux LPT sound driver)

/* test if a Stereo-on-One is on lp(port) */
inline static int stereo1_detect(unsigned port)
{
if (! pcsp_free_port(port))
return 0;
outb(0x7F, LP_B(port));
if (LP_S(port) & 0x80) {
outb(0x80, LP_B(port));
return (LP_S(port) & 0x80) ? 0 : 1;
}
return 0;
}

/* test if a new Stereo-Circuit is on lp(port) */
inline static int stereo_nc_detect(unsigned port)
{
if (! pcsp_free_port(port))
return 0;
outb(0, LP_B(port));
if (LP_S(port) & 0x40) {
outb(0xFF, LP_B(port));
return (LP_S(port) & 0x40) ? 0 : 1;
}
return 0;
}

I prepared answers to these test procedures for dosbox disney but they do not work at all. Maybe DOS applications use different detection mechanism.

There is BUSY signal (pin 11) which may be significant part of DACs autodection procedure but do not know how it impacts on autodetection.
BUSY line is always soldered on scheme with D7 line of LPT port.

method 4:
Unknown method Visual Player 2.0 utilizes.

Inside mp219b.zip there is pure DOS text file hardware.doc which has scheme of stereo-on-1 DACs and author knows how detection procedure should look. However my both mails were bounced back because authors accounts does not exist anymore.

Last edited by zbiggy on 2006-07-05, 19:17. Edited 2 times in total.

Reply 4 of 14, by mirekluza

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Very nice...
I wonder whether it will work for Wizardry 7 (the Soundblaster sound effects do not work there in DOSBOX, PC speaker effects are not nice in DOSBOX - because of effects when switching the speaker on/off, Covox is another option).
I cannot wait to try it...

Mirek

Reply 5 of 14, by mirekluza

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

🙁 🙁 🙁
Neither of Covox choices in Wizardry 7 works for sound effects (Covox Sound Master, Covox Voice Master, Covox sound Master II)...

I did not try to use Covox for music (ADLIB works ok there).

Mirek

Reply 7 of 14, by zbiggy

User metadata
Rank Newbie
Rank
Newbie

This patch emulates raw DAC on LPT. If any game does some kind of autodetection by sending special codes and listening to special answers it will not work. If somebody knows such secret codes there is room for improvements.

I checked Pinball Fantasies in covox mode - works.

Reply 8 of 14, by zbiggy

User metadata
Rank Newbie
Rank
Newbie

It looks covox voice master/sound master for PC does not use LPT port but 220 port so it must be a internal ISA sound card. However covox voice for atari continues to be LPT port device.

Reply 10 of 14, by zbiggy

User metadata
Rank Newbie
Rank
Newbie

Got it. Emulation works using SB16+LAPC-I. LAPC-I emulation sounds great as always. SB samples looks very low quality but works. I'm afraid you will not get better sound quality in this game.

Reply 11 of 14, by mirekluza

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
zbiggy wrote:

Got it. Emulation works using SB16+LAPC-I. LAPC-I emulation sounds great as always. SB samples looks very low quality but works. I'm afraid you will not get better sound quality in this game.

Do you mean that you were able to get the sound effects (not music!) by something else than PC Speaker?
Yes, the sound samples in Wiyardry 7 are low quality, that is no problem - the problem was that when playing them through anything else than PC speaker they were horribly corrupted in DOSBOX or they did not play at all... (on a real SB the samples play normally).

Mirek

Reply 12 of 14, by zbiggy

User metadata
Rank Newbie
Rank
Newbie

At the beginning the wind blows. If go on wall there is sound like from early arcade figting games. There is no background music in game. Only if I win battle with tentacle short music plays. Maybe you should adjust volume in ALSA? To hear it I have to move PCM slider to the 75%. There is ping when I chose wrong option in menu.

Update: as I move further there is blonde woman warrior on cosmic bike or something there is some engine sound. There are big bugs in the cellar which during biting make sound.

Man, I can hear difference between high quality LAPC-I music and worse than 'phone quality' poorly recorded game samples.

Everytime I run game like this I'm grateful to Canadacow and Kingguppy for their great munt.

Reply 14 of 14, by suinegagpf

User metadata
Rank Newbie
Rank
Newbie

On a 4 years late to reply note and slightly off topic:
There was a slightly newer version of PCSTGIF7.ZIP archived as PCSTGIF7A.ZIP that didn't seem to have been picked up by anyone and redistributed. In this version only the text files were updated, no modifications to the hardware were made, also a couple of simple utilities were included. The last known copy exists here:
http://web.archive.org/web/20050108021826/hom … /ppsb/index.htm

The contact information for the author embedded in that archive is long obsolete.

-Dave