Jill of the Jungle Sound Effects

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

Re: Jill of the Jungle Sound Effects

Postby ripsaw8080 » 2017-4-03 @ 22:06

NewRisingSun wrote:In particular, you can replace it with the version that came with the Sound Blaster Pro 1 (2xOPl2) to hear the music in stereo when used with such a card, or with sbtype=sbpro1 in DOSBox.

There's also Version 1.32 of SBFMDRV for SBPro2 that seems to play in stereo on any SB with OPL3, and as such works with the default sbtype=sb16 in DOSBox.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4389
Joined: 2006-4-25 @ 23:24

Re: Jill of the Jungle Sound Effects

Postby leileilol » 2017-4-03 @ 22:53

One could do the same for Brix, Kiloblaster, and Solar Winds (whcih sounds nice in stereo)
by the way, DOSBox is not for running Windows 9x
User avatar
leileilol
l33t++
 
Posts: 9733
Joined: 2006-12-16 @ 18:03

Re: Jill of the Jungle Sound Effects

Postby NewRisingSun » 2017-4-04 @ 05:30

Only SBFMDRV v1.32 dated February 1992 supports stereo on OPL3; SBFMDRV v1.32 dated October 1992 does not. The difference between SBFMDRV v1.32-2 for OPL3 and v1.30 for 2xOPL2 is that v1.32-2 seems to always hard-pan left, right and center (mostly center), whereas v1.30 gradually pans. v1.30 applies note velocities, while v1.32-02 ignores them, so that the Hi Hats in FUNKY.DDT lack any emphasis in v1.32-2 and above.

In any case, the .CMF format has no provisions for panning information, and so these two SBFMDRV versions just assign voices to default panning positions that sound good with some files and awful with others. I consider it more of a gimmick than a feature. Apparently Creative Labs had the same thought, as they removed stereo support in version v1.32-10, v1.33 and v1.34.

EPICFM.EXE already supports the 1994 version of Kiloblaster, which also has the bad internal .CMF player. I might release similar version update and SBFMDRV intercept patches for the games mentioned once I have collected older and newer versions of each of them.
NewRisingSun
Oldbie
 
Posts: 852
Joined: 2005-9-02 @ 02:26

Re: Jill of the Jungle Sound Effects

Postby Great Hierophant » 2017-4-05 @ 01:49

I have tried the patch on my 486DX2/66 with a Sound Blaster 16 CT-1750, DSP 4.05. The patch works on real hardware. Using SBFMDRV 1.11 gives notable audio differences compared to any version of the game. I find that SBFMDRV 1.22, 1.30B or 1.32 is a much closer and probably a perfect match to the music of 1.0 or 1.2c. The 1.30B and 1.32 sound louder than 1.22.

I have two versions of JotJ Trilogy. One has 1.2b and 1.2d executables, the other only has 1.2c executables. The patch installed perfectly on both. It seems that the music output for 1.0 and 1.2c are the same, but Epic MegaGames tried something for 1.2b, reverted it for 1.2c and finally went with different playback code for 1.2d.

I have not had much success in running the game in DOSBox. There is a great deal of slowdown in performance with any rational cycle count. I can put it up to 100K cycles and it still won't play and sound smooth, but my real 486 can handle the patch with the proper speed (with cache enabled or disabled).

Real hardware is not perfect either. The digitized sound effects will randomly silence themselves for an indeterminate period of time on 1.2d. This also occurs on 1.0 shareware.
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2398
Joined: 2003-4-27 @ 08:20

Re: Jill of the Jungle Sound Effects

Postby NewRisingSun » 2017-4-05 @ 05:16

SBFMDRV v1.22/v1.30B is the driver embedded into game v1.0's executable. I still find its drum channel unrealistically loud. I judge based on how files converted from ROL to CMF via ROL2CMF sound, because Dan Froelich says that this is what he did. Since it boils down to a matter of taste, I think the replacable SBFMDRV routine is the best one.

I'm not having any slowdown issues in DOSBox as long as cycles is 3000 or 4000. Higher settings confuse SBFMDRV.

I think the sound effects breaking up is the result of the game not detecting the IRQ properly. The game uses a similarly silly IRQ detection routine as Sierra's older SNDBLAST.DRV that is rather speed-sensitive. I suppose I could try to patch that. Here is the relevant code from v1.2d's JRFILE1:
Code: Select all
        B9 01 00                MOV     CX, 1
        51              L1:     PUSH    CX
        B9 FF FF                MOV     CX, FFFF
        E2 FE           L2:     LOOP    L2
        59                      POP     CX
        E2 F7                   LOOP    L1
