Super Mario Bros. area-parser-task-handler … get-block-buffer-addr | Super Mario Bros.: The Lost Levels area-parser-task-handler … get-block-buffer-addr | changed | 2,422 | The 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-background | Super Mario Bros.: The Lost Levels chr-background | changed | 3,200 | Background 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-font | Super Mario Bros.: The Lost Levels chr-font | rewritten | 576 | The 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-objects | Super Mario Bros.: The Lost Levels chr-sprites | changed | 2,816 | Sprite 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-player | Super Mario Bros.: The Lost Levels chr-sprites | identical | 1,280 | The first 80 tiles of the character data, `$00`-`$4F`, are Super Mario Bros.'s byte for byte. |
Super Mario Bros. draw-vine … draw-sprite-object | Super Mario Bros.: The Lost Levels draw-vine … draw-sprite-object | changed | 3,800 | The 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-troopa | Super Mario Bros.: The Lost Levels enemies-and-loops-core … init-jump-gp-troopa | changed | 2,033 | Enemy 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-collision | Super Mario Bros.: The Lost Levels fireball-enemy-collision … block-buffer-collision | changed | 3,511 | The 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-timer | Super Mario Bros.: The Lost Levels floatey-numbers-routine … reset-screen-timer | changed | 910 | The 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-position | Super Mario Bros.: The Lost Levels game-core-routine … get-screen-position | changed | 363 | The 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-routine | Super Mario Bros.: The Lost Levels game-menu-routine … demo-engine | changed | 261 | The 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-friction | Super Mario Bros.: The Lost Levels game-routines … impose-friction | changed | 1,518 | The 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-fireworks | Super Mario Bros.: The Lost Levels init-bal-platform … run-fireworks | changed | 2,798 | The 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-screen | Super Mario Bros.: The Lost Levels jump-engine … update-screen | relocated | 240 | The 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-offsets | Super Mario Bros.: The Lost Levels load-area-pointer … area-data-addrs | changed | 456 | The 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-gravity | Super Mario Bros.: The Lost Levels move-object-horizontally … impose-gravity | relocated | 325 | The 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-handler | Super Mario Bros.: The Lost Levels alt-sound-engine | rewritten | 856 | The 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-data | Super Mario Bros.: The Lost Levels music-header-data … star-cloud-m-data | changed | 1,713 | SM2MAIN'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-over | Super Mario Bros.: The Lost Levels print-status-bar-numbers … run-game-over | changed | 846 | The 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-handler | Super Mario Bros.: The Lost Levels proc-fireballs … vine-object-handler | changed | 1,013 | Fireballs, 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-updater | Super Mario Bros.: The Lost Levels process-cannons … block-obj-mt-updater | changed | 1,358 | Cannons, 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-data | Super Mario Bros.: The Lost Levels render-area-graphics … water-palette-data | changed | 1,266 | The 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-check | Super Mario Bros.: The Lost Levels run-star-flag-obj … offscreen-bounds-check | changed | 1,047 | The 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-handler | Super Mario Bros.: The Lost Levels sound-engine … music-handler | changed | 1,705 | The 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-data | Super Mario Bros.: The Lost Levels star-cloud-m-data | identical | 1,299 | 1,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-offscreen | Super Mario Bros.: The Lost Levels start … move-all-sprites-offscreen | changed | 664 | The 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-messages | Super Mario Bros.: The Lost Levels victory-mode … print-victory-messages | changed | 357 | The 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. |