SEGA Music to MODfile, (Semi)Automatically

Diablo

New member
sega-sound.jpg


One thing SEGA’s MegaDrive/Genisis and the Commodore Amiga had in common was–aside from the Motorola 68000 processor– being known for excellent music in games. As [reassembler] continues his quest to de-assemble Sonic: The Hedgehog and re-assemble the code to run on Amiga, getting the music right is a key challenge. Rather than pull MIDI info or recreate the sound by ear, [reassembler] has written a program called Sonic2MOD to automatically take the assembly file music from the MegaDrive catridge and turn it into an Amiga-style MODfile. He’s also made a video about it that you’ll find embedded below.

Of course how music gets made differs widly on the two systems. Amiga, famously has Paula, a custom ASIC designed for sampling, allowing you to play four eight-bit voices. The Sega, of course, has that glorious FM-synthesis chip from Yamaha synthesizing five channels of CD-quality sound and one channel of sample. It’s not as well known, but the Sega also has a bonus TI-compatible programmable sound chip (PSG) that can handle 3 square-wave tone channels and one noise channel. That’s ten total channels to the Amiga’s four, and CD-quality to 8-bit voices. Knowing all that, we were very curious how close to SEGA’s original music [reassembler] could get on the Amiga.

Before he could show us, [reassembler] needed to decode the SMPS files used on Sonic: The Hedgehog and many other MegaDrive games. Presumably he could have gotten a MIDI file online somewhere– there are oodles– but the goal was to reverse engineer Sonic from its cartridge for the Amiga, not download a lot of resources from the web. SMPS is a sort of programing language for sound, telling the Yamaha and PSG chips what to do.

In some ways, it’s not unlike the Amiga’s MOD format, which programmatically specifies how to play the sampled voices also stored in the file. Translating from one to another is a matter of reading the SMPS files, extracting the timing, volume, vibrato, et cetera, and translate that into a form the MOD file can use. Then [reassembler] needed to generate samples, which was an added hiccup because the Amiga can only handle 3 octaves vs the seven of the SEGA’s FM synthesizer. He’s able to solve this simply by generating multiple samples to span the Yamaha chip’s range, though, again, at only 8-bit fidelity. It doesn’t sound half bad.

What about the four-channel limit? That’s where a bit of artistry comes in; the automated tool produces MOD files with more voices, which MOD trackers can handle at increased computational load. Computational load you don’t need when trying to play a game. Scaling down the soundtrack to the Amiga’s limits is something [reassembler] already has practice with from his famous OutRun port, though, so we’re sure he’ll get it done.

All of this effort just to match the Mega Drive makes us appreciate what a capable little computer the Sega console was; why, you can even check your stocks with it! We’ve already featured [reassembler]’s Sonic port once before, but this music tool was interesting enough we couldn’t help ourselves coming back to it. The ability to play MOD files were pretty impressive when the Amiga came out, but nowadays all you need is a ten-cent microcontroller.
 
Back
Top