Obviously, just using loops is going to fail on faster systems. And the initial MOV CX, 1 is twice the bullshit, as the second loop instruction is encountered only once and thus does not actually provide any additional delay, as LOOP only loops if CX is != 0 *after* decrementing it. Dumbass! :) A simple fix would be to just wait for five interrupt requests of any source:
Code: Select all
        B9 05 00        MOV     CX, 5
        F4      L1:     HLT
        E2 FD           LOOP    L1
        90              NOP
        90              NOP
        90              NOP
        90              NOP
        90              NOP
        90              NOP
We only need one interrupt request (the Sound Blaster's), but since a timer interrupt or a keyboard interrupt request could occur as well, five is the safe choice. And it neatly fits into the twelve bytes we have. So, try if replacing B9 01 00 51 B9 FF FF E2 FE 59 E2 F7 with B9 05 00 F4 E2 FD 90 90 90 90 90 90 alleviates the problem of sound effects stopping. If it does, then that is the solution, if it does not, then the problem has a different source.
Last edited by NewRisingSun on 2017-4-05 @ 12:14, edited 1 time in total.
NewRisingSun
Oldbie
 
Posts: 852
Joined: 2005-9-02 @ 02:26

Re: Jill of the Jungle Sound Effects

Postby Great Hierophant » 2017-4-05 @ 06:08

Reducing the cycles to 3000 fixed things.

I appreciate the explanation about ROL2CMF. The program converts Adlib Visual Composer files into the Creative Music Format. You would think that the conversion would be without flaw, but perhaps Creative's disassembly of Adlib's format was imperfect. Fortunately the "matter of taste" is not arbitrary as many a patcher often is (as in if you don't like my patch, make your own!)

I am sure I would not be the only individual who could benefit from bug-free Jill sound effects on the SB16.
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2398
Joined: 2003-4-27 @ 08:20

Re: Jill of the Jungle Sound Effects

Postby NewRisingSun » 2017-4-05 @ 06:24

The Adlib Developer's Kit came with a utility (with source code) that would convert from .ROL to a .MUS format that was basically a Standard MIDI file with links to an external instrument bank. I need to check this, but knowing Creative Labs' lack of respect for Adlib's intellectual property, it would not surprise me if ROL2CMF was just a modification of said utility.
NewRisingSun
Oldbie
 
Posts: 852
Joined: 2005-9-02 @ 02:26

Re: Jill of the Jungle Sound Effects

Postby NewRisingSun » 2017-4-05 @ 12:35

Great Hierophant wrote:I appreciate the explanation about ROL2CMF.
To justify my preference for SBFMDRV v1.11 over 1.30B, consider this example of the song "We Wish You A Merry Christmas" from the Adlib Song Disk #2.

The first recording is the original .ROL file played through AdLib's own Jukebox utility. I have converted this file using Creative's ROL2CMF utility into a .CMF format file. The second recording is this .CMF file played through SBFMDRV v1.11. The volume levels are more or less correct, although the hi-hat instrument sounds a bit shrill. The third recording is this .CMF file played through SBFMDRV v1.30B. Note how much louder the drums are, making the file almost unlistenable in my opinion. The fourth recording is this .CMF file played through SBFMDRV v1.34, whose output is almost identical to v1.30B. I could not find a copy of SBFDMRV v1.22, otherwise I would post a recording of that version as well.

All files were recorded (i.e. captured with Ctrl+Alt+F6) from DOSBox' Nuked OPL core with sbtype=sb16. I think the results show well why I consider SBFMDRV v1.11 the most accurate of the drivers for files that are known to have been composed in the AdLib Visual Composer. The choice would of course be different for game music that is known to have been specifically composed for a later SBFMDRV version.

In any case, I have updated my patch to additionally (1) replace the IRQ-determining timing loop in the manner that I described, and (2) replace the machine-speed-sensitive OPL delay loops in SBFMDRV.COM with something that is more robust. I have kept v1.11 for the reasons I gave. GH, please check if this is sufficient to alleviate the problems you have had.
NewRisingSun
Oldbie
 
Posts: 852
Joined: 2005-9-02 @ 02:26

Re: Jill of the Jungle Sound Effects

Postby Great Hierophant » 2017-4-06 @ 06:06

I tried the updated patch and played Jill Goes Underground for about 20 minutes. I noted about three instances where the sound effects would go out for any length of time as opposed to some sounds not being played due to a complete lack of sound mixing. Two of the instances resolved themselves by dying. Overall I believe the patch to be an improvement over 1.2d.

I made recordings with 1.11, 1.22, 1.30B and 1.32-2. 1.22 is like a quieter version of 1.30B. 1.32-2 had some evidence of stereo separation, but nothing really notable in what I heard.

Would it be conceivable that, if you know how Creative's utility modifies Adlib's ROL files, that you could recreate the original Adlib Visual Composer data? Or does it rely too much on assumptions because Creative's software converts so broadly that the original intent is irretrievably lost?
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2398
Joined: 2003-4-27 @ 08:20

Re: Jill of the Jungle Sound Effects

Postby NewRisingSun » 2017-4-06 @ 06:22

I think the remaining sample dropouts are the same issue as Wolfenstein 3-D's sound effects sometimes stopping on the SB16. The DSP sometimes seems to request one sample byte too much, and since the DMA controller will not provide more bytes than programmed, the DSP will wait forever instead of raising the interrupt request. The solution was to program the DMA controller for auto-initialize mode (requires a simple one-byte change) even as the DSP is programmed for single-cycle mode. That way, the DSP will be satisfied even when it requests an excess byte. I will try and see later if that solution applies to Jill as well.

It should be possible to modify .CMF files to sound exactly as the original .ROL files, specific to one particular SBFMDRV version. That version can only be v1.11, as the later versions will likely not even allow the necessary volume range.
NewRisingSun
Oldbie
 
Posts: 852
Joined: 2005-9-02 @ 02:26

Re: Jill of the Jungle Sound Effects

Postby NewRisingSun » 2017-4-06 @ 17:46

I have reuploaded JILLUPD.ZIP and added the change to the DMA controller code as I described. If my suspicion was right, then you should experience no sound breakups whatsoever now. Note that this change works around a possible bug in the Sound Blaster 16 DSP rather than fixing a bug in the game itself.

Modifying .CMF files to sound exactly as original .ROL files in SBFMDRV v1.11 involves three steps: adjusting the note numers of percussion notes, setting the frequencies of unused percussion channels by playing a silent dummy note on them, and possibly slightyl readjusting the velocities of notes, which I will have to investigate further.
Last edited by NewRisingSun on 2017-4-06 @ 19:03, edited 1 time in total.
NewRisingSun
Oldbie
 
Posts: 852
Joined: 2005-9-02 @ 02:26

Re: Jill of the Jungle Sound Effects

Postby Great Hierophant » 2017-4-06 @ 17:48

One wonders why they ever thought it was a good idea to embed SBFMDRV.COM into the executable when they were using Adlib's product to make music. Wouldn't it have been better to have just directed users to load their card manufacturer's supplied FM driver prior to playing the game? Adlib's driver does not discriminate against any FM card, but Creative Labs' driver does and they knew it. Did Creative pay some $$ to persuade them to use their driver instead? Were the licensing fees to include the driver lower from Creative than Adlib? Or does SBFMDRV.COM play better with the Sound Blaster's DSP than Adlib's SOUND.COM?
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2398
Joined: 2003-4-27 @ 08:20

Re: Jill of the Jungle Sound Effects

Postby NewRisingSun » 2017-4-06 @ 19:18

Now that I have been sent SBFMDRV v1.22 and looked at its velocity code, I have replaced SBFMDRV.COM v1.11 with v1.22 in EPICFM.ZIP.

Having the user supply a driver would be a customer support nightmare. Most users seem to have been overwhelmed setting up the BLASTER environment variable properly. Loading a particular driver would be far beyond their capabilities. "Don't Go Alone" by Accolade only plays Adlib music when SOUND.COM has been loaded. I don't think most people are even aware of this. And I think SBFMDRV only rejects cards in its startup and make-resident code, which is bypassed in the embedded versions, I think.
NewRisingSun
Oldbie
 
Posts: 852
Joined: 2005-9-02 @ 02:26

Re: Jill of the Jungle Sound Effects

Postby Scali » 2017-4-06 @ 19:30

Great Hierophant wrote:Or does SBFMDRV.COM play better with the Sound Blaster's DSP than Adlib's SOUND.COM?


You don't need the DSP for FM music, and the AdLib doesn't even have a DSP, so I can't imagine AdLib's SOUND.COM to do anything at all that would upset the DSP (unless they deliberately added it to make it incompatible with SBs).
Likewise I wouldn't expect the SB FM driver to do anything with the DSP, although they may have put in some auto-detect functionality to see if an SB is present. Which would fail on an AdLib of course.
As a developer I certainly wouldn't use the SBFMDRV on anything other than an SB, unless I were absolutely sure that it does not adversely affect other cards.
Scali
l33t
 
Posts: 4254
Joined: 2014-12-13 @ 14:24

Re: Jill of the Jungle Sound Effects

Postby Great Hierophant » 2017-4-07 @ 02:55

Jill 1.0 will not work with an Adlib, the configuration screen will report no Sound Blaster-compatible music card has been detected. Jill 1.2b and 1.2c will work with an Adlib, asking you if you want the musical track. Jill 1.2d is weird, it will always detect a Sound Blaster, but if you select select digital audio with only an Adlib, there will be silence and a pause each time a sample is supposed to play. If you just select music, you won't hear the PC speaker sound effects.

Jill's digital audio appears to be fully fixed after the last patch. I played Jill Saves the Prince for half an hour and heard no audio dropouts. I think we can file this issue in the "fixed" category.

If you install the basic Sound Blaster installation, the installer should add the line "SET SOUND=" to your AUTOEXEC.BAT, and I believe that games which called SBFMDRV.COM externally would need nothing more than this line. Alternatively, an instruction telling the user to copy SOUND.COM from an Adlib disk to the game's directory seems straightforward enough. But I have only been able to find eight games that require the driver and most are obscure, so I guess that it wasn't a very good idea. Moreover, clone cards may not have come with an FM driver, leaving many people out in the cold that have perfectly good hardware to play the music.
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2398
Joined: 2003-4-27 @ 08:20

Re: Jill of the Jungle Sound Effects

Postby NewRisingSun » 2017-4-07 @ 18:47

Great Hierophant wrote:Jill's digital audio appears to be fully fixed after the last patch.
Very good. I'm not sure, but I don't think that last problem that the SB16s have is described anywhere.

I wonder if I should add my own CMF player to the selection of available SBFMDRVs. Based on what I have seen ROL2CMF do and how it mangles the drum notes, it tries to play the .CMF file's drum notes as the .ROL file must have originally sounded, tries to make sure that all notes' release periods will be heard, and applies a more reasonable stereo effect on OPL3. Here's how it plays FUNKY.CMF (the Drum Blaster version, which adds a detuned second voice to the bass line to make it sound fuller) --- notice the xylophone at 0'48''.
NewRisingSun
Oldbie
 
Posts: 852
Joined: 2005-9-02 @ 02:26

Re: Jill of the Jungle Sound Effects

Postby Great Hierophant » 2017-4-08 @ 16:26

NewRisingSun wrote:
Great Hierophant wrote:Jill's digital audio appears to be fully fixed after the last patch.
Very good. I'm not sure, but I don't think that last problem that the SB16s have is described anywhere.

I wonder if I should add my own CMF player to the selection of available SBFMDRVs. Based on what I have seen ROL2CMF do and how it mangles the drum notes, it tries to play the .CMF file's drum notes as the .ROL file must have originally sounded, tries to make sure that all notes' release periods will be heard, and applies a more reasonable stereo effect on OPL3. Here's how it plays FUNKY.CMF (the Drum Blaster version, which adds a detuned second voice to the bass line to make it sound fuller) --- notice the xylophone at 0'48''.


Other than the stereo effect, is that really what Froelich would have heard? If so, then by all means add it.
That music recording is a lot more "funky" than anything produced by SBFMDRV. !_! Are you sure you didn't run this recording through a reverb unit? :lol:
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2398
Joined: 2003-4-27 @ 08:20

Re: Jill of the Jungle Sound Effects

Postby NewRisingSun » 2017-4-08 @ 19:23

Great Hierophant wrote:Other than the stereo effect, is that really what Froelich would have heard?
I meant that about the drum notes only. But the only way to know for sure would be to ask him for the original .ROL files, and then compare.
Great Hierophant wrote:Are you sure you didn't run this recording through a reverb unit?
Heh. No, the spaciousness comes solely from reusing notes that have been turned off as late as possible, so that the Release period specified in the instrument is actually heard. SBFMDRV reuses notes as soon as they are turned off, so that they never can sound out. Compare Creative's 1993 "2 Operator Test" from SBFMDRV and mine for illustration.
NewRisingSun
Oldbie
 
Posts: 852
Joined: 2005-9-02 @ 02:26


Re: Jill of the Jungle Sound Effects

Postby Blades » 2017-4-19 @ 05:31

Much appreciated! I can now play Ep2 and 3 the way it was supposed to be played with correct music and sounds on my DOS machine with my AWE32! This is awesome! Thanks for your hard work and attention to detail to all that contributed to this project!!
Blades
Newbie
 
Posts: 25
Joined: 2015-4-28 @ 21:09

PreviousNext

Return to DOS

Who is online

Users browsing this forum: No registered users and 1 guest