Note: See
adolif2's SNES-to-GBA level converter thread for more information relating to SMA3 hacking.
---
wxEVA: Yakov's SMA3 level name editor
---
---
Anyway, I decided to create a topic for Super Mario Advance 3 hacking, to avoid crowding the SMW2 Offsets thread with information irrelevant to hacking the SNES version.
(It should also prevent those topics of "Why can't I hack the GBA version?" that appear every so often.)
I'll be updating this post with anything I find.
By the way, I'm pretty sure I'm using "Super Mario Advance 3 - Yoshi's Island (U) [!].gba". Just in case there are multiple versions...
---
Newest version of SNES/GBA info document:
YI info for editor.rtf (updated 2010-4-7)
This document contains information towards making a SNES/GBA editor, but it may also be useful in general.
---
---
x1C1D54-x1EEE8B: Level data
x1C1D54: Level 38 (data looks entirely different from the other levels)
x1C1DA4: Level 39
x1C1F29: Level 0
x1C2265: Level 3A
x1C2320: Level 38 sprite data (blank)
x1C2324: Level 39 sprite data
x1C2354: Level 0 sprite data
x1C2434: Level 3A sprite data
x1C245C: Level 1
x1C264E: Level 3B
x1C2D70: Level 1 sprite data
x1C2E18: Level 3B sprite data
x1C2F00: Level 2
...
...
x1EED08: Level F5 sprite data
x1EED90: Level 36
x1EEDEF: Level 37
x1EEE5C: Level 36 sprite data
x1EEE70: Level 37 sprite data
The first 10 bytes of level data are the header. The sprite set now takes up 8 bits; as a result, some bits in the header have been shifted slightly from the SNES version.
If the SMW2 headers are:
BBBB BTTT TPPP PPII III2 2222 2333 333e eeee eSSS SSSS pppp OOOO Ox
tt tEEE EEEE 2233 4mmm mMMx xxxx
Then the SMA3 headers are:
BBBB BTTT TPPP PPII III2 2222 2333 333e eeee eSSS SSSS Sx
pp ppOO OOOx
tttE EEEE EE22 334m mmmM Mxxx
Notes:
As the first bit of Eggvine's "music" value affects layer 3, not music, I labeled it "4" instead of "m".
Similarly, I only labeled the Midring bits that actually affect the Middle Rings, the rest being labeled "x".
"2" and "3" each refer to two different values, but it should be self-explanatory which is which if you're familiar with the SNES version's level headers.
I also decoded the headers for levels DE-F5, for reference:
SMA3 Level Headers (RTF file) (updated 2010-4-10)
Sprites are 4 bytes each; the first 3 bytes are the same as in the SNES; the 4th byte is always 00.
Objects are stored in the same manner as the SNES version.
Sprite data ends with FF FF FF FF. (Level 38's sprite data is only the FF FF FF FF.)
Object data appears to end with just FF.
Screen exits are stored in the same manner as the SNES version; however, they are 7 bytes each instead of 5. The two additional bytes are the same as those of the level entrances (see below).
---
Objects/sprites that are different from the SNES version:
- The SNES version's S1D6 (Lock Horizontal Scroll) is now S1E0.
- The "Green Red Coins" (82, 83, 84, and X17) are normal red coins in the GBA version.
---
x1EF1A4-x1EF57B: Pointers to level data (4 bytes each)
x1EF57C-x1EF953: Pointers to sprite data (4 bytes each)
Going by the number of pointers, the highest-numbered level is F5.
---
About pointers (this applies to all pointers as far as I know):
Pointers are 4 bytes each, e.g. 29 1F 1C 08.
The first 3 bytes are the offset (bytes are in reverse order, so 29 1F 1C points to x1C1F29).
The 4th byte is always 08.
Note: The 4th byte is 09 if the offset is x1000000 or higher (the GBA ROM size limit is 32MiB, or x2000000). Considering that SMA3 is 0x400000 bytes, though, I find it unlikely that the ROM will need to be expanded to that size.
---
x1EEE8C-x1EEFFF: Level entrances (6 bytes each)
If the pointers are unmodified, the order is:
1-1 to 1-8, 1-Extra, 2-1 to 2-8, 2-Extra, 3-1 ... 6-8, 6-Extra, level 38, Welcome, 1-Secret, 2-Secret ... 6-Secret
1st 4 bytes are the same as SMW2: level #, X position, Y position, icon to unlock
5th byte: unknown, but relates to the camera
6th byte: Scrolling settings
Originally posted by Yoshis Fan00---> Free scrolling
01---> Locks horizontal scrolling
02---> Locks vertical scrolling
03---> Locks scrolling
04---> Locks downwards scrolling
05---> Locks sidewards and downwards scrolling
Values 04 and 05 set the camera position higher related to other values if the 6th byte determines the camera's Y-position.
SMA3 Level Entrances.txt
I've copied all of the level entrances into a .txt file for convenience.
---
x1EF08C-x1EF1A3: Pointers to level entrances (4 bytes each)
1-1 to 1-8, 1-Secret, 1-Extra, level 38, Welcome, 2-1 to 2-8, 2-Secret, 2-Extra, (8 bytes of 00s), 3-1 to 3-8, 3-Secret, 3-Extra, (8 bytes of 00s), ... 6-8, 6-Secret, 6-Extra
---
x164184-x1643BB: Midway entrances (4 bytes each)
As far as I can tell, these are stored in exactly the same way as SMW2.
Level #, X position, Y position, entrance type (I assume the 4th byte is still entrance type-- it's always 00 in the original.)
New midway entrances are in
DE, F3,
E0, E1, E2,
E3, E4, E5, E6,
E7, E8, E9, EA,
EB, EC,
EF, EF, F0, F2.
(Double EF is explained in-game if you've ever died in Secret 6's spike shaft. And I doubt anyone who has played Secret 6 has not died in Secret 6's spike shaft.)
---
x1643BC-x1644D3: Pointers to midway entrances (4 bytes each)
1-1 to 1-8, 1-Secret, 1-Extra, level 38, Welcome, 2-1 to 2-8, 2-Secret, 2-Extra, (8 bytes of 00s), 3-1 to 3-8, 3-Secret, 3-Extra, (8 bytes of 00s), ... 6-8, 6-Secret, 6-Extra
As the midway entrance pointers can point anywhere in the ROM, it is possible for every level to have a full 4 midway entrances...
---
Text:
x2F215C-x2F5E11: Messages - Includes goal minigames, Bandit minigames, Welcome message, automated messages, message blocks, Kamek messages, and ending messages (in this order)
x2F90AC-x2F9880: Level names
x16B0EC-x16B745: Pre-title-screen text
x1994C0-x1995DE: File select screen text
x16CEE8-x16D47D: Credits
Text can be edited using the same table files as SMW2.
---
x2F5E18-x2F6297: Pointers to message blocks (4 bytes per pointer, 16 bytes per map icon)
1-1 to 1-8, 1-Secret, 1-Extra, 1-Bonus, Welcome, 2-1 to 2-8, 2-Secret, 2-Extra, 2-Bonus, (16 bytes of 00s), 3-1 ... 6-8, 6-Secret, 6-Extra
Some of the Secret and Extra levels' pointers point to the various boss battle messages; I'm not sure if these are the actual pointers used in the boss battles or not.
---
x2F629C-x2F62CB: Pointers to Bandit minigame messages (with some duplicates)
I wonder if these pointers are for the minigame huts, the LLBAR minigames, or both...
---
---
Level list:
0-DD: These appear to be the same as SMW2.
DE: 1-Secret Entrance
DF: 1-Secret 2nd Area
E0: 2-Secret Entrance
E1: 2-Secret 2nd Area
E2: 2-Secret 3rd Area
E3: 3-Secret Entrance
E4: 3-Secret 2nd Area
E5: 3-Secret 3rd Area
E6: 3-Secret 4th Area
E7: 4-Secret Entrance
E8: 4-Secret 2nd Area
E9: 4-Secret 3rd Area
EA: 4-Secret 4th Area
EB: 5-Secret Jungle Areas
EC: 5-Secret Castle Areas
ED: 5-Secret Snowy Areas
EE: 6-Secret Entrance
EF: 6-Secret Castle Area
F0: 6-Secret Main Cave Area
F1: 6-Secret Super Star Cave
F2: 6-Secret Dark Forest with Welcome music
F3: 1-Secret 3rd Area
F4: 2-Secret Outside Area with goal
F5: 6-Secret Final Area
(See
this post for more about the Bandit minigames.)
F6: Minigame: Throwing Balloons (1up)
F7: Minigame: Throwing Balloons (2up)
F8: Minigame: Throwing Balloons (3up)
F9: Minigame: (freeze)
FA: Minigame: Gather Coins
FB: Minigame: Popping Balloons
FC: Minigame: Popping Balloons
FD: Minigame: (freeze)
FE: Minigame: (freeze)
FF: Minigame: Seed-Spitting
I have no idea how 1-8's new room fits into this. (It's probably part of an existing sewer-tileset level.)
---
---
So this is what I've found so far.
It appears the GBA version is almost a direct port of the original.
(By the way, there's already something I like about hacking the GBA version-- the pointers are much simpler!)
–=–=–=–=–=–=–
Alyssa's Unlikely Trap -
Zeldara's Glitch City
Follow Us On