Claim set · data/claims/super-mario-bros-2.yaml

Super Mario Bros. 2 (USA) (the NES ROM)

Game: Super Mario Bros. 2.

Each playable character uses a 23-byte physics block defining six lift delays, seven jump speeds, float length, three gravities, and six horizontal speed caps (increased by half when holding the run button); all four characters share a base horizontal speed of 24 subpixels per frame empty-handed, whereas carrying heavy objects splits them into 29 for Toad, 24 for Mario, 22 for Luigi, and 21 for Princess, only Princess carries a nonzero float duration of 60 frames, and Luigi has the lowest normal gravity at 2 instead of 7. super-mario-bros-2/character-physics-tables

Value
{
 "mario": {
  "walkSpeed": 24,
  "carrySpeed": 24,
  "gravity": 7,
  "floatFrames": 0
 },
 "princess": {
  "walkSpeed": 24,
  "carrySpeed": 21,
  "gravity": 7,
  "floatFrames": 60
 },
 "toad": {
  "walkSpeed": 24,
  "carrySpeed": 29,
  "gravity": 7,
  "floatFrames": 0
 },
 "luigi": {
  "walkSpeed": 24,
  "carrySpeed": 22,
  "gravity": 2,
  "floatFrames": 0
 }
}
CodeSuper Mario Bros. 2 (USA) · 0x143D9-0x14438 — bank 0A $83C9-$8428: character offset table ($83C9-$83CC) and four 23-byte physics blocks ($83CD-$8428)Super Mario Bros. 2 (USA) · 0x14461-0x14473 — bank 0A $8451-$8463: copies the selected 23-byte physics block into RAM $0546-$055CSuper Mario Bros. 2 (USA) · 0xA97-0xADD — bank 00 $8A87-$8ACD: lift delay lookup across $0546-$054B ($0544+Y), special overrides $8AC2-$8AC5, and animation frames $8AC6-$8ACDSuper Mario Bros. 2 (USA) · 0xCA9-0xD39 — bank 00 $8C99-$8D29: jump velocity selection ($054C-$0552), float timer ($04C9 = $0553), gravity ($0554-$0556), and float Y-velocity cycle ($FC, $00, $04, $00)Super Mario Bros. 2 (USA) · 0xDD0-0xE14 — bank 00 $8DC0-$8E04: horizontal speed caps ($0557-$055C) and 1.5x run-button multiplier ($F7 bit 6)Checked by research-agent, 2026-11-26 — Read the cited banked ROM bytes and checked the instructions and tables against the stated behavior.

In bank 0A $83C9-$8428, the four 23-byte blocks are stored in the order Mario ($00), Toad ($17), Luigi ($2E), and Princess ($45), with heavy-object carry speeds of 24, 29, 22, and 21 subpixels per frame. The offset lookup table at $83C9-$83CC selects them in character-ID order (Mario, Princess, Toad, Luigi) using offsets $00, $45, $17, $2E.

Wart starts with 6 HP and ignores projectile or vegetable collisions unless his mouth-open timer is nonzero, storing 96 flash frames on an accepted vegetable hit; thrown carried objects such as the Key and direct thrown POW-block collisions branch straight to the shared damage handler, bypassing the mouth check and storing 33 flash frames (counted down by 1 per frame before object updates). super-mario-bros-2/wart-damage-classes

Value: wart hp 6 · veggie flash frames 96 · bypass flash stored 33

CodeSuper Mario Bros. 2 (USA) · 0x71DD-0x71EA — bank 03 $B1CD-$B1DA: EnemyInit_Wart stores 6 into Wart HP ($0465,X)Super Mario Bros. 2 (USA) · 0x71EF-0x71FF — bank 03 $B1DF-$B1EF: Wart behavior triggers death state ($86,X = $B1,X = $80) when $0465,X reaches 0Super Mario Bros. 2 (USA) · 0x7709-0x772C — bank 03 $B6F9-$B71C: collision-class entry check and jump table dispatching $B761, $B95C, $B8D1, $B956, and $B71DSuper Mario Bros. 2 (USA) · 0x78E1-0x7912 — bank 03 $B8D1-$B902: Class-2 carried/thrown object handler (including Key $3D) jumping to $B9EASuper Mario Bros. 2 (USA) · 0x7966-0x796B — bank 03 $B956-$B95B: EnemyCollisionBehavior_POW handles direct thrown POW-block hitbox collisions by jumping to $B9EASuper Mario Bros. 2 (USA) · 0x796C-0x7A09 — bank 03 $B95C-$B9F9: Class-1 projectile path tests Wart ($2C) mouth timer $85,X ($0086+slot), calls $BA5D, and overwrites $045B,X ($045C+slot) with #$60 (96 frames); $B9EA bypass calls $BA5D directlySuper Mario Bros. 2 (USA) · 0x7A6D-0x7AA4 — bank 03 $BA5D-$BA94: shared damage routine skips while $0452|$045B != 0, decrements $0464,X ($0465+slot), and stores #$21 (33 frames) in $045B,XSuper Mario Bros. 2 (USA) · 0x41A6-0x4204 — bank 02 $8196-$81F4: per-slot descending 8..0 loop decrements ObjectFlashTimer ($045C,X) at $81D2-$81D9 before object behavior at $81ED (HandleEnemyState)Checked by research-agent, 2026-11-26 — Read the cited banked ROM bytes and checked the instructions and tables against the stated behavior.

