Super Mario All-Stars - Area Music Data

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Super Mario All-Stars - Area Music Data
by on (#40082)
Does anyone know where in the Super Mario All-Stars ROM the music selection data for both Super Mario Bros. and Super Mario Bros.: The Lost Levels is located?

Area Songs:
WaterMusic (byte $02)
GroundMusic (byte $01)
UndergroundMusic (byte $04)
CastleMusic (byte $08)
BonusMusic (this selection is heard in bonus stages, both underground and up in the clouds)
CloudMusic (applicable to the 8-bit N.E.S. SMB1 and F.D.S. SMB2J ROMs; this is the same tune as StarPowerMusic) (byte $10)
PipeIntroMusic (byte $20)
StarPowerMusic (heard when you collect Star Man) (byte $40)

~Ben

by on (#42896)
RAM:
7E0060 area for title screen
7E1200 = SMB3
7E1600 = SMB1/Lost Levels
7E1DE0 = SMB2

Example:
8FD8F0 = Lost Levels music table
0FD934 = Address table indexed music is read from
7E1602 = Address written to (7E1603 is the effective address for music)

Use SNES9X Debugger to find what does the writing, if you need to.

I just watched 002140 to find the routines. A good 8 minutes of effort, if you know what to look for, and the game cooperates.

Snes File<->LoRom<->HiRom Convertor:
http://www.gshi.org/vb/showthread.php?t=3184

As some added effort:
0EC391 = Loads data about the first stage
8EC4A6 = Stage 1 data loaded above (Default is 0x20, song index 01)
Divide by 0x20 for indexed song used. Affects other elements as well.