BGNG
New member
In the F-Zero X ROM (North American, Non-byte swapped: Z64), I zeroed all the bytes from offset 0x800000 to 0x810000. This happens to be a chunk of the Mute City music data. When listening to the music in-game, the music simply stops dead silent during the zeroed data and picks back up right where it would have been if I hadn't done anything at all.
This suggests that the encoding scheme for the music uses a very rudimentary method. This also suggests that the music is stored with a constant bitrate.
Copying the data to offsets 0x810000 to 0x820000, however, the music didn't repeat itself. Instead, there was some very loud, distorted noise. This suggests that there is at least some form of compression invloved; the music is not raw PCM data.
__________
To verify my suspicions, I dumped the data from offset 0x800000 to 0x810000 to a file on disk and read it as if it was raw PCM data at varying sample rates. What I found was that the data most certainly is not PCM data at 8 or 16 bits (big or little endian); 1 or 2 channels.
What I did find, however, is that at 8 bits, 1 channel, 11025 hz, you can identify the exact sounds of the music through all the static, albeit somewhat distorted. This could mean a number of things, but I figure it's one of two: 1) The static may represent block headers in the music, where it is only a simple matter of code application to decode it completely; or: 2) The static may represent sequencing information that informs the audio driver to continue playing/looping certain chunks of previous data.
My basis for number 2 is the fact that I was unable to identify any bass in the extracted ROM data, but there's plenty of bass in the decoded music.
__________
So I come to EmuTalk for help. I've prepared a .wav file of the ROM data at 8 bits, 1 channel, 11025 hz. I've included it in a ZIP file with a plain dump of the ROM data and an MP3 I recorded that shows what the music in the extracted chunk sounds like when it's finished decoding. The files are as such:
Data Wave (really loud).wav - The prepared wave file
Real Thing.mp3 - The recorded MP3
ROM Data.bin - The extracted ROM data
CAUTION: When listening to the data wave file, turn your speakers down almost all the way. The static in the file produces incredibly loud noise that may damage your ears if your speaker's volume is set too high. Nonetheless, if you listen to the file, you can hear the music in question rather easily through the noise.
The Real Thing MP3 was recorded off of F-Zero X in a real N64. I cut out other parts of the data, and what's left is reasonably close to the exact decoded data that can be generated by the given ROM data file. Also in that MP3 is the overlaying sound of the machine engine; a sound which will not be present when the ROM data is decoded.
__________
As you may recall: about a year ago, I was asking about MIO0 decoding so I could extract the course texture images for use in a level editor for F-Zero X. I've decided to give that project another try, and I'd eventually like the option to choose which music plays when you play on an edited course that is patched to the ROM. In order to do a music preview, I'll need to know how to decode the music. (I've figured out the MIO0 compression algorithm, by the way)
So I ask for help decoding the music. I offer to anyone who helps me reach my goal the opportunity to beta test the level editor before its first release.
__________
NOTE: The F-Zero X Expansion Kit, released in Japan only for the N64DD, enabled the musics to be played in stereo, while the retail version of the game only gives mono music even if the sound option in the Options menu is set to stereo. I suspect that the data stored in the retail ROM might be decodable to stereo output, but the game mixes the channels to mono before it's outputted from the N64. Bear this in mind if you try to decode the ROM data file I've provided.
This suggests that the encoding scheme for the music uses a very rudimentary method. This also suggests that the music is stored with a constant bitrate.
Copying the data to offsets 0x810000 to 0x820000, however, the music didn't repeat itself. Instead, there was some very loud, distorted noise. This suggests that there is at least some form of compression invloved; the music is not raw PCM data.
__________
To verify my suspicions, I dumped the data from offset 0x800000 to 0x810000 to a file on disk and read it as if it was raw PCM data at varying sample rates. What I found was that the data most certainly is not PCM data at 8 or 16 bits (big or little endian); 1 or 2 channels.
What I did find, however, is that at 8 bits, 1 channel, 11025 hz, you can identify the exact sounds of the music through all the static, albeit somewhat distorted. This could mean a number of things, but I figure it's one of two: 1) The static may represent block headers in the music, where it is only a simple matter of code application to decode it completely; or: 2) The static may represent sequencing information that informs the audio driver to continue playing/looping certain chunks of previous data.
My basis for number 2 is the fact that I was unable to identify any bass in the extracted ROM data, but there's plenty of bass in the decoded music.
__________
So I come to EmuTalk for help. I've prepared a .wav file of the ROM data at 8 bits, 1 channel, 11025 hz. I've included it in a ZIP file with a plain dump of the ROM data and an MP3 I recorded that shows what the music in the extracted chunk sounds like when it's finished decoding. The files are as such:
Data Wave (really loud).wav - The prepared wave file
Real Thing.mp3 - The recorded MP3
ROM Data.bin - The extracted ROM data
CAUTION: When listening to the data wave file, turn your speakers down almost all the way. The static in the file produces incredibly loud noise that may damage your ears if your speaker's volume is set too high. Nonetheless, if you listen to the file, you can hear the music in question rather easily through the noise.
The Real Thing MP3 was recorded off of F-Zero X in a real N64. I cut out other parts of the data, and what's left is reasonably close to the exact decoded data that can be generated by the given ROM data file. Also in that MP3 is the overlaying sound of the machine engine; a sound which will not be present when the ROM data is decoded.
__________
As you may recall: about a year ago, I was asking about MIO0 decoding so I could extract the course texture images for use in a level editor for F-Zero X. I've decided to give that project another try, and I'd eventually like the option to choose which music plays when you play on an edited course that is patched to the ROM. In order to do a music preview, I'll need to know how to decode the music. (I've figured out the MIO0 compression algorithm, by the way)
So I ask for help decoding the music. I offer to anyone who helps me reach my goal the opportunity to beta test the level editor before its first release.
__________
NOTE: The F-Zero X Expansion Kit, released in Japan only for the N64DD, enabled the musics to be played in stereo, while the retail version of the game only gives mono music even if the sound option in the Options menu is set to stereo. I suspect that the data stored in the retail ROM might be decodable to stereo output, but the game mixes the channels to mono before it's outputted from the N64. Bear this in mind if you try to decode the ROM data file I've provided.