User:Blaziken257/T1 Music research
Some research on Telefang's music.
Reading music values
On overworld map
- Code is at 0x2E384.
- Music is based on the Denjuu's origin in any given acre, and the game maps the value of the origin to the value of the music:
Note: Check this more thoroughly.
Origin | Music |
---|---|
0x5 | 0x6 |
0x6 | 0x5 |
0x3 | 0x7 |
0xB | 0x8 |
0xE | 0x2A if you're in bottom-left quadrant in overworld, while in an antenna tree (i.e. 0xC904 in RAM == 0x06); 0x3 otherwise. |
Everything else | 0x3 |
In Denjuu battles
0x14620: Controls music in normal wild Denjuu battle.
0x14624: Appears to control music in T-Fanger battle. (Check this!)
0x14630: Appears to control music in boss battle. (Check this!)
0x14634: Appears to control music in Doomsday battle. (Check this!)
Finding music data in ROM
Since the music data is split up into multiple banks (each bank = 0x4000 bytes or 16 KB), a function exists at 0x15F5 to determine the bank and relative song ID.
If music ID < 0x10:
Don't change music ID, set bank to 0x20
Else if music ID < 0x20:
Subtract 0xF from music ID, set bank to 0x21
Else if music ID < 0x30:
Subtract 0x1F from music ID, set bank to 0x22
Else:
Subtract 0x2F from music ID, set bank to 0x23
New music ID is output to 0xFFA0 in RAM, bank (minus 0x20) is output to 0xCFF8 in RAM.
Music table
This is in the same order as the sound test, but is sometimes split apart for some reason. (Maybe more songs were planned?)
Internal ID | ROM Bank | Relative ID | Sound test | Song |
---|---|---|---|---|
0x03 | 0x20 | 0x03 | 00 | Overworld |
0x04 | 0x04 | 01 | Cactos Ruins | |
0x05 | 0x05 | 02 | Ion Island | |
0x06 | 0x06 | 03 | Barran | |
0x07 | 0x07 | 04 | Palm Sea | |
0x08 | 0x08 | 05 | Pepperi Mts. | |
0x09 | 0x09 | 06 | Toronko Spring | |
0x0A | 0x0A | 07 | Craft Research Center | |
0x0B | 0x0B | 08 | Burion Ruins | |
0x12 | 0x21 | 0x03 | 09 | Wild Denjuu screen |
0x13 | 0x04 | 10 | Before link battle | |
0x14 | 0x05 | 11 | Wild Denjuu battle | |
0x15 | 0x06 | 12 | T-Fanger battle | |
0x16 | 0x07 | 13 | Boss/Mini-boss battle | |
0x17 | 0x08 | 14 | Doomsday battle | |
0x18 | 0x09 | 15 | Battle win | |
0x19 | 0x0A | 16 | Battle lose | |
0x1A | 0x0B | 17 | Level up | |
0x1B | 0x0C | 18 | Game Over | |
0x22 | 0x22 | 0x03 | 19 | Kai |
0x23 | 0x04 | 20 | Miyo | |
0x24 | 0x05 | 21 | Shop | |
0x25 | 0x06 | 22 | Before battle | |
0x26 | 0x07 | 23 | Nerikara | |
0x27 | 0x08 | 24 | Multiplayer | |
0x28 | 0x09 | 25 | Got number | |
0x29 | 0x0A | 26 | To Denjuu World | |
0x2A | 0x0B | 27 | Yarrow | |
0x2B | 0x0C | 28 | Natural evolution | |
0x2C | 0x0D | 29 | Test evolution | |
0x2D | 0x0E | 30 | Experimental evolution | |
0x2E | 0x0F | 31 | Lost phone number | |
0x32 | 0x23 | 0x03 | 32 | D-Shot menu |
0x33 | 0x04 | 33 | Human World | |
0x34 | 0x05 | 34 | Switch | |
0x35 | 0x06 | 35 | Warp | |
0x36 | 0x07 | 36 | Title screen | |
0x37 | 0x08 | 37 | Intro | |
0x38 | 0x09 | 38 | Credits | |
0x39 | 0x0A | 39 | Sanaeba | |
0x3B+ | ID-0x2F | -- | Glitchy sound |
Anything less than 0x3B that is not listed is silent. IT IS UNLIKELY THAT THERE IS UNUSED MUSIC IN THIS GAME (much to my dismay). Unless there are songs that have no pointers, which is possible but very unlikely (hey, I've seen it elsewhere).
There appears to be some code in the game that branches whether the relative music ID is 0x00 or 0x01, but it is not known what this does.
Each bank from 0x20 to 0x23 contains code to produce the music, and contains a pointer table.
TODO: Get pointers for all music tracks.