In the collision routine X = slot + 1, so $85,X, $8F,X, $045B,X, and $0464,X address the slot-aligned timer, type, flash, and HP bytes. Class-3 ($B956-$B95B) handles direct thrown POW-block hitbox collisions rather than screen-clearing POW quakes. Per-frame flash countdown runs inside the descending slot-8..0 loop at bank 02 $8196-$81F4 ($81D2-$81D9) before object behavior ($81ED, HandleEnemyState) runs.

When a thrown potion lands, it transforms into a Subspace door and checks the area-orientation flag; in vertical areas, the game immediately plays a sound effect and destroys the door before it can be entered. super-mario-bros-2/subspace-potion-vertical-block

CodeSuper Mario Bros. 2 (USA) · 0x5141-0x51D4 — bank 02 $9131-$91C4: potion landing ($9131 BEQ target), door transformation ($90,X = $3C), and vertical-area rejection ($EC = 0 -> $0601 = $40, JSR $89A9)Super Mario Bros. 2 (USA) · 0x49B9-0x49C8 — bank 02 $89A9-$89B8: EnemyDestroy clears active enemy slot state ($51,X = 0)Checked by research-agent, 2026-11-26 — Read the cited banked ROM bytes and checked the instructions and tables against the stated behavior.

$90,X = $3C identifies the Subspace Door. When $00EC (IsHorizontalLevel) = 0, the vertical-area path calls EnemyDestroy at $89A9 with $0601 = $40.

Pulling Subspace grass spawns coins only during the player's first two coin-yielding Subspace visits in a stage, and each stage tracks two separate Subspace Mushroom flags so at most two Mushrooms can be collected per stage. super-mario-bros-2/subspace-coins-and-mushrooms

Value: max coin visits 2 · max mushrooms per stage 2

CodeSuper Mario Bros. 2 (USA) · 0x11DF-0x11FA — bank 00 $91CF-$91EA: requires SubspaceState ($0628) = 2 and SubspaceVisits ($0621) < 2 to increment SubspaceCoins ($0622) and spawn a coinSuper Mario Bros. 2 (USA) · 0x1E62A-0x1E636 — bank 0F $E61A-$E626: increments SubspaceVisits ($0621) on exiting Subspace when SubspaceCoins ($0622) != 0Super Mario Bros. 2 (USA) · 0xD489-0xD4BC — bank 06 $9479-$94AC: DoSubspaceTileRemap maps Mushroom tiles $41/$42 to $04FB[0..1] and creates the Mushroom only when zeroSuper Mario Bros. 2 (USA) · 0x50A6-0x50BC — bank 02 $9096-$90AC: Mushroom ($3F) pickup increments $04FB,X and PlayerMaxHealth ($04C3) and restores full healthSuper Mario Bros. 2 (USA) · 0x1075-0x111B — bank 00 $9065-$910B: grass-pull item spawn ($9074) maps $09 = 4 through $9065[4] = $36 to spawn a coinSuper Mario Bros. 2 (USA) · 0xD907-0xD966 — bank 06 $98F7-$9956: CreateSubspaceMushroomObject spawns Mushroom ($3F) and stores slot flag index Y (0 or 1) into $79Super Mario Bros. 2 (USA) · 0x1E6AF-0x1E6CA — bank 0F $E69F-$E6BA: per-stage reset clears SubspaceVisits ($0621), Mushroom flags ($04FB/$04FC), and $0620Checked by research-agent, 2026-11-26 — Read the cited banked ROM bytes and checked the instructions and tables against the stated behavior.

