VOGONS

Common searches


Sierra/Dynamix sound driver hacking

Topic actions

Reply 40 of 332, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie
ripsaw8080 wrote:

The NRS drivers seem to work well enough on SQ3, but have glitches on KQ1 SCI, such as the first time you open the door of the witch's house there is a couple of seconds of ear-grinding noise at the end of the sample, but every time after the first seems fine.

Doesn't happen here. Then again I don't keep track of older, possibly error-prone, versions of my stuff being distributed.

tikalat wrote:

The driver does use the 'low-res' replacements (debugger confirms SB DMA) but I think it should be his call what he wants to do with his work.

What are "low-res replacements", and what exactly are you all trying to do? If the goal is to get both MT-32 music and Sound Blaster PCM, but the latter only for those sound effects that are not just recorded from the MT-32, then modifying PCM-waveform-bearing sound resources to indicate whether it's an MT-32-recorded waveform or not, and having a custom MTBLAST.DRV look for that flag, is unavoidable. I've done this before.

Reply 41 of 332, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
NewRisingSun wrote:

I don't keep track of older, possibly error-prone, versions of my stuff

Do you have newer, possibly less error-prone, versions of the drivers available? 😀

NewRisingSun wrote:

If the goal is to get both MT-32 music and Sound Blaster PCM, but the latter only for those sound effects that are not just recorded from the MT-32

The first MTBLAST driver for QFG2 uses separate SOUND.XXX files, so it can already do that: either the separate file is there or not.

NewRisingSun wrote:

then modifying PCM-waveform-bearing sound resources to indicate whether it's an MT-32-recorded waveform or not, and having a custom MTBLAST.DRV look for that flag, is unavoidable.

Actually, it may be avoidable. The approach being used by the second driver is for it to hack the interpreter to play digital sounds despite the MT-32 device ID, so you don't need modified or separate sound resources, but at the moment it lacks selectivity. It may be possible to refine the second approach to only play specific digital sounds by number, perhaps going by a table within the driver. A table would be specific to QFG2, but the interpreter hacking tends to make it specific anyway.

With the first or second approach, still need someone to go through the digital sounds and identify which are just sampled MT-32 sounds so they can be excluded. The SCI tool linked by collector seems to work well enough for the job.

Reply 43 of 332, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

Attached find patch for Quest for Glory II. Because only two PCM sound effects are not recorded from the MT-32 (and yes, I went through all of them), just providing those two modified sound resources as separate files is the simplest option, certainly simpler than modifying the interpreter executable.

Also find MTBLAST.DRV for King's Quest I. Since in this game all PCM sound effects sound different from their respective MIDI data, no selectivity is needed. I got no static when knocking on the witch house door; if you still do, report.

HunterZ wrote:

How can you identify a sampled MT-32 sound versus other kind of sounds?

Play the MIDI data on your MT-32, then play the PCM sound data. If they sound the same, minus the lower sampling rate in the PCM sound data, you know that it's been sampled from the MT-32.

Attachments

  • Filename
    kq1sci.zip
    File size
    1.95 KiB
    Downloads
    938 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    qfg2.zip
    File size
    10.22 KiB
    Downloads
    886 downloads
    File license
    Fair use/fair dealing exception
Last edited by NewRisingSun on 2012-06-21, 17:05. Edited 1 time in total.

Reply 44 of 332, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Does your MTBLAST for QFG2 do something more than the others in this thread? Seems to be more-or-less the same thing with SOUND.XXX files. Granted that the separate SOUND.XXX is easier, but collector seemed to like more the idea of no extra resource files.

For my own ears, I prefer some of the other digital sounds over the MT-32 sounds, if for nothing else than the seeming lack of reverb. But it is, of course, subjective.

I tried the KQ1 MTBLAST.DRV and don't get the noise when opening the witch house door for the first time, so that's an improvement. I also tried it with SQ3 and it seems to work fine there as well. Thanks for the updated version of the driver. Do you also have a newer SNDBLAST.DRV with stereo FM for SCI0?

