- Max channels: 12
- Similar to Standard MIDI Format 1
- BGM/SFX have different data structure
Music address table at 0x807EC8C (xref from 0x8069DEE), 19 song items available.
Song #0 and #1 are special. They are used for setup.
Channel 0-7 are for GB channels (ch 4-7 are usually not used), and 8-11 are for GBA FIFO channels. (GB channels are slightly initialized in song #0, #1)
Live pointer addresses: 0x3000174, 0x30001e8, ... (+0x74*N)
Size | Comment |
---|---|
2 | Channel mask (max 0xFFF, MSB first) |
1 | Priority? |
1 | Alignment (0) |
4*N | Channel entrypoint address |
Command e0..ff
- 00-7F xx: Note (note number, length)
- 80 xx: Rest
- D0-DF: ADSR? (Attack Rate?)
- E3 xx: Instrument (GB Waveform, GBA FIFO)
- E4, E5, E6, E7: Pulse Duty Rate (12.5%, 25%, 50%, 75%)
- E9 xx: Single-ch Echo Delay (max xx: 48)
- FB xx yy zz vv: General channel attributes?
- FD: ?
- FE xx: FE 02 for percussion channel? (GB Noise, GBA FIFO Drums), FE 00 for switching back to melodic channel
- FF: End of Track
BGM entrypoint:
0x807ECD8
0x807ED0C
0x807ED28
0x807ED44
0x807ED60
0x807ED7C
0x807ED98
0x807EDB4
0x807EDD0
0x807EDEC
0x807EE08
0x807EE24
0x807EE40
0x807EE5C
0x807EE78
0x807EE94
0x807EEB0
0x807EECC
0x807EEE8
Song 2:
0x807FAC0
0x807FB6A
0x807FC14
0x807FCC4
0x807FDB1
0x807FE17
Perc 0x24 (bass drum) = unk_807FA92 // why?