Name: Super Mario Bros. 3 Console: Nintendo Version 2.1 05/July/2025 Written by: samurai goroh samuraigoroh@gmail.com ******************************************************************************* ___ _ _ ___ ___ ___ _____ __ ___ _ ___ | __) | | | | | . | | __) | _ | | | / \ | _ | | | | | |__ | | |_| | | __| | _) | _| | | | | | ^^ | | _| | | | | | (___| \___/ |_| |___) |_\_\ |_|_|_| |_/\_| |_\_\ |_| |___| ___ ___ ___ ___ ____ | . ) | _ | | | | __) (___ | | < | _| | | | |__ | _ (__ | |___) |_\_\ |___| (___| |_| (____| ******************************************************************************* 1.0 Flags 2.0 Hex Numbers 3.0 Bitwise Values 4.0 Lists 4.1 Power Up 4.2 Icon ------------------------------------------------------------------------------- SORTED CODES ------------------------------------------------------------------------------- 000A XX Temp. used to adjust main character sprite vertical position 0012 XX Screen - X coord (high byte) 2.0 0013 XX Screen - Y coord (high byte) 2.0 0014 XX Flag - Returns to map (beats level); will NOT break locks or build bridges 0015 XX Timer - Card Timer 2.0 0016 XX Flag - Black & White mode 1.0 0017 XX Controller 1 input 01 Right 02 Left 04 Down 08 Up 10 Start 20 Select 40 B 80 A 0075 XX Mario - Y coord (high byte) Also horizontal position in levels measured in units of 8 blocks wide. 0076 XX Enemy 5 - coord X (high byte) 0077 XX Enemy 4 - coord X (high byte) 0078 XX Enemy 3 - coord X (high byte) 0079 XX Enemy 2 - coord X (high byte) 007A XX Enemy 1 - coord X (high byte) 0079 XX On map screen horizontal position. Multiples of 20, unless in boat. If multipaged, E0 shifts screen right, then 60, then D0, then 50. Shifting back to the left occurs at 20, then A0, then 20, then A0. 0083 XX Koopalings Hp? 0087 XX Mario - X coord (high byte) 0088 XX Enemy 5 - X coord (high byte) 0089 XX Enemy 4 - X coord (high byte) 008A XX Enemy 3 - X coord (high byte) 008B XX Enemy 2 - X coord (high byte) 008C XX Enemy 1 - X coord (high byte) 0090 XX Mario - X coord (low byte) 0091 XX Enemy 5 - coord X 0092 XX Enemy 4 - coord X 0093 XX Enemy 3 - coord X 0094 XX Enemy 2 - coord X 0095 XX Enemy 1 - coord X 009A XX Platform move direction index E,F 0 1,2 D. \ | / .3 '. \ | / .' '.\|/.' C ------+------ 4 ./|\. .'/ | \'. B.' / | \ '.5 9,A 8 6,7 00A2 XX Mario - Y coord (low byte) 00A3 XX Enemy 5 - Y coord (low byte) 00A4 XX Enemy 4 - Y coord (low byte) 00A5 XX Enemy 3 - Y coord (low byte) 00A6 XX Enemy 2 - Y coord (low byte) 00A7 XX Enemy 1 - Y coord (low byte) 00AB XX Mario - Relative X coord 00B0 XX Enemy 5 - Relative X coord? 00B1 XX Enemy 4 - Relative X coord? 00B2 XX Enemy 3 - Relative X coord? 00B3 XX Enemy 2 - Relative X coord? 00B4 XX Enemy 1 - Relative X coord? 00B4 XX Mario - vertical position with 11 added. Set to C0 to kill Mario in an odd way. Sprite disappears, death music plays and returns you to world map. 00BD XX Mario - X speed (signed) 00BE XX Enemy 5 - X speed (signed) 00BF XX Enemy 4 - X speed (signed) 00C0 XX Enemy 3 - X speed (signed) 00C1 XX Enemy 2 - X speed (signed) 00C2 XX Enemy 1 - X speed (signed) 00C4 XX Flag - End of level 00CF XX Mario - Y speed (signed) 00D0 XX Enemy 5 - Y speed (signed) 00D1 XX Enemy 4 - Y speed (signed) 00D2 XX Enemy 3 - Y speed (signed) 00D3 XX Enemy 2 - Y speed (signed) 00D4 XX Enemy 1 - Y speed (signed) 00D8 XX Flag - In the air 00E5 XX Type of block Mario is standing on 00EC XX Mario - Sprite frame number? 00ED XX Mario's Power Up 4.1 00EE XX Mario - Sprite frame offset? 00EF XX Mario - Facing direction ($40=Right, $00=Left) 00F5 XX Controller status - new buttons pressed this frame 00F7 XX Controller status - buttons held down 00FC XX Screen - Y coord 00FD XX Screen - X coord 00FE XX cont from: 29,2A=carry:SFRGTH 2B=hold:SFRGTH 2C=climb:SFRTH 2D=kick:SFRGTH 2E,2f=holding:L 30=turn:L 31=slide:L 32=face-camera:L 33=slide:L 34,35=(air-shoot)/swim:(FH)SRFTH 36=(air-shoot)/swim(fly):(FH)SRFTH(RT) 37=fly=RT 38=fly/high-jump(SFRTH) 39,3A,3B=sprint/slide-jump:SFRTH 3E=stand/walk:L 3F=walk/run:L 40=jump/fall:L 41=turn:L 42=kick:L 46,47,48=swim:L 4A=climb:L 4B=die:L 4C,4D=sprint:L 4E=high-jump:L 4F=jump:SFH 50=jump:RT 0100-01FF CPU Stack 0160 80 Enable debug mode? 0200-02FF Sprite Data (DMA transfer) 0376 XX Pause flag 03DD XX P meter (Bits 0-5 -> Arrows, bit 6 is the P; 0x7F = Full) 03E8 XX Item selector - X coord 03E9 XX Item selector - Y coord 03F2 XX Overworld - Starman flag 03F3 XX Overworld - Mario's Icon 4.2 0400 to ? Card Matching game cards? 0435 XX Card Matching game - Misses Remaining 04E1 XX Currently playing Sound 1? 04E2 XX Currently playing Sound 2? 04E3 XX Currently playing Sound 3? 04E4 XX Currently playing Fanfare 04E5 XX Currently playing Music 0F Find Peach AND credits 0B Warp Whislte And Zone B0 Bowser Boss Fight (goes to 0x00 after bowser falls) 04E6 XX Currently playing Sound 4? 04E7 XX Pause Sound toggle? 04F1 XX Sound play byte 04F2 XX Sound play byte 04F3 XX Sound play byte 04F4 XX Fanfare play byte 04F5 XX Music play byte 04F6 XX Sound play byte 04F7 XX Sound pause byte (01=pauses, 02=unpauses) 0510 to 0517 Various countdown timers (Routine at A1DC) 0510 XX Countdown timer for player going in/out of pipe. Starts with 0F 0511 XX Countdown timer for raccoon tail waving (repeatedly pressing jump button) 0515 XX Countdown timer for P-meter? 0516 XX Countdown timer for multi-coin blocks 0518 XX Countdown timer for enemy 5? 0519 XX Countdown timer for enemy 4? 051A XX Countdown timer for enemy 3? 051B XX Countdown timer for enemy 2? (e.g. Piranha plants use these to toggle being up/down) 051C XX Countdown timer for enemy 1? (e.g. Piranha plants use these to toggle being up/down) 051D XX Countdown timer for powerups rising animation. 0525 XX Countdown timer for bounce block sprite (like "?" when hit). 0545 XX Level start entrance effect. 00 normal 01 slide 02 pipe upwaard 03 pipe downward 04 pipe from right 05 pipe from left 06 jump on anchor of ship 07 scroll right and down 0552 XX Timer - Invulnerable Frames after getting hit 0553 XX Timer - Star Power invincibility frames 0554 XX Timer - Change suit poof effect 0559 FF Auto-control Character 055A XX Auto-control Mode 00 normal 01 run under ship 02 jump on ship 03 grab anchor 04 screen scroll right and down for ship 06 screen scrolls fast right 055C XX Mario's speed (fractional) 055D XX Timer - 8 Frame (Resets at the beginning of a level) 0567 XX Timer - P-Block 056E XX Timer - Flight 056F XX Flag - Ducking; Set to $FF for squat-float effect 0570 XX Number of frames ducking on white blocks 0571 XX makes change when using pipes? 0573 XX Direction moving (0=stationary, 01=moving left, 02=moving right) 0575 XX Flag - Swimming 0577 XX Flag - Kuribo's Shoe 0578 XX Mario's form (low byte=power, high byte=special power) Modes: 01 Small 02 Big 03 Fire 04 Raccoon 05 Frog 06 Tanooki 07 Hammer Flags: 10 Enable Statue 20 ? 40 Enable swimming (causes splash on land) 80 Enable Kuribos boot 057A XX Enable statue mario characteristic (gray & invincible) 057B XX Indicates flight? Has the value 1 when P-meter is full AND player is jumping. Used at least for locking 0515 and thus the P-meter while in flight. 057C XX PrizeBoxCode 0584 XX Underwater / not underwater selection 0585 XX (??) Set to $FF to slide "right" (not left) through solid objects 0588 XX Backstage timer (doing down white platform) 05EE XX Timer - X00 05EF XX Timer - 0X0 05F0 XX Timer - 00X 05F1 XX Clock timer 05F3 XX Item Menu flag? 05F4 XX Stomp counter 0669 XX Toad's House item 066F XX Card selection for the flashing card that you jump to get 070A XX Current Object Set 01 Plains 02 Dungeon 03 Hilly 04 Sky 05 Piranha Plant 06 Water 08 Pipe 09 Desert 0A Ship 0B Giant 0C Ice 0D Cloudy 0E Underground 0711 XX Timer - Countdown to Spawning on Overworld Map 0715 XXXXXX Score x10 (up to 0xF423F or 999999) 071A XX Current tileset animation frame 0726 XX Player's turn (0=Mario, 1=Luigi) 0727 XX World (0 based) 072B XX Number of Players in Title (0=1 player, 1=2 players) 0736 XX P1 - Lives 0737 XX P2 - Lives 073A XX World (0 based) duplicate? 0746 XX P1 Icon in overworld (When the level is loaded this value gets transferred to $00ED) 4.2 0747 XX P2 Icon in overworld (When the level is loaded this value gets transferred to $00ED) 4.2 074D XX Mario - X coord subpixel 075F XX Mario - Y coord subpixel 0781 * RNG (72 bits LFSR) 6000 to 794F Active Block Buffer/Tile Map (432 bytes per room, thus 15 in total) 7970 XX Flag - Anchored Ship (1=True) 7971 XX Flag - White Mushroom House Spawned 7976 XX Map screen Y position for the current level Mario is in. 7977 XX Map screen Y position for the current level Luigi is in. 7978 XX Map screen X position (high byte) for the current level Mario is in. 7979 XX Map screen X position (high byte) for the current level Luigi is in. 797A XX Map screen X position (low byte) for the current level Mario is in. 797B XX Map screen X position (low byte) for the current level Luigi is in. 797E XX Map screen Y position to return to when Mario dies. 797F XX Map screen Y position to return to when Luigi dies. 7980 XX Map screen X position (high byte) to return to when Mario dies. 7981 XX Map screen X position (high byte) to return to when Luigi dies. 7982 XX Map screen X position (low byte) to return to when Mario dies. 7983 XX Map screen X position (low byte) to return to when Luigi dies. 7B40 XX Enemy data for the current level (6 Bytes?) 7b50 XXXX Stage ID 4.3 7CFA XX Boss HP 7D00 to 7D3F World Completition flags - Mario's level completed 7D40 to 7D7F World Completition flags - Luigi's level completed 7D80-7D9B P1 - Inventory 4.2 7D9C XX P1 - Cards, slot 1 (0=Empty, 1=Mushroom, 2=Flower, 3=Star) 7D9D XX P1 - Cards, slot 2 7D9E XX P1 - Cards, slot 3 7D9F XXXXXX P1 - Score x10 7DA2 XX P1 - Coins 7DA3-7DBE P2 - Inventory 4.2 7DBF XX P2 - Cards, slot 1 (0=Empty, 1=Mushroom, 2=Flower, 3=Star) 7DC0 XX P2 - Cards, slot 2 7DC1 XX P2 - Cards, slot 3 7DC2 XXXXXX P2 - Score x10 7DC5 XX P2 - Coins 7DFC XXXX Screen ID? 0000=Title 0F16=OverworldMap-ToadChest 0F27=PeachLetter-ToadChestClaim 1630=SlidingPuzzleGame 1727=ThroneRoomWorld6 2736=InStage 2730=BowsersCastleAndCredits 2A30=ThroneRoom 7E83 to 7E93 Card Matching Game cards? 7F15 XX Map events - World 1? 01 HelpBubbleOnCastle 02 FlyingShip 03 HammerBro 07 Plant 08 CardMatchGame 0A BlackNwhiteShroom 0B CoinShip 0E Tank 0C WhiteFlyingShip 0D ShipCannon 7F16 XX Map events - World 2? 7F17 XX Map events - World 3? 7F18 XX Map events - World 4? 7F19 XX Map events - World 5? 7F1A XX Map events - World 6? 7F1B XX Map events - World 7? 7F1C XX Map events - World 8? A648 C8 Initial velocity for player jump ACA2 05 Mario falling gravity, added to Y vel each frame. ACA6 E0 Default upward velocity for jumps. Modified by a table value subtracted from this ACB3 01 Mario jump gravity, added to Y vel each frame while jump in progress. BFCC Routine that clamps 00CF (Mario Y velocity) to the maximum ($45) when falling. -------------------------------------------------------------------------------- Description -------------------------------------------------------------------------------- 1.0 Flags +--+---+ |00|Off| |01|On | +--+---+ 2.0 Hex Numbers +----+----+-----+ +--------+----+-----+ +----------------+----+-----+ | Bin| Hex| Dec | | Bin | Hex| Dec | | Bin | Hex| Dec | +----+----+-----+ +--------+----+-----+ +----------------+----+-----+ |0000| 0| 0| |00000000| 00| 0| |0000000000000000|0000| 0| |0001| 1| 1| |00010000| 10| 16| |0001000000000000|1000| 4096| |0010| 2| 2| |00100000| 20| 32| |0010000000000000|2000| 8192| |0011| 3| 3| |00110000| 30| 48| |0011000000000000|3000|12288| |0100| 4| 4| |01000000| 40| 64| |0100000000000000|4000|16384| |0101| 5| 5| |01010000| 50| 80| |0101000000000000|5000|20480| |0110| 6| 6| |01100000| 60| 96| |0110000000000000|6000|24576| |0111| 7| 7| |01110000| 70| 112| |0111000000000000|7000|28672| |1000| 8| 8| |10000000| 80| 128| |1000000000000000|8000|32768| |1001| 9| 9| |10010000| 90| 144| |1001000000000000|9000|36864| |1010| A| 10| |10100000| A0| 160| |1010000000000000|A000|40960| |1011| B| 11| |10110000| B0| 176| |1011000000000000|B000|45056| |1100| C| 12| |11000000| C0| 192| |1100000000000000|C000|49152| |1101| D| 13| |11010000| D0| 208| |1101000000000000|D000|53248| |1110| E| 14| |11100000| E0| 224| |1110000000000000|E000|57344| |1111| F| 15| |11110000| F0| 240| |1111000000000000|F000|61440| +----+----+-----+ |11111111| FF| 255| |1111111111111111|FFFF|65535| +--------+----+-----+ +----------------+----+-----+ 3.0 Bitwise Values 4.0 Lists 4.1 Power Up +--+----------------+ |00| Normal | |01| Super | |02| Fiery | |03| Leaf | |04| Frog Suit | |05| Tanooki Suit | |06| Hammer Suit | +--+----------------+ 4.2 Icon +--+----------------+ |00| Normal | |01| Super | |02| Fiery | |03| Leaf | |04| Frog Suit | |05| Tanooki Suit | |06| Hammer Suit | |07| Cloud | |08| P-Wing | +--+----------------+ |09| Star | |0A| Anchor | |0B| Hammer | |0C| Whistle | |0D| Music Box | +--+----------------+ 4.3 Stage ID? 3772 1-1 5372 1-2 4273 1-3 2736 1-4 475A 1-Fortress 2C70 1-5 4D44 1-6 1EBC 1-Airship 2E6B 2-1 3326 2-2 2E3F 2-Fortress 426C 2-3 376C 2-Quicksand or 7-3 3082 2-4 3572 2-5 3270 2-Pyramid 29BC 2-Airship 3A67 3-1 2F6F 3-2 2F6C 3-3 363F 3-Fortress 1 3672 3-4 3177 3-5 446F 3-6 3329 3-7 3D31 3-Fortress 2 5C4C 3-Fortress 2 543E 3-8 3355 3-9 1FBC 3-Airship 427C 4-1 1B7F 4-2 3368 4-3 3230 4-Fortress 1 4465 4-4 33BD 4-5 307C 4-6 3272 4-6 623F 4-Fortress 2 1BB1 4-Airship 3433 5-1 606E 5-2 1C71 5-3 328A 5-Fortress 1 285A 5-Tower 2F91 5-4 30A7 5-5 209F 5-6 36A4 5-7 1E9E 5-Fortress 2 1EFF 5-8 1C28 5-9 27C8 5-Airship 4A2A 6-1 2C24 6-2 6A27 6-3 1D9E 6-Fortress 1 1DFF 6-Fortress 1 2E44 6-4 3B40 6-5 2329 6-6 4860 6-Fortress 2 2A39 6-8 2865 6-9 3C40 6-10 3E31 6-Fortress 3 2EAE 6-Airship 0E56 7-1 2E66 7-2 376C 7-3 3FBB 7-4 2755 7-5 33A4 7-Piranah Plant 1 33A4 Fortress 1 33A4 AND 04A0 7-6 4CA0 7-7 29A3 7-8 2972 7-9 25A6 7-Fortress 2 3C4B 7-Fortress 2 346F 7-Piranah Plant 2 15AA 7-Airship 23CE 8-Tank 1 1CC2 8-Battleship 1CFF 8-Hand Trap 239E 8-Hand Trap 14AD 8-Airship 37BC 8-1 50A6 8-2 4C8F 8-Fortress 3B08 8-Fortress 1CC4 8-Tank 2 555A 8-Bowser's Castle 6C75 8-Bowser's Castle