Sierra/Dynamix sound driver hacking

Getting old DOS games working. (DOSBox topics belong in DOSBox areas below, not here).

Re: Sierra/Dynamix sound driver hacking

Postby tikalat » 2013-7-25 @ 13:08

Switched tactics realizing it can't be done in EXE reliably. Looking at raw ADPCM files for 'peak overflows' - where they should've clipped the voice but allowed it to roll 32767 <--> -32768 (pretty bad pop). Then make a tool to reconnect the curve without overflow.

Doesn't get rid of all pops, distortion but it works decently well on some games (QFG4 - "Nothing happens" or clip about bunny ripping out your heart ~ 90+ sound clips). Acceptably good on PQ4 ("Dog doesn't understand your LAPD" or "Holster your weapon" ~ 70+ clips). Still needs some hand-adjusting. And 8-bit work (GK1 ~ 1000+ errors).

Maybe another few weeks and 16-bit AUD patches will be release-ready.
tikalat
Member
 
Posts: 287
Joined: 2012-4-13 @ 16:39

Re: Sierra/Dynamix sound driver hacking

Postby tikalat » 2013-7-27 @ 13:55

viewtopic.php?p=309534#p309534

Pepper's Adventures in Time
- DAC fixes (8-bit <--> 16-bit conversion)

Police Quest Open Season
- DAC fixes (8-bit <--> 16-bit conversion)
- ADPCM overflow - repair audio peaks
- ADPCM noise - reduce isolated static
- DOS Floppy - DACBLAST error fixed


Satisfied with how repair clips went: 76 / 10848. Most sound okay in-game.


For a sample of what ADPCM fixes sound like:
1) http://s000.tinyupload.com/index.php?fi ... 3884760223
2) Get SCI Viewer and play


Quest for Glory IV is next - ~30/108+ errors need new curve formulas. Take time.


@Collector
Do you know how far back the Sound Blaster distortion goes? Space Quest III or Quest for Glory II?

Seems random and save states can't reproduce problem when it happens while testing PQ4 speech.
tikalat
Member
 
Posts: 287
Joined: 2012-4-13 @ 16:39

Re: Sierra/Dynamix sound driver hacking

Postby collector » 2013-7-27 @ 16:50

I don't recall encountering the noise in early SCI1 and earlier. On the other hand, I believe that KQ5 (first VGA) is the first one to exhibit the initialization speed bug. The pre SCI1 Sierra SB drivers do not seem to suffer from either bug.
User avatar
collector
l33t
 
Posts: 4004
Joined: 2003-1-15 @ 10:39

Re: Sierra/Dynamix sound driver hacking

Postby tikalat » 2013-7-29 @ 02:42

viewtopic.php?p=309534#p309534


King's Quest VII update
- DAC converter fixes (8 <-> 16)
- Patch to reduce stray ADPCM noise (zero peak overflow errors with this game)

(16-bit ADPCM 22050)


Something noticed:

AVI
320x168 @ 10fps - 8bit CRAM (Microsoft)
11025 8-bit mono

RBT
5 fps?? - seems to skip frames, kinda choppy compared to AVI??
22050 16-bit mono



LSL6 is probably next. Only ~30 overflow errors - decent repair job. 16-bit ADPCM 22050. Already fixed up except for floppy DAC converter - could be inside AUDBLAST.DRV / AUDTHUND.DRV drivers. 8-bit ADPCM done inside sound driver. Will check more.

QG4 is 11025 16-bit ADPCM. Messy--- overflow errors. Hand cleaning several noisy clips. 12 formulas remaining - the pretty difficult curves to repair. Tiring stuff.
tikalat
Member
 
Posts: 287
Joined: 2012-4-13 @ 16:39

Re: Sierra/Dynamix sound driver hacking

Postby collector » 2013-7-29 @ 07:03

tikalat wrote:Something noticed:

AVI
320x168 @ 10fps - 8bit CRAM (Microsoft)
11025 8-bit mono

RBT
5 fps?? - seems to skip frames, kinda choppy compared to AVI??
22050 16-bit mono

I have noticed the lower quality of the RBTs as compared to the AVIs. Keep in mind that Sierra originally intended this to be a Win only game. It was not until v2 that they finally included a DOS interpreter. I suppose that they assumed that anyone needing the DOS version probably had an older, lower powered machine, hence the downsampling of the cut scene videos. I wish that there were some way to get the DOS interpreter to play the AVIs or to format the AVIs to RBTs at the higher sampling.

