AUDIO - DAC on LPT1, covox emulation added

Here you can discuss the development of patches.

AUDIO - DAC on LPT1, covox emulation added

Postby zbiggy » 2006-7-05 @ 12:16

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
You do not have the required permissions to view the files attached to this post.
Last edited by zbiggy on 2006-7-05 @ 20:50, edited 1 time in total.
zbiggy
Newbie
 
Posts: 90
Joined: 2004-7-29 @ 01:59
Location: Poland, Pultusk

Re: [patch] DAC on LPT1, covox emulation added

Postby eL_PuSHeR » 2006-7-05 @ 12:46

Nice! Good work! :cool:
Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)
User avatar
eL_PuSHeR
Moderator
 
Posts: 6495
Joined: 2003-6-20 @ 16:39

Re: [patch] DAC on LPT1, covox emulation added

Postby zbiggy » 2006-7-05 @ 13:53

Nice! Good work! Cool


Thanks :happyhappy:

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-7-05 @ 19:17, edited 2 times in total.
zbiggy
Newbie
 
Posts: 90
Joined: 2004-7-29 @ 01:59
Location: Poland, Pultusk

Re: [patch] DAC on LPT1, covox emulation added

Postby zbiggy » 2006-7-05 @ 14:33

Some other info about stereo LPT DACs is in PCSTGIF7.ZIP
zbiggy
Newbie
 
Posts: 90
Joined: 2004-7-29 @ 01:59
Location: Poland, Pultusk

Re: [patch] DAC on LPT1, covox emulation added

Postby mirekluza » 2006-7-05 @ 18:43

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
mirekluza
DOSBox Moderator
 
Posts: 1697
Joined: 2003-8-21 @ 04:19

Re: [patch] DAC on LPT1, covox emulation added

Postby mirekluza » 2006-7-05 @ 19:43

:-( :-( :-(
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
mirekluza
DOSBox Moderator
 
Posts: 1697
Joined: 2003-8-21 @ 04:19

Re: [patch] DAC on LPT1, covox emulation added

Postby zbiggy » 2006-7-05 @ 20:18

Where I can download this game?
zbiggy
Newbie
 
Posts: 90
Joined: 2004-7-29 @ 01:59
Location: Poland, Pultusk

Re: [patch] DAC on LPT1, covox emulation added

Postby zbiggy » 2006-7-05 @ 20:49

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.
zbiggy
Newbie
 
Posts: 90
Joined: 2004-7-29 @ 01:59
Location: Poland, Pultusk

Re: [patch] DAC on LPT1, covox emulation added

Postby zbiggy » 2006-7-05 @ 22:02

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.
zbiggy
Newbie
 
Posts: 90
Joined: 2004-7-29 @ 01:59
Location: Poland, Pultusk

Re: [patch] DAC on LPT1, covox emulation added

Postby mirekluza » 2006-7-06 @ 06:54

zbiggy wrote:Where I can download this game?

I PMed you some info since I cannot post it here on Vogons (basically: simple googling has got some results).

Mirek
mirekluza
DOSBox Moderator
 
Posts: 1697
Joined: 2003-8-21 @ 04:19

Re: [patch] DAC on LPT1, covox emulation added

Postby zbiggy » 2006-7-06 @ 11:08

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.
zbiggy
Newbie
 
Posts: 90
Joined: 2004-7-29 @ 01:59
Location: Poland, Pultusk

Re: [patch] DAC on LPT1, covox emulation added

Postby mirekluza » 2006-7-06 @ 11:35

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
mirekluza
DOSBox Moderator
 
Posts: 1697
Joined: 2003-8-21 @ 04:19

Re: [patch] DAC on LPT1, covox emulation added

Postby zbiggy » 2006-7-07 @ 18:18

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.
zbiggy
Newbie
 
Posts: 90
Joined: 2004-7-29 @ 01:59
Location: Poland, Pultusk

Re: [patch] DAC on LPT1, covox emulation added

Postby zbiggy » 2006-7-07 @ 18:45

I run the game using PC speaker emulation. Now it is much better.
zbiggy
Newbie
 
Posts: 90
Joined: 2004-7-29 @ 01:59
Location: Poland, Pultusk

Re: DAC on LPT1, covox emulation added

Postby suinegagpf » 2010-7-09 @ 01:14

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/200501080218 ... /index.htm

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

-Dave
suinegagpf
Newbie
 
Posts: 1
Joined: 2010-7-09 @ 00:58
Location: Milwaukee, WI


Return to DOSBox Patches

Who is online

Users browsing this forum: Ringding and 2 guests