Data East / Side Pocket Sound Driver
reverse engineered

I was always a fan of this sound driver.
It doesn't just use the LFO to make a nice vibrato and has lots of great PCM drums, but it's the only driver used in chinese pirates which actually sounds good. (if not great sometimes)

Recently I startet ripping another pirate with this sound driver and got the idea of reverse engineering the sound format.

I was in the middle of preparing a list of playlist addresses when I noticed... Side Pocket itself doesn't lay songs out like this. It appears all songs have 5FM+1PCM and are just a sequential list of channel addresses. :/ In fact, the play sound routine is completely different: far more complex... In the US ROM, it begins at $308B8 with the song # at address $FF1FFA.
EDIT song data at $30DDE; first six addresses for first song; then second, etc.

What a coincidence, I spent some time last night playing the Mega Drive and SNES versions of this very game, looking for differences between them, and the MD sound driver also stood out for me. It's the same one that was later used in Dashing Desperados, isn't it?

A bit off topic, but another sound driver that surprised me last night was Pac-Attack's; there's some pretty Namco-ish instrumentation in the Puzzle Mode's BGM (not present in the SNES version) that almost made me forget that I was playing a Mega Drive game. Don't know if that driver has been researched already, though.

Just wondering, would this info help adding the games that use this engine, to the M1 music player?

Yes; the other three games that use it are High Seas Havoc (which the unlicensed games steal from), Dashin' Desperadoes, and Minnesota Fats Pool Legend. However, it also showed up in nearly every Taiwanese unlicensed games after Chuanpu used it for the 1995 RPG Ya Se Chuan Shuo (previously, unlicensed devs would usually (there are exceptions) either use the SMPS/Z80 (yes they beat us =P ) in Boy III: Monster Lair or presumably Sunsoft's custom driver from Shikinjoh). I'll post the list of playlist addresses later (assuming ValleyBell didn't do it already =P ).

Namco driver(s) might be fun to look at, but there were a few others I wanted to play with first...

I wonder if the Data East developers wrote the sound driver for Sonic 1 SMS - there are surprising similarities.
One is that the songs' header is only some pointers, the second one is the data format: 00-7F aa for Note+Delay (7F is rest), 80-FF are coordination flags.
Third is the note format itself: the Side Pocket driver uses a note format as described here. (I would describe it as BCD for notes)
Later driver versions (like the one used in High Seas Havoc) use a more MIDI-like note format.

Converting the Side Pocket songs works after patching de2mid so that it skips the first 2 bytes on each track and handles the coord. flag 90 (with 2 parameters) correctly. I'll update the converter tomorrow.

I didn't make a pointer list yet. Barver Battle Saga was the only game I tested. (also because I it's the only game where I already had the music list pointer)

About the Namco driver: I may have a look. (reverse engineering is fun )
And the info isn't that sort of info that M1 needs. M1 needs the address of the PlayMusic or PlaySound routines, becuase it just makes the game's sound driver play the songs.

It could be; or it could be just coincidence; or it could be that Ancient created the Side Pocket driver :/ Who knows

Here is the song list for the other games. Each is just a list of addresses to each song. It looks like each game just places this list immediately before a song, so I gues in general, stop when you read from an address that's already in the list. I could try to see exactly how many songs

EDIT - SOME MORE
San Guo Zhi V (Romance of the Three Kingdoms Part 5) - $1DC598
Hua Mu Lan: Mulan - $5B396 (though IDK if the banking copy protection would get in the way... try?)
Chinese Fighter (g_cf3p) - $8DDCC (though IDK if the banking copy protection would get in the way... try?)Dragon Ball Final Bout - $ADE3E

Also can you give me the name of one game that has the speedup bug and one that doesn't? I'll compare the two to see what changed.

What is the Stage 1 music in Shui Hu: Feng Yun Zhuan from, if it isn't original? It plays in Chinese Fighter on the story screen if you wait at the title screen...

I dunno where Shui Hu: Feng Yun Zhuan got it's music. But Chinese Fighter has the boss theme of Barver Battle Saga as song 01 and some of the Power Rangers songs, too.
It would be interesting in which order the games were made, but some of those pirates don't even have a credits screen.

EDIT: About the speedup-problem: I'm sure Shui Hu: Feng Yun Zhuan has the problem, maybe Aladdin II, too. The Power Rangers game seems to work better (no slowdown as long as the main cpu doesn't need to load graphics). The licensed games don't have the problem either.