Reply 45 of 332, by Spikey

User metadata
Rank Oldbie
Rank
Oldbie

For my own ears, I prefer some of the other digital sounds over the MT-32 sounds, if for nothing else than the seeming lack of reverb. But it is, of course, subjective.

This could also be that sometimes with MT-32 SFX, the reverb for the current song will intervene or conflict with the reverb (or lack thereof) for the SFX.

For me, the advantage is hearing them in stereo (think SQ4, the "LiftOff" sound where the starship pans in both channels) versus (relatively) low quality PCM in mono.

Attached find patch for Quest for Glory II. Because only two PCM sound effects are not recorded from the MT-32 (and yes, I went through all of them), just providing those two modified sound resources as separate files is the simplest option, certainly simpler than modifying the interpreter executable.

NRS, great to see you! Glad to see you're still around.

Excellent idea! makes a ton more sense than manually flagging each resource. I didn't think there were many other than the genie laugh, since that's all people mention.. if I may ask, what in blazes is the second one? Ad Avis screaming at the end?

Also find MTBLAST.DRV for King's Quest I. Since in this game all PCM sound effects sound different from their respective MIDI data, no selectivity is needed. I got no static when knocking on the witch house door; if you still do, report.

Very interesting as well! I had no idea all SFX were PCM. And also, genius, makes a lot more sense to just allow all SFX to be played PCM and music on the MT-32.

Great post, great thread. Thanks to Tikalat for his investigatory work also 😀

Reply 46 of 332, by tikalat

User metadata
Rank Member
Rank
Member

Dumping Krondor thoughts for future reference.

This is the magic routine that starts sifting through the MIDI track data (basically SCI1 MIDI-style, apart from the header).

seg050:087F 50                                push    ax
seg050:0880 55 push bp
seg050:0881 1E push ds
seg050:0882 33 F6 xor si, si
seg050:0884 26 C5 6F 08 lds bp, es:[bx+8]
seg050:0888 3E C5 6E 00 lds bp, ds:[bp+0]

; checks for 1-track vs multi-track (?) file (written for one device)
seg050:088C 3E 80 7E 20 FF cmp byte ptr ds:[bp+20h], 0FFh
seg050:0891 74 11 jz short loc_33824
seg050:0893 26 80 BF 5B 01 00 cmp byte ptr es:[bx+15Bh], 0
seg050:0899 75 09 jnz short loc_33824
seg050:089B 3E 8A 4E 20 mov cl, ds:[bp+20h]
seg050:089F 26 88 8F 5C 01 mov es:[bx+15Ch], cl
seg050:08A4
seg050:08A4 loc_33824: ; CODE XREF: sub_33721+F0j
seg050:08A4 ; sub_33721+F8j
seg050:08A4 8B CD mov cx, bp
seg050:08A6
seg050:08A6 loc_33826: ; CODE XREF: sub_33721+225j

; instrument offset table
seg050:08A6 3E 8B 56 00 mov dx, ds:[bp+0]
seg050:08AA 83 FA 00 cmp dx, 0
seg050:08AD 74 36 jz short loc_33865
seg050:08AF 8B E9 mov bp, cx
seg050:08B1 03 EA add bp, dx

; instrument sequence starts here
seg050:08B3 3E 8A 56 00 mov dl, ds:[bp+0]
seg050:08B7 80 FA FE cmp dl, 0FEh ; '¦'
seg050:08BA 75 2C jnz short loc_33868

The evil starts when you find out that each soundtrack piece is compressed per device. No lumping together like the SCI files.

So only the SB will have the digital PCM effects embedded in the track (Adlib / SB). Using anything else will not make them visible.