BTW, did you find your Jones CD?
User avatar
collector
l33t
 
Posts: 4004
Joined: 2003-1-15 @ 10:39

Re: Sierra/Dynamix sound driver hacking

Postby tikalat » 2013-7-29 @ 13:05

Still looking for the CD. Found my lost Mother Goose + Blue Ice games so I'm sure it's somewhere. Look later in week.


I wish that there were some way to get the DOS interpreter to play the AVIs or to format the AVIs to RBTs at the higher sampling.


Same. If there were a way to merge the two - video bitrate + audio bitrate :|

Guess I'll watch both in the meantime. :lol:
tikalat
Member
 
Posts: 287
Joined: 2012-4-13 @ 16:39

Re: Sierra/Dynamix sound driver hacking

Postby tikalat » 2013-7-30 @ 13:37

Update. Pepper's Adventures does not fix DAC conversion (mistake) - do that later.

(non-SCI2) 16-bit --> 8-bit DAC is done by each sound driver - generic code. Fixable error.
- Win versions are more nasty to fix. Studying.



@Cloudschatze
Which AUDTANDY.DRV are you using?

Looking at the KQ5 one - 8-bit ADPCM v1.
Freddy Pharkas uses 8-bit ADPCM v2 -- different speech algorithm.

Could likely patch it up for a test run later.


edit: Using QG3 AUDTANDY. Get it now. Probably a combo of both - no 8-bit downsample + ADPCM algorithm. Looking.
edit2: QG3 AUDTANDY understands SOL files. Not RIFF WAVE (Pharkas). This causes flags to not setup properly.



@Collector
http://www.sierrahelp.com/Patches-Updat ... dates.html
- Could you mention that PQ4CUF is for Floppy only? Gives Error 48 - purge is not a selector on CD builds at City Hall.

edit: Found my Jones CD.
Last edited by tikalat on 2013-7-31 @ 01:23, edited 2 times in total.
tikalat
Member
 
Posts: 287
Joined: 2012-4-13 @ 16:39

Re: Sierra/Dynamix sound driver hacking

Postby collector » 2013-7-30 @ 15:32

Done. Thanks for the catch. Most of the patch descriptions are directly from Sierra's old site. In some cases where I did not have that, I used the readmes. There may be some other errors carried over from from Sierra's site.
User avatar
collector
l33t
 
Posts: 4004
Joined: 2003-1-15 @ 10:39

Re: Sierra/Dynamix sound driver hacking

Postby tikalat » 2013-8-06 @ 16:43

Update on what's been doing.


1) Spent last few weeks studying noise. How to detect, remove, identify. Lot more complicated than thought. There's hard 'g', 'p' / soft 'h' / laugh volume micro-bursts / up-puh~ / snick / cough / breath / style of speech / A~Ad Avis / stress / serious / enunciate / guffaw / English-isms / button push / room ambient / slur / bah~~ vs bah! (brief) / unknown mouth sloshing / whistle / hold time of 'T'he lock / bac-k!-uh. Treating this as non-noise - voice technique.

And annoying pop + click.

Seems to affect 16-bit ADPCM 11025 much more than 22050 16-bit. Hard part is not over-scrubbing and damaging any raw voice (see above). Cut too much noise and it sounds sharp, briefer - seems phony compared to uncut parts in same clip.


Experimented with a new method that removes small bumps that come out as pops, excessive noise that's far away from voice data. Will be used on QG4 AUD (nearly done) ~ 102 overflow peaks corrected. Hand cleaned other warts.

KQ7 AUD patch should be discarded - little good and likely small minor damage. PQ4 AUD probably has some minor 'scratching' - might redo cleaning procedure some other day with new safer method.


Did try playing with the Sierra low-pass filter used in Torin's Passage for other pcm clips. Sounds blurry, distant. Removes too much noise, dirt. Doesn't have same 'faithful' feeling and destroys unique speech quirks of John Rhys-Davies. So I'm not using it (and giving option to remove it from future SCI2 games). Using linear interpolation adds too much aliasing, voice band bursts - sounds worse.


So~~. QG4 + LSL6 AUD basically done for release. 16-bit --> 8-bit DAC fix kits coming also (Pepper, LSL6, QG4, KQ7).


2) Tandy DAC w/ Freddy Pharkas

FP uses 16-bit WAVE format sfx (instead of SOL). Driver gets confused and treats everything as raw 8-bit pcm. So heavy distortion.