Along with the Aladdin II and Sonic Jam 6 (which are right), this should be all of them. Interestingly, Virtua Fighter 2 vs Tekken 2 appears to use a Z80-only driver (probably SMPS/Z80 again)...

EDIT: Actually there appears to be another two in NonGoodGen that I need to find out about ("13 tiles mahjong - 98 pretty girl (C).bin" [NSFW] and "Samurai 2 (unl).bin"/"samurai spirit 2.bin"/"Shin Samurai Spirits (Unl).bin")... also Pokemon Stadium, which doesn't seem to be in GoodGen (or at least not marked (Unl) or (Ch)?)? Not sure what either of those three use, though I'm pretty sure "98 pretty girl" does use this driver.

I can't say which version the ROMs are exactly (but I'm sure Pokemon Stadium is [f] - the header says "Crack by Ken Tse"), because I they were inside an archive called "MDPirates.rar" and none of them had GoodGen-style names.
"98 pretty girl" wasn't in the archive, btw.

During the last few weeks I researched the Data East sound driver a lot more. (I found no-attack and portamento flags and analyzed how the driver works.)
And here are my results: the Data East Music Player (source, some documents and example vgm logs included)

It can play songs in Data East format directly from the ROM.
This includes finding the instrument table, DAC sounds and music pointer list.
And: it can log VGMs (press 'V') and loops them fully automatically.

Usage: DEPlay.exe ROM.bin [MusPtrs.bin]
where MusPtrs.bin contains only the music pointers extracted from the ROM, because the automatic search fails sometimes. (I included a list for Ya-Se Chuan Shuo.)
But in most cases drag and drop works, too.

For my research I didn't do any disassembling, I just used Gens KMod and recreated the sound driver's behaviour by watching the RAM and analyzing VGM logs.

Notes:
- If it fails to find the DAC sounds or instruments, you can edit data\config.ini and use the extracted instruments and DAC sounds.
- The tempo is only an approximation, because the sound driver's update routine seems to be called from somewhere else and the update rate is controlled there.
But otherwise, all songs should sound perfect. (almost perfect if they have some unknown coordination flags)
- Side Pocket is NOT supported because it uses an older version of the sound format

And as a small bonus I fixed the broken snare drum in the extracted Sonic Jam VI drum set and included a VGM of the fixed "Save the Princess" song.

Is there really no way to read the original tempo values? Some of the tracks in Dashin' Desperados play a bit too fast. If it's not possible, perhaps you could allow to change it manually? The left or right arrows are unused, so they could be used for this.

Also, I've been having some problems with this game, like track 07 getting out of sync or track 12 crashing the player.

Other suggestions:

In case it's not already been taken into account, I'd advise to have an option for autodetecting possible unindexed tracks inside the specified ROM.

Also,I think it would be neat to have the possibility of extracting the sound driver, tracks and needed extra data, so the player can read from them instead of the ROM (if track autodetection is on, you could just delete those files that aren't really tracks anyway). That could set a new standard for Genesis music formats, even.

I'll find a way to get a correct tempo. Currently I'm using the tempo formula Sonic 2 uses, so some songs play too fast and some play too slow.

Also thanks for the bug report. I fixed the out-of-sync bug (wrong handling of command 91) and made a workaround for the crash (it was a divide by 0).
I'll upload an updated player within the next few days.

About the suggestions:
I already wrote a small tool to extract all the DAC sounds, but I also planned other features like extracting songs and instruments.
The search for unused songs is a good idea. This should be fairly easy, because almost every header has the bytes 00 01 02 04 05 06.

At the moment you only have the possibility to use pre-extracted instrument sets and DAC sounds. Just uncomment some lines in data\config.ini.
The only disadvantage is that you need to call it directly via command line, because drag and drop sets the working directory anything but the correct one.

Update:
- The Tempo works now! (they used a really easy but very clever solution - YM2612's Timer B)
The only thing that was a little complicated, was fixing the YM2612 core's Timer calculation. (because I don't use MAME timers)
- I made some tests and have now correct sizes for all commands. (80-9A)
- I implemented commands 8E, 8F, 90 and 91 (all 4 are related to the FM vibrato effect, Dashin' Desperadoes uses the last two quite often )
- I fixed a bug that made the player crash with Super Donkey Kong 99
- some other small bugfixes
- I debugged/disassembled some parts of the driver, so I know now the meaning of the Status Control byte.

Download
(btw: Some of the new features be also be present in the next version of SMPSPlay.)

If you listen to some songs and get a message like "Channel X: Command XX", please report that. (ROM name + song number) I need some example songs to test these commands.
Thanks.