Facts
Released
1985
Genre
Platformer
Platforms
Famicom, NES
Developer
Nintendo
Publisher
Nintendo
Series
Super Mario, part of Mario
Code
Disassembly by doppelganger and Xkeeper
Evidence
Code (19)
Interview (12)
Verified (8)
Manual (6)
Magazine (4)
Publisher (2)
Code notes (2)
Wiki (1)
Sources
18
On this page
  1. How it plays
  2. Controls
  3. Data
  4. Releases
  5. Cartridge
  6. Code lineage
  7. Related
  8. Mechanics
  9. References
  10. Sources

Super Mario Bros. is Nintendo’s side-scrolling platformer for the Famicom and NES. Nintendo dates its release to 13 September 19851, and Nintendo of America’s list of NES games gives October 19852 for North America. The player is Mario, out to free Princess Toadstool from the Koopa king, whose tribe of turtles has put a spell on the Mushroom Kingdom3. A second player takes turns as Luigi4. The screen scrolls right through worlds of four areas each, and the fourth area of every world ends in a castle5. The game has eight worlds, and hidden warps let a skilled player skip ahead6. Mushrooms, flowers, and stars hidden in blocks make Mario bigger, let him throw fireballs, or make him invincible7.

Shigeru Miyamoto wrote the game’s specifications. Takashi Tezuka, a designer in his first year at Nintendo, worked with him, programmers from Toshihiko Nakago’s company SRD built it, and Koji Kondo did the sound8. Miyamoto set out to make something like his arcade Mario Bros., but with a scrolling screen, a bright background, and bigger characters, and scrolling cost it Mario Bros.’ simultaneous two-player play9. The specification borrowed slopes, lifts, ropes, springs, and enemies from Nintendo’s earlier games10, and Miyamoto says the warps came from the arcade Excitebike, which let a player choose the course to start on11. Miyamoto says the team meant it as their last cartridge game before the Famicom Disk System and packed in all they could12. Iwata recalls 256 kilobits of memory at first, and Miyamoto 64 for the characters13. The cartridge holds 256 kilobits of program and 64 of graphics14. With 20 bytes to spare at the end, Miyamoto added a crown as a reward for players with ten or more extra lives15.

Nintendo’s Satoru Iwata recalled that the game wasn’t released to great fanfare and didn’t catch fire at once, but that everyone who played it was drawn in. In January 1986 the Asahi Graph, a magazine of the Asahi Shimbun, ran a feature on it that Masayuki Uemura calls a strategy guide for adults, and a shop in his photo from those days hung a sign saying it was sold out16. In 2010 he said it had sold more packaged copies in Japan than any other game17. Izuhiko Imanishi, who ran Nintendo’s general affairs at the Famicom’s launch, says newspapers had been mostly negative about video games, and Japan’s parliament had taken up their influence on children, until the game’s bright atmosphere cleared away that prejudice against the Famicom18. In North America it was one of the games on sale as the NES spread out from New York19. From June 1986 it came packed with a cheaper NES set, the Control Deck20, and from 1988 on multicarts with Duck Hunt21. Computer Entertainer’s review called it “sheer delight” and said no NES owner should be without it22. Electronic Gaming Monthly’s 1997 list of the best games of all time ranked it 37th, in its Super NES All-Stars version, saying it brought the video game market back from the dead and set the standard for side-scrolling platform games23. Nintendo also made an arcade version, VS. Super Mario Bros., for its VS. System cabinets24.

#How it plays

The d-pad walks Mario, and holding B with it runs. A run raises his top speed by two-thirds25. From a standstill he takes under a second to reach either top speed, and about as long to stop once the d-pad is let go26.

A jumps, but only from the ground and only on the press27. How fast Mario is moving when he leaves the ground picks one of five sets of jump settings, and the faster the take-off, the higher he goes28,29. Holding A makes the jump higher. Gravity is light while A is held on the way up, and turns heavier for the rest of the jump once it is let go or he reaches the top30. A tapped jump rises less than two blocks, and a held jump four to five (66–83 px held, 24–29 px tapped31, with held peaks of 66 px standing, 71 px walking, and 83 px running32 on flat ground, where a block is 16 px). This is variable jump height. The game keeps his height and vertical speed in fractions of a pixel, or subpixels33, and a fall levels off at 4 px/frame34 once it reaches 4.5 px a frame35.

Interactive: movement-lab (needs JavaScript)

Standing, walking, and running jumps at World 1-1’s first pipe

In the air, a held direction speeds Mario toward it, and once it is let go he keeps the speed he has36. Out of water, he keeps facing the way he jumped37. A jump has to start on solid ground: a press after he walks off a ledge does nothing, so the game has no coyote time38. He walks a few pixels past the edge before he drops39. A walk-off before his first jump in an area falls more gently than one after it40.

Big Mario breaks a plain brick he jumps into from below. Small Mario only bumps it, and either size only bumps a ? block41. A hit shrinks Super or Fiery Mario back to regular Mario7, and he can’t be hurt again for about two and a half seconds42.

#Wall jump

Mario can jump off the side of a wall, by a glitch in how the game checks his feet. After he moves each frame, the game tests a point at his head, two at his feet, and then points at his sides against the level’s blocks43. A foot inside a solid block lands him if he isn’t moving up and the foot is less than 5 px into the block44. The test doesn’t ask whether the block is a floor or part of a wall. So a foot that dips into a wall near the top of one of its blocks stands him on the wall’s side. He starts the next frame on the ground, and a fresh press of A jumps45.

The side test pushes him back out of the wall by 1 px a frame46, so he stays caught only while his foot is inside it. With big Mario, the window for the press was 1 or 2 frames47, depending on how deep his foot went, not on his speed. That held for a walking jump into a wall built into World 1-1’s start, a running hop at the level’s first pipe, and a hop at World 2-1’s last wall47. TASVideos explains the move as a floor check that still runs while the game pushes Mario out of a wall. Super Mario Wiki lists it among the glitches that resemble the series’ later, designed wall jump48.

Interactive: movement-lab (needs JavaScript)

The wall jump glitch

#Unused

  • Super Mario Bros.'s song table has a second entry for the game-over song that none of the stores that name the event-music queue asks for: entry $04, bit 4 of that queue, points at $F966, the game-over song's header, as entry $01 does.49
  • Super Mario Bros.'s song table has an entry for steps of the aboveground theme that no store naming the area-music queue reaches: entry $08, which the engine's bit search gives for bit 0 of that queue, points at $F976, the header that steps 2, 3, 16 and 17 of the aboveground theme play.50
  • Super Mario Bros. has a song header that no entry of its song table points at, so no request can play it.51

Controls

Move, crouchPauseRun, shootJump
On land in Super Mario Bros., A jumps, and B held while walking runs; Fire Mario's B also throws a fireball. Left and Right walk, and Down crouches big Mario, Super or Fire, on the ground; small Mario doesn't crouch. Start on controller 1 pauses the game and resumes it.52

Data

All 37 tables

World 1-1:

BlockNameKind
$10warp pipe end left, points uppipe entry
$11warp pipe end right, points uppipe entry
$12decoration pipe end left, points upsolid
$13decoration pipe end right, points upsolid
$14pipe shaft leftsolid
$15pipe shaft rightsolid
$24flagpole ballclimb
$25flagpole shaftclimb
$51breakable brick w/ linebreakable
$52breakable brickbreakable
$54cracked rock terrainground
$57brick with line (star)item block
$58brick with line (coins)item block
$60hidden block (1-up)hidden block
$61solid block (3-d block)solid
$C0question block (coin)item block
$C1question block (power-up)item block

Releases

Cartridge

Interactive: rom-parts (needs JavaScript)

40 KB, a cell per 512 bytes, from 289 mapped regions

Other releases: Super Mario Bros. (Europe), Super Mario Bros. (Japan) (En).

Code lineage

