It's that time of year again: the summer. This is the time when I often get bored and work on my projects.
This year, I've decided to reverse-engineer the music drivers for games that M1 does not yet support.
First up is Super Pang (as well as its prequel, Pang). These offsets should be the same for all releases, even some of the bootlegs. The Z80 machine code is semi-fucked up, so I can't get it decoded and working in other environments, so I leave you with this code.
Note that this only works for the YM2413 code, and does not work with the OKI sound bank, although there is already an extractor for that.
0x788E - init address. Song ID is stored in a. Song IDs are 0x20-0x3F, SFX are 0x00-0x1F.
0x7800 - play address. ugetab found this one out.
Secondly, the SMPS driver for Megadrive/Genesis games. This info ONLY APPLIES to the Z80 builds. It's actually pretty simple, just write the song number you want to play to 0x1C0A (in Z80 space) after all the hardware has been initialized and the code is up and running. This works on Chaotix as well, which runs the main music driver on the Z80.