News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Roland MT-32 problems with BB 1.1

Started by viniciusferrao, June 25, 2012, 04:10:20 AM

Previous topic - Next topic

viniciusferrao

Hello fellas,

I'm doing a little revival of Stunts.

So I've got my binaries from the old days and fire up Stunts 1.1 with brand new Roland MT-32 emulation from DOSBox. But... the sound behavior is strange. There are minor glitches and some freezes and sound lags when starting a new race or changing tracks in track selection screen.

Just for the sake of wasting time I tried running Stunts 1.0 and for my surprise it was not a waste of time. The MT-32 worked correctly.

Here comes the dafuq moment: I got the MD5 hashes from MT-32 files and as expected, they are different.

Vinicius-Ferraos-MacBook-Pro:~ viniciusferrao$ cd ~/DOS\ Games/Stunts\ 1.1.boxer/C.harddisk/
Vinicius-Ferraos-MacBook-Pro:C.harddisk viniciusferrao$ md5 MT*
MD5 (MT15.DRV) = acc5d03d038f1ef0afa0cf4dcad72ef9
MD5 (MT32.PLB) = a7a3e9efa284123036e73ab8477d5dca
MD5 (MTENG1.VCE) = 2325daaecd2d87d2a3a0dda35b8f06f9
MD5 (MTSKIDMS.VCE) = b7ffdefa6f0e4bc0fc83030c2b777d39

Vinicius-Ferraos-MacBook-Pro:C.harddisk viniciusferrao$ cd ~/DOS\ Games/Stunts\ 1.0.boxer/C.harddisk/
Vinicius-Ferraos-MacBook-Pro:C.harddisk viniciusferrao$ md5 MT*
MD5 (MT15.DRV) = 7048d28f2a0fe8c8c09141d5c89706db
MD5 (MT32.PLB) = a7a3e9efa284123036e73ab8477d5dca
MD5 (MTENG1.VCE) = 2325daaecd2d87d2a3a0dda35b8f06f9
MD5 (MTSKIDMS.VCE) = b7ffdefa6f0e4bc0fc83030c2b777d39


I immediatelly bring the MT15.DRV from Stunts 1.0 and put in Stunts 1.1 folder replacing (after a backup) the MD15.DRV file. And now the sound is fine :)

Doing a little more research I queried the files with strings command and the only difference is the text message that is displayed in Roland MT-32 Module LCD. As you can see here:

Vinicius-Ferraos-MacBook-Pro:C.harddisk viniciusferrao$ strings ~/DOS\ Games/Stunts\ 1.0.boxer/C.harddisk/MT15.DRV
    (C) 1990 DSI   
.;6r
Vinicius-Ferraos-MacBook-Pro:C.harddisk viniciusferrao$ strings ~/DOS\ Games/Stunts\ 1.1.boxer/C.harddisk/MT15.DRV.OLD
  (C)1990,1991 DSI 
.;6r


The main question now is: I really don't believe that the sound driver files are different, except for the copyright string. I really don't know why this could broke the sound system, if this is the only behavior. In a modern game we could blame the hash checks, but in a 1990 game, I don't think this is viable. So any thoughts on this?

PS: This thread is more for a curiosity than other thing... but its here.

zaqrack


Duplode

Welcome Vinícius! That is an interesting observation, even though there are other differences between the files beyond the copyright string (as you can see by opening both side by side an an hex editor). It might be a bug in the drivers revealed by DOSBox, or some added functionality that DOSBox and the associated paraphernalia can't cope too well with.

In any case, is there any non-obvious DOSBox setting needed to run under MT-32 (other than setting mididevice to mt32)? I couldn't get it to work out of the box here - most likely due to the weirdness of MIDI under Linux, but I'd better eliminate all possible sources of trouble...

zaqrack

Duplode - you are right, I think, it must be DosBox.

I recall I played Stunts 1.1 a couple of times back in the heydays with MT-32 emulation on my Gravis Ultrasound.


viniciusferrao

Hello Duplode. I'm using the standard DOSBox configuration. Actually I'm running Boxer in OS X Lion. Boxer is a pretty cool DOSBox frontend that does everything that I need to work. Even MT-32 emulation is done with a single drag and drop of ROM files.

In the old windows days I was able to run MT-32 emulation in Stunts with something like DOSBox 0.65, can't remember now, was something in 2005 to 2007 and I was only able to listen to motor sounds in BB1.0. At least I can hear everything fine now. The only thing that bothers me is the slowdown loading anything due MT-32 in actual DOSBox versions.

I'll do some tests today and post the results here.

viniciusferrao

I've made a video: http://www.youtube.com/watch?v=oMmSeW80BfQ

In the 1.0 version (the first one) you can hear the car crash sound and there's no delays in pre-loading screens.

Duplode

I have finally managed set up MT-32 emulation in my system to see what Vinícius was talking about four years ago, and indeed I could reproduce the bugs he described (music slowdowns in some screens, no crash sounds). Fortunately, the solution implied in his post works: overwriting the Stunts 1.1 MT* files with the 1.0 ones seems to solve the problem.

In any case, however, what led me to revisit this issue was noticing another bug: with the Sound Blaster driver, the lower-pitched skidding sound on surfaces other than tarmac (grass, ice, etc.) is completely missing! This bug seems to affect both 1.0 and 1.1, at least in DOSBox -- by the way, does anybody know, or is able to test, whether it happens in an actual MS-DOS/FreeDOS/Win 98 as well?

