Super Mario Bros.

From NES Hacker Wiki
Jump to: navigation, search

Super Mario Bros. is a platform action game where you play Mario and Luigi the plumber brothers in their quest through Mushroom Kingdom to rescue Princess Toadstool from Bowser. On the way you'll face numerous baddies like goombas, koopa troopas, buzzy beetles, spineys, and more!

Easy Cheats

Icon Addr Val Cmp Description
Icon-Lives.png 906A 09 02 Start With 9 Lives (Both players)
Icon-Lives.png 906A 63 02 Start With 99 Lives (Both players)
Icon-Lives-Infinite.png 075A 08 - Infinite Lives (Both Players)
Icon-Powerup.png 0754 00 - Have Super Mushroom
Icon-Powerup.png 0756 02 - Have Fire Flower (Use with Have Super Mushroom)
Icon-Invincible.png 079F 10 - Invincible
Icon-Jump.png B424
B425
B426
B427
B428
0B
0B
0B
0B
0B
20
20
1E
28
28
High Jump (1/5)
High Jump (2/5)
High Jump (3/5)
High Jump (4/5)
High Jump (5/5)
Icon-Jump.png B432
B433
B434
B435
B436
F9
F9
F9
F9
F9
FC
FC
FC
FB
FB
Fast Jump (1/5)
Fast Jump (2/5)
Fast Jump (3/5)
Fast Jump (4/5)
Fast Jump (5/5)
Icon-Jump.png 070A 07 - Moon Gravity
Icon-Jump.png 0709 20 - Slow Jumps
Icon-Speed.png B440
B443
C0
3F
D8
28
Fast Running (1/2)
Fast Running (2/2)
Icon-Time.png 912E
912F
09
09
04
03
Start With 900 Time (1/2)
Start With 900 Time (2/2)
Icon-Time.png 0787 01 - Infinite Time
Icon-Warp.png 9087
9089
908A
07
5F
07
FF
A0
03
Start On World 8 (1/3)
Start On World 8 (2/3)
Start On World 8 (3/3)
Icon-Warp.png 07FC 01 - Start On 2nd Quest
Icon-Strange.png 070C 01 - Silly Walking
Icon-Challenge.png 906A 01 02 Start With 1 Life (Both players)
Icon-Challenge.png 075A 02 - Start With 1 Life, No 1-Ups (Both players)
Icon-Challenge.png 0754
0756
01
00
-
-
Always Regular Mario (1/2)
Always Regular Mario (2/2)
Icon-Challenge.png 07EE 00 - P1 Can't Get Coins
Icon-Challenge.png 07F4 00 - P2 Can't Get Coins
Icon-Challenge.png 079F 00 - Stars Don't Make You Invincible
How do I use these?

North America / Japan

Super Mario Bros..png

Memory Addresses

0024 - Fireball 1 Flag / Explosion Delay (00-01 / 80-86)
0025 - Fireball 2 Flag / Explosion Delay (00-01 / 80-86)

0030 - Point display 3 timeout
0031 - Point display 2 timeout
0032 - Point display 1 timeout

0057 - Player X Delta (Signed)

008D - Fireball 1 X Position (00-FF)
008E - Fireball 2 X Position (00-FF)

009F - Player Y Delta (Signed)

00A6 - Fireball 1 Status? (03, FD, FE)
00A7 - Fireball 2 Status? (03, FD, FE)

00CE - Player Y Position

00D5 - Fireball 1 Y Position (00-FF)
00D6 - Fireball 2 Y Position (00-FF)

0200-02FF - PPU Sprite Memory
0300-03FF - Sprite Values
03A0 - Unknown Value, Gets set to FF every time a map is loaded.

0500-05CF - Screen layout page 1
05D0-069F - Screen layout page 2

06A0 - Screen Memory Offset

06CE - Fireball Count (00-FF)

06D5 - Player Sprite Frame

06D7 - End of Level Fireworks (Firework position is determined by value)

06FC - Controller 1 Poll

0700 - Running Animation Speed (00-28)
0701 - Sliding Flag (00 - No, 01 - Yes)
0702 - Slide Length
0703 - Matches Running Animation Speed from 1C-28
0704 - Unused?
0705 - Cycles during walking animation
0706 - Minimum Jump Height (01)
0707 - Always 01?
0708 - Starting Jump Y Position (Affects max jump height)
0709 - Player Y Delta While Jumping
070A - Player Y Delta Change To
070B - Player Injured Flag
070C - Walking Frame Delay (04-07)
070D - Player Frame While Walking (00-02)
070E - ? When Not 00, Player can't move or jump 
070F - ? When not 0, score at flag is visible before touched.
0710 - How Mario enters the level (00-07)
	00 - Fall from ceiling - Water (2-2)
	01 - Fall from ceiling - Underground (1-2)
	02 - On ground (1-1) Also, pipes and vines
	03 - Middle of screen for castles (1-4)
	04 - Unused: Same as 01
	05 - Unused: Same as 01 (maybe 02?)
	06 - Unused: Same as 07
	07 - On ground, Mario walks right (Between 1-1 and 1-2)
0711 - Delay (Used by throwing fireballs)
0712 - Unused?
0713 - Used during flag contact
0714 - Ducking Flag (00 - Walking, 04 - Ducking)