Plus the 2nd intro lightning bolt (play track #4) - doesn't even exist for non-SB. Never called or used.

Means you have use normal Adlib ($00) ID to give you the PCM. Then trick the game to use other ID ($07/ 0C) to get your normal MIDI. Game does keep music + SE in 2 separate memory segments (useful to know in figuring this out).

Some basic stuff attached - just fixes the SB init problem with fast CPUs. Has some decompressed MIDI binary blobs for others to look over. SX.OVL merger code.

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

Had a cheap idea for SQ3 + QFG2 driver-only versions: (inside the driver) check MIDI data and look for 3 pairs of magic bytes. Turn on/off digital as needed for matching pairs.

Bloatware. Non-award winning stuff. Only works with _original_ game. Classic amateurish. Yeah. Tikalat-style. 😉

If collector doesn't need any more specialized driver-only game hacks though, I'll call it quits for now. Do some private hobbyist stuff for awhile.
(like hack-merging a few more Sierra drivers/interpreters for my own fun or failing to do same for MI1-2)

Let the smart people take care of things. Why create more problems for myself? :p

Attachments

  • Filename
    krondor___work.7z
    File size
    185.88 KiB
    Downloads
    867 downloads
    File license
    Fair use/fair dealing exception

Reply 47 of 332, by Spikey

User metadata
Rank Oldbie
Rank
Oldbie

On Krondor, the game's music is designed to be heard on a SC-55, I don't think the MT-32 support is anything special, in fact, I think the MT-32 just plays the GM files with a GM SysEx bank, ala SQ5.

I think the MIDI SFX sound fine on a SC-55, but that's just me 😉
Hey, so, PCM sound effects won't play in Krondor CD version if you have GM selected? Is that right?

Reply 48 of 332, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I guess you're right about Krondor. I think I lost sight of which MIDI synth was the one to use in my rage about not being able to hear the digital sounds along with it 😀

Reply 49 of 332, by tikalat

User metadata
Rank Member
Rank
Member

I don't think the MT-32 support is anything special, in fact, I think the MT-32 just plays the GM files with a GM SysEx bank, ala SQ5.

Attached MUNT log. Looks like plain GM-style?

Hey, so, PCM sound effects won't play in Krondor CD version if you have GM selected? Is that right?

Right you are. Same with Krondor floppy (unpatched or patched).

not being able to hear the digital sounds along with it

There's quite enough PCM-exclusive ones too. Even for cutscenes. Plus ~15-25 short speech clips.

The end of ch8 sounded so~ wrong to me - maybe it's my expectations though. Same with ch6 start (or was it 7?). Should listen to the SB track to see if it's just me.

Gunshot is used enough for SE - spells, lightning. Other areas. I want better (if PCM is better).

Attachments

  • Filename
    krondor-mt32-munt.txt
    File size
    17.9 KiB
    Downloads
    603 downloads
    File license
    Fair use/fair dealing exception

Reply 50 of 332, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie
tikalat wrote:

The evil starts when you find out that each soundtrack piece is compressed per device. No lumping together like the SCI files.

That doesn't seem to be the case. Unless I am completely mistaken, all sound and music is in an archive with the extension .SX, with each tune compressed with the LZHUF compression algorithm. The decompression code is just written to skip unwanted bytes instead of adding them to the decompressed data buffer.

The cleanest way is still to just add the reference to the PCM track to the track lists of devices [h] and (07 and 0C). Then the .SX archive needs to be rebuilt and put into the game directory to be used as a replacement of the original file encapsulated in KRONDOR.001.

Spikey wrote:

I didn't think there were many other than the genie laugh, since that's all people mention.. if I may ask, what in blazes is the second one?

Something that sounds like a crossbow.

Last edited by NewRisingSun on 2012-06-19, 18:50. Edited 1 time in total.

Reply 51 of 332, by tikalat

User metadata
Rank Member
Rank
Member

Looking over the list at the end of FRP.SX, that looks like all the names. Working backwards from the driver, I wouldn't have ever noticed that - they seemed to keep massaging the data over and over. Never got a complete soundtrack of all devices per tune - just separately. Chased those bytes around and never figured out where they were coming from.

The cleanest way is still to just add the reference to the PCM track to the track lists of devices [h] and (07 and 0C). Then the .SX archive needs to be rebuilt and put into the game directory to be used as a replacement of the original file encapsulated in KRONDOR.001.



I can wait many more years to pick this up again. My interest in DOS-related hacking just got completely drained.

Thanks for looking into this though. I'm sure others will become motivated to finish this.

Reply 53 of 332, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

All right, dearly beloved. I don't know this game at all, so this may be completely wrong after the title sequence, but I can now get General MIDI sound with PCM samples.

KRONDOR.EXE must be modified so that it even bothers to call up AUDBLAST.DRV with any RESOURCE.CFG entry other than SNDBLAST.DRV. The modification could be done more elegantly; right now it is forced to always load AUDBLAST.DRV, no matter the setting.

SX.OVL includes an AUDBLAST.DRV that doesn't fail to initialize on faster machines. Inappropriate trivia: the IRQ check routine that always fails wasn't done by Sierra but just copied from Creative Labs' very first Sound Blaster SDK.

FRP.SX has the sound resources modified so that PCM tracks are included in the [h] and track lists as well.

I have only tried it with some "free download on Sierra's website to promote the game Betrayal in Antara" that's dated 1997 (readme file says "Betrayal at Krondor FREE RELEASE, Version 1.02"), so beware.

Attachments

  • Filename
    krondor.zip
    File size
    1 MiB
    Downloads
    1654 downloads
    File license
    Fair use/fair dealing exception

Reply 54 of 332, by tikalat

User metadata
Rank Member
Rank
Member

I'm quite shocked. And stunned.

Digital effects are correct - act1. Intro. Act1 in-game. Battles. Must try more later. MIDI sounds spot-on.

That was a mighty damn fast job!! There is a god.

(Unpatched CD exe)

edit:
Thank you so very much!!!! Act1 = "Hold there!" (thought it was "Hello there!" - bad memory)

Going to make a speech list because of this. 😀

edit2:
Okay did some more testing comparisons. Gen Midi music is correct - choirs, percussion, themes. Special digital SE are right - definitely better than some of the synth ones.

Battles - Alistair is right. I remember digital but listening much closer, I can sort out the Adlib synth. So SC-55 synth it is! (already correct).

Now if Alistair could give NewRisingSun the sound files with the corrected SQ5 drum program #s, he'd have performed 3 miracles in a mere week with that release.

edit3:
Should also mention that my 1.02 CD saves do load with NewRisingSun's EXE. Be warned though!

From EXE strings:
- CD = Version 1.02 CD
- Floppy 1.0 -> 1.2 patch = Version 1.2
- Antara = Version 1.00 (....? that's weird)

edit4:
40 lines of speech.

Attachments

  • Filename
    krondor_speech.txt
    File size
    1.68 KiB
    Downloads
    627 downloads
    File license
    Fair use/fair dealing exception

Reply 55 of 332, by Spikey

User metadata
Rank Oldbie
Rank
Oldbie

Attached MUNT log. Looks like plain GM-style?

Yeah, the CS in "CS_HARP" stands for Chris Stevens, who made a MT-32 patch bank to emulate the GM sounds. It's pretty horrible though (listen to Krondor or SQ5 on a MT-32 and you'll see why!), I don't know why they didn't just use the Sierra one.. Although it's far from perfect too.

Right you are. Same with Krondor floppy (unpatched or patched).

OK, neat. Well, now NRS has fixed it, anyway 😉

There's quite enough PCM-exclusive ones too. Even for cutscenes. Plus ~15-25 short speech clips.

The end of ch8 sounded so~ wrong to me - maybe it's my expectations though. Same with ch6 start (or was it 7?). Should listen to the SB track to see if it's just me.

Gunshot is used enough for SE - spells, lightning. Other areas. I want better (if PCM is better).

Sure. Krondor is a game where the SFX would be preferable in PCM because it's not a MT-32 game natively. I wonder if any other GM games fall into this category..That have the problem that is.

Now if Alistair could give NewRisingSun the sound files with the corrected SQ5 drum program #s, he'd have performed 3 miracles in a mere week with that release.

I'm pretty sure NRS already knows which are which, i think he told me originally 😉 But I'm happy to supply him with the track names if he has time and needs the info.

My main NRS project I want completed someday is Willy Beamish with CD version and MT-32 support, but we'll see. 😀 He's done so much for me I should dedicate my website in his honour- hey, maybe I'm onto something.. 😉 We'll see, 10th anniversary coming up.

Reply 57 of 332, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

The MTBLAST patch for Willy CD was never finished because Cloudschatze mentioned that although most things work, some sound effects were missing. I can't find anything wrong from listening to the introduction, so here goes. Report if you find something missing.

EDIT: Uploaded new version.

HunterZ wrote:

I thought there was a newer patch version of Krondor than what was released for free?

Point me to it, and I'll patch that as well.

Attachments

  • Filename
    willycd.zip
    File size
    143.58 KiB
    Downloads
    1178 downloads
    File license
    Fair use/fair dealing exception
Last edited by NewRisingSun on 2012-06-21, 17:05. Edited 3 times in total.

Reply 58 of 332, by tikalat

User metadata
Rank Member
Rank
Member

1.02 floppy upgrade
http://www.sendspace.com/file/6550vn

edit:
1.02 floppy patched exe (based on NewRisingSun patch)
(use with official package earlier - SX.OVL + FRP.SX)

edit2:
Added 1.02 cd patched exe

CS in "CS_HARP" stands for Chris Stevens

Oh! Thought it meant "Custom Sound". Then MS = Mark Seibert? Seen those initials enough.

I wonder if any other GM games fall into this category..That have the problem that is.

That's a good question.

My main NRS project I want completed someday is Willy Beamish with CD version and MT-32 support, but we'll see. Happy He's done so much for me I should dedicate my website in his honour- hey, maybe I'm onto something.. Wink We'll see, 10th anniversary coming up.

Only did Beamish once on Sega CD. Not familiar at all memory-wise.

I think he's worthy of a tribute - basically done more than most of us could combined. :approval:

Now I get this itch to do some Scumm game that I've heard about a unused feature but never had the skill to bother. With all that open-source work, should be easier. 😀

Last edited by tikalat on 2013-07-14, 01:29. Edited 1 time in total.

Reply 59 of 332, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

I've only sent this out via private message so far. This patch for SQ5 allows for using all sixteen MIDI channels on General MIDI, so that the Glockenspiel and the Reverse Cymbal no longer get cut off by the Alert sound during the flight simulator sequence in the introduction. And drum map changes are now sent to the output device. New compared to the version I sent out privately is automatic remapping of illegal drum map numbers to the ones recognized by GS level 1, which is required to get them to sound right on later Sound Canvases. 4.PAT adds a voice reserve sysex to better make use of the sixteen MIDI channels, and ADL.DRV is the stereo FM driver.

tikalat wrote:

There is a god.

No, there isn't.

Spikey wrote:

He's done so much for me I should dedicate my website in his honour- hey, maybe I'm onto something..

Don't do anything that I wouldn't do.

HunterZ wrote:

I thought there was a newer patch version of Krondor than what was released for free?

Could someone please provide an overview of all the versions and patches to this silly game? The websites on this game are confusing as hell, why with the "free" version not really being free and supposedly bugged, and some patch originally being an update to a floppy version but also fixing bugs in the free version, and similar incomprehensible gibberish.

Attachments

  • Filename
    sq5.zip
    File size
    68.69 KiB
    Downloads
    1018 downloads
    File license
    Fair use/fair dealing exception