FromToMatchBytesWhat
Super Mario Bros. area-parser-task-handler … get-block-buffer-addrSuper Mario Bros.: The Lost Levels area-parser-task-handler … get-block-buffer-addrchanged2,422The area parser and its object builders are Super Mario Bros.'s, with most changes in the metatile numbers they write, which shift with the renumbered metatiles (bridges, flagpole, coins, bricks, cannons, stairs, blocks, water pipe). Beyond those: the object jump table gains entries, the wind on and off commands among them, so three offsets into it change; the warp zone's scroll-lock object picks the warp zone's destination by world, level and area; the third ledge style uses metatiles $8A-$8C and draws no stem, where Super Mario Bros.'s mushroom ledge uses $19-$1B with a stem (and the renderer of an object's lower part drops its stem checks); the vertical pipes place a piranha plant through a shared set-up routine, with no exception for world 1-1; the jumpspring builder places nothing when no enemy slot is free. The column position increment, the area attribute changer, the enemy remover and the object position helpers are byte for byte the same.
Super Mario Bros. chr-backgroundSuper Mario Bros.: The Lost Levels chr-backgroundchanged3,200Background tiles `$24`-`$EB` are Super Mario Bros.'s but for 65 of their 200: `$28`, `$29`, `$2B`-`$2D`, `$30`-`$3C`, `$45`, `$47`, `$4B`, `$4C`, `$4E`-`$52`, `$5D`, `$5E`, `$6B`-`$76`, `$80`, `$81`, `$9B`-`$9E`, `$A0`, `$A1`, `$A9`, `$AA`, `$AF`, `$B4`-`$BD`, `$C0`, `$C1` and `$CF` differ.
Super Mario Bros. chr-fontSuper Mario Bros.: The Lost Levels chr-fontrewritten576The font, background tiles `$00`-`$23` (the digits and A to Z), keeps Super Mario Bros.'s layout, so the game's text spells with the same numbers, but every one of its 36 tiles differs from Super Mario Bros.'s.
Super Mario Bros. chr-sprites-objectsSuper Mario Bros.: The Lost Levels chr-spriteschanged2,816Sprite tiles `$50`-`$FF` are Super Mario Bros.'s but for 15: `$5B`, `$76`-`$7B`, `$85`, `$86`, `$D8`, `$DA`, `$DB` and `$FD`-`$FF` differ.
Super Mario Bros. chr-sprites-playerSuper Mario Bros.: The Lost Levels chr-spritesidentical1,280The first 80 tiles of the character data, `$00`-`$4F`, are Super Mario Bros.'s byte for byte.
Super Mario Bros. draw-vine … draw-sprite-objectSuper Mario Bros.: The Lost Levels draw-vine … draw-sprite-objectchanged3,800The sprite drawing code is Super Mario Bros.'s with these changes: the power-up drawer draws every mushroom from tiles $D8, $DA, $DB and $FF where Super Mario Bros. uses $76-$79, and gives the poison mushroom, a fifth row, palette 3; the enemy graphics handler's tile table takes up $76-$79, and the handler also flips the upside-down piranha plants and colors the jumpsprings green on world numbers 2, 3 and 7; the player renderer plays the skid sound; the flagpole graphics handler's score table gains the 1-up; the vertical off-screen bits routine has two of its tables' halves swapped, its instructions unchanged; the block drawer uses a renumbered metatile. 12 regions, the player graphics handler among them, differ only in their addresses, and five, the sprite object drawer among them, are byte for byte the same.
Super Mario Bros. enemies-and-loops-core … init-jump-gp-troopaSuper Mario Bros.: The Lost Levels enemies-and-loops-core … init-jump-gp-troopachanged2,033Enemy spawning and set-up are Super Mario Bros.'s with these changes: the loop command reads 12 loop entries where Super Mario Bros. reads 11, and takes each loop's number of checks from a new table where Super Mario Bros. special-cases world 7; the enemy data processor skips a check in world 9 and gives one enemy code a piranha plant set-up; the Hammer Bro set-up checks the world; the Lakitu and Spiny handler brings Lakitu back once his reappear timer reaches 3, where Super Mario Bros. waits until it reaches 7, and brings him back lower on the screen in worlds 7 to 9 and A to D; the Bowser set-up first erases any other Bowser; the piranha plant set-up patches the plant's palette and pipe distance, green in worlds 1 to 3 and red from world 4 and in A to D; the jumping paratroopa's set-up starts it at x speed $F4 where Super Mario Bros. uses $F8. Of its 27 regions, 15 differ only in their addresses and 5 are byte for byte the same.
Super Mario Bros. fireball-enemy-collision … block-buffer-collisionSuper Mario Bros.: The Lost Levels fireball-enemy-collision … block-buffer-collisionchanged3,511The collision code is Super Mario Bros.'s with the upside-down piranha plant, the poison mushroom and the renumbered metatiles added: the fireball, enemy, background and stomp checks treat the upside-down plant like a piranha plant; the power-up collision injures the player on power-up type 4; the injury routine also does nothing while the star's invincibility timer runs; the routine that handles player-enemy contacts checks for the cannon's Bullet Bill before the piranha plants and Podoboo, where Super Mario Bros. checks it after them; the stomp test decides a stomp with LDY, DEY, BPL on the vertical speed where Super Mario Bros. uses BMI and BNE (the two disagree only at speed $80); every stomp bounces the player through a new bounce routine, at vertical speed $FA, or $F8 off red paratroopas and flying green paratroopas, where Super Mario Bros. sets $FD after a stomp that defeats an enemy and $FC after one that demotes a paratroopa or knocks an enemy into its shell; the climbing handler gives a life for grabbing the flagpole when the coin tally's digits and the timer's last digit match; the pipe entry handler sends the player to the warp zone's one destination whichever pipe they take, where Super Mario Bros. picks by the pipe's x position; the coin-metatile handler's axe restores Mario's physics; the jumpspring landing check sets the downward vertical force to $70 as well as the vertical force; the player-hammer collision also skips while the player is off screen; the enemy-to-background collision bounces a power-up on a bumped block without stunning it and never demotes a piranha plant; the player's vertical check drops its test of how far down the screen the player is; one bounding box grows from $14 to $16. The platform collisions, the enemy landing routine, the side checks and the block buffer collision differ only in their addresses, and three regions, the player's collision core among them, are byte for byte the same.
Super Mario Bros. floatey-numbers-routine … reset-screen-timerSuper Mario Bros.: The Lost Levels floatey-numbers-routine … reset-screen-timerchanged910The score numbers, the screen setup tasks, the status bar and the game's text are Super Mario Bros.'s with these changes: the player color routine no longer picks a palette row by the current player (Super Mario Bros.'s table has a row for Luigi); the bottom status line goes through a new routine that shows worlds A to D as letters; the intermediate screen blanks the screen after the world and lives screen in world 9, and the time-up screen writes its text and resets the screen timer itself where Super Mario Bros. jumps into the intermediate screen's code; the title-screen part of the buffer-clearing and icon routine moves to the title code; the screen task list gains a demo reset; the game's text drops the two-player and Luigi texts and adds CONTINUE and RETRY to the game-over screen. The screen initializer, the intermediate set-up, the area palette and alternate palette routines, the top status line, the area parser's task control and the screen timer reset keep every instruction, with only addresses changed.
Super Mario Bros. game-core-routine … get-screen-positionSuper Mario Bros.: The Lost Levels game-core-routine … get-screen-positionchanged363The game core and the scroll handler are Super Mario Bros.'s with three changes: the game mode's task list gains the disk routines at its head and the core no longer reads the current player's saved joypad bits; each frame of play calls the wind simulation once a disk file beyond worlds 1 to 4 is loaded; the scroll handler waits for the status bar's timer IRQ before it scrolls and keeps the name table in a byte of its own, where Super Mario Bros. sets it in its PPU control mirror. The screen position routine is byte for byte the same.
Super Mario Bros. game-menu-routineSuper Mario Bros.: The Lost Levels game-menu-routine … demo-enginechanged261The game menu and the demo are Super Mario Bros.'s, rewritten in part: the menu drops the one- or two-player choice and the world select, and starts the game at world 1, or at world A when A is held and the game has been beaten 8 times; Select switches between Mario and Luigi; the demo plays new button presses and durations through the same code.
Super Mario Bros. game-routines … impose-frictionSuper Mario Bros.: The Lost Levels game-routines … impose-frictionchanged1,518The player's control and movement code is Super Mario Bros.'s, instruction for instruction in 14 of its 19 regions, with these changes: the on-ground state and the jump and swim code move the player through a new move routine, which lets the wind push them once a disk file beyond worlds 1 to 4 is loaded; the physics routine's friction table moves up to follow the fall forces, inside the 17 bytes that the physics loader overwrites with Mario's or Luigi's set; the level-end routine queues the level-end music once, guarded by a new flagpole music flag, where Super Mario Bros. queues it whenever the scroll lock is set, and sets the hidden 1-up's flag on 10 coins in any world, where Super Mario Bros. reads a per-world table, and starts world 9 over after 9-4; the player death routine shares one RTS. The entrances, pipes, size change, injury blink, flagpole slide, falling, climbing, animation speed and friction differ only in their addresses.
Super Mario Bros. init-bal-platform … run-fireworksSuper Mario Bros.: The Lost Levels init-bal-platform … run-fireworkschanged2,798The platforms' set-up, the enemy object loop, the enemies' movers, Bowser and the fireworks (32 regions) are Super Mario Bros.'s instruction for instruction, with two changes: the enemy movers' jump table sends enemy 4, the upside-down piranha plant, to a new mover of its own, where Super Mario Bros. has the normal enemy mover; the swimming Cheep Cheep's mover adds $40 to its vertical fraction each frame where Super Mario Bros. adds $20. Three of the regions are byte for byte the same, and the rest differ only in the addresses of their calls, jumps and tables.
Super Mario Bros. jump-engine … update-screenSuper Mario Bros.: The Lost Levels jump-engine … update-screenrelocated240The jump table dispatcher, the name table initializer, the joypad reader and the screen updater are Super Mario Bros.'s, instruction for instruction: the dispatcher is byte for byte the same, and the other three differ only in the addresses of their calls, jumps and tables.
Super Mario Bros. load-area-pointer … world-addr-offsetsSuper Mario Bros.: The Lost Levels load-area-pointer … area-data-addrschanged456The area pointer routines (loading the pointer, finding it, and getting the area data addresses) are Super Mario Bros.'s, with the area data address tables made tables of words (indexed with an ASL) where Super Mario Bros. keeps separate low and high byte tables; the tables themselves hold The Lost Levels' worlds, and the area data loopback table its 12 loop points. Of the level data, only the 9-byte pipe intro area is byte for byte Super Mario Bros.'s.
Super Mario Bros. move-object-horizontally … impose-gravitySuper Mario Bros.: The Lost Levels move-object-horizontally … impose-gravityrelocated325The movement and gravity routines are Super Mario Bros.'s, instruction for instruction: the gravity routine and the drop platform's mover are byte for byte the same, and the other seven differ only in the addresses of their calls and jumps.
Super Mario Bros. music-handlerSuper Mario Bros.: The Lost Levels alt-sound-enginerewritten856The ending's sound engine in `SM2DATA3` is a rewrite of Super Mario Bros.'s music handler that keeps its note and length code: it has no event or area music buffers and no time-running-out handling, steps through a list of patterns with a pattern counter, reading each pattern's header from a header table, has its own pause and silence code, and plays the ending's music on the disk system's wavetable channel as well as the square, triangle and noise channels, with its own waveform, envelope and modulation tables.
Super Mario Bros. music-header-data … star-cloud-m-dataSuper Mario Bros.: The Lost Levels music-header-data … star-cloud-m-datachanged1,713SM2MAIN's music data is Super Mario Bros.'s less the victory theme: the headers lose the victory theme's header and their offsets shift by its five bytes, the residual header bytes differ, and the victory theme's data is gone from between the castle-clear music and the frequency tables, with two of the three unused bytes after it (the ending's music lives in `SM2DATA3`). The notes of every other song and the frequency, note-length and envelope tables after them are byte for byte the same.
Super Mario Bros. print-status-bar-numbers … run-game-overSuper Mario Bros.: The Lost Levels print-status-bar-numbers … run-game-overchanged846The status bar numbers, game setup, lives and game over are Super Mario Bros.'s with a new game-over dispatch among them and these changes: the status bar's digit tables lose the second player's entries; the top score update checks one score where Super Mario Bros. checks two; the digit math routine drops a compare with zero before its BEQ; the default sprite offsets lose the sprite 0 data; the area initializer loads the player's physics and sets the secondary hard mode flag from 4-4 on and in all of worlds A to D, where Super Mario Bros. sets it from 5-3 on or once the primary hard mode flag is set; the secondary game setup sets the name table and switches on the status bar's IRQ split, where Super Mario Bros. sets the second player's lives and switches on the sprite 0 check; the memory initializer also spares $0100-$0108; the lose-a-life routine reads its own halfway pages and no longer swaps players; the game-over routine opens the continue-or-retry menu (or, in world 9, ends the game) where Super Mario Bros. ends the game on Start or when the screen timer runs out and then hands over to the other player if they have lives left. The area music selection and the entrance's game timer set-up keep every instruction, though the level timer's digits moved from $07F8 to $07EC.
Super Mario Bros. proc-fireballs … vine-object-handlerSuper Mario Bros.: The Lost Levels proc-fireballs … vine-object-handlerchanged1,013Fireballs, the level timer and the stage objects are Super Mario Bros.'s with these changes: the game timer tests the player's height with BPL instead of BCS and points at the timer digits' new place; the warp zone object no longer counts up its warp zone control byte; the flagpole routine gives a life for the new sixth flagpole score; the jumpspring handler launches with the green springs' force on world numbers 2, 3 and 7; the vine handler erases the vine and its metatiles once it goes off the left of the screen. The fireball and whirlpool routines differ only in their addresses, and the vine set-up is byte for byte the same.
Super Mario Bros. process-cannons … block-obj-mt-updaterSuper Mario Bros.: The Lost Levels process-cannons … block-obj-mt-updaterchanged1,358Cannons, hammers, coins, power-ups and blocks are Super Mario Bros.'s with the poison mushroom added and one player: the bumped block's contents table gains poison mushroom blocks and the mushroom-or-flower block code gains a poison mushroom block, which sets power-up type 4; the power-up handler walks types 4 and 5 like a mushroom; the bumped-block check checks 19 block metatiles where Super Mario Bros. checks 14; the coin and score routines use fixed offsets where Super Mario Bros. indexes by the current player; the head-collision and coin checks use the renumbered metatiles. The power-up set-up is byte for byte Super Mario Bros.'s, though the poison mushroom now passes through it, and so are the block position set-up and the brick chunk spawner; the cannons, hammers, jumping coins, brick shatter and bouncing blocks differ only in their addresses.
Super Mario Bros. render-area-graphics … water-palette-dataSuper Mario Bros.: The Lost Levels render-area-graphics … water-palette-datachanged1,266The background renderer, the metatile tables and the area palettes are Super Mario Bros.'s with the metatiles renumbered: The Lost Levels inserts new metatiles, so the block replacement routine compares against shifted numbers ($56, $4F, $5C and $50 for Super Mario Bros.'s $58, $51, $5D and $52), and the metatile graphics table moves some entries and adds others. The palette data region also holds two new messages. The attribute table renderer is byte for byte the same, and the area graphics renderer and the palette color rotation differ only in their addresses.
Super Mario Bros. run-star-flag-obj … offscreen-bounds-checkSuper Mario Bros.: The Lost Levels run-star-flag-obj … offscreen-bounds-checkchanged1,047The code from the star flag object through the off-screen bounds check is Super Mario Bros.'s with these changes: the star flag object sets off fireworks when the timer's last digit matches the coin tally's, where Super Mario Bros. matches the timer's last digit against 1, 3 and 6, and adds its points to the one player's score; the piranha plant mover moves red piranha plants (the patched palette) every frame; the balance platform leaves a platform alone when its partner is no balance platform; the off-screen bounds check treats upside-down piranha plants like upright ones. The fire bar spin is byte for byte the same, and the moving platforms differ only in their addresses.
Super Mario Bros. sound-engine … music-handlerSuper Mario Bros.: The Lost Levels sound-engine … music-handlerchanged1,705The sound engine is Super Mario Bros.'s with two new sounds in the noise handler: the skid, played on the triangle channel from its own frequency table, and the wind, played from a frequency and envelope table of its own; both tables sit after the square 2 handler. The engine's entry, the square 1 register dump, the square 1 sound effect handler and the music handler differ only in their addresses.
Super Mario Bros. star-cloud-m-dataSuper Mario Bros.: The Lost Levels star-cloud-m-dataidentical1,2991,299 bytes of The Lost Levels' music are Super Mario Bros.'s byte for byte: the last bytes of the music headers and the notes of every song SM2MAIN plays, from the star music through the ground music's parts, death, castle, game over, time running out, level end, underground, water and the castle-clear music.
Super Mario Bros. start … move-all-sprites-offscreenSuper Mario Bros.: The Lost Levels start … move-all-sprites-offscreenchanged664The Lost Levels' boot, NMI and pause code is Super Mario Bros.'s with these changes: the reset code sets mirroring through the disk drive's control register, keeps the world number across the reset and sets the BIOS's IRQ flag; the NMI arms the drive's timer IRQ to split the status bar from the level, where Super Mario Bros. waits for the sprite 0 hit, and its VRAM address table is one table of 31 words where Super Mario Bros. has low and high byte tables of 19; the pause routine allows a pause in game-mode task 4 instead of 3, the game mode's task list having gained a disk task at its head. The sprite shuffler and the routine that moves all sprites off screen are byte for byte the same, and the operating-mode dispatch differs only in its addresses.
Super Mario Bros. victory-mode … print-victory-messagesSuper Mario Bros.: The Lost Levels victory-mode … print-victory-messageschanged357The castle victory sequence is Super Mario Bros.'s with these changes: on world 8, which world D also uses, the victory mode runs a second task list that loads the ending from disk; its set-up also sets the world's bit in a byte of completed worlds and queues the castle-clear music; the victory message printer loses Super Mario Bros.'s world 8 branch and its victory music, and gains a castle award that counts the remaining time into points. The title screen drawer, which sits in the middle, shrinks to a few instructions that queue a layout held in the program, where Super Mario Bros. copies it out of CHR ROM. The player's victory walk keeps every instruction; only its addresses and one branch's distance differ.

Mechanics

MechanicKindHow
Status bar splitSprite 0 hitthe status bar holds still while the level scrolls under it
Sprite flickerRotating slotswhen too many sprites share a line, a different one drops out each frame, so they flicker in turn
Palette cyclingColor step? blocks and coins shimmer through six colors, a step every eighth frame
CHR bank switchingFixedone set of tiles for the whole game
Raster effectsTwo bandsone split a frame, between the status bar and the level
Music driverLength tableeach song times its notes in whole frames from its own row of lengths; the hurry-up tunes take a faster row
Variable jump heightGravity switchgravity stays light while A is held on the way up, and turns heavier for good on release or at the top
JumpSpeed from the runthe faster Mario moves at take-off, the faster and higher he jumps: standing, walking, and running jumps differ
GravitySwitch on releasea light pull while A is held on the way up, a heavier one after
Air controlMomentuma held direction speeds him toward it, let go he keeps his speed, and he faces the way he jumped
RunningRun buttonholding B raises his top speed from 1.5 to 2.5 px a frame
Destructible terrainBreakable tilesbig Mario breaks a plain brick he hits from below; small Mario only bumps it, and either size only bumps a ? block
Wall jumpa foot that dips into a wall near the top of one of its blocks stands Mario on its side for a frame, and A then jumps glitch
HitboxPoints and a boxpoints at his head, feet, and sides meet the level, and a box meets enemies
Invincibility framesSlow timerafter a hit he can't be hurt again for about two and a half seconds
Demo playbackInput scriptthe title screen's demo is a recording of button presses, played through the ordinary game
Coyote timeNonea jump starts only from the ground
Every claim about this game, by concept (169)
generalSuper Mario Bros.'s cartridge ROM, counted by part of the game: each stretch of code or data goes to the part its code shows it serves, and the value sums the bytes of each part.Code
The cartridge ROM of Super Mario Bros. (Europe), a release of Super Mario Bros., counted by part of the game from Super Mario Bros.'s map carried to it: each region of that map is matched by its bytes where they're the same (its code's addresses aside), or placed between matched neighbours where they changed, and the bytes no region matches count as unmatched. The value sums the bytes of each part, and those matched, changed, and unmatched.Unsourced
The disk image of Super Mario Bros. (Japan) (En), a release of Super Mario Bros., counted by part of the game from Super Mario Bros.'s map carried to it: each region of that map is matched by its bytes where they're the same (its code's addresses aside), or placed between matched neighbours where they changed, and the bytes no region matches count as unmatched. The value sums the bytes of each part, and those matched, changed, and unmatched.Unsourced
World 1-1's main area as a 224 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
The underground bonus rooms, one area whose pages hold the rooms that 1-1, 1-2, 2-1, 3-1, 4-1, 4-2, 5-1, 6-2, 7-1, 8-1, and 8-2 lead to, as a 176 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
The pipe intro area that opens 1-2, 2-2, 4-2, and 7-2, as a 48 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 1-2's main area as a 224 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
The main area 1-3 and 5-3 share, as a 192 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
The main area 1-4 and 6-4 share, as a 176 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 2-1's main area as a 240 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
The cloud area that 2-1 and 5-2 lead to, as a 112 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
The main area 2-2 and 7-2 share, as a 224 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
The main area 2-3 and 7-3 share, as a 256 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
The main area 2-4 and 5-4 share, as a 176 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 3-1's main area as a 240 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
The cloud area that 3-1 and 6-2 lead to, as a 128 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 3-2's main area as a 240 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 3-3's main area as a 192 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 3-4's main area as a 176 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 4-1's main area as a 256 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 4-2's main area as a 256 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
The warp zone area that 4-2 leads to, as a 96 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 4-3's main area as a 176 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 4-4's main area as a 208 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 5-1's main area as a 224 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 5-2's main area as a 240 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
The water area that 5-2 and 6-2 lead to, as a 96 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 6-1's main area as a 224 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 6-2's main area as a 256 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 6-3's main area as a 208 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 7-1's main area as a 208 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 7-4's main area as a 240 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 8-1's main area as a 416 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 8-2's main area as a 256 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 8-3's main area as a 256 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
World 8-4's main area as a 336 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
The water area that 8-4 leads to, as a 96 × 13 grid of what Mario collides with: each cell the metatile the game's area parser puts in the block buffer there, column by column from the area's left edge.Code
Super Mario Bros.'s song table, at $F90D, holds 49 entries, all music, each the offset of one of the song headers that follow it; two entries are silence. The game asks for a song by setting one bit in the event-music queue at $FC (bits 0 to 7 are entries $00 to $07) or the area-music queue at $FB (bits 1 to 7 are entries $09 to $0F). The area queue's bit 0 starts the aboveground theme instead, which the engine plays as entries $10 to $30 in turn and then repeats from $11. Requests reach 15 entries and the aboveground theme's step counter 32 more. Of the 18 stores that name the two queues, two in the sound engine clear them each frame, and each of the other 16 writes one bit: a constant, 1, or a byte from a six-entry table indexed 0 to 5. None of those asks for entry $04 (the event queue's bit 4) or $08 (the area queue's bit 0 taken as a bit); stores through an index or a pointer that might reach the queues are not yet bounded. Each row says where the game plays the entry, from the code that requests it.Code
Over its first 216 block columns, through the castle, World 1-1's collision map, as the probe reads it from the cartridge's block buffer, holds a floor with three pits (2, 3, and 2 blocks wide), six pipes (2, 3, 4, 4, 2, and 2 blocks tall), four 4-step stairs and an 8-step one, 13 ? blocks, 30 bricks, a hidden 1-up block, and the flagpole at column 198 on a one-block base.Verified
Mario catches the flagpole when his lower side collision point finds a pole metatile and the low 4 bits of his own x position (not the point's) are 6 to 9, so the pole is 4 px thick in each 16. His right-hand points are 13 px right of that x, so running right he catches World 1-1's pole (block column 198, x 3168 to 3183) with his x at 3158 to 3161.Verified
At the movement lab's start in World 1-1 (the game started from power-on, Mario standing still, then 10 frames), the frame counter reads 166, and the leftover sub-pixel part of a power-up's fall is 0.Verified
On land in Super Mario Bros., A jumps, and B held while walking runs; Fire Mario's B also throws a fireball. Left and Right walk, and Down crouches big Mario, Super or Fire, on the ground; small Mario doesn't crouch. Start on controller 1 pauses the game and resumes it.Code
In Super Mario Bros.'s water areas, A swims: each press sends Mario up a stroke, except while he is still rising after the last stroke's timer has run out. B no longer runs there, but Fire Mario's B still throws fireballs. The Control Pad moves him and crouches big Mario on the floor, and Start pauses as on land. Below a line near the bottom of the screen, or off the screen vertically, the game ignores the Control Pad, A, and B, though Start still pauses.Code
On Super Mario Bros.'s title screen, Select moves the mushroom between the one- and two-player games and Start begins, from either controller. Holding A with Start begins at the first area of the world where the last game ended. Once the game has been beaten and B pressed on the ending screen, B on the title screen steps through the worlds.Code
Nintendo dates the release of Super Mario Bros. to 13 September 1985.Interview
Nintendo of America's list of NES games dates the North American release October 1985.Publisher
In February 1986 Computer Entertainer listed Super Mario Bros. among the 15 games sold with the NES in the markets it had reached, as a $30 Action Series game. After New York, shipments to southern California were about to begin.Magazine
From June 1986 Nintendo offered the NES in a new, cheaper set, the Control Deck, with two controllers and the Super Mario Bros. Game Pak, while the Deluxe Set kept its robot, light gun, and two games.Magazine
In North America the game was later sold on two multicarts, with Duck Hunt from November 1988 and with Duck Hunt and World Class Track Meet from December 1990, by Nintendo of America's list.Publisher
In the manual's story the Koopa, a tribe of turtles, have invaded the Mushroom Kingdom and turned its people into stones, bricks, and plants. Only Princess Toadstool, the Mushroom King's daughter, can undo the spell, and the Koopa king holds her; Mario sets out to free her.Manual
The screen scrolls to the right as Mario goes. The kingdom is a number of worlds of four areas each, the fourth ending in a castle, and Mario has to reach each world's castle within the given time. A lost life halfway through an area restarts there, and an area ends at a flagpole whose bonus rises with how high Mario lands on it.Manual
The game has eight worlds; Miyamoto says warps let a good player go from World 1 straight to World 8, to reach the end.Interview
Miyamoto says the warps came from Excitebike's arcade version, which let a player choose which of its three levels to start on: since a cartridge couldn't save, a good player could skip ahead instead of playing from the start every time.Interview
Power-ups hidden in bricks and invisible blocks change Mario: the manual's chart sets the Magic Mushroom, the Fire Flower, and the Starman beside Super Mario and Fiery Mario, and after the Fire Flower, B throws fireballs. A hit turns Super or Fiery Mario back into regular Mario, who flickers and can't be hurt for a short while. An extra life comes from a 1-up mushroom or 100 coins.Manual
The manual says the d-pad walks Mario and B held with it runs; A jumps, higher the longer it is held, and higher from a run; the d-pad steers him in mid-air; and Super Mario jumps as high as Mario. The pad's chart also lists a crouch, for Super Mario only.Manual
A second player plays Luigi on controller 2, taking turns with the first.Manual
Nintendo names the game's original developers as Shigeru Miyamoto, who wrote its specifications; Takashi Tezuka, a designer in his first year at Nintendo when the first plans were drawn up; Toshihiko Nakago, president of SRD, the contractor whose programmers built it; and Koji Kondo, whom Miyamoto appointed to sound.Interview
Kondo says he was hired in 1984 with one other person as Nintendo's first music staff; before them, programmers such as Hirokazu Tanaka also wrote the music.Interview
Around December 1984 Miyamoto had SRD's programmers make a test of a Mario about twice the size of the one in Mario Bros., who jumped when a button was pressed. Tezuka recalls that at first only a square moved, and Nakago that the sky was still black in the test and turned blue after the background could scroll sideways.Interview
Miyamoto's specifications are dated 20 February 1985, and the game was on ROM about six months later. They have Up on the d-pad jump and A attack with items, and Mario flying a rocket; a later drawing, probably Tezuka's, put him on a cloud, which wasn't used.Interview
Miyamoto says he set out to make something like his arcade Mario Bros. (1983), which didn't scroll and had a black background, but scrolling, bright, and with bigger characters. To make the screen scroll, he gave up on the two-player game that Mario Bros. had.Interview
The game drew on Nintendo's earlier ones. Its specification lists refinements of Donkey Kong's slopes, lifts, conveyor belts, and ladders, Donkey Kong Jr.'s ropes, logs, and springs, and Mario Bros.' enemies, frozen platforms, and POW Blocks. Iwata says the scrolling came from Excitebike and the large characters from Devil World, and Nakago that SRD's makers of Donkey Kong Jr.'s springs brought them in.Interview
Miyamoto says that, a year before the Disk System, the team meant it to be their last cartridge game, and packed in as much as they could to show what Nintendo could do with one. In another interview Izuhiko Imanishi recalled him making it on cartridge on purpose against the expectation of the Disk System, and Masayuki Uemura disputed it.Interview
Iwata says the game used 256-kilobit memory at first, and Miyamoto that its characters stayed at 64 kilobits.Interview
At the end of development the team used up the spare bytes usually left for bug fixes: with 20 bytes left, Miyamoto added a crown as a reward for ten or more extra lives, and with eight left, more blocks.Interview
Computer Entertainer's June 1986 review called the game "sheer delight" and placed it among "truly addictive action games", saying the depth of its action keeps one playing and that no NES owner should be without it. It was rated Recommended.Magazine
Iwata recalled that the game wasn't released to great fanfare and didn't catch fire at once, but drew in everyone who played it. In January 1986 the Asahi Shimbun's Asahi Graph ran a feature on it that Uemura calls a strategy guide for adults, and a store sign in his photo from those days says it is sold out with no stock due. Iwata calls it a social phenomenon.Interview
In 2010 Iwata said Super Mario Bros. had sold more packaged copies in Japan than any other game.Interview
Imanishi, then Nintendo's head of general affairs, recalled that before the game the Diet had taken up video games' influence on children and newspapers were mostly negative, and that Mario's bright atmosphere cleared away that prejudice against the Famicom.Interview
Electronic Gaming Monthly's 1997 list of the 100 best games ranked it 37th, counting the Super NES All-Stars version, and said it brought the video game market back from the dead and set the standard for side-scrolling platform games after it.Magazine
VS. Super Mario Bros. is an arcade version for Nintendo's VS. System, sold as six software ROMs and two custom chips to fit a VS. board. A two-monitor VS. DualSystem takes one copy, on its main side, and the operator's switches set coins per credit or free play, the number of lives, the coins for an extra life, and a continue mode.Manual
Air controlIn the air the horizontal physics routine takes the running cap $28 and acceleration $E4 while Mario's speed is $19 or more, and the walking cap $18 with $98 (or $D0 while a running flag is set) below it, whatever B does.Code
The air steering routine runs the friction routine only while Left or Right is held, so in the air a held direction accelerates Mario toward it up to the cap and a released d-pad keeps his speed.Code
Because a jump keeps Mario's take-off facing, steering back slows him at the plain rate until he moves the other way, then at double the rate ($1A0 from a run).Verified
CHR bank switchingThe cartridge header declares two 16 KB PRG ROM pages and one 8 KB CHR ROM page, so the game's tile set never changes.Code
Coyote timeMario gets no grace window after leaving a ledge; the jump check refuses airborne jumps unless he is swimming.Code
Mario leaves a ledge on the frame his horizontal move leaves neither foot point over a block; the falling state that the background collision routine sets first then stays, so he ends that frame in the air, with a vertical speed of 0, and starts falling on the next. Walking right, the left foot point decides, so he walks 5 px past the edge (measured); walking left, the right foot point decides, 4 px past it (from the code's points).Verified
Demo playbackSuper Mario Bros.' demo is a script of 21 controller bytes in an action table, each held for the number of frames at the same place in a timing table; the demo routine moves to the next byte when the count runs out. The 21 counts add up to 1,119 frames (computed), about 18.6 seconds at the NES's 60.1 frames a second (computed).Code
The demo writes each byte into controller 1's saved byte at $06FC, the byte the interrupt routine fills from controller 1 every frame, and then calls the game's core routine, the same engine a game in play runs, so Mario moves by the ordinary player code.Code
Each time the title screen starts, the game's initialization sets the demo timer at $07A2 to $18 (24). It is one of the interval timers, which the interrupt routine counts down once every 21 frames, so the demo starts about 500 frames after the title appears (computed: 24 × 21 = 504, less up to 20 for the first tick). Pressing Select, or B once world select is enabled, puts the timer back to $18 while it is still running; once it has reached 0, the press resets the title screen instead.Code
The demo ends, and the title screen restarts from its initialization, in three ways: the script reaches its closing count of 0; the engine reaches its lose-life routine (engine subroutine 6); or a player presses Start (alone or with A) or Select on either controller; B, which the title screen checks for world select, isn't tested while the demo runs.Code
The demo doesn't reseed the random generator. The random register at $07A7 gets its seed $A5 only at reset, and the interrupt routine shifts it every frame; the game's initialization clears memory only up to $076F. The generator's state when the demo starts therefore depends on the number of frames since reset.Code
Destructible terrainThe solid-metatile check splits what a head can meet by the metatile's top two bits: at or above $10, $61, $88, or $C4 in its group is solid (smb1/head-solid); below is hit (the head-hit routine). The collision map stores nothing below $10, $51, $88, and $C0 in the same groups, so the hit kinds are $51–$60 (bricks, the cracked-rock ground, bricks with items, hidden blocks) and $C0–$C1 (? blocks); a used block ($C4), the solid blocks from $61, and pipes are solid.Code
The head-hit routine bumps the block unless Mario is big and the metatile is missing from a list of ? blocks ($C0, $C1), hidden blocks ($5F, $60), and bricks with items ($55–$5E); then it breaks it (smb1/brick-break). So big Mario breaks plain bricks ($51–$53) and bumps the rest, and small Mario bumps everything. Size is the player-size byte, so by the code a crouching big Mario breaks bricks too (not probed). Measured: big Mario, standing, broke a brick and bumped a ? block and a hidden block; small Mario bumped a brick and a ? block.Verified
A bump sets Mario's vertical speed byte to 0, keeping the fraction, and starts a block object at the block's row moving up at 2 px/frame under a gravity of $50/256 px/frame². The object moves on the hit frame itself, after the player; measured against its row, it reads −2, −4, −6, −7, −7, −8, −8, −8, −7, −6, −5, −4, −2, 0 px on the hit frame and the 13 after, and it ends when its Y's low nybble is under 5. The block's cell holds $23 from the hit frame, and the next frame's block metatile updater writes the block back: a used block ($C4) for ? blocks, hidden blocks, and item bricks, the metatile itself for a plain brick or ground block that small Mario hit. Measured: the cell held $23 for 14 frames.Verified
Every head hit that reaches the head-hit routine, bump or break, sets the block bounce timer to 16, a frame timer. Until it is back at 0, the head check treats bricks and ? blocks as solid without the sound (smb1/head-solid), so no second block can be bumped or broken for 16 frames. Measured after five bumps: 16 on the hit frame, 0 sixteen frames later.Verified
During a bounce, and on the frame after a brick breaks, the block's cell holds $23, and every test of the background collision routine takes its solid path for it: the head check's solid range starts at $10 in group 0; the foot check's exceptions (climbable from $24, the axe $C5, hidden blocks $5F and $60) miss it, so it lands Mario or pushes him back; and the side check's exceptions (hidden blocks, climbable, coins $C2 and $C3, jumpspring $67 and $68, the pipe openings) miss it, so it ends in the routine that stops his move.Code
Breaking a brick sets Mario's vertical speed byte to −2, adds 50 points, spawns debris (smb1/brick-debris), and flags the cell, which holds $23 meanwhile, to be cleared to 0. The clearing comes on the next frame's block metatile updater, after that frame's background collision routine, so the next frame's head check still meets $23 and sets the speed to 1: a break stops the jump one frame later, 1 or 2 px higher (computed), not passing through. Measured: 1 px higher, speed 1, and the cell 0 by the end of that frame, with a second brick stacked above never reached.Verified
The debris routine makes the debris from two block objects at the block's place, the upper starting up at 6 px/frame and the lower, 8 px down, at 4 px/frame, both with horizontal speed $F0. The block-object routine moves each under the block gravity ($50/256 px/frame², fall cap 8) and draws them with the chunk-drawing routine, which puts each object's two sprites at its own X and at the original X mirrored across it, plus 6, so four chunks fly apart.Code
Big Mario breaks a ground block he hits from below: the overworld's terrain metatile, $54 (cracked rock), is in the hit range and not in the list of blocks that even big Mario only bumps (? blocks, hidden blocks, bricks with items; smb1/bump-or-break), so the game treats it as a plain brick (smb1/bump-or-break). Measured with a $54 block written 4 rows above World 1-1's floor: big Mario broke it, for 50 points, and small Mario bumped it, the block bouncing and coming back as $54.Verified
A brick with coins ($58, $5D) starts a coin timer at 11 on its first hit. Every bump gives a coin; while the timer runs the brick comes back as itself, and the first bump after it reaches 0 leaves a used block. It is an interval timer, counted down once every 21 frames, so the brick pays out for 11 such ticks, 211 to 231 frames (computed).Code
DPCM samplesDuring the overworld and underwater songs the sound engine raises a counter by 1 a frame up to $30 and writes it to the DMC's output level at $4011; other songs count it back down to 0.Code
Enemy AIA Goomba starts walking left at 0.5 px a frame (1 px every second frame), and turns around at the same speed when it walks into a pipe or into another Goomba; two Goombas that meet both turn on the same frame. Walking off a ledge, it keeps its x speed and falls, its y speed growing by 61/256 px a frame every frame until its whole part reaches 3 px a frame (measured in Mesen).Verified
Enemies test for touching each other only on odd frames and never in water levels. A touch turns both around for any enemy with an id below 7 but the Hammer Bro (Goombas, Koopa Troopas, and Buzzy Beetles), and for Spinies and jumping Green Paratroopas. If one of them is in a state from 6 up, as a kicked shell is, the other is knocked out instead, and an enemy already knocked out touches nothing. With the game's hard-mode flag set, a Goomba walks at 0.75 px a frame.Code
A Goomba dies when Mario touches it while moving down: it is flattened, Mario bounces up with a y speed of −4, and, with the game's hard-mode flag clear, the flat Goomba is erased two ticks of the 21-frame interval timer later, 22 to 42 frames. A fireball, a kicked shell running into it, Mario touching it while the star is on, or a block bumped under it knock it out instead: it takes the defeated state and falls off the screen. Any other touch hurts Mario, unless the stomp timer is running, which makes it a stomp, or his injury timer is, which makes it nothing.Code
Enemy spawningWorld 1-1's enemy list holds 16 Goombas and one Green Koopa Troopa. Four Goombas stand alone, at columns 22 and 40 on the floor (row 11) and 80 and 82 on the high bricks (row 3), and the Koopa is at column 107 on the floor. The other 12 come in six pairs, keyed to columns 54, 100, 117, 127, 131, and 177, which appear at the screen's right edge on the floor. On one run through the level with the star held, measured in Mesen, 16 of the 17 appeared: the pair at column 131 got one Goomba, because only one of the five enemy slots was free.Verified
An enemy in Super Mario Bros.'s level data appears once the screen's right edge plus 48 px, rounded down to a 16 px column, reaches the enemy's column. A single enemy appears at its column's left edge, its y 8 px below its row's (row × 16 + 8) for an enemy id below $15, the Goomba's and the Koopa Troopa's among them, and a group appears at the screen's right edge, each member 24 px to the right of the last. Each one takes a free slot of the five, and a group member that finds none is dropped, not delayed (measured in Mesen).Verified
An enemy whose column is already left of the screen's right edge when the level data reaches it is skipped and never appears. With the game's hard-mode flag set, groups of Goombas come as Buzzy Beetles.Code
GravityVertical motion is 8.8 fixed point; each frame, the gravity routine adds speed to position, the fraction via a subpixel byte, then gravity to speed.Code
The vertical-move routine gives the gravity routine 4 px/frame as Mario's maximum fall speed; the clamp sets the speed back to 4 only when its whole part is at least 4 and its fraction byte at least $80.Code
The gravity routine clamps a fall of 4 px/frame or more only when the fraction byte is at least $80.Code
A falling Mario's gravity is a stored falling gravity, which the falling routine copies in every frame. Each area's entrance sets it to $28 (40/256 px/frame²), and only a jump changes it, to its row's falling gravity, so a walk-off before any jump falls at $28 and one after a jump at that jump's falling gravity.Verified
HitboxThe bounding-box table gives Mario a box for touching objects from 2 to 14 px across his sprite, and 8 to 32 px down when big or 20 to 32 px crouching; small Mario's runs from 3 to 13 across and 20 to 32 down.Code
Against the level, the background collision routine tests a head point at x+8, feet at x+3 and x+12 (y+32), and sides at x+2 and x+13, at y+8 and y+24 when big and both at y+24 when small or crouching.Code
The block-buffer lookup turns a point into a block lookup: it adds the point's offsets to Mario's position, takes the block column from X ÷ 16 and the block row from (Y & $F0) − 32, and returns the metatile stored there, with the low nybble of Mario's Y (head and feet) or X (sides) as the point's place inside its block.Code
Mario's background-collision routine runs after the frame's movement (smb1/frame-order). It first sets a swimming Mario's state to 1, and any other Mario in the normal or climbing state to falling (2), then tests the head, then the two foot points, then the side points, the left pair before the right. The first side point that finds a tile ends the check, though the first point of each pair passes over a pipe's top or a climbable. The side check then stops Mario unless the tile is a hidden block, a coin, a climbable, or a jumpspring in motion, or Mario, in the normal state and facing right, meets the bottom of a sideways or water pipe.Code
When a foot point finds an ordinary solid block and Mario isn't moving up, the background collision routine lands him if his Y is less than 5 px into the block's 16 px row; 5 px or more, it calls the push-back routine in his moving direction instead, which pushes him 1 px back unless he is already moving away, and leaves without checking his sides.Code
A side point in a block calls the push-back routine, which moves Mario 1 px away from the block and zeroes his speed byte, unless he is already moving away; either way it clears that side's d-pad bit in a collision byte, which the next frame's friction routine ANDs with the d-pad, so the next frame's friction ignores the direction into the wall.Verified
While Mario moves up, the background collision routine tests a single head point, the first of its point set (smb1/bg-points), after the frame's movement and before the feet. It acts only if his vertical speed byte is negative, the low nybble of his own Y is 4 or more, and his Y is at least $20 (big) or $10 (small, or big and crouching), and only if the point's metatile is nonzero and not a coin. So one block at most is hit per frame: when his head spans two blocks, the one under the point is hit and the other is ignored. Measured: big Mario under a brick that covered only his box's left part rose past it untouched.Verified
When the head point finds a block in the solid ranges (smb1/head-kinds), the background collision routine sets Mario's vertical speed byte to 1 and plays the bump sound; his position and the speed's fraction are left as they are, so the frame ends with his head inside the block and he starts down on the next. In water levels, and while the block bounce timer runs (smb1/bounce-timer), a brick or ? block gets the same speed of 1 without the sound and without being hit.Verified
A Goomba's hit box is 10 px wide and 6 px tall: from 3 to 13 px right of its x and from 14 to 20 px below its y (measured in Mesen).Verified
Invincibility framesA hit on big Mario sets the injury timer to 8, and enemy contact is skipped until it is back at 0. It is one of the interval timers, which the timer routine counts down once every 21 frames, so the window lasts 8 such ticks, 148 to 168 frames while the game's timers run.Code
JumpA jump starts only on the frame A goes down while Mario is grounded; the jump setup zeroes the vertical subpixel and sets the jumping state.Code
The jump setup picks one of five jump rows by take-off horizontal speed, stepping up at $09, $10, $19, and $1C.Code
The jump-speed table starts a jump at −4 px/frame (rows 0–2) or −5 px/frame (rows 3–4).Code
The jump's starting-fraction table gives jump rows 0–4 a zero speed fraction, so take-off is exactly −4.00 or −5.00 px/frame.Code
The press frame already moves Mario, since the player physics routine starts the jump before the state dispatch runs the jump-and-swim routine and the vertical move.Code
Swimming jumps use row 5 of the jump tables, or row 6 in a whirlpool.Code
The jump setup leaves Mario's horizontal speed alone and sets the jumping state before the horizontal physics routine runs, so the press frame already uses the air rules, and the take-off speed only picks the jump row.Code
On landing, the background collision routine snaps Mario's Y to a 16 px row and zeroes his vertical speed and its fraction, then sets the ground state; his horizontal speed is untouched, and the ground rules apply from the next frame.Verified
Mario can jump off a wall because the foot check counts a block in the wall's side as ground. If his move into a wall puts a foot point in a wall block while he is falling and less than 5 px below a block boundary, the background collision routine lands him there; he starts the next frame on the ground, so a fresh press of A then jumps.Code
A wall jump's press has to come on a frame that starts with Mario caught on the wall's side. Measured in the cartridge with big Mario, the window was one frame for a walking jump into a wall laid into World 1-1's start, two for a running hop into the level's first pipe, unedited, and one for a running hop from the bricks into World 2-1's last wall; a press on the catch frame itself, or one frame after the window, did nothing.Verified
Mario can jump off the side of a wall when his feet meet it at a block boundary, a glitch that Super Mario Wiki counts among maneuvers resembling the later, designed Wall Jump, with "frame-perfect timing". TASVideos' resource page explains it by the floor check running during the push out of a wall, and asks for an X speed above 16 toward the wall.Wiki
World 1-1's first four pipes stand at block columns 28, 38, 46, and 57, each two blocks wide, with their tops on rows 9, 8, 7, and 7, so 2, 3, 4, and 4 blocks above the floor; the fourth is the one Mario can enter.Code
World 2-1 ends with a column of solid blocks two wide and ten high, at block columns 190 and 191 from the level's start, rows 1 to 10, so its top is 160 px above the floor. Two columns before it is a jumpspring (column 188); over the ground in front of that are two bricks on row 7 (columns 185 and 186, tops 64 px up) and, over the second, a hidden coin block on row 3 (top 128 px up).Verified
No jump from the floor or the bricks in front of it clears World 2-1's last wall, and a wall jump from the bricks does. Measured in the cartridge with big Mario, starting from the wall's screen: after a running hop onto the bricks, a running jump from them with A held peaked 147 px above the floor, short of the wall's top at 160 (computed from the level data), and he next stood on the floor. From the floor, by arithmetic rather than a run, his highest jump's 83 px rise can't reach 160. A 4-frame hop from the bricks brought his foot to the wall's side 80 px up on the way down, at the end of frame 91; a press on frame 92 jumped him to 163 px and onto the top, and presses on frames 91 and 93 didn't jump. The level has another way up without a wall jump: the hidden coin block over the second brick, once hit, is a ledge 128 px up (computed), and a jump from it reaches the top.Verified
Music driverThe NMI handler calls the sound engine, which outside the title screen and pause runs the music handler: it steps square 2, square 1, the triangle, and the noise channel in turn, and each counts its note length down by 1 per call and reads its next byte at 0. Square 1 is skipped while its data offset is 0, and the noise channel is skipped during the underground and castle songs and while an event song has replaced the area song.Code
A song's header picks an 8-entry row of the note-length table, and a length code of 0-7 indexes it in frames; the overworld theme's row is 54, 3, 9, 6, 18, 27, 36, 12, and the hurry-up version adds 8 to the row offset for 36, 2, 6, 4, 12, 18, 24, 8.Code
In Super Mario Bros.'s overworld theme, a length of 18 frames (smb1-av/note-lengths) is a quarter note, which gives about 200 beats a minute at 60.1 frames a second (computed).Unsourced
A note byte is an offset into a table of 51 two-byte timer periods that the driver writes to the channel's timer registers; a recreation turns period t into fCPU/(16(t+1)) Hz on a square channel and half that on the triangle.Code
A new area-music square note sets duty and volume byte $82 and an envelope index of 8; each frame the driver writes the envelope table's entry at that index to the channel and counts the index down, so the note plays at 50% duty with volumes 0, 8, 7, 6, 5, 5, 4, 4 and then 0 until the next note.Code
The noise channel plays three drum sounds, all at constant volume 12 ($400C = $1C): a short beat at period index 3, a strong beat at period index 12, and a long beat at period index 3 with length-counter load $58 instead of $18; a silent beat writes $10, constant volume 0.Code
Super Mario Bros.'s song table has a second entry for the game-over song that none of the stores that name the event-music queue asks for: entry $04, bit 4 of that queue, points at $F966, the game-over song's header, as entry $01 does. Those stores write $08, $04, $02, $20, $40, $80, or 1. The square channels' code treats bit 4 as it treats bits 0 and 7, the death song and silence: for an event song with any of those bits (it tests %10010001), both square channels skip their envelope table.Code notes
Super Mario Bros.'s song table has an entry for steps of the aboveground theme that no store naming the area-music queue reaches: entry $08, which the engine's bit search gives for bit 0 of that queue, points at $F976, the header that steps 2, 3, 16 and 17 of the aboveground theme play. The area byte $01 alone goes to the aboveground theme's steps, entries $10 on; the search reaches entry $08 only for a byte with bit 0 and another bit set. Every store that names the area queue writes one bit: $80, $40, or one of $02, $01, $04, $08, $10 and $20 from a table, and the engine's own restarts pass on a byte it took from the queue.Code notes
Super Mario Bros. has a song header that no entry of its song table points at, so no request can play it. The five bytes at $F94E give note-length offset $20, as the level-clear song's header does, and song data at $FCC4, 20 bytes into the level-clear song's data, which starts at $FCB0; its triangle and square 1 offsets are $3F and $1D, where the level-clear song's are $3D and $21.Code
Replayed in FCEUX 2.6.6 and run 3,600 frames past its last input, DaSmileKat, HappyLee and Mars608's "all items" movie of Super Mario Bros. (TASVideos publication 4313, 71,438 frames) has the sound engine load 19 of the song table's 49 entries. It never asks for the death song $00, the game-over song $01, the time-running-out song $06, or the cloud song $0C. The aboveground theme never plays past its ninth step, so steps $19 to $30 never load, and the run never loads $04 or $08.Verified
Palette cyclingEvery 8th frame the color-rotation routine rewrites background palette 3 at $3F0C, putting the next of six colors, $27, $27, $27, $17, $07, $17, in its second entry, so the question blocks and coins shimmer on a 48-frame loop.Code
Power-upWorld 1-1 has 13 ? blocks: 11 placed one at a time and a row of two at columns 129 and 130. Three of the single ones hold a power-up: the left ? block in the first brick row (column 21), the ? block in the bricks past the first pit (column 78), and the high ? block at column 109. The other ten, the row's two among them, hold coins.Code
A ? block's power-up is a mushroom when Mario is small and a fire flower when he's big. It appears 8 px above the block's top, behind the background, on the frame he bumps it, and rises a pixel on every frame whose frame counter is a multiple of 4: 17 px over 17 such frames. On the last it starts moving right at 1 px a frame and comes in front of the background. Until it has risen 5 px it isn't drawn and can't be touched.Verified
Once out, a mushroom moves as a walking enemy does: 1 px a frame, turned around by a solid block at its side, falling off an edge with gravity of 61/256 px a frame per frame up to 3 px a frame, and landing on a block its foot (8 px across, 24 down) finds when its y is 8 to 12 px into a tile row. A fire flower stays where it rose.Verified
Mario takes a power-up when its box, 2 to 14 px across its sprite and 9 to 21 down, touches his (edges count), tested only on frames with an even frame counter. Small Mario becomes super and super Mario fiery; either way the game stops for the change and puts him in the on-the-ground state, wherever he is.Verified
Taking a mushroom stops the game for the next 59 frames: no timer runs and Mario doesn't move, though the frame counter keeps counting. His size changes on the 7th of them, and play resumes on the frame after the 59th. Taking a fire flower stops it for 63 frames.Verified
RunningHorizontal speeds are 4.4 fixed point, whole pixels and sixteenths per frame; the horizontal-move routine shifts the sixteenths into the subpixel byte.Code
Mario's top ground speed is $18 walking and $28 running (B held).Code
Each frame the player control routine splits the d-pad bits, runs the jump check, the horizontal physics, and the state's routine (which changes the speed, then moves Mario), sets his moving direction from the speed's sign, and only then runs the background collision routine, which lands him.Code
Mario's horizontal fraction byte sits below his speed byte, so acceleration works in 1/256 of a sixteenth (1/4096 px/frame) and carries into the speed byte, but the horizontal-move routine moves Mario by the speed byte alone.Code
The friction table gives Mario's acceleration and braking per frame: $E4 running, $98 walking, and $D0 walking while still fast from a run, in 1/4096 px/frame.Code
On the ground the horizontal physics routine uses the running row (cap $28, acceleration $E4) while B and the direction Mario moves in are held and for the 9 frames after B goes up; otherwise the walking row (cap $18, $98, or $D0 while a running flag is set or his speed is $21 or more).Code
The horizontal physics routine doubles the acceleration whenever Mario faces away from the direction he moves, so a turn brakes at $130, $1A0, or $1C8 a frame.Code
When a held direction carries the speed to its cap or past it, the friction routine sets the speed byte to the cap, so a speed above the cap drops to it in one frame.Code
With neither Left nor Right held on the ground, the friction routine brakes Mario by the frame's acceleration toward zero and stops once the speed byte reaches 0, leaving the fraction byte as it is.Code
On the ground, the animation-speed routine zeroes Mario's speed and turns his moving direction to his facing one when a button other than A is held, the d-pad's Left/Right bits differ from his moving direction, and his speed is below $0B.Code
On the ground the on-ground routine turns Mario toward a held Left or Right before friction runs; the jumping and falling routines change his facing only while he swims.Code
On the ground, Down with Left or Right clears both, so Mario neither walks nor crouches, and friction slows him as it does with the d-pad released. The skid check still reads the buttons held, though, so unless he holds the way he is moving it stops him dead below $0B. Big Mario holding Down alone crouches.Code
Measured from a standstill in World 1-1, Mario reaches $18 on frame 40 walking and $28 on frame 45 running, and let go at those speeds he stops in 40 and 49 frames.Verified
A frame-by-frame model of the horizontal physics, animation-speed, and friction routines reproduces Mario's speed bytes, facing, moving direction, and run timer on every frame of 17 probed traces, walking, running, skidding, crouching, and jumping.Verified
ScrollingSuper Mario Bros.' screen scrolls only to the right, by as many px as Mario moved right this frame, once his x on screen (his x less the screen's left edge, as of when he was last drawn) is 80 px or more; below 112 px a move of 2 px or more scrolls 1 px less. A scroll lock or a recent bump into a wall's side stops it, and a moving platform's push counts as his movement. While a springboard is animating, Mario doesn't move and its animation counter counts as his movement instead.Code
Sprite flickerEvery unpaused frame the sprite shuffler adds one of three amounts, $58, $48, or $38 in turn, to each object's OAM offset at or above $28, wrapping within $28-$FF, so the objects' sprites change OAM slots each frame and a ninth sprite on a line drops out on different frames.Code
Status bar splitThe NMI handler first sets the scroll to 0; then, while the game's sprite 0 check is on, it waits for the sprite 0 hit flag to clear, spins until the sprite 0 hit, waits a short loop for horizontal blank, and only then writes the level's scroll, so the status bar above the hit is drawn at scroll 0. With the check off it writes the level's scroll without waiting.Code
The game sets sprite 0 to OAM bytes $18, $FF, $23, $58, so tile $FF sits at Y $18 and X $58 behind the background in palette 7, the last sprite palette (computed).Code
Variable jump heightWhile a jump rises with A held, gravity is the rising-gravity table's $20, $20, $1E, $28, $28 subpixels/frame² for rows 0–4.Code
After the switch, gravity is the falling-gravity table's $70, $70, $60, $90, $90 subpixels/frame² for rows 0–4.Code
In rows 0–1, the standing and slow jumps, held gravity is $20/256 = 0.125 px/frame².Code
In rows 0–1, falling gravity is $70/256 = 0.4375 px/frame².Code
In rows 0–1, falling gravity ($70) is 3.5 times held gravity ($20).Code
The jump-and-swim routine swaps in falling gravity, never back, once speed is zero or downward, or once the jump has risen at least a set minimum (smb1/diff-to-halt-jump) on a frame when A is not held, or was not held the frame before.Code
The jump setup sets the minimum rise for a release to 1, so a release switches gravity only once Mario has risen at least 1 pixel.Code
Measured in the game on flat ground, the apexes, tapped/held, are 24/66 px standing, 27/71 px walking, and 29/83 px running.Verified
Measured in the game with A held, Mario's jumps peak at 66 px standing, 71 px walking, and 83 px running.Verified

References

  1. ^InterviewIwata Asks, SMB 25th, Vol. 2 p. 1 · Iwata Asks, SMB 25th, Vol. 5 p. 1 · Nintendo, Company History
    How we know

    Nintendo dates the release of Super Mario Bros. to 13 September 1985.

    This September 13th marked the 25th anniversary of the release of the game Super Mario Bros.
    Vol. 2, p. 1, opening · archived copy ↗
    A side-scrolling action game released for the Family Computer System (Famicom) and the Nintendo Entertainment System (NES) in September 1985.
    Vol. 5, p. 1, note 1 · archived copy ↗
    Started selling the Super Mario Bros. game software for the Nintendo Entertainment System.
    1985 · archived copy ↗

    Claim page

  2. ^PublisherNintendo, NES Games
    How we know

    Nintendo of America's list of NES games dates the North American release October 1985.

    Super Mario Bros. Nintendo October 1985
    PDF p. 12 · archived copy ↗

    Claim page

  3. ^ManualSuper Mario Bros. instruction booklet
    How we know

    In the manual's story the Koopa, a tribe of turtles, have invaded the Mushroom Kingdom and turned its people into stones, bricks, and plants. Only Princess Toadstool, the Mushroom King's daughter, can undo the spell, and the Koopa king holds her; Mario sets out to free her.

    One day the kingdom of the peaceful mushroom people was invaded by the … Mushroom People were turned into mere stones, bricks and even field horse- … The only one who can undo the magic spell on the Mushroom People and … the Mushroom King. Unfortunately, she is presently in the hands of the great … plight and sets out on a quest to free the Mushroom Princess from the evil
    Object of the Game · archived copy ↗
    Bowser,
    Characters · archived copy ↗

    Claim page

  4. ^ManualSuper Mario Bros. instruction booklet · Computer Entertainer, June 1986
    How we know

    A second player plays Luigi on controller 2, taking turns with the first.

    Controller 2 — for second player in 2 player game … moves Mario (Luigi
    2. Names of Controller Parts · archived copy ↗
    (Solo or 2-player alternating; Pause.)
    review of Super Mario Bros. · archived copy ↗

    Claim page

  5. ^ManualSuper Mario Bros. instruction booklet
    How we know

    The screen scrolls to the right as Mario goes. The kingdom is a number of worlds of four areas each, the fourth ending in a castle, and Mario has to reach each world's castle within the given time. A lost life halfway through an area restarts there, and an area ends at a flagpole whose bonus rises with how high Mario lands on it.

    As this game proceeds the screen gradually advances … a number of worlds, and each world is divided into 4 … areas. The fourth area of each world ends in a big … to make it to the castle at the end of each world with- … in the given time. Along the way are mountains, pits,
    3. How to Play · archived copy ↗
    ever, once Mario gets about halfway through an area, he doesn't have to go all
    3. How to Play, Starting position and time progress · archived copy ↗
    flagpole, the higher the bonus … the end of each area there … jump onto a flagpole. The … higher you jump onto the
    3. How to Play, Finish Area · archived copy ↗

    Claim page

  6. ^InterviewIwata Asks, SMB 25th, Vol. 5 p. 3 · Nintendo Power 3
    How we know

    The game has eight worlds; Miyamoto says warps let a good player go from World 1 straight to World 8, to reach the end.

    So we made warps possible for people who want to play to the end. If the players figure out the warps, they can jump to World 8 right away.
    Vol. 5, p. 3, The Grand Culmination · archived copy ↗
    dream your way through all 8 Worlds of Super Mario Bros.?
    PDF p. 34, holiday gift guide · archived copy ↗

    Claim page

  7. ^ abManualSuper Mario Bros. instruction booklet
    How we know

    Power-ups hidden in bricks and invisible blocks change Mario: the manual's chart sets the Magic Mushroom, the Fire Flower, and the Starman beside Super Mario and Fiery Mario, and after the Fire Flower, B throws fireballs. A hit turns Super or Fiery Mario back into regular Mario, who flickers and can't be hurt for a short while. An extra life comes from a 1-up mushroom or 100 coins.

    If you come across mushrooms who have been turned … into bricks or made invisible, they reward you by … *When Super Mario or Fiery Mario are bumped into by a bad guy, they don't die … but simply return to their old regular-Mario selves. … For a short while after turning back into his regular-Mario self, Mario flickers. … During this time, he can not be killed by bad guys (he's invincible).
    Mario's Friends · archived copy ↗
    Fireballs ...... After you pick up the fire flower, you can use this button to throw
    2. Names of Controller Parts, B button · archived copy ↗
    If Mario picks up 1 up mushroom, he gets an extra life. … If Mario picks up 100 coins, he gets an extra life.
    Bonus Prizes · archived copy ↗
    Magic Mushroom … Starman
    Mario's Friends, chart · archived copy ↗

    Claim page

  8. ^InterviewIwata Asks, SMB 25th, Vol. 5 p. 1 · Iwata Asks, SMB 25th, Vol. 5 p. 2 · Iwata Asks, SMB 25th, Vol. 5 p. 3
    How we know

    Nintendo names the game's original developers as Shigeru Miyamoto, who wrote its specifications; Takashi Tezuka, a designer in his first year at Nintendo when the first plans were drawn up; Toshihiko Nakago, president of SRD, the contractor whose programmers built it; and Koji Kondo, whom Miyamoto appointed to sound.

    I have gathered the original developers, four men who continue to be active in development of the Super Mario Bros. series.
    Vol. 5, p. 1, opening · archived copy ↗
    These are Miyamoto-san's first specifications for Super Mario Bros.
    Vol. 5, p. 1 · archived copy ↗
    Super Mario Bros. was completed your second year at the company, so when the first plans were drawn up, you two were still new guys in your first year. … Back then, before Tezuka-san came, I was doing all the design work myself, so it was a big help just to have another designer.
    Vol. 5, p. 2, The New Guys, Too! · archived copy ↗
    A company established in 1979 that contracts to develop video game software programs and develops and sells CAD packages. The head office is in Osaka, but their Kyoto office is inside Nintendo headquarters. Toshihiko Nakago is company president.
    Vol. 5, p. 1, note 4 · archived copy ↗
    so I asked the programmers at Nakago-san's company, SRD
    Vol. 5, p. 1 · archived copy ↗
    the SRD members who had made, for example, the Springs in Donkey Kong Jr.12, were also participating in the Super Mario Bros. project
    Vol. 5, p. 3, The Grand Culmination · archived copy ↗
    After Kung-Fu, we started making Super Mario Bros., and I appointed Kondo-san to sound.
    Vol. 5, p. 2, The New Guys, Too! · archived copy ↗

    Claim page

  9. ^InterviewIwata Asks, SMB 25th, Vol. 5 p. 3
    How we know

    Miyamoto says he set out to make something like his arcade Mario Bros. (1983), which didn't scroll and had a black background, but scrolling, bright, and with bigger characters. To make the screen scroll, he gave up on the two-player game that Mario Bros. had.

    About two years before Super Mario Bros., I made the arcade version of Mario Bros., but the screen didn't scroll, the background was black, and it was sort of plain. … So I decided to test out something like Mario Bros., but which scrolled, had a bright background, and had bigger characters moving around. … I wanted the screen to scroll, so at that point, I gave up on a two-player game. … Two people could enjoy playing Mario Bros., but it didn't scroll sideways.
    Vol. 5, p. 3, The Grand Culmination · archived copy ↗

    Claim page

  10. ^InterviewIwata Asks, SMB 25th, Vol. 5 p. 3
    How we know

    The game drew on Nintendo's earlier ones. Its specification lists refinements of Donkey Kong's slopes, lifts, conveyor belts, and ladders, Donkey Kong Jr.'s ropes, logs, and springs, and Mario Bros.' enemies, frozen platforms, and POW Blocks. Iwata says the scrolling came from Excitebike and the large characters from Devil World, and Nakago that SRD's makers of Donkey Kong Jr.'s springs brought them in.

    Add refinements focusing on Donkey Kong's slopes, lifts, conveyor belts and ladders; Donkey Kong Jr.'s ropes, logs and springs; and Mario Bros.'s enemy attacks, enemy movement, frozen platforms and POW Blocks. … you brought in the partial scrolling technology from Excitebike, which allowed you to scroll part of the screen, and the two-character mode technology from Devil World, which allowed characters twice the size of those in Mario Bros. … Right. It was a combination of elements from previous games. … the SRD members who had made, for example, the Springs in Donkey Kong Jr.12, were also participating in the Super Mario Bros. project, so they brought that straight in.
    Vol. 5, p. 3, The Grand Culmination · archived copy ↗

    Claim page

  11. ^InterviewIwata Asks, SMB 25th, Vol. 5 p. 3
    How we know

    Miyamoto says the warps came from Excitebike's arcade version, which let a player choose which of its three levels to start on: since a cartridge couldn't save, a good player could skip ahead instead of playing from the start every time.

    perhaps the most important one was Excitebike. For example, the idea for warps came from there. … The arcade version of Excitebike had three levels, and you could choose where you wanted to start playing. … Right. Every time, you had to play from the beginning.
    Vol. 5, p. 3, The Grand Culmination · archived copy ↗

    Claim page

  12. ^InterviewIwata Asks, SMB 25th, Vol. 5 p. 3 · Iwata Asks, SMB 25th, Vol. 2 p. 4
    How we know

    Miyamoto says that, a year before the Disk System, the team meant it to be their last cartridge game, and packed in as much as they could to show what Nintendo could do with one. In another interview Izuhiko Imanishi recalled him making it on cartridge on purpose against the expectation of the Disk System, and Masayuki Uemura disputed it.

    It was the year before the Disk System came out, and we intended it to be the last game we released on a cartridge. I wanted to put in as much as possible that would make people think, "Nintendo sure does know cartridges!"
    Vol. 5, p. 3, The Grand Culmination · archived copy ↗
    I had the impression that Miyamoto-kun* purposely made Super Mario Bros. on cartridge against everyone's anticipation surrounding the Disk System. … No, not true! Not true!
    Vol. 2, p. 4 · archived copy ↗

    Claim page

  13. ^InterviewIwata Asks, SMB 25th, Vol. 5 p. 3
    How we know

    Iwata says the game used 256-kilobit memory at first, and Miyamoto that its characters stayed at 64 kilobits.

    When you first made Super Mario Bros., you used 256-kilobit memory at first. … That's right. The characters stayed at 64 kilobits, though.
    Vol. 5, p. 3, The Grand Culmination · archived copy ↗

    Claim page

  14. ^CodeXkeeper0/smb1smb1.asm 4–10
    How we know

    The cartridge header declares two 16 KB PRG ROM pages and one 8 KB CHR ROM page, so the game's tile set never changes.

    4	.db "NES", $1a ; identification of the iNES header
    ⋮
    6	.db 2 ; number of 16KB PRG-ROM pages
    7	.db 1 ; number of 8KB CHR-ROM pages
    ⋮
    10	.db 1 ; mapper/mirroring/whatever
    
    smb1.asm lines 4–10 at 1cc3c92 · upstream ↗

    Claim page

  15. ^InterviewIwata Asks, SMB 25th, Vol. 5 p. 3
    How we know

    At the end of development the team used up the spare bytes usually left for bug fixes: with 20 bytes left, Miyamoto added a crown as a reward for ten or more extra lives, and with eight left, more blocks.

    And 20 bytes were left over, so Miyamoto-san said, "Let's make a crown!" … I wanted to make a crown as a reward for people who got ten or more extra lives. … Usually you would leave about 100 bytes as a precaution against bugs that might need to be fixed … "There are eight bytes left, so is there anything you want to put in?" … I really wanted to put some blocks here!
    Vol. 5, p. 3, The Grand Culmination · archived copy ↗

    Claim page

  16. ^InterviewIwata Asks, SMB 25th, Vol. 2 p. 4
    How we know

    Iwata recalled that the game wasn't released to great fanfare and didn't catch fire at once, but drew in everyone who played it. In January 1986 the Asahi Shimbun's Asahi Graph ran a feature on it that Uemura calls a strategy guide for adults, and a store sign in his photo from those days says it is sold out with no stock due. Iwata calls it a social phenomenon.

    It's not like Super Mario Bros. was released to great fanfare or really caught fire just after release, either. … Without exception, though, those who played it were drawn in. … "Super Mario Bros. and Portopia Renzoku Satsujin Jiken14 are sold out. No further stock scheduled. Our apologies." … "Take a Bite Out of Super Mario Bros." It's dated January 1986. … This feature article was in the Asahi Graph, published by Asahi Shimbun. … If you think about the reader demographic, this is a strategy guide for adults. … I've got this photo from those days... … At that time, it truly was a social phenomenon.
    Vol. 2, p. 4 · archived copy ↗

    Claim page

  17. ^InterviewIwata Asks, SMB 25th, Vol. 2 p. 1
    How we know

    In 2010 Iwata said Super Mario Bros. had sold more packaged copies in Japan than any other game.

    when it comes to the number of packaged copies of a game sold in Japan, Super Mario Bros. still far surpasses all other games.
    Vol. 2, p. 1 · archived copy ↗

    Claim page

  18. ^InterviewIwata Asks, SMB 25th, Vol. 2 p. 4 · Iwata Asks, SMB 25th, Vol. 2 p. 1
    How we know

    Imanishi, then Nintendo's head of general affairs, recalled that before the game the Diet had taken up video games' influence on children and newspapers were mostly negative, and that Mario's bright atmosphere cleared away that prejudice against the Famicom.

    Before Super Mario Bros. came out, even the parliament had taken up the issue of the influence of video games on children, and newspaper articles were mostly negative. But Mario's bright atmosphere cleared away that prejudice against the Famicom.
    Vol. 2, p. 4 · archived copy ↗
    When the Famicom (Nintendo Entertainment System) came out, Imanishi-san was heading the General Affairs Department
    Vol. 2, p. 1 · archived copy ↗

    Claim page

  19. ^MagazineComputer Entertainer, February 1986
    How we know

    In February 1986 Computer Entertainer listed Super Mario Bros. among the 15 games sold with the NES in the markets it had reached, as a $30 Action Series game. After New York, shipments to southern California were about to begin.

    is accompanied by 15 games in the markets where it is
    Nintendo Update (printed page unmarked in the OCR) · archived copy ↗
    CLIMBER, KUNG FU, SUPER MARIO BROS., and PINBALL … (Action Series at $30) … this issue went to press, shipments into southem California were about
    Nintendo Update · archived copy ↗

    Claim page

  20. ^MagazineComputer Entertainer, June 1986
    How we know

    From June 1986 Nintendo offered the NES in a new, cheaper set, the Control Deck, with two controllers and the Super Mario Bros. Game Pak, while the Deluxe Set kept its robot, light gun, and two games.

    this month, Nintendo will offer its system in a new
    New Way to Buy Nintendo System (printed page unmarked in the OCR) · archived copy ↗
    allowing consumers an inexpensive way to … The new option is to puhase the NES Control Deck, which includes two corollers and the “Super Mario Bros." Game Pak … rot and "Duck Hunt" and “Gyromite” Game Paks will
    New Way to Buy Nintendo System · archived copy ↗

    Claim page

  21. ^PublisherNintendo, NES Games
    How we know

    In North America the game was later sold on two multicarts, with Duck Hunt from November 1988 and with Duck Hunt and World Class Track Meet from December 1990, by Nintendo of America's list.

    2-in-1 Super Mario Bros/Duck Hunt Nintendo November 1988 … 3-in-1 Super Mario Bros/Duck Hunt/World Class Track Meet Nintendo December 1990
    PDF p. 1 · archived copy ↗

    Claim page

  22. ^MagazineComputer Entertainer, June 1986
    How we know

    Computer Entertainer's June 1986 review called the game "sheer delight" and placed it among "truly addictive action games", saying the depth of its action keeps one playing and that no NES owner should be without it. It was rated Recommended.

    For the game player, it's sheer delight
    review of Super Mario Bros. (printed page unmarked in the OCR) · archived copy ↗
    reserved for truly addictive action games … action that keeps you playing again and again … the Nintendo Entertainment System should be without … game--it's a must! … Recommended. (MSR $29.95)
    review of Super Mario Bros. · archived copy ↗

    Claim page

  23. ^MagazineEGM 100
    How we know

    Electronic Gaming Monthly's 1997 list of the 100 best games ranked it 37th, counting the Super NES All-Stars version, and said it brought the video game market back from the dead and set the standard for side-scrolling platform games after it.

    37 Super Mario Bros. (All-Stars Edition) … this game brought the video game market back from the dead … it set the standard for all side-scrolling platform titles from that point on
    100 Best Games of All Time, no. 37 · archived copy ↗

    Claim page

  24. ^ManualVS. Super Mario Bros. operation manual
    How we know

    VS. Super Mario Bros. is an arcade version for Nintendo's VS. System, sold as six software ROMs and two custom chips to fit a VS. board. A two-monitor VS. DualSystem takes one copy, on its main side, and the operator's switches set coins per credit or free play, the number of lives, the coins for an extra life, and a continue mode.

    “VS. SUPER MARIO BROS.” contains 6 Software ROMs and 2 Custom ICs … For VS. DUAL SYSTEM (two monitors) : Only one“VS. SUPER MARIO BROS.” can … the main Cleft) side of the cabinet.
    1. How to install Software ROMs · archived copy ↗
    CREDIT/COIN … FREE PLAY … NUMBER OF LIVES … EXTRA LIFE COINS … CONTINUE MODE
    2. Game Option Settings · archived copy ↗

    Claim page

  25. ^CodeXkeeper0/smb1 · Jdaster64 n.d. · “Super Mario Bros. (World)”prg.asm 4873–4874, 5000–5014
    How we know

    Mario's top ground speed is $18 walking and $28 running (B held).

    4873MaxRightXSpdData:
    
    src/prg.asm lines 4873–4874 at 1cc3c92 · upstream ↗
    5009	AND #B_Button
    5010	BNE SetRTmr                                  ; if pressed, skip ahead to set timer
    ⋮
    5014	INY                                          ; if running timer not set or level type is water,
    
    src/prg.asm lines 5000–5014 at 1cc3c92 · upstream ↗
    Maximum walk speed (normal, castle cutscene) 01900 | Maximum running speed 02900
    SMB PHYSICS 101 / GROUND PHYSICS, Mario table · archived copy ↗

    In the cartridge (“Super Mario Bros. (World)”): MaxRightXSpdData. We don't reproduce the bytes.

    Claim page

  26. ^VerifiedXkeeper0/smb1 · “Super Mario Bros. (World)”prg.asm 4877–4878, 5042–5047, 4870–4874, 5028–5036
    How we know

    Measured from a standstill in World 1-1, Mario reaches $18 on frame 40 walking and $28 on frame 45 running, and let go at those speeds he stops in 40 and 49 frames.

    4877FrictionData:
    
    src/prg.asm lines 4877–4878 at 1cc3c92 · upstream ↗
    5042	LDA PlayerFacingDir
    
    src/prg.asm lines 5042–5047 at 1cc3c92 · upstream ↗
    4870MaxLeftXSpdData:
    ⋮
    4873MaxRightXSpdData:
    
    src/prg.asm lines 4870–4874 at 1cc3c92 · upstream ↗

    In the cartridge (“Super Mario Bros. (World)”): FrictionData; MaxLeftXSpdData, MaxRightXSpdData. We don't reproduce the bytes.

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on Super Mario Bros. (World) (SHA-1 33d23c2f2cfa…). It fails if the result disagrees with the claim.

    1 more excerpts on the claim page

  27. ^CodeXkeeper0/smb1prg.asm 4913–4923, 4931–4942, 4139–4141
    How we know

    A jump starts only on the frame A goes down while Mario is grounded; the jump setup zeroes the vertical subpixel and sets the jumping state.

    4913	LDA A_B_Buttons                              ; check for A button press
    ⋮
    4916	AND PreviousA_B_Buttons                      ; if button not pressed in previous frame, branch
    ⋮
    4922	LDA Player_State                             ; check player state
    4923	BEQ InitJS                                   ; if on the ground, branch
    
    src/prg.asm lines 4913–4923 at 1cc3c92 · upstream ↗
    4935	STY Player_YMF_Dummy
    ⋮
    4941	LDA #$01                                     ; set player state to jumping/swimming
    
    src/prg.asm lines 4931–4942 at 1cc3c92 · upstream ↗
    4141	STA PreviousA_B_Buttons                      ; into temp variable to be used on next frame
    
    src/prg.asm lines 4139–4141 at 1cc3c92 · upstream ↗

    Claim page

  28. ^CodeXkeeper0/smb1 · Jdaster64 n.d.prg.asm 4943–4955
    How we know

    The jump setup picks one of five jump rows by take-off horizontal speed, stepping up at $09, $10, $19, and $1C.

    4943	LDA Player_XSpeedAbsolute                    ; check value related to walking/running speed
    4944	CMP #$09
    ⋮
    4947	CMP #$10
    4948	BCC ChkWtr
    ⋮
    4950	CMP #$19
    4951	BCC ChkWtr
    ⋮
    4953	CMP #$1c
    4954	BCC ChkWtr                                   ; note that for jumping, range is 0-4 for Y
    
    src/prg.asm lines 4943–4955 at 1cc3c92 · upstream ↗
    Less than 01000 | 01000 – 024FF | 02500 or greater
    JUMPING/VERTICAL PHYSICS, Mario table · archived copy ↗

    Claim page

  29. ^ManualSuper Mario Bros. instruction booklet
    How we know

    The manual says the d-pad walks Mario and B held with it runs; A jumps, higher the longer it is held, and higher from a run; the d-pad steers him in mid-air; and Super Mario jumps as high as Mario. The pad's chart also lists a crouch, for Super Mario only.

    (Push button B at the
    2. Names of Controller Parts · archived copy ↗
    Mario (Luigi) jumps higher if you hold the button down longer.
    2. Names of Controller Parts, A button · archived copy ↗
    Accelerate ... Press this button to speed up, then jump and you can go all the
    2. Names of Controller Parts, B button · archived copy ↗
    hook to the left or right even in mid-air! … Jumping.......Mario and Super Mario both jump the
    3. How to Play, Pointers · archived copy ↗
    (Super Mario only.) … Crouch.
    2. Names of Controller Parts · archived copy ↗

    Claim page

  30. ^CodeXkeeper0/smb1 · Jdaster64 n.d.prg.asm 4756–4769
    How we know

    The jump-and-swim routine swaps in falling gravity, never back, once speed is zero or downward, or once the jump has risen at least a set minimum (smb1/diff-to-halt-jump) on a frame when A is not held, or was not held the frame before.

    4757	BPL DumpFall                                 ; or moving downwards, branch to falling
    ⋮
    4760	AND PreviousA_B_Buttons                      ; and was pressed in previous frame
    4761	BNE ProcSwim                                 ; if so, branch elsewhere
    ⋮
    4765	CMP DiffToHaltJump                           ; compare to value set here to see if player is in mid-jump
    ⋮
    4768	LDA VerticalForceDown                        ; otherwise dump falling into main fractional
    4769	STA VerticalForce
    
    src/prg.asm lines 4756–4769 at 1cc3c92 · upstream ↗
    so long as they are moving upward in a jump, holding “A” will make them rise more slowly
    JUMPING/VERTICAL PHYSICS · archived copy ↗

    Claim page

  31. ^VerifiedXkeeper0/smb1prg.asm 4756–4769, 6664–6696, 4957–4958
    How we know

    Measured in the game on flat ground, the apexes, tapped/held, are 24/66 px standing, 27/71 px walking, and 29/83 px running.

    4758	LDA A_B_Buttons
    ⋮
    4763	SEC
    ⋮
    4767DumpFall:
    ⋮
    4769	STA VerticalForce
    
    src/prg.asm lines 4756–4769 at 1cc3c92 · upstream ↗
    6681	LDA SprObject_Y_MoveForce,x
    6682	CLC
    ⋮
    6684	STA SprObject_Y_MoveForce,x
    ⋮
    6686	ADC #$00
    6687	STA SprObject_Y_Speed,x
    ⋮
    6690	LDA SprObject_Y_MoveForce,x
    
    src/prg.asm lines 6664–6696 at 1cc3c92 · upstream ↗
    4958	STA DiffToHaltJump
    
    src/prg.asm lines 4957–4958 at 1cc3c92 · upstream ↗

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on . It fails if the result disagrees with the claim.

    Claim page

  32. ^VerifiedXkeeper0/smb1prg.asm 4756–4769, 6664–6696, 4957–4958
    How we know

    Measured in the game with A held, Mario's jumps peak at 66 px standing, 71 px walking, and 83 px running.

    4758	LDA A_B_Buttons
    ⋮
    4763	SEC
    ⋮
    4767DumpFall:
    ⋮
    4769	STA VerticalForce
    
    src/prg.asm lines 4756–4769 at 1cc3c92 · upstream ↗
    6681	LDA SprObject_Y_MoveForce,x
    6682	CLC
    ⋮
    6684	STA SprObject_Y_MoveForce,x
    ⋮
    6686	ADC #$00
    6687	STA SprObject_Y_Speed,x
    ⋮
    6690	LDA SprObject_Y_MoveForce,x
    
    src/prg.asm lines 6664–6696 at 1cc3c92 · upstream ↗
    4958	STA DiffToHaltJump
    
    src/prg.asm lines 4957–4958 at 1cc3c92 · upstream ↗

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on . It fails if the result disagrees with the claim.

    Claim page

  33. ^CodeXkeeper0/smb1prg.asm 6666–6687
    How we know

    Vertical motion is 8.8 fixed point; each frame, the gravity routine adds speed to position, the fraction via a subpixel byte, then gravity to speed.

    6668	ADC SprObject_Y_MoveForce,x
    6669	STA SprObject_YMF_Dummy,x
    ⋮
    6676	ADC SprObject_Y_Position,x                   ; add vertical position to vertical speed plus carry
    ⋮
    6683	ADC $00                                      ; add downward movement amount to contents of $0433
    ⋮
    6685	LDA SprObject_Y_Speed,x                      ; add carry to vertical speed and store
    
    src/prg.asm lines 6666–6687 at 1cc3c92 · upstream ↗

    Claim page

  34. ^CodeXkeeper0/smb1 · Jdaster64 n.d.prg.asm 6547–6550, 6688–6696
    How we know

    The vertical-move routine gives the gravity routine 4 px/frame as Mario's maximum fall speed; the clamp sets the speed back to 4 only when its whole part is at least 4 and its fraction byte at least $80.

    6549	LDA #$04                                     ; set maximum vertical speed here
    6550	JMP ImposeGravitySprObj                      ; then jump to move player vertically
    
    src/prg.asm lines 6547–6550 at 1cc3c92 · upstream ↗
    6688	CMP $02                                      ; compare to maximum speed
    ⋮
    6691	CMP #$80                                     ; if less positively than preset maximum, skip this part
    ⋮
    6694	STA SprObject_Y_Speed,x                      ; keep vertical speed within maximum value
    ⋮
    6696	STA SprObject_Y_MoveForce,x                  ; clear fractional
    
    src/prg.asm lines 6688–6696 at 1cc3c92 · upstream ↗
    their vertical downward velocity caps at 04800 in most cases, wrapping back to 04000 when exceeded
    JUMPING/VERTICAL PHYSICS · archived copy ↗

    Claim page

  35. ^CodeXkeeper0/smb1 · Jdaster64 n.d.prg.asm 6688–6696
    How we know

    The gravity routine clamps a fall of 4 px/frame or more only when the fraction byte is at least $80.

    6688	CMP $02                                      ; compare to maximum speed
    6689	BMI ChkUpM                                   ; if less than preset value, skip this part
    6690	LDA SprObject_Y_MoveForce,x
    6691	CMP #$80                                     ; if less positively than preset maximum, skip this part
    6692	BCC ChkUpM
    
    src/prg.asm lines 6688–6696 at 1cc3c92 · upstream ↗
    their vertical downward velocity caps at 04800 in most cases, wrapping back to 04000 when exceeded
    JUMPING/VERTICAL PHYSICS · archived copy ↗

    Claim page

  36. ^CodeXkeeper0/smb1prg.asm 4783–4788, 4748–4751
    How we know

    The air steering routine runs the friction routine only while Left or Right is held, so in the air a held direction accelerates Mario toward it up to the cap and a released d-pad keeps his speed.

    4783LRAir:
    4784	LDA Left_Right_Buttons                       ; check left/right controller bits (check for jumping/falling)
    4785	BEQ JSMove                                   ; if not pressing any, skip
    4786	JSR ImposeFriction                           ; otherwise process horizontal movement
    4787JSMove:
    4788	JSR MovePlayerHorizontally                   ; do a sub to move player horizontally
    
    src/prg.asm lines 4783–4788 at 1cc3c92 · upstream ↗
    4748FallingSub:
    4749	LDA VerticalForceDown
    4750	STA VerticalForce                            ; dump vertical movement force for falling into main one
    4751	JMP LRAir                                    ; movement force, then skip ahead to process left/right movement
    
    src/prg.asm lines 4748–4751 at 1cc3c92 · upstream ↗

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on . It fails if the result disagrees with the claim.

    Claim page

  37. ^CodeXkeeper0/smb1prg.asm 4735–4740, 4771–4784
    How we know

    On the ground the on-ground routine turns Mario toward a held Left or Right before friction runs; the jumping and falling routines change his facing only while he swims.

    4735OnGroundStateSub:
    4736	JSR GetPlayerAnimSpeed                       ; do a sub to set animation frame timing
    4737	LDA Left_Right_Buttons
    4738	BEQ GndMove                                  ; if left/right controller bits not set, skip instruction
    4739	STA PlayerFacingDir                          ; otherwise set new facing direction
    4740GndMove:
    
    src/prg.asm lines 4735–4740 at 1cc3c92 · upstream ↗
    4771	LDA SwimmingFlag                             ; if swimming flag not set,
    4772	BEQ LRAir                                    ; branch ahead to last part
    ⋮
    4779LRWater:
    4780	LDA Left_Right_Buttons                       ; check left/right controller bits (check for swimming)
    4781	BEQ LRAir                                    ; if not pressing any, skip
    4782	STA PlayerFacingDir                          ; otherwise set facing direction accordingly
    4783LRAir:
    4784	LDA Left_Right_Buttons                       ; check left/right controller bits (check for jumping/falling)
    
    src/prg.asm lines 4771–4784 at 1cc3c92 · upstream ↗

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on . It fails if the result disagrees with the claim.

    Claim page

  38. ^CodeXkeeper0/smb1prg.asm 4921–4925
    How we know

    Mario gets no grace window after leaving a ledge; the jump check refuses airborne jumps unless he is swimming.

    4922	LDA Player_State                             ; check player state
    4923	BEQ InitJS                                   ; if on the ground, branch
    4924	LDA SwimmingFlag                             ; if swimming flag not set, jump to do something else
    4925	BEQ NoJump                                   ; to prevent midair jumping, otherwise continue
    
    src/prg.asm lines 4921–4925 at 1cc3c92 · upstream ↗

    Claim page

  39. ^VerifiedXkeeper0/smb1prg.asm 11185–11195
    How we know

    Mario leaves a ledge on the frame his horizontal move leaves neither foot point over a block; the falling state that the background collision routine sets first then stays, so he ends that frame in the air, with a vertical speed of 0, and starts falling on the next. Walking right, the left foot point decides, so he walks 5 px past the edge (measured); walking left, the right foot point decides, 4 px past it (from the code's points).

    11185	JSR BlockBufferColli_Feet                    ; do player-to-bg collision detection on bottom left of player
    ⋮
    11189	JSR BlockBufferColli_Feet                    ; do player-to-bg collision detection on bottom right of player
    11190	STA $00                                      ; save bottom right metatile here
    11191	PLA
    11192	STA $01                                      ; pull bottom left metatile and save here
    11193	BNE ChkFootMTile                             ; if anything here, skip this part
    11194	LDA $00                                      ; otherwise check for anything in bottom right metatile
    11195	BEQ DoPlayerSideCheck                        ; and skip ahead if not
    
    src/prg.asm lines 11185–11195 at 1cc3c92 · upstream ↗

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on . It fails if the result disagrees with the claim.

    Claim page

  40. ^VerifiedXkeeper0/smb1prg.asm 2324–2328, 4748–4751, 4965–4969
    How we know

    A falling Mario's gravity is a stored falling gravity, which the falling routine copies in every frame. Each area's entrance sets it to $28 (40/256 px/frame²), and only a jump changes it, to its row's falling gravity, so a walk-off before any jump falls at $28 and one after a jump at that jump's falling gravity.

    2324Entrance_GameTimerSetup:
    ⋮
    2327	LDA #$28                                     ; store value here
    2328	STA VerticalForceDown                        ; for fractional movement downwards if necessary
    
    src/prg.asm lines 2324–2328 at 1cc3c92 · upstream ↗
    4748FallingSub:
    4749	LDA VerticalForceDown
    4750	STA VerticalForce                            ; dump vertical movement force for falling into main one
    4751	JMP LRAir                                    ; movement force, then skip ahead to process left/right movement
    
    src/prg.asm lines 4748–4751 at 1cc3c92 · upstream ↗
    4965GetYPhy:
    4966	LDA JumpMForceData,y                         ; store appropriate jump/swim
    4967	STA VerticalForce                            ; data here
    4968	LDA FallMForceData,y
    4969	STA VerticalForceDown
    
    src/prg.asm lines 4965–4969 at 1cc3c92 · upstream ↗

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on . It fails if the result disagrees with the claim.

    Claim page

  41. ^VerifiedXkeeper0/smb1 · “Super Mario Bros. (World)”prg.asm 6151–6159, 6168–6176, 6218–6224, 6304–6320
    How we know

    The head-hit routine bumps the block unless Mario is big and the metatile is missing from a list of ? blocks ($C0, $C1), hidden blocks ($5F, $60), and bricks with items ($55–$5E); then it breaks it (smb1/brick-break). So big Mario breaks plain bricks ($51–$53) and bumps the rest, and small Mario bumps everything. Size is the player-size byte, so by the code a crouching big Mario breaks bricks too (not probed). Measured: big Mario, standing, broke a brick and bumped a ? block and a hidden block; small Mario bumped a brick and a ? block.

    6151PlayerHeadCollision:
    6152	PHA                                          ; store metatile number to stack
    6153	LDA #$11                                     ; load unbreakable block object state by default
    6154	LDX SprDataOffset_Ctrl                       ; load offset control bit here
    6155	LDY PlayerSize                               ; check player's size
    6156	BNE DBlockSte                                ; if small, branch
    6157	LDA #$12                                     ; otherwise load breakable block object state
    6158DBlockSte:
    6159	STA Block_State,x                            ; store into block object buffer
    
    src/prg.asm lines 6151–6159 at 1cc3c92 · upstream ↗
    6168	JSR BlockBumpedChk                           ; do a sub to check which block player bumped head on
    ⋮
    6173ChkBrick:
    6174	BCC PutMTileB                                ; if no match was found in previous sub, skip ahead
    6175	LDY #$11                                     ; otherwise load unbreakable state into block object buffer
    6176	STY Block_State,x                            ; note this applies to both player sizes
    
    src/prg.asm lines 6168–6176 at 1cc3c92 · upstream ↗
    6218	LDY Block_State,x                            ; get block object state
    6219	CPY #$11
    6220	BEQ Unbreak                                  ; if set to value loaded for unbreakable, branch
    6221	JSR BrickShatter                             ; execute code for breakable brick
    6222	JMP InvOBit                                  ; skip subroutine to do last part of code here
    6223Unbreak:
    6224	JSR BumpBlock                                ; execute code for unbreakable brick or question block
    
    src/prg.asm lines 6218–6224 at 1cc3c92 · upstream ↗

    In the cartridge (“Super Mario Bros. (World)”): BrickQBlockMetatiles. We don't reproduce the bytes.

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on Super Mario Bros. (World) (SHA-1 33d23c2f2cfa…). It fails if the result disagrees with the claim.

    1 more excerpts on the claim page

  42. ^CodeXkeeper0/smb1prg.asm 10583–10592, 126–139; ram.asm 60–78
    How we know

    A hit on big Mario sets the injury timer to 8, and enemy contact is skipped until it is back at 0. It is one of the interval timers, which the timer routine counts down once every 21 frames, so the window lasts 8 such ticks, 148 to 168 frames while the game's timers run.

    10583InjurePlayer:
    10584	LDA InjuryTimer                              ; check again to see if injured invincibility timer is
    10585	BNE ExInjColRoutines                         ; at zero, and branch to leave if so
    ⋮
    10591	LDA #$08
    10592	STA InjuryTimer                              ; set injured invincibility timer
    
    src/prg.asm lines 10583–10592 at 1cc3c92 · upstream ↗
    127	LDX #$14                                     ; load end offset for end of frame timers
    128	DEC IntervalTimerControl                     ; decrement interval timer control,
    129	BPL DecTimersLoop                            ; if not expired, only frame timers will decrement
    130	LDA #$14
    131	STA IntervalTimerControl                     ; if control for interval timers expired,
    132	LDX #$23                                     ; interval timers will decrement along with frame timers
    
    src/prg.asm lines 126–139 at 1cc3c92 · upstream ↗
    60Timers                = $0780
    ⋮
    78InjuryTimer           = $079e
    
    src/ram.asm lines 60–78 at 1cc3c92 · upstream ↗

    Claim page

  43. ^CodeXkeeper0/smb1 · “Super Mario Bros. (World)”prg.asm 11108–11118, 11235–11269, 11287–11297, 11149–11154, 11180–11195, 11202–11204, 11273–11286, 12295–12302, 12317–12319
    How we know

    Mario's background-collision routine runs after the frame's movement (smb1/frame-order). It first sets a swimming Mario's state to 1, and any other Mario in the normal or climbing state to falling (2), then tests the head, then the two foot points, then the side points, the left pair before the right. The first side point that finds a tile ends the check, though the first point of each pair passes over a pipe's top or a climbable. The side check then stops Mario unless the tile is a hidden block, a coin, a climbable, or a jumpspring in motion, or Mario, in the normal state and facing right, meets the bottom of a sideways or water pipe.

    src/prg.asm at 1cc3c92
    Our readingA ← 1, swimming's state (by the comment)11108swimming: to SetPSte11109–11110state 0, normal: to SetFallS11111–11112not 3, climbing: to ChkOnScr, state kept (not quoted)11113–11114SetFallS, normal or climbing: A ← 2, falling11115–11116SetPSte: state ← A11117–11118offset + 2, to the side adders11236–11238counter ← 211239–11240SideCheckLoop: next adder11242–11244in the status bar: to BHalf11245–11247too low: leave11248–11249side collision for one half11250nothing, or a pipe top: to BHalf11251–11255not climbable: to CheckSideMTiles11256–11257BHalf: the next adder11258–11260Y under $08, or $D0 and over: leave11261–11265side collision for the other half11266something found: to CheckSideMTiles11267counter − 1, until both sides11268–11269ChkPBtm: state not normal: StopPlayerMove (by its label)11287–11290facing left: StopPlayerMove (by the comment)11291–11293sideways pipe bottom: to PipeDwnS (by the comment)11294–11295not the water pipe bottom: StopPlayerMove (by the comment)11296–11297HeadChk: too high: to DoFootCheck11149–11152head collision (by its label)11153nothing: to DoFootCheck11154DoFootCheck: too low: to DoPlayerSideCheck11180–11184left foot (by the comment)11185a coin: to AwardTouchedCoin (not quoted)11186–11187right foot (by the comment)11188–11190left foot not empty: to ChkFootMTile (not quoted)11191–11193right foot empty too: to DoPlayerSideCheck11194–11195ChkFootMTile: climbable: to DoPlayerSideCheck (by its label)11202–11204hidden or coin 1-up block: leave (by the comment)11273–11275climbable: HandleClimbing (by its label)11276–11278a coin: HandleCoinMetatile (by its label)11279–11281a jumpspring (by its label)11282–11283 animating: leave11284–11285 else: StopPlayerMove11286adder sets at 0, 7 and $0E12295–12296each set: points 3-4 at x + 2, 5-6 at x + $0D12298–12302BlockBufferColli_Side: horizontal, for the player (by the comment)12317–12319

    In the cartridge (“Super Mario Bros. (World)”): BlockBufferAdderData, BlockBuffer_X_Adder. We don't reproduce the bytes.

    Claim page

  44. ^CodeXkeeper0/smb1prg.asm 11202–11220
    How we know

    When a foot point finds an ordinary solid block and Mario isn't moving up, the background collision routine lands him if his Y is less than 5 px into the block's 16 px row; 5 px or more, it calls the push-back routine in his moving direction instead, which pushes him 1 px back unless he is already moving away, and leaves without checking his sides.

    11202ChkFootMTile:
    ⋮
    11205	LDY Player_Y_Speed                           ; check player's vertical speed
    11206	BMI DoPlayerSideCheck                        ; if player moving upwards, branch
    ⋮
    11215	LDY $04                                      ; check lower nybble of vertical coordinate returned
    11216	CPY #$05                                     ; from collision detection routine
    11217	BCC LandPlyr                                 ; if lower nybble < 5, branch
    11218	LDA Player_MovingDir
    11219	STA $00                                      ; use player's moving direction as temp variable
    11220	JMP ImpedePlayerMove                         ; jump to impede player's movement in that direction
    
    src/prg.asm lines 11202–11220 at 1cc3c92 · upstream ↗

    Claim page

  45. ^CodeXkeeper0/smb1prg.asm 11214–11233, 4921–4923
    How we know

    Mario can jump off a wall because the foot check counts a block in the wall's side as ground. If his move into a wall puts a foot point in a wall block while he is falling and less than 5 px below a block boundary, the background collision routine lands him there; he starts the next frame on the ground, so a fresh press of A then jumps.

    11215	LDY $04                                      ; check lower nybble of vertical coordinate returned
    11216	CPY #$05                                     ; from collision detection routine
    11217	BCC LandPlyr                                 ; if lower nybble < 5, branch
    ⋮
    11221LandPlyr:
    ⋮
    11223	LDA #$f0
    11224	AND Player_Y_Position                        ; mask out lower nybble of player's vertical position
    11225	STA Player_Y_Position                        ; and store as new vertical position to land player properly
    ⋮
    11227	LDA #$00
    ⋮
    11231InitSteP:
    11232	LDA #$00
    11233	STA Player_State                             ; set player's state to normal
    
    src/prg.asm lines 11214–11233 at 1cc3c92 · upstream ↗
    4922	LDA Player_State                             ; check player state
    4923	BEQ InitJS                                   ; if on the ground, branch
    
    src/prg.asm lines 4921–4923 at 1cc3c92 · upstream ↗

    Claim page

  46. ^VerifiedXkeeper0/smb1prg.asm 11547–11584, 5091–5093
    How we know

    A side point in a block calls the push-back routine, which moves Mario 1 px away from the block and zeroes his speed byte, unless he is already moving away; either way it clears that side's d-pad bit in a collision byte, which the next frame's friction routine ANDs with the d-pad, so the next frame's friction ignores the direction into the wall.

    11547ImpedePlayerMove:
    11548	LDA #$00                                     ; initialize value here
    11549	LDY Player_X_Speed                           ; get player's horizontal speed
    11550	LDX $00                                      ; check value set earlier for
    11551	DEX                                          ; left side collision
    11552	BNE RImpd                                    ; if right side collision, skip this part
    11553	INX                                          ; return value to X
    11554	CPY #$00                                     ; if player moving to the left,
    11555	BMI ExIPM                                    ; branch to invert bit and leave
    11556	LDA #$ff                                     ; otherwise load A with value to be used later
    ⋮
    11566	LDY #$00
    11567	STY Player_X_Speed                           ; nullify player's horizontal speed
    ⋮
    
    src/prg.asm lines 11547–11584 at 1cc3c92 · upstream ↗
    5091ImposeFriction:
    5092	AND Player_CollisionBits                     ; perform AND between left/right controller bits and collision flag
    5093	CMP #$00                                     ; then compare to zero (this instruction is redundant)
    
    src/prg.asm lines 5091–5093 at 1cc3c92 · upstream ↗

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on . It fails if the result disagrees with the claim.

    Claim page

  47. ^ abVerifiedXkeeper0/smb1prg.asm 11214–11217, 11550–11575, 11221–11233, 4921–4923
    How we know

    A wall jump's press has to come on a frame that starts with Mario caught on the wall's side. Measured in the cartridge with big Mario, the window was one frame for a walking jump into a wall laid into World 1-1's start, two for a running hop into the level's first pipe, unedited, and one for a running hop from the bricks into World 2-1's last wall; a press on the catch frame itself, or one frame after the window, did nothing.

    LDY $04 CPY #$05 BCC LandPlyr
    src/prg.asm#L11214-L11217 · upstream ↗
    11550	LDX $00                                      ; check value set earlier for
    11551	DEX                                          ; left side collision
    11552	BNE RImpd                                    ; if right side collision, skip this part
    11553	INX                                          ; return value to X
    11554	CPY #$00                                     ; if player moving to the left,
    11555	BMI ExIPM                                    ; branch to invert bit and leave
    11556	LDA #$ff                                     ; otherwise load A with value to be used later
    11557	JMP NXSpd                                    ; and jump to affect movement
    11558RImpd:
    11559	LDX #$02                                     ; return $02 to X
    11560	CPY #$01                                     ; if player moving to the right,
    11561	BPL ExIPM                                    ; branch to invert bit and leave
    ⋮
    
    src/prg.asm lines 11550–11575 at 1cc3c92 · upstream ↗
    11221LandPlyr:
    ⋮
    11227	LDA #$00
    ⋮
    11231InitSteP:
    11232	LDA #$00
    
    src/prg.asm lines 11221–11233 at 1cc3c92 · upstream ↗
    4921ProcJumping:
    
    src/prg.asm lines 4921–4923 at 1cc3c92 · upstream ↗

    Measured by a script in MesenCE 2.2.1 (build 4b8a196), on . It fails if the result disagrees with the claim.

    Claim page

  48. ^WikiSuper Mario Wiki, “Wall Jump” · TASVideos, “Game Resources: NES Super Mario Bros.”
    How we know

    Mario can jump off the side of a wall when his feet meet it at a block boundary, a glitch that Super Mario Wiki counts among maneuvers resembling the later, designed Wall Jump, with "frame-perfect timing". TASVideos' resource page explains it by the floor check running during the push out of a wall, and asks for an X speed above 16 toward the wall.

    maneuvers similar to the Wall Jump exist as glitches. For example, in Super Mario Bros., if Mario lands on a wall on a 16×16 boundary (so that his foot is on the top corner of a block), the player is able to jump from that point with frame-perfect timing.
    History, Super Mario series · archived copy ↗
    Walljump happens because the game does a floor check (a simple "is there a solid block below him?" test) even during a wall-ejection. … Some horizontal speed towards the wall (facing right: X speed > 16, facing left: X speed < 240) … Mario's feet must hit the wall at a block boundary (every 16 pixels)
    Walljump · archived copy ↗

    Claim page

  49. ^Code notesXkeeper0/smb1music-data.asm 4–8; defs.asm 41–47; +1 files
    How we know

    Super Mario Bros.'s song table has a second entry for the game-over song that none of the stores that name the event-music queue asks for: entry $04, bit 4 of that queue, points at $F966, the game-over song's header, as entry $01 does. Those stores write $08, $04, $02, $20, $40, $80, or 1. The square channels' code treats bit 4 as it treats bits 0 and 7, the death song and silence: for an event song with any of those bits (it tests %10010001), both square channels skip their envelope table.

    4	.db DeathMusHdr-MHD                          ; event music
    5	.db GameOverMusHdr-MHD
    6	.db VictoryMusHdr-MHD
    7	.db WinCastleMusHdr-MHD
    8	.db GameOverMusHdr-MHD
    
    src/music-data.asm lines 4–8 at 1cc3c92 · upstream ↗
    41TimeRunningOutMusic   = %01000000
    42EndOfLevelMusic       = %00100000
    43AltGameOverMusic      = %00010000
    44EndOfCastleMusic      = %00001000
    45VictoryMusic          = %00000100
    46GameOverMusic         = %00000010
    47DeathMusic            = %00000001
    
    src/defs.asm lines 41–47 at 1cc3c92 · upstream ↗
    src/music-engine.asm at 1cc3c92
    Our readingsquare 2 free, and the event song has bit 7, 4 or 0: skip the envelope749–753square 1 free, and the event song has bit 7, 4 or 0: skip the envelope796–800

    Measured by a script. It fails if the result disagrees with the claim.

    Claim page

  50. ^Code notesXkeeper0/smb1music-data.asm 13–14; music-engine.asm 640–660
    How we know

    Super Mario Bros.'s song table has an entry for steps of the aboveground theme that no store naming the area-music queue reaches: entry $08, which the engine's bit search gives for bit 0 of that queue, points at $F976, the header that steps 2, 3, 16 and 17 of the aboveground theme play. The area byte $01 alone goes to the aboveground theme's steps, entries $10 on; the search reaches entry $08 only for a byte with bit 0 and another bit set. Every store that names the area queue writes one bit: $80, $40, or one of $02, $01, $04, $08, $10 and $20 from a table, and the engine's own restarts pass on a byte it took from the queue.

    13	.db GroundLevelPart1Hdr-MHD                  ; area music
    14	.db WaterMusHdr-MHD
    
    src/music-data.asm lines 13–14 at 1cc3c92 · upstream ↗
    src/music-engine.asm at 1cc3c92
    Our readingarea buffer ← the byte643exactly $01: the aboveground theme's next step644–652any other byte: Y ← 8, then + 1 per shift right until a set bit654–660

    Measured by a script. It fails if the result disagrees with the claim.

    Claim page

  51. ^CodeXkeeper0/smb1 · “Super Mario Bros. (World)”music-data.asm 45–48; music-engine.asm 662–676
    How we know

    Super Mario Bros. has a song header that no entry of its song table points at, so no request can play it. The five bytes at $F94E give note-length offset $20, as the level-clear song's header does, and song data at $FCC4, 20 bytes into the level-clear song's data, which starts at $FCB0; its triangle and square 1 offsets are $3F and $1D, where the level-clear song's are $3D and $21.

    45EndOfLevelMusHdr:
    46	.db $20, <WinLevelMusData, >WinLevelMusData, $3d, $21
    47ResidualHeaderData:
    
    src/music-data.asm lines 45–48 at 1cc3c92 · upstream ↗

    In the cartridge (“Super Mario Bros. (World)”): $F949-$F952: the level-clear song's header, then the one at $F94E. We don't reproduce the bytes.

    src/music-engine.asm at 1cc3c92
    Our readingheader ← the table's byte at entry Y − 1663–664its six bytes: note-length offset, data address, triangle, square 1 and noise offsets665–676

    Measured by a script. It fails if the result disagrees with the claim.

    Claim page

  52. ^CodeSuper Mario Bros. instruction booklet · Xkeeper0/smb1prg.asm 4913–4918, 5000–5010, 5024–5025, 5142–5161, 4372–4378, 4702–4711, 213–216, 186–188, 4080–4083
    How we know

    On land in Super Mario Bros., A jumps, and B held while walking runs; Fire Mario's B also throws a fireball. Left and Right walk, and Down crouches big Mario, Super or Fire, on the ground; small Mario doesn't crouch. Start on controller 1 pauses the game and resumes it.

    Jump... ... Mario (Luigi) jumps higher if you hold the button down longer.
    p. 4, 2. Names of Controller Parts, A button · archived copy ↗
    Accelerate ... Press this button to speed up, then jump and you can go all the … Fireballs ...... After you pick up the fire flower, you can use this button to throw
    p. 4, 2. Names of Controller Parts, B button · archived copy ↗
    Walk to the right. … (Push button B at the … Crouch. … (Super Mario only.)
    p. 3, 2. Names of Controller Parts, Control Pad · archived copy ↗
    If you wish to interrupt play in the middle of a game, press the START button. … The pause tone will sound, and the game will stop. Press the START button again
    p. 5, START button · archived copy ↗
    4913	LDA A_B_Buttons                              ; check for A button press
    4914	AND #A_Button
    4915	BEQ NoJump                                   ; if not, branch to something else
    4916	AND PreviousA_B_Buttons                      ; if button not pressed in previous frame, branch
    4917	BEQ ProcJumping
    4918NoJump:
    
    src/prg.asm lines 4913–4918 at 1cc3c92 · upstream ↗
    5000ProcPRun:
    5001	INY                                          ; if mario on the ground, increment Y
    5002	LDA AreaType                                 ; check area type
    5003	BEQ ChkRFast                                 ; if water type, branch
    5004	DEY                                          ; decrement Y by default for non-water type area
    5005	LDA Left_Right_Buttons                       ; get left/right controller bits
    5006	CMP Player_MovingDir                         ; check against moving direction
    5007	BNE ChkRFast                                 ; if controller bits <> moving direction, skip this part
    5008	LDA A_B_Buttons                              ; check for b button pressed
    5009	AND #B_Button
    5010	BNE SetRTmr                                  ; if pressed, skip ahead to set timer
    
    src/prg.asm lines 5000–5010 at 1cc3c92 · upstream ↗
    5024SetRTmr:
    5025	LDA #$0a                                     ; if b button pressed, set running timer
    
    src/prg.asm lines 5024–5025 at 1cc3c92 · upstream ↗
    Walk to the left.
    p. 3, 2. Names of Controller Parts, Control Pad · archived copy ↗

    6 more excerpts on the claim page

  53. ^CodeSuper Mario Bros. instruction booklet · Xkeeper0/smb1prg.asm 2337–2341, 4921–4930, 5000–5003, 4361–4371, 213–216
    How we know

    In Super Mario Bros.'s water areas, A swims: each press sends Mario up a stroke, except while he is still rising after the last stroke's timer has run out. B no longer runs there, but Fire Mario's B still throws fireballs. The Control Pad moves him and crouches big Mario on the floor, and Start pauses as on land. Below a line near the bottom of the screen, or off the screen vertically, the game ignores the Control Pad, A, and B, though Start still pauses.

    Swim... ..When you're in the water, each press of this button makes you bob
    p. 4, 2. Names of Controller Parts, A button · archived copy ↗
    2337	LDA AreaType                                 ; check area type
    2338	BNE ChkStPos                                 ; if water type, set swimming flag, otherwise do not set
    2339	INY
    2340ChkStPos:
    2341	STY SwimmingFlag
    
    src/prg.asm lines 2337–2341 at 1cc3c92 · upstream ↗
    4921ProcJumping:
    4922	LDA Player_State                             ; check player state
    4923	BEQ InitJS                                   ; if on the ground, branch
    4924	LDA SwimmingFlag                             ; if swimming flag not set, jump to do something else
    4925	BEQ NoJump                                   ; to prevent midair jumping, otherwise continue
    4926	LDA JumpSwimTimer                            ; if jump/swim timer nonzero, branch
    4927	BNE InitJS
    4928	LDA Player_Y_Speed                           ; check player's vertical speed
    4929	BPL InitJS                                   ; if player's vertical speed motionless or down, branch
    4930	JMP X_Physics                                ; if timer at zero and player still rising, do not swim
    
    src/prg.asm lines 4921–4930 at 1cc3c92 · upstream ↗
    5000ProcPRun:
    5001	INY                                          ; if mario on the ground, increment Y
    5002	LDA AreaType                                 ; check area type
    5003	BEQ ChkRFast                                 ; if water type, branch
    
    src/prg.asm lines 5000–5003 at 1cc3c92 · upstream ↗

    2 more excerpts on the claim page

  54. ^CodeSuper Mario Bros. instruction booklet · Xkeeper0/smb1prg.asm 330–353, 364–376, 402–407, 428–433, 622–626, 638–645
    How we know

    On Super Mario Bros.'s title screen, Select moves the mushroom between the one- and two-player games and Start begins, from either controller. Holding A with Start begins at the first area of the world where the last game ended. Once the game has been beaten and B pressed on the ending screen, B on the title screen steps through the worlds.

    Use this button to move the mushroom mark to the
    p. 4, SELECT button · archived copy ↗
    Press this button to begin.
    p. 5, START button · archived copy ↗
    330GameMenuRoutine:
    331	LDY #$00
    332	LDA SavedJoypad1Bits                         ; check to see if either player pressed
    333	ORA SavedJoypad2Bits                         ; only the start button (either joypad)
    334	CMP #Start_Button
    335	BEQ StartGame
    336	CMP #A_Button+Start_Button                   ; check to see if A + start was pressed
    337	BNE ChkSelect                                ; if not, branch to check select button
    338StartGame:
    339	JMP ChkContinue                              ; if either start or A + start, execute here
    340ChkSelect:
    341	CMP #Select_Button                           ; check to see if the select button was pressed
    ⋮
    
    src/prg.asm lines 330–353 at 1cc3c92 · upstream ↗
    364	CPY #$01                                     ; was the B button pressed earlier?  if so, branch
    365	BEQ IncWorldSel                              ; note this will not be run if world selection is disabled
    366	LDA NumberOfPlayers                          ; if no, must have been the select button, therefore
    367	EOR #%00000001                               ; change number of players and draw icon accordingly
    368	STA NumberOfPlayers
    369	JSR DrawMushroomIcon
    370	JMP NullJoypad
    371IncWorldSel:
    372	LDX WorldSelectNumber                        ; increment world select number
    373	INX
    374	TXA
    375	AND #%00000111                               ; mask out higher bits
    ⋮
    
    src/prg.asm lines 364–376 at 1cc3c92 · upstream ↗
    402ChkContinue:
    403	LDY DemoTimer                                ; if timer for demo has expired, reset modes
    404	BEQ ResetTitle
    405	ASL                                          ; check to see if A button was also pushed
    406	BCC StartWorld1                              ; if not, don't load continue function's world number
    407	LDA ContinueWorld                            ; load previously saved world number for secret
    
    src/prg.asm lines 402–407 at 1cc3c92 · upstream ↗

    3 more excerpts on the claim page

Sources

Code

Primary

  • Iwata, Satoru and Nintendo Co., Ltd. 2010. “Iwata Asks: Super Mario Bros. 25th Anniversary, Vol. 2, p. 1 (Bringing Video Games Home).” Iwata Asks, Wii, Super Mario Bros. 25th Anniversary, Vol. 2, p. 1. Nintendo Co., Ltd. original · archived · licence, all uses
  • Iwata, Satoru and Nintendo Co., Ltd. 2010. “Iwata Asks: Super Mario Bros. 25th Anniversary, Vol. 5, p. 1 (Using the D-pad to Jump).” Iwata Asks, Wii, Super Mario Bros. 25th Anniversary, Vol. 5, p. 1. Nintendo Co., Ltd. original · archived · licence, all uses
  • Co., Nintendo and Ltd. 2026. “Corporate Information: Company History (Nintendo).” original · archived · licence, all uses
  • America, Nintendo of. n.d. “NES Games (Nintendo of America release list).” Nintendo of America. original · archived · licence, all uses
  • Nintendo. 1985. “Super Mario Bros. instruction booklet (NES).” Super Mario Bros. instruction booklet, pp. 1-16. Nintendo of America. original · archived · licence, all uses
  • Iwata, Satoru and Nintendo Co., Ltd. 2010. “Iwata Asks: Super Mario Bros. 25th Anniversary, Vol. 5, p. 3 (The Grand Culmination).” Iwata Asks, Wii, Super Mario Bros. 25th Anniversary, Vol. 5, p. 3. Nintendo Co., Ltd. original · archived · licence, all uses
  • Iwata, Satoru and Nintendo Co., Ltd. 2010. “Iwata Asks: Super Mario Bros. 25th Anniversary, Vol. 5, p. 2 (The New Guys, Too!).” Iwata Asks, Wii, Super Mario Bros. 25th Anniversary, Vol. 5, p. 2. Nintendo Co., Ltd. original · archived · licence, all uses
  • Iwata, Satoru and Nintendo Co., Ltd. 2010. “Iwata Asks: Super Mario Bros. 25th Anniversary, Vol. 2, p. 4 (The Grand Culmination of Famicom Cartridges).” Iwata Asks, Wii, Super Mario Bros. 25th Anniversary, Vol. 2, p. 4. Nintendo Co., Ltd. original · archived · licence, all uses
  • Nintendo. n.d. “VS. Super Mario Bros. operation manual (Nintendo VS. System).” VS. Super Mario Bros. operation manual, pp. 1-3. Nintendo of America. original · archived · licence, all uses

Secondary