0747 - Object pause (When above zero, nothing but Mario can move. Used upon dieing)
0748 - Display Coins
074A - Controller 1 Poll
074B - Controller 2 Poll

074E - Background Type (00 - Under Water, 01 - Above Ground, 02 - Underground, 03 - Castle)

0754 - Tall Mario Flag (00 - Tall, 01 - Short)
0756 - Powerup Flag (00 - Mario, 01 - Super Mario, 02 - Fire Mario)
0757 - Player Lives Screen Flag (00 - Playing, 01 - Player Lives Screen)
0758 - Vine Growth Flag? Set to 1, die, restart, vine grows!
0759 - Time Up Flag (00-01) Doesn't take effect until after death
075A - Current Player Lives
075C - Display Level
075E - Display Coins
075F - World
0760 - Level
0761 - Waiting Player Lives

0770 - Gameplay Mode (00 - Demo, 01 - Playing, 02 - End of Level)
0772 - Gameplay Status (00 - Run to next status, 01 - Loading, 02 - Loading done, 03 - Playing)
0773-0774 - Counters for Gameplay Status

0778 - Affects Horizontal Scrolling
0779 - Color Mode? (1E - Color, 1F - Black & White)

077F - Delay (Used by demo, invincibility, and player lives screen)

0781 - Delay (Used by walking and throwing fireballs)
0782 - Delay (Used by jumping)

0787 - Timer Delay (00-18)

079F - Star Invincibility Timeout (00 - Not Invincible, 00-07 - Slow Flash, 08-FF - Fast Flash) - You can even kill Bowser's fireballs!

07A0 - Player Lives Countdown (00-07) At zero it starts the demo.
07A2 - Demo Countdown (00-07) At zero it starts the demo.

07D8 - Display Score: 9xxxx0
07D9 - Display Score: x9xxx0
07DA - Display Score: xx9xx0
07DB - Display Score: xxx9x0
07DC - Display Score: xxxx90

07DE - P1 Score: 9xxxx0
07DF - P1 Score: x9xxx0
07E0 - P1 Score: xx9xx0
07E1 - P1 Score: xxx9x0
07E2 - P1 Score: xxxx90
07E4 - P2 Score: 9xxxx0
07E5 - P2 Score: x9xxx0
07E6 - P2 Score: xx9xx0
07E7 - P2 Score: xxx9x0
07E8 - P2 Score: xxxx90

07ED - P1 Coins: 9x
07EE - P1 Coins: x9
07F3 - P2 Coins: 9x
07F4 - P2 Coins: x9

07F8 - Time: 9xx
07F9 - Time: x9x
07FA - Time: xx9

07FC - Beat Game Flag (00 - 1st Run, 01 - 2nd Run)

B424 - Standing Max Jump Height (20) Signed
B425 - Sliding Max Jump Height (20) Signed
B426 - Walking Max Jump Height (1E) Signed
B427 - Staring to Run Max Jump Height (28) Signed
B428 - Running Max Jump Height (28) Signed

B42B - Standing Gravity (70) Signed
B42C - Sliding Gravity (70) Signed
B42D - Walking Gravity (60) Signed
B42E - Starting to Run Gravity (90) Signed
B42F - Running Gravity (90) Signed

B432 - Standing Jump Y Delta (FC) Signed
B433 - Sliding Jump Y Delta (FC) Signed
B434 - Walking Jump Y Delta (FC) Signed
B435 - Starting to Run Jump Y Delta (FB) Signed
B436 - Running Jump Y Delta (FB) Signed

B440 - Left Running Speed Max (D8) Signed
B441 - Left Walking Speed Max (E8) Signed
B443 - Right Running Speed Max (28) Signed
B444 - Right Walking Speed Max (18) Signed

B447 - Running Acceleration (E4) Unsigned

Code

Starting Lives

This is an excerpt from the game-start routine where lives are set.

9069:A9 02     LDA #$02         ; Load 2 into Accumulator.
906B:8D 5A 07  STA $075A        ; Set the active player's lives to 2.
906E:8D 61 07  STA $0761        ; Set the waiting player's lives to 2.

Unknown Loader

This is an excerpt of a block of code that is called every time the map refreshes. It doesn't appear to ever get read in the game, so it's a wonder why it's set to FF. The Game Genie code to start on a specific world hijacks this code to set the game world at the start of the game. The Genie code fails when you reach the second level of next world, but it's fine for world 8. This code can be re-purposed for setting any value every time a map loads.

9086:A9 FF     LDA #$FF         ; Load A with #FF.
9088:8D A0 03  STA $03A0        ; Store A into Unknown value

Text

Super Mario Bros. has a simple and clean character set with letters, numbers, and a few symbols.

00=0
01=1
02=2
03=3
04=4
05=5
06=6
07=7
08=8
09=9
0A=A
0B=B
0C=C
0D=D
0E=E
0F=F
10=G
11=H
12=I
13=J
14=K
15=L
16=M
17=N
18=O
19=P
1A=Q
1B=R
1C=S
1D=T
1E=U
1F=V
20=W
21=X
22=Y
23=Z
24= 
28=-
29=×
2B=!
AF=.
CF=©

Famicom Disk System

Super Mario Bros. (FDS).png

Europe

Super Mario Bros. (E).png