Entering a Warp Vase reads the current zero-based world index and loads the destination world from a seven-byte lookup table [3, 1, 4, 5, 6, 5, 6], sending World 1 to World 4, World 3 to World 5, World 4 to World 6, and World 5 to World 7. super-mario-bros-2/warp-vase-destinations

About: Super Mario Bros. 2 Stage select

Value: 3, 1, 4, 5, 6, 5, 6

CodeSuper Mario Bros. 2 (USA) · 0x1E76D-0x1E7AF — bank 0F $E75D-E79F: Warp Vase lookup and destination loadSuper Mario Bros. 2 (USA) · 0x1F66A-0x1F670 — bank 0F $F65A-F660: seven-byte world destination tableChecked by research-agent, 2026-11-25 — Read the cited banked ROM bytes and checked the instructions and tables against the stated behavior.

The zero-based world index $0635 maps 0->3 (World 1->4), 1->1 (World 2->2, unused), 2->4 (World 3->5), 3->5 (World 4->6), 4->6 (World 5->7), 5->5, and 6->6 via the area table at $E012.

Boss hit-point counters initialize to 2 (3 hits to defeat because knockout requires a negative decrement) for Birdo and Tryclyde, 4 (5 hits) for Clawgrip, 2 in World 1 or 4 in later worlds for Mouser, and 4 for Fryguy—which instead splits into four one-hit small flames when its counter reaches 1 (3 hits to split, 7 total hits to defeat); Birdo selects one of three variants from its spawn position—egg-only, fireball-only, or mixed with a 12.5%, 18.75%, or 25% fireball rate at 3, 2, or 1 remaining HP—and an existing Crystal Ball detaches once no active Birdo remains. super-mario-bros-2/birdo-variants-and-boss-hp

Value: birdo hits 3 · tryclyde hits 3 · mouser hits 3, 5 · fryguy split hits 3 · fryguy small flame hits 1 · fryguy total hits 7 · clawgrip hits 5 · mixed fireball rates 0.125, 0.1875, 0.25

CodeSuper Mario Bros. 2 (USA) · 0x4F5F-0x4F84 — bank 02 $8F4F-$8F74: Birdo sprite attributes [$43, $41, $42], spawn-X subtype selection ($A0->0, $B0->1, other->2), and $0465,X = 2Super Mario Bros. 2 (USA) · 0x4FAD-0x4FB2 — bank 02 $8F9D-$8FA2: Birdo spit period masks [$7F, $3F, $3F] and subtype-1 fireball RNG thresholds [8, 6, 4]Super Mario Bros. 2 (USA) · 0x4FB3-0x502D — bank 02 $8FA3-$901D: EnemyBehavior_Birdo selects egg ($1E) vs fireball ($20) by subtype and ($05AE & $1F) < threshold[HP]Super Mario Bros. 2 (USA) · 0x51D7-0x5221 — bank 02 $91C7-$9211: Crystal Ball scans object slots 0..5 for active Birdo ($1C) and detaches ($79,X = 1) when none remainSuper Mario Bros. 2 (USA) · 0x611A-0x612F — bank 03 $A10A-$A11F: EnemyInit_Clawgrip sets $0465,X = 4Super Mario Bros. 2 (USA) · 0x657B-0x658A — bank 03 $A56B-$A57A: EnemyInit_Mouser sets $0465,X = 2 if $0635 = 0 else 4Super Mario Bros. 2 (USA) · 0x6734-0x6743 — bank 03 $A724-$A733: EnemyInit_Tryclyde sets $0465,X = 2Super Mario Bros. 2 (USA) · 0x6C7A-0x6C86 — bank 03 $AC6A-$AC76: EnemyInit_Fryguy sets $0465,X = 4Super Mario Bros. 2 (USA) · 0x7A6D-0x7AA4 — bank 03 $BA5D-$BA94: DEC $0464,X; BMI triggers knockout on negative HP for standard bosses (HP + 1 hits)Super Mario Bros. 2 (USA) · 0x6C9B-0x6CF6 — bank 03 $AC8B-$ACE6: EnemyBehavior_Fryguy checks LDY $0465,X; DEY; BNE $ACE7 and at HP = 1 (3 hits) sets $04F8 = 3, destroys Fryguy via $89A9, and spawns 4 small flames ($2B)Super Mario Bros. 2 (USA) · 0x6D58-0x6D68 — bank 03 $AD48-$AD58: EnemyBehavior_FryguySplit puffs into smoke ($91B0) on a single collision hit ($5B,X & $10)Super Mario Bros. 2 (USA) · 0x4852-0x4867 — bank 02 $8842-$8857: HandleEnemyState_PuffOfSmoke_CheckDestroy decrements $04F8 for small flames ($2B) and ends the fight once all 4 are defeatedChecked by research-agent, 2026-11-26 — Read the cited banked ROM bytes and checked the instructions and tables against the stated behavior.

