Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,480,679
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-25-24 07:11 AM
Guest: Register | Login

0 users currently in ROM Hacking Related Releases | 1 guest | 1 bot

Main - ROM Hacking Related Releases - Mario 64 Sequenced Music Parser v0.03 + Specification New thread | New reply


messiaen
Posted on 09-26-08 04:31 AM (rev. 3 of 09-26-08 04:37 AM) Link | Quote | ID: 91117


Cheep-cheep
Level: 32

Posts: 46/193
EXP: 204431
Next: 2011

Since: 05-26-08
From: Porto Alegre, Brazil

Last post: 4442 days
Last view: 4770 days
Hi, this is the result of some work I've been doing with the sequenced music format of Mario 64.

This utility reads the raw data of a Mario 64 sequence file and outputs a formatted log. I'm releasing it hoping that somebody may also be interested in discovering more about the format.

Here is one excerpt showing its output:


---------------------------------------------
MUSIC TRACK 1, SUB-TRACK 0 AT OFFSET 0x2ac
---------------------------------------------

0x2ac: Cmd 0x33 | Type: 0 | Note C5 | Timestamp: Other (0x16) | Velocity: 0x68 | Duration: 0xa3
0x2b0: Cmd 0x30 | Type: 0 | Note A4 | Timestamp: Other (0x19) | Velocity: 0x64 | Duration: 0xae
0x2b4: Cmd 0x73 | Type: 1 | Note C5 | Timestamp: Other (0x16) | Velocity: 0x66
0x2b7: Cmd 0x29 | Type: 0 | Note D4 | Timestamp: Other (0xf) | Velocity: 0x5e | Duration: 0x55
0x2bb: Cmd 0x33 | Type: 0 | Note C5 | Timestamp: Other (0x1b) | Velocity: 0x6a | Duration: 0xaa
0x2bf: Cmd 0x2b | Type: 0 | Note E4 | Timestamp: Other (0x1e) | Velocity: 0x64 | Duration: 0x11
0x2c3: Cmd 0x2c | Type: 0 | Note F4 | Timestamp: Eight-note (0x18) | Velocity: 0x64 | Duration: 0x80
0x2c7: Cmd 0x2d | Type: 0 | Note F#4 | Timestamp: Other (0x19) | Velocity: 0x63 | Duration: 0x99
0x2cb: Cmd 0x2e | Type: 0 | Note G4 | Timestamp: Other (0x31) | Velocity: 0x6d | Duration: 0xcb
0x2cf: Cmd 0x2e | Type: 0 | Note G4 | Timestamp: Other (0x13) | Velocity: 0x75 | Duration: 0x5e
0x2d3: Cmd 0xa2 | Type: 2 | Note G3 | Timestamp: (same as previous one) | Velocity: 0x60 | Duration: 0xa2
0x2d6: Cmd 0x6e | Type: 1 | Note G4 | Timestamp: Other (0x8) | Velocity: 0x75
-- END OF MUSIC TRACK AT 0x2d9 ---


The quality really depends on the track, but it can already decode about 4 or 5 sequences 100% right (ie, a MIDI export would be possible). There is an old source available in the same download folder as the program. If you are going to read it, warning, it's my 3rd program ever .

Download link for latest version (0.03) and sequence files.

I have also uploaded an specification with pretty much everything I know about the format.


messiaen
Posted on 11-10-08 12:00 AM Link | Quote | ID: 93982


Cheep-cheep
Level: 32

Posts: 72/193
EXP: 204431
Next: 2011

Since: 05-26-08
From: Porto Alegre, Brazil

Last post: 4442 days
Last view: 4770 days
Just to update this:

Mario64 Sequenced Music Parser v0.05 + Sequence Bank Ripper + messy sources.

Now it also shows loop commands, pitch bends, transposition settings and the music data parsing is very accurate. Since the format used on Mario Kart 64 and Wave Race 64 are very similar to Mario 64, it also works for those, so this tool will be of great help to anyone who want to import sequences from these games.

There is also a 'sequence ripper' utility which works for these three games.

Zycor
Posted on 11-11-08 06:28 AM Link | Quote | ID: 94094


Ninji
Level: 36

Posts: 182/237
EXP: 286781
Next: 21329

Since: 05-27-07

Last post: 4827 days
Last view: 4772 days
I'm surprised at the lack of replies seeing how nearly everyone in the entire internet loves Super Mario 64 and everyone was anticipating their ability to be able to actually hack the game extensively. I guess this place just isn't like it used to be huh?

While I'm not interested in hacking Mario 64 myself, I must say you've done quite a lot that many would have deemed impossible a while back. I would check out these tools but I rom hack about as much as I do my homework at a decent hour, not too often. I like making graphics but I don't like having to be endlessly limited by everything. Though I do plan on finishing up my Pokemon Gold hack(s). I could also never really figure out ASM, but then again I don't know any programming language and the only thing I can "make" is websites in html, that's not saying much XD.