Have to rewrite that part of driver to accept new style. Not started.


3) Jones

Haven't even got a chance to look yet. File is unusually large > 32KB. Looks strange.


4) New games to look at

Torin's Passage, Slater and Charlie, Mother Goose (later versions), Jones.


5) 8-bit AUD

Have to construct new peak overflow methods. Not started.
tikalat
Member
 
Posts: 287
Joined: 2012-4-13 @ 16:39

Re: Sierra/Dynamix sound driver hacking

Postby collector » 2013-8-06 @ 22:32

tikalat wrote:3) Jones

Haven't even got a chance to look yet. File is unusually large > 32KB. Looks strange.


Odd. The one on my CD is tiny, just 896 bytes.
Attachments
AUDCDROM.zip
(771 Bytes) Downloaded 53 times
User avatar
collector
l33t
 
Posts: 4004
Joined: 2003-1-15 @ 10:39

Re: Sierra/Dynamix sound driver hacking

Postby tikalat » 2013-8-07 @ 03:09

Slater & Charlie Go Camping (1993, DOS + WIN)


Title: Driver fixes
Date: August 6, 2013


About:

General MIDI (DOS)
- Sfx now use full channel 1-16
- Volume slider fix


General MIDI (WIN)
- Sfx now use full channel 1-15
- Higher polyphony
- Send GS reset


Sound Blaster (DOS)
- 16-bit DAC driver


ADPCM (DOS / WIN)
- Fix 16-bit --> 8-bit conversion


===============================================================
===============================================================
===============================================================

Trivia:
MT-32 + GM soundtracks nearly identical. MT-32 looks to use GM map.

GS PERC = shakers (925)
Small amount of FM pan-pot


Game uses 16-bit 11025 speech. So new Sound Blaster driver supports this mode.

===============================================================
===============================================================
===============================================================

@Collector
Ack. Misread thread - thinking it was AUDBLAST broken. AUDCDROM matches mine. Get around to checking it out tomorrow.


@News
viewtopic.php?p=309534#p309534

Updated Pepper's Adventures again. DAC 16-bit --> 8-bit fixed this time. Plus Win polyphony + channel map, which I didn't carefully check before.
Attachments
Slater & Charlie Go Camping - genmidi.7z
(270.1 KiB) Downloaded 63 times
tikalat
Member
 
Posts: 287
Joined: 2012-4-13 @ 16:39

Re: Sierra/Dynamix sound driver hacking

Postby tikalat » 2013-8-07 @ 20:09

viewtopic.php?p=309534#p309534

Decided to update QFG4 kit
- DAC conversion (16-bit --> 8-bit)
- ADPCM repair + noise cuts

And Leisure Suit 6 kit
- DAC conversion (16-bit --> 8-bit)
- ADPCM repair (speech + 1 sfx)
- Lo-res WIN polyphony + expand channels (now works)


Irony is that I learn how to use a spectogram + wave editor on the final repaired clip (LSL6 sfx - sex moan). Looking at the points as a picture (wave editor), still done incorrectly. I use 5 points to repair the curve. LSL6 repaired sfx still has small minor bursts of high frequency static (see spectogram), because it requires 6 points to repair - 4 are damaged, not 3.

Current job is tolerable for the time being. Thinking of going back and redoing the 4th point for the 3 ADPCM repair games - QFG4, PQ4, LSL6.
tikalat
Member
 
Posts: 287
Joined: 2012-4-13 @ 16:39

Re: Sierra/Dynamix sound driver hacking

Postby marooned_on_mars » 2013-8-08 @ 00:51

Tikalat, do you think you could return to TIM2 sometime (when you're not busy with fixing something else) and take a look at it again? Some songs sound ear-screamingly out of tune (I can point out exactly which ones are problematic) when set to MT-32. It almost sounds like they don't pitch blend properly and like in some parts the wrong instrument is used. I appreciate your efforts, and in advance if you would be able to fix this =)
I support Universal Basic Income, and so should you, here's why. Another reason why.
Commonly asked questions about UBI
Spread the word!
User avatar
marooned_on_mars
Member
 
Posts: 361
Joined: 2006-1-23 @ 18:47
Location: MoonBase2

Re: Sierra/Dynamix sound driver hacking

Postby tikalat » 2013-8-08 @ 01:58

Jones in the Fast Lane (DOS CD)