(As for other drivers, PC Speaker and MT-32 are unaffected by this skidding issue, while Tandy unfortunately has the same problem. I find it hard to believe that it took me at least nine years to notice that! On the bright side, though, at least now I have the option of switching to MT-32 permanently :)

Cas

I've just discovered this thread and must admit I haven't made any tests yet, but reading it, I remember something that might be useful, so I'll post that now and then I'll see if I can test anything.

When I first got Stunts back in 1993, I did not have a sound card, so I was using the PC Speaker and for some time, I didn't realise there was a problem with the sound driver. When I finally had a sound card, I found that  Stunts' Sound Blaster/AdLib sound was very buggy. I don't know if other people had the same problem and how it was possible nobody had noticed it. After a year or so of still using the PC Speaker for Stunts because the SB sound was unacceptably bad, I noticed that the DRV files for Stunts were similar to those of the game Fight (box game by DSI), so I tried copying the SB/AdLib driver from Fight to Stunts and the problem was permanently solved!

In other words... if none the 1.0 or 1.1 drivers would work properly, try with the Fight drivers. If you don't have them, let me know. I have that game somewhere.
Earth is my country. Science is my religion.

Duplode

#8
Quote from: Cas on September 17, 2016, 09:37:49 PM
In other words... if none the 1.0 or 1.1 drivers would work properly, try with the Fight drivers. If you don't have them, let me know. I have that game somewhere.

I'm not 100% sure if we are thinking of the same game (or the same version of the game), but I tried this trick with the 4D Boxing AD15.DRV and SB15.DRV (Stunts can use the latter if it is renamed to AD15.DRV). Unfortunately, it didn't solve this particular issue with skidding, though it may be well worth it testing it for a little longer to see if there will be any other improvements under DOSBox (for one, there is that other very annoying issue of skidding and/or engine sounds disappearing completely every now and then that I would love to get rid of).

(By the way, one fact I don't think I have mentioned here yet is that Stressed can open many of the .P3S, .PVS, etc. files from DSI games. It would be amusing to try and bring a car from one of their other 3D racing games to Stunts  :))

Cas

Yep. I think it's the same game. Just like Stunts was renamed "4D Sports Driving", Fight was renamed "4D Sports Boxing".
It would be interesting, yeah. Of course, probably the car functioning would have to be recreated, I guess.
Earth is my country. Science is my religion.

Duplode

I have just created a Wiki article about the sound devices, which provides guidance on setting up MT-32 and documents some of the information in this and other related threads. As ever, further additions are welcome!

llm

#11
Interesting topic

long time ago i've started to analyse the drv-code based on my drvcombine-tool (http://forum.stunts.hu/index.php?topic=3019.0)
to help IDA analysing the dependencies to the DRV code - after the first Analyse run IDA reveals a jump-table in the beginning of the DRVs (the stunts main-code
is calling this jump-table so IDA was able to see the path through after statical integration of the code)

MT15.DRV comparison

MT15.DRV loaded in IDA as Binary with code starting at offset 0, manualy changed labels to functions

1.1
MD5: ACC5D03D038F1EF0AFA0CF4DCAD72EF9
IDA: https://paste.ubuntu.com/p/JdKNNFPBVy/

1.0
MD5: 7048D28F2A0FE8C8C09141D5C89706DB
IDA: https://paste.ubuntu.com/p/qSdR5bhRwB/

Quote from: viniciusferrao on June 25, 2012, 04:10:20 AM
I really don't believe that the sound driver files are different, except for the copyright string. I really don't know why this could broke the sound system, if this is the only behavior. In a modern game we could blame the hash checks, but in a 1990 game, I don't think this is viable. So any thoughts on this?

some minor differences: http://www.mergely.com/CZB13xu7/ (left is 1.1)

btw: easy to re-assemble the source to a indentical(enough, 3 different opcodes of same size/feature a used by todays assemblers) DRV binary

easily assembled with current ML (VS2019) or UASM (http://www.terraspace.co.uk/uasm.html)

ml.exe /c /omf MT15.DRV.asm
or
uasm64.exe MT15.DRV.asm

and UniLinker: ftp://ftp.styx.cabel.net/pub/UniLink/ulnb1155.zip

ulink.exe -T16 -Tbi MT15.DRV.obj, MT15.DRV


Duplode

There it is ;) (Hello, llm! Just the other day I was reading some of the old threads and thinking of restunts  :))

llm

#13
restunts is in cryogenic sleep but there is still much to reverse that isn't that demanding - the sound drivers seems to be very simple :)

btw: "Stunts 1.0" and "4D Sports Driving 1.1" MT15.DRV is equal

GTAManRCR

Quote from: llm on May 29, 2020, 09:47:19 AM
restunts is in cryogenic sleep but there is still much to reverse that isn't that demanding - the sound drivers seems to be very simple :)

btw: "Stunts 1.0" and "4D Sports Driving 1.1" MT15.DRV is equal
For 4D Sports Driving 1.1 Dec-13-1990 it's true, but since 4D Sports Driving 1.1 Feb-25-1991 is compatible with Stunts 1.1 it has the Stunts 1.1 MT15.DRV
Hejj bicska, bicska, bicska csantavéri kisbicska!

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
Who won the 2023 season of ZakStunts?:
Shortcuts: ALT+S post or ALT+P preview