Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Bug/error in Toto World 3 music

Reply to topic
Author Message
  • Joined: 24 May 2010
  • Posts: 127
  • Location: New York
Reply with quote
Bug/error in Toto World 3 music
Post Posted: Tue May 17, 2011 8:37 pm
The soundtrack to Toto World 3 is certainly strange to begin with, but in at least a couple of places it's got some serious issues that sound (to me) like bugs or errors.

The most prominent example is in World 2, in which the music consists of three basic parts: a bass part (PSG Channel 2), an arpeggiating part that plays chords (PSG 1), and a melody on top (PSG 0), plus a sporadic noise channel part used for hi-hat. They both have basically the same chord changes, with a Csus4 -> C progression followed by Eb > Bb > Db > Ab > Bb, or something like it.

If they were played together it'd be a decent little tune in typical platforming vein. But they're completely out of sync with each other, creating a dissonant clash that doesn't seem intentional at all. I'm not sure that the tempos even match -- the noise channel seems to be in sync with PSG 1, but everything else is all over the place.

There are also four high-pitched beeps which sound to me like a music driver that's reading out-of-range data -- this happens when the bass part gets towards the end of its cycle, where it's in an octave pattern and reaches for low notes (A-flats, so around 103-104 Hz) that aren't available on the SMS.

In other levels there are other music issues -- World 3 almost passes muster, but World 4 sounds even more messed-up than World 2. I don't remember what happens after that. Even the title screen music has weird stuff going on -- the bass part (PSG 2) has some high notes and out-of-tune notes that, again, suggest data errors. I think World 1's music has the same issue -- if you disable PSG 2, it sounds a lot more normal.

Has anyone ever delved into the code to see whether there's some sort of identifiable error in the sound driver that's responsible? Does Cave Dude have the same issue?
  View user's profile Send private message
  • Joined: 24 May 2010
  • Posts: 127
  • Location: New York
Reply with quote
Post Posted: Thu May 19, 2011 7:34 pm
Well, how about this: can anyone tell me where the music data is stored in this game, and in what format? Unfortunately I don't have the skills yet to suss that out myself.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14744
  • Location: London
Reply with quote
Post Posted: Fri May 20, 2011 9:00 am
In Meka's debugger, "w w io 7f" will find the music engine for you; the engine and data are most likely living in the same 16KB block. ("Watch for writes to IO port $7f"). However, the music engine format is likely to be entirely proprietary - as far as I know, the only game whose music engine has been reverse engineered is Sonic 2.

I think it's worth verifying that the ROM image is correct before putting too much work in. It was dumped by Bock, so maybe he can verify it if he still has the cart?
  View user's profile Send private message Visit poster's website
  • Joined: 02 Jan 2005
  • Posts: 668
Reply with quote
Post Posted: Fri May 20, 2011 9:03 am
Buggy or just "badly" done? Or buggy because it's "badly" done?

Jang Pung II uses the same music and it sounds the same.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8651
  • Location: Paris, France
Reply with quote
Post Posted: Fri May 20, 2011 12:01 pm
I confirmed Toto World dump a few times.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14744
  • Location: London
Reply with quote
Post Posted: Fri May 20, 2011 1:30 pm
OK, so it may just be screwed up data. However, fixing it is likely to be extremely hard and it's not exactly well-loved music...
  View user's profile Send private message Visit poster's website
  • Joined: 24 May 2010
  • Posts: 127
  • Location: New York
Reply with quote
Post Posted: Fri May 20, 2011 2:10 pm
Maxim wrote
In Meka's debugger, "w w io 7f" will find the music engine for you; the engine and data are most likely living in the same 16KB block. ("Watch for writes to IO port $7f").

Unfortunately I can't use Meka on my normal machine (PowerBook G4) but let me see if I can resurrect my girlfriend's old XP desktop (which I recently somehow borked by installing Nero or DiscJuggler).

CRV wrote
Buggy or just "badly" done? Or buggy because it's "badly" done?

Buggy in that I don't think the composer's intentions are accurately represented by the game. Some of the notes are clearly the product of out-of-range errors, or whatever the right way of describing that is -- reaching for bass notes that the SMS can't reproduce, so the frequency "wraps around" to the other side and creates high-pitched beeps.

Does that suggest that the game was originally planned for MSX? The ColecoVision also uses the SN76489 and I think it has much the same problem with bass frequencies that the SMS does, but I know the Intellivision has no issue producing those low notes and, like the MSX, uses the AY-3-8910.

Besides that, the sync error in the 2nd tune is clearly a mistake. I don't know whether it was an issue of haste, incompetence, or indifference, but I can't imagine that someone would go to the trouble of writing a good tune and then intentionally sabotaging it. Obviously, though, that'll be much harder to fix than the problem with the bass notes (which should in theory just be a matter of editing data table entries, right?).

Is the music in Cave Dude identical to Toto World 3?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14744
  • Location: London
Reply with quote
Post Posted: Fri May 20, 2011 2:37 pm
It could be a matter of editing some rate parameters in the music data to be consistent across the channels. You could try messing with RAM (again, in a suitable emulator) to see if you can isolate some variables.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8651
  • Location: Paris, France
Reply with quote
Post Posted: Fri May 20, 2011 5:28 pm
It's not like any of those games are great in the first place. They have dodgy physics, gameplay, etc. I imagine they were done in a short amount of time and with little quality control. It is also possible that the guy who wrote the music didn't have a chance to hear it in the final product and audio bugs just went unnoticed.
That said it would be interesting to study the issue further and see if something could be fixed.
  View user's profile Send private message Visit poster's website
  • Joined: 24 May 2010
  • Posts: 127
  • Location: New York
Reply with quote
Post Posted: Fri May 20, 2011 5:49 pm
Bock wrote
It's not like any of those games are great in the first place. They have dodgy physics, gameplay, etc. I imagine they were done in a short amount of time and with little quality control. It is also possible that the guy who wrote the music didn't have a chance to hear it in the final product and audio bugs just went unnoticed.

Absolutely, that's certainly the most likely scenario. I do have to say that I like Toto World 3 -- it plays pretty well, actually.

Say, here's a thought: if the music and sound engine in Jang Pung 2 are taken from Toto World 3, then perhaps there's a significant block of ROM that's identical in both games and (by implication) will tell us where the music is located. What's the best tool to check that out?
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!