Title: Driver fixes
Date: August 7, 2013


About:

CD-DA (DOS CD)
- Allow fixed drive playback


#########################################################
#########################################################
#########################################################

There's probably little more I can do with this game but later
- WIN CD uses General MIDI files ==> patch usual stuff, add MIDI reset


AUDCDROM checks drive from where game is run:
- if CD drive, then works okay
- if HDD, then fails (requires MSCDEX usage)

Run the CDPATCH to hard-code cdrom drive into AUDCDROM driver. Then can play full HDD install + CD-DA from CD drive.
- Note that newer AUDCDROM is supplied (very little difference)


#########################################################
#########################################################
#########################################################

@marooned_on_mars
If you know which MIDI file #s and roughly where, maybe it can be examined. No predictions if it can be fixed.
Attachments
Jones in the Fast Lane - cdrom.7z
(9.19 KiB) Downloaded 62 times
tikalat
Member
 
Posts: 287
Joined: 2012-4-13 @ 16:39

Re: Sierra/Dynamix sound driver hacking

Postby marooned_on_mars » 2013-8-08 @ 02:39

I'm not sure if this is what you're looking for, but feel free to let me know:
country.snd (the only one that has a instrument panning weirdly, a feature not present in the GM set)
blazooes.snd (this and all the other ones have that ugly distorted instrument that doesn't sound right and sounds like the pitch is bent wrongly)
keeptryn.snd
withagun.snd
fifties.snd
hueydewy.snd
I support Universal Basic Income, and so should you, here's why. Another reason why.
Commonly asked questions about UBI
Spread the word!
User avatar
marooned_on_mars
Member
 
Posts: 361
Joined: 2006-1-23 @ 18:47
Location: MoonBase2


Re: Sierra/Dynamix sound driver hacking

Postby tikalat » 2013-8-09 @ 19:36

viewtopic.php?p=309534#p309534

Updated Freddy Pharkas
- ADPCM peak overflows (most fixed ~ 40-50 files, using old repair method)
- DAC 8-bit converter fixed
- AUDTANDY fixed to work
- (WIN) Fix channel map, polyphony



@marooned_on_mars
Can't figure which snd file #s. Do match any these?
- 1002.snd (2 channels), 1009 (1), 1010 (2), 1012 (1), 1013 (1), 1014 (2), 1017 (3), 1020 (1), 50 (1)

If so, then maybe the composer left instrument on 'unused' channel for a reason.
tikalat
Member
 
Posts: 287
Joined: 2012-4-13 @ 16:39

Re: Sierra/Dynamix sound driver hacking

Postby marooned_on_mars » 2013-8-09 @ 19:43

@tikalat: How could I check that? I have the snd files generously provided by NRS (thanks again! =D ), but I didn't know what ID's or names they have embedded in the executable, so I just assumed that's how they are named.
I support Universal Basic Income, and so should you, here's why. Another reason why.
Commonly asked questions about UBI
Spread the word!
User avatar
marooned_on_mars
Member
 
Posts: 361
Joined: 2006-1-23 @ 18:47
Location: MoonBase2

Re: Sierra/Dynamix sound driver hacking

Postby tikalat » 2013-8-09 @ 22:22

Try this tool:
http://s000.tinyupload.com/index.php?fi ... 3856138168

Run it with TIM2.SX, SX.OVL files. Dumps SND + DRV + PAT (001,003,004,101) files.


Question:
Are you playing MT-32 MIDIs outside the game or inside? If outside, are you uploading MT-32 patch file (rename 001.DRV --> 1.PAT) before playback?
tikalat
Member
 
Posts: 287
Joined: 2012-4-13 @ 16:39

Re: Sierra/Dynamix sound driver hacking

Postby marooned_on_mars » 2013-8-10 @ 00:31

Thanks for the tool though it doesn't seem to be doing anything, I placed it in the folder, tried to see if any of the two executables have a manpage or such but came to nothing, I also tried to simply add the filenames you specified but still nothing. Are there some parameters I should type in that you forgot to mention?

As for the question, I played the tracks inside the game, so no ^^
I support Universal Basic Income, and so should you, here's why. Another reason why.
Commonly asked questions about UBI
Spread the word!
User avatar
marooned_on_mars
Member
 
Posts: 361
Joined: 2006-1-23 @ 18:47
Location: MoonBase2

PreviousNext

Return to DOS

Who is online

Users browsing this forum: boink and 1 guest