Skip to content

Hijacking SMPS and GEMS on MegaDrive/Genesis

Technical discussion which is not directly related to VGM files. Talk about Hardware and Software.

Moderator: Staff

  • User avatar
  • ArcadeTV Offline
  • Posts: 6
  • Joined: 2020-04-01, 12:40:57
  • Location: DE
  • Contact:

Hijacking SMPS and GEMS on MegaDrive/Genesis

Post by ArcadeTV »

Hi everyone, I'm Alex.
I create MSU-MD patches for MegaDrive/Genesis games, replacing the chipsound with CD audio which works on flashcarts, real hardware and emulation. You can find my patches and sources on my github.

I've been digging through all sorts of sound drivers and often times I'm struggeling with unexpected results when I mute the chipsounds by bypassing routines or setting registers from music-IDs to values that trigger a "stopAll" command. This is sometimes related to a bug in SMPS when no music is played where the original game expects music to be present. Seeing so many experts here, I'd like to ask for some information.

I've experienced that the most reliable way to mute SMPS is to null all the sound data. I've done that with Toki but it was more or less accidently that I found the correct location of the music tracks, while leaving the headers of each track intact.
What would be to right way to do it?

I'm also having a hard time with GEMS, which is doable for me, but since I don't know better, I patch each and every instruction where music is supposed to play. There's gotta be a better way, hijacking the driver itself.

If you had any useful tips for me, that'd be very much appreciated! Maybe you know of a tool that would come handy when trying to find locations, headers, data etc.? Thank you very much!
  • SeregaZ Offline
  • Posts: 98
  • Joined: 2015-08-08, 13:56:52

Post by SeregaZ »

ops... almost one year ago...

GEMS have 4 banks with data. Samples, Envelopes, Sequences and Instruments. every one of them have his own format. for usual GEMS version will fine my this one picture-explanations:

for custom GEMS cases it will be more difficult. like Zero Tolerance - GEMS Sequences bank have only 7 or 8 melodies, without sfx or woman voice. but they are present inside Samples bank and Instruments bank have them. so ZT GEMS was a little modified and sfx calls from another place - table of sfx, not Sequences as usual. like MK3 - it can play two samples at once. but it cost low quality - 6500 instead 10.4khz for top GEMS's samples quality. and it have 4 bit DPCM, not 8 bit PCM as usual. like Comix Zone - it have ADPCM.

most of all that GEMS games i am unpack into my online GEMS database - for switching songs between games, that have same GEMS. (too bored video and too russian's english language)

will be nice to get same pack of SMPS and make converter from SMPS to GEMS, but i am too dumb at last time to deeply dig SMPS :) (early i am was too lazy to do that - now, after covid - too dumb). but still want to!
Post Reply