Sonic and Sega Retro Message Board: MIDI player for the Sega Genesis - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Page 1 of 1
    Locked
    Locked Forum

MIDI player for the Sega Genesis Let's play Davis Cup World Tour Tennis

#1 User is offline nineko 

Posted 04 January 2009 - 08:56 PM

  • I am the Holy Cat
  • Posts: 5341
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
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 &quot;Davis&quot;) 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 &quot;Nstr&quot;, &lt;s&gt;which I believe contains the voices in some format, but this is speculation&lt;/s&gt;.
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

#2 User is offline Sik 

Posted 04 January 2009 - 09:35 PM

  • Sik is pronounced as "seek", not as "sick".
  • Posts: 6719
  • Joined: 17-March 06
  • Gender:Male
  • Project:being an asshole =P
  • Wiki edits:11
Next: MP3 player for the Sega Genesis.

I mean, seriously, another thread about a game using a standard music format? How many cases do you plan to find? =P

#3 User is offline nineko 

Posted 04 January 2009 - 09:41 PM

  • I am the Holy Cat
  • Posts: 5341
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251

View PostSik, on Jan 5 2009, 03:35 AM, said:

How many cases do you plan to find? =P
The list is on the spritesmind thread I linked to in my first post. And I'm done, because nobody cares.

#4 User is offline muteKi 

Posted 04 January 2009 - 09:50 PM

  • Fuck it
  • Posts: 7427
  • Joined: 03-March 05
  • Gender:Male
  • Wiki edits:91
Very interesting indeed -- I even see something like a standard wave player, though I'm not sure what to make of that fact's significance, since I thought all samples were in a PCM form anyway.



I don't think that an mp3 player on Genesis would work though, because of the decoding involved -- rather processor and memory intensive. :P

#5 User is offline TmEE 

Posted 05 January 2009 - 02:06 AM

  • Hot music ~~~~
  • Posts: 1716
  • Joined: 06-January 08
  • Gender:Male
  • Location:Estonia, Rapla City
  • Project:Big Neighbor Disturber, Laser Raster Scan Projector
  • Wiki edits:11
Glass Breaker MD for example uses plain WAV files for sound effects and voices. 8bit unsigned 8KHz mono WAVs.

You can play MP3s on MD, just don't expect realtime playback, more like 1 second of sound, minute of silence and so on :v:

#6 User is offline Overlord 

Posted 05 January 2009 - 01:59 PM

  • Cat-herder
  • Posts: 14494
  • Joined: 12-January 03
  • Gender:Male
  • Location:Berkshire, England
  • Project:VGDB
  • Wiki edits:3,204
It's not the best MIDI player in the world, but yup, it works. =P Nice work!

#7 User is offline nineko 

Posted 05 January 2009 - 10:55 PM

  • I am the Holy Cat
  • Posts: 5341
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
I linked to a new rom in my first post, with a much better sample MIDI in it (Tetris).
Apparently the midi interpreter is better than I thought.
Also, the weird "Nstr" chunk isn't for the voices as I thought: it's for the drums, since they are on FM and not on DAC.
This implies that now I don't have a single clue about where the voices are stored.

edit: thanks Tweaker for splitting the PCM discussion out of this thread :)
This post has been edited by nineko: 06 January 2009 - 03:44 PM

#8 User is offline Overlord 

Posted 06 January 2009 - 05:00 PM

  • Cat-herder
  • Posts: 14494
  • Joined: 12-January 03
  • Gender:Male
  • Location:Berkshire, England
  • Project:VGDB
  • Wiki edits:3,204

View Postnineko, on Jan 6 2009, 03:55 AM, said:

I linked to a new rom in my first post, with a much better sample MIDI in it (Tetris).
Apparently the midi interpreter is better than I thought.
Also, the weird "Nstr" chunk isn't for the voices as I thought: it's for the drums, since they are on FM and not on DAC.
This implies that now I don't have a single clue about where the voices are stored.

edit: thanks Tweaker for splitting the PCM discussion out of this thread :eng101:

You're right, that IS much better. =P

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users