If you ever do see me make a hack, it'll be the day I just program my own engine and go from there... or something, since expectations for rom hacks have gotten so high it's really hard to do anything, everyone in the Sonic community wants ASM and custom music with their hacks, and that's a nice touch if you know how to do it, but it does beat the "change the palette and level layout and call it something that isn't "Green Hill Zone."." I honestly think I'll pass...

____________________
Why are you reading this? My post is up there^

messiaen
Posted on 11-11-08 01:54 PM (rev. 2 of 11-11-08 02:36 PM) Link | Quote | ID: 94135


Cheep-cheep
Level: 32

Posts: 73/193
EXP: 204431
Next: 2011

Since: 05-26-08
From: Porto Alegre, Brazil

Last post: 4442 days
Last view: 4770 days
I can't complain about the lack of replies because I do get a lot of feedback comparing to people hacking other less known games to the same extent. Also, there weren't a lot of practical applications to this tool (at least until now), but the specification is becoming very complete so if someone gets interested in writing a midi importer (I'm not up for this task) this will be of great aid.

Anyway, here is a new version with better output: Download for v0.06b.

Here is Bob-omb's Battlefied header structure. The song is divided in four eight-bar chunks in a very square 32 bars formal design:

------
HEADER
------

0x0: D3 80 --> Begin Header (types: 80, 60 or 20)
0x2: D7 0f c1 --> Enable Channels: 0 6 7 8 9 10 11
0x5: 90 00 82 --> Load track from offset 0x82 (Channel 0)
0x8: 96 00 99 --> Load track from offset 0x99 (Channel 6)
0xb: 97 00 ab --> Load track from offset 0xab (Channel 7)
0xe: 98 00 bf --> Load track from offset 0xbf (Channel 8)
0x11: 99 00 d4 --> Load track from offset 0xd4 (Channel 9)
0x14: 9a 00 e8 --> Load track from offset 0xe8 (Channel 10)
0x17: 9b 00 f7 --> Load track from offset 0xf7 (Channel 11)
0x1a: DD 71 --> Tempo = 113 (BMP)
0x1c: DB 4b --> Master Volume = 0x4b
0x1e: FD 81 80 --> Timestamp: Two 4/4 measures (0x180)</b> ; up to here is the introduction, which isn't looped (see 0xFB command below)
0x21: 90 01 06 --> Load track from offset 0x106 (Channel 0)
0x24: 96 01 12 --> Load track from offset 0x112 (Channel 6)
0x27: 97 01 1c --> Load track from offset 0x11c (Channel 7)
0x2a: 98 01 26 --> Load track from offset 0x126 (Channel 8)
0x2d: 99 01 33 --> Load track from offset 0x133 (Channel 9)
0x30: 9a 01 3d --> Load track from offset 0x13d (Channel 10)
0x33: 9b 01 44 --> Load track from offset 0x144 (Channel 11)
0x36: FD 86 00 --> Timestamp: Eight 4/4 measures (0x600)
0x39: 90 01 4b --> Load track from offset 0x14b (Channel 0)
0x3c: 96 01 82 --> Load track from offset 0x182 (Channel 6)
0x3f: 97 01 8c --> Load track from offset 0x18c (Channel 7)
0x42: 98 01 96 --> Load track from offset 0x196 (Channel 8)
0x45: 99 01 a3 --> Load track from offset 0x1a3 (Channel 9)
0x48: 9a 01 ad --> Load track from offset 0x1ad (Channel 10)
0x4b: 9b 01 b4 --> Load track from offset 0x1b4 (Channel 11)
0x4e: FD 86 00 --> Timestamp: Eight 4/4 measures (0x600)
0x51: 90 01 bb --> Load track from offset 0x1bb (Channel 0)
0x54: 96 02 44 --> Load track from offset 0x244 (Channel 6)
0x57: 98 02 4e --> Load track from offset 0x24e (Channel 8)
0x5a: 99 02 5b --> Load track from offset 0x25b (Channel 9)
0x5d: 9a 02 65 --> Load track from offset 0x265 (Channel 10)
0x60: 9b 02 6c --> Load track from offset 0x26c (Channel 11)
0x63: FD 86 00 --> Timestamp: Eight 4/4 measures (0x600)
0x66: 90 02 73 --> Load track from offset 0x273 (Channel 0)
0x69: 96 02 7d --> Load track from offset 0x27d (Channel 6)
0x6c: 98 02 87 --> Load track from offset 0x287 (Channel 8)
0x6f: 99 02 94 --> Load track from offset 0x294 (Channel 9)
0x72: 9a 02 9e --> Load track from offset 0x29e (Channel 10)
0x75: 9b 02 a5 --> Load track from offset 0x2a5 (Channel 11)
0x78: FD 86 00 --> Timestamp: Eight 4/4 measures (0x600)
0x7b: FB 00 21 --> Loop from offset 0x21
0x7e: D6 0f c1 --> Disable Channels: 0 6 7 8 9 10 11
--- END OF HEADER AT 0x81 ---


Here is how a track works. It's not possible to do a '0' timestamp for simultaneous notes/events, so everything is arranged into 'layers', which saves some space but makes the data much more complex.

----------------------------------
TRACK 1 (CHANNEL 0) AT OFFSET 0x82
----------------------------------

0x82: C4 --> Begin track
0x83: 90 02 ac --> Load Music Track (Layer 0) from offset 0x2ac
0x86: 91 02 da --> Load Music Track (Layer 1) from offset 0x2da
0x89: 92 03 05 --> Load Music Track (Layer 2) from offset 0x305
0x8c: D4 0a --> ?
0x8e: DF 64 --> Track Volume = 100
0x90: DD 54 --> Set Track Pan = 84
0x92: C1 00 --> Set Program-related
0x94: Unknown command = 68
0x95: FD 81 80 --> Timestamp: Two 4/4 measures (0x180)
--- END OF TRACK 1 AT 0x98 ---


And here we get to the music data itself. There are three diferent 'PlayNote' command formats (0x00 to 0x3F, 0x40 - 0x7F, 0x80, 0xBF) which are alterned to get the most compact data possible:

---------------------------------------
MUSIC TRACK 1 (LAYER 0) AT OFFSET 0x2ac
---------------------------------------

0x2ac: Cmd 0x33 | Note C5 | Timestamp: Other (0x16) | Velocity: 0x68 | Duration: 0xa3
0x2b0: Cmd 0x30 | Note A4 | Timestamp: Other (0x19) | Velocity: 0x64 | Duration: 0xae
0x2b4: Cmd 0x73 | Note C5 | Timestamp: Other (0x16) | Velocity: 0x66
0x2b7: Cmd 0x29 | Note D4 | Timestamp: Other (0xf) | Velocity: 0x5e | Duration: 0x55
0x2bb: Cmd 0x33 | Note C5 | Timestamp: Other (0x1b) | Velocity: 0x6a | Duration: 0xaa
0x2bf: Cmd 0x2b | Note E4 | Timestamp: Other (0x1e) | Velocity: 0x64 | Duration: 0x11
0x2c3: Cmd 0x2c | Note F4 | Timestamp: Eight-note (0x18) | Velocity: 0x64 | Duration: 0x80
0x2c7: Cmd 0x2d | Note F#4 | Timestamp: Other (0x19) | Velocity: 0x63 | Duration: 0x99
0x2cb: Cmd 0x2e | Note G4 | Timestamp: Other (0x31) | Velocity: 0x6d | Duration: 0xcb
0x2cf: Cmd 0x2e | Note G4 | Timestamp: Other (0x13) | Velocity: 0x75 | Duration: 0x5e
0x2d3: Cmd 0xa2 | Note G3 | Timestamp: (same as previous one) | Velocity: 0x60 | Duration: 0xa2
0x2d6: Cmd 0x6e | Note G4 | Timestamp: Other (0x8) | Velocity: 0x75
--- END OF MUSIC TRACK AT 0x2d9 ---

messiaen
Posted on 12-03-08 12:41 PM Link | Quote | ID: 95489


Cheep-cheep
Level: 32

Posts: 92/193
EXP: 204431
Next: 2011

Since: 05-26-08
From: Porto Alegre, Brazil

Last post: 4442 days
Last view: 4770 days
A little update: Download for 0.07. Here's a list of games which use this format (in slightly different versions):

Mario 64
Mario Kart 64
Wave Race 64
Star Fox 64
1080 Snowboarding
Yoshi's Island
Zelda 64

As you can see, all of them are first-party Nintendo games developed between 1996-1998. I ordered them according to how different they are from Mario 64, which is (naturally) the first version of this format.

I will expand a bit the scope of this tool so that it covers the format variations between these games (I'm aiming especially at Zelda 64).

messiaen
Posted on 12-12-08 05:52 AM Link | Quote | ID: 96634


Cheep-cheep
Level: 32

Posts: 98/193
EXP: 204431
Next: 2011

Since: 05-26-08
From: Porto Alegre, Brazil

Last post: 4442 days
Last view: 4770 days
A branch of this project:

Zelda 64 Sequenced Music Parser v0.1.

Zelda 64 Sequence Ripper (Debug ROM).

messiaen
Posted on 12-21-08 11:49 PM (rev. 2 of 12-21-08 11:49 PM) Link | Quote | ID: 97296


Cheep-cheep
Level: 32

Posts: 102/193
EXP: 204431
Next: 2011

Since: 05-26-08
From: Porto Alegre, Brazil

Last post: 4442 days
Last view: 4770 days
Bump bump.

Mario 64 Sequence Inserter 0.1 - inserts custom sequence files in the ROM. A few sample custom sequences are included.

Main - ROM Hacking Related Releases - Mario 64 Sequenced Music Parser v0.03 + Specification New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.022 seconds. (335KB of memory used)
MySQL - queries: 67, rows: 85/85, time: 0.016 seconds.