Whenever Super Mario Bros. 2 runs its area start-up routine, it sets the first of its random generator's two seed bytes to the same fixed value and doesn't write the second. super-mario-bros-2/area-start-reseeds-first-byte

About: Super Mario Bros. 2 Random number generator

Value: 182

CodeSuper Mario Bros. 2 (USA) · 0x402E-0x417B — bank 02 $801E-$816B: area start-up; $807B-$807F stores $B6 to $05AC on every path through, and nothing writes $05ADSuper Mario Bros. 2 (USA) · 0x421E-0x424C — bank 02 $820E-$823C: the generator, whose ASL and INC are the only absolute writes of $05ADChecked by claude, 2026-11-30 — Disassembled the start-up routine and the generator from the USA ROM, and searched the program ROM for stores to both seed bytes.Revised after a check by a second AI model, 2026-11-30: Corrected the address of the store in the evidence note.

The first byte is $05AC and the fixed value $B6. The level loader writes another value to it earlier in a level's start.

Cited by: Super Mario Bros. 2

Each step of Super Mario Bros. 2's random generator multiplies its first byte by five and adds one, shifts its second byte left, adding one when the bit shifted out equals the new bit 5, and outputs the exclusive OR of the two. Each call takes two steps and stores both outputs. super-mario-bros-2/random-step-two-bytes

About: Super Mario Bros. 2 Random number generator

CodeSuper Mario Bros. 2 (USA) · 0x421E-0x424C — bank 02 $820E-$823C: the entry runs the step twice (Y = 0, 1); $05AC becomes 5 x $05AC + 1; $05AD is shifted left and incremented when carry equals bit 5; the exclusive OR is stored to $05AE,YChecked by claude, 2026-11-30 — Disassembled the generator from the USA ROM and worked through all four carry and bit-5 cases of its branches.Checked by a second AI model, 2026-11-30.

Cited by: Super Mario Bros. 2

In Super Mario Bros. 2, an empty-handed character who ducks on an enterable jar mouth goes in only when their horizontal position is from 4 pixels left to 3 pixels right of the tile column (computed). Entering stops all horizontal speed and snaps the character to the column. super-mario-bros-2/jar-entry-clears-speed

Value: pixels left 4 · pixels right 3

CodeSuper Mario Bros. 2 (USA) · 0x111C-0x1164 — bank 00 $910C-$9154: requires empty hands, ducking and an enterable jar-mouth tile (a different tile in Subspace), then (x + 4) AND 15 below 8; clears horizontal speed, sets the going-down state and snaps x to the columnChecked by claude, 2026-11-30 — Disassembled the jar entry routine from the USA ROM.Checked by a second AI model, 2026-11-30.

Cited by: Super Mario Bros. 2

After the first crystal ball pickup sets the Hawkmouth's opening timer to 96, Super Mario Bros. 2 counts it down only while each of the Hawkmouth's 8-pixel columns begins on the screen. super-mario-bros-2/hawkmouth-waits-offscreen

Value: 96

CodeSuper Mario Bros. 2 (USA) · 0x5085-0x509C — bank 02 $9075-$908C: picking up the crystal ball (object $44) for the first time sets the timer to $60Super Mario Bros. 2 (USA) · 0x4D84-0x4D99 — bank 02 $8D74-$8D89: the timer is decremented only when the object's horizontal clipping byte is zeroSuper Mario Bros. 2 (USA) · 0x48A4-0x48FA — bank 02 $8894-$88EA: the per-frame clipping routine sets a bit for each 8-pixel column of the object outside the screenChecked by claude, 2026-11-30 — Disassembled the crystal pickup, the timer test and the clipping routine with its tables from the USA ROM.Revised after a check by a second AI model, 2026-11-30: Narrowed the on-screen condition to where each 8-pixel column begins.

Cited by: Super Mario Bros. 2