So I found <a href="http://www.spritesmind.net/_GenDev/forum/viewtopic.php?t=472" target="_blank">this thread</a> on spritesmind. It turns out that Davis Cup World Tour Tennis (from now on, I'll refer to it simply as "Davis") uses standard MIDI files. I checked, and guess what -- that's true.
I quickly wrote yet another tool to extract those MIDIs, and <a href="http://digilander.iol.it/projectchaos2/davismidi.rar" target="_blank">here they are</a>.
They are standard MIDI files for the most part, but some players may refuse to open them because of some additional data at the end, like a lot of padding 00s I was too lazy to remove, and a chunk which probably contains the YM2612 voices in some format.
So, they have a regular MThd midi header, and regular MTrk midi tracks; they seem to use channels from 1 to 6 or less (with 6 being the drums -- change it to 10 if you want to replay them on a normal GM player), <s>and from what I've seen they use MIDI instruments 0 to 5, which will all render as various kinds of piano in a normal midi player, but are probably replaced by proper voices when in-game</s>; additionally, most of those MIDIs seem to have all the instrument changes in a track separate from the main ones, which is somewhat uncommon to my knowledge, though perfectly legit. After those tracks, there's a weird chunk labeled as "Nstr", <s>which I believe contains the voices in some format, but this is speculation</s>.
And yes, it is possible to put custom midis into this, with the obvious limit that each channel must be used monophonically; drum definitions seem to be compliant with the midi standard. <a href="http://digilander.iol.it/projectchaos2/davis.zip" target="_blank">This</a> is a modified Davis rom with the Tetris song playing on the title screen. Keep in mind that the tempo and the instrument are completely fucked up, and that this is missing the PSG channels. But take it as a proof of concept.
I don't plan to do much more research over this though.
Update 1: I changed the test rom to use the Tetris song, much better.
Update 2: The Nstr chunk doesn't contain voice definitions. It contains FM drums definitions, since drums aren't playing on DAC. Without that chunk, the drums don't play.
Update 3: How voices are changed is still beyond me. But the MIDI instruments don't need to be in the 0-5 range.
I quickly wrote yet another tool to extract those MIDIs, and <a href="http://digilander.iol.it/projectchaos2/davismidi.rar" target="_blank">here they are</a>.
They are standard MIDI files for the most part, but some players may refuse to open them because of some additional data at the end, like a lot of padding 00s I was too lazy to remove, and a chunk which probably contains the YM2612 voices in some format.
So, they have a regular MThd midi header, and regular MTrk midi tracks; they seem to use channels from 1 to 6 or less (with 6 being the drums -- change it to 10 if you want to replay them on a normal GM player), <s>and from what I've seen they use MIDI instruments 0 to 5, which will all render as various kinds of piano in a normal midi player, but are probably replaced by proper voices when in-game</s>; additionally, most of those MIDIs seem to have all the instrument changes in a track separate from the main ones, which is somewhat uncommon to my knowledge, though perfectly legit. After those tracks, there's a weird chunk labeled as "Nstr", <s>which I believe contains the voices in some format, but this is speculation</s>.
And yes, it is possible to put custom midis into this, with the obvious limit that each channel must be used monophonically; drum definitions seem to be compliant with the midi standard. <a href="http://digilander.iol.it/projectchaos2/davis.zip" target="_blank">This</a> is a modified Davis rom with the Tetris song playing on the title screen. Keep in mind that the tempo and the instrument are completely fucked up, and that this is missing the PSG channels. But take it as a proof of concept.
I don't plan to do much more research over this though.
Update 1: I changed the test rom to use the Tetris song, much better.
Update 2: The Nstr chunk doesn't contain voice definitions. It contains FM drums definitions, since drums aren't playing on DAC. Without that chunk, the drums don't play.
Update 3: How voices are changed is still beyond me. But the MIDI instruments don't need to be in the 0-5 range.
This post has been edited by nineko: 05 January 2009 - 11:08 PM


00