If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Talk:Super Mario Bros.

From The Cutting Room Floor
Jump to navigation Jump to search
This is the talk page for Super Mario Bros..
  • Sign and date your posts by typing four tildes (~~~~).
  • Put new text below old text.
  • Indent replies by prefixing with a colon :
  • Add new sections with the 'Add topic' button at the top right.
  • Be polite.
  • Assume good faith.
  • Don't delete discussions.
  • Be familiar with the talk help page.

Changed tiles?

Is there any actual evidence behind the changed tiles paragraph? --Frantik 07:06, 5 June 2010 (EDT)

The fact it exists is pretty much proof in its own regard, notwithstanding that it disappears in 16×16 chunks as well. Actual proof? Not quite. --Xk-sig.png Xkeeper (talk) 07:19, 5 June 2010 (EDT)
Proof of what? There are many other blocks in the game that are 8x16 block repeated. The game engine requires all background elements be 16x16, made up of 4 8x8 tiles. The breakable bricks in the underground levels are just one 8x8 tile repeated 4 times. And that's why the bridge disappears in 16x16 chunks. As someone very familiar with the inner workings on that game, it's my opinion there is nothing significant about the bridge graphics. But I'm not gonna change it ;) --Frantik 08:40, 5 June 2010 (EDT)
The difference is that the 16×16 tiles for the bricks are just two 8×8 tiles repeated (just 2 unique graphics) -- the bridge is a full 16×16-block graphic, with 4 unique tiles, just like Super Mario World's Boss Door graphics. --Xk-sig.png Xkeeper (talk) 08:49, 5 June 2010 (EDT)
No it's not.. it's just two tiles (0x77 and 0x79) repeated twice... unless we have different ROMs... there are only two tiles in the rom for the bridge. --Frantik 08:54, 5 June 2010 (EDT)
... Ugh. Damnit, maybe we goofed up somewhere, but I swear it wasn't like that when I wrote it. ._. --Xk-sig.png Xkeeper (talk) 09:03, 5 June 2010 (EDT)
The only thing I can see is the bridge may have originally been 4 unique tiles but was reduced to only 2 since tiles 0x78 and 0x7A are used for the title screen. But it's likely the breakable bricks also had the same thing happen to them since the title screen graphics are interspersed among those tiles too. I'm sure all of the graphics went through revisions, and without real evidence not really worth adding, unless you're just adding any random theory people have ;) --Frantik 09:14, 5 June 2010 (EDT)
I think the odd layout of the CHR tiles is worth mentioning on the page, as long as the wording implies that something might have been changed. I'm kind of wondering why a few of the tiles are arranged like 8×16 sprites (top, bottom, top, bottom) while the rest are in the standard 16×16 (top, top, bottom, bottom) format.
On a related note, I think there is good evidence that the "SUPER MARIO BROS." letters on the title screen did not originally have a brown block background. Nearly all of the tiles necessary to draw the letters themselves exist at the end of the CHR data in an organized fashion; the rest of the tiles that are scattered about are mostly shadows and pieces of the aforementioned background. If the decision to add it came late in the development process, then obviously the easiest thing to do would be to examine the existing tiles and try to fit the new pieces in wherever possible, rather than remap a bunch of tiles (leading to the simplification of the bricks and Bowser bridge).
I've been told by a few different people that some change during development required a major reorganization and simplification of the graphics, though they never told me exactly what, or where they got their information. Obviously the placement of the title screen tilemap in the CHR (kind of an oddity in itself) shrunk the available graphics space by a full 20 tiles, though it's impossible to tell if that was planned early on, or was forced late in development due to a shortage of PRG space. Blah blah blah words. --BMF54123 19:21, 7 June 2010 (EDT)

More Unused Music?

Here is a music/sound effect modifier that I made to prove that there are indeed unused versions of songs, not an nsf artifact.

Super Mario Bros. Sound Effect Modifier 10FA:??

Music Modifier 10FB:?? 01 - Super Mario Bros. Theme 02 - Underwater Theme 03, 07, 09, 0B, 0D, 0F, 11, 13, 17, 19, 1B, 1D - Unused Song! 04, 05 - Unused Song 2! 06, 0A, 0E, 12, 16, 1A - Underwater Theme 07, 08 - Castle 0C - Underground 10 - Starman/bonus rooms 14, 15, 1C - Unused Underground Theme 17, 18 - Unused Castle Theme

Music 2 (Fanfares) Modifier 10FC:?? 01 - Player Down 02, 06 - Game Over 03, 05, 07 - Unused Player Down 04 - Ending 08 - THANK YOU BUT OUR PRINCESS IS IN ANOTHER CASTLE! Nensondubois 14:46, 23 June 2010 (EDT)

I have also found this, dunno if its the same thing. All NSF rips I checked don't have anything unused other than the alt Game Over and fast "Enter Pipe" music (both in the article).
Speaking of unused themes, I wonder if, before the bonus room theme ($10) used the exact same music as the Starman theme ($40), they were going to use the portion of the overworld theme that we'd hear later as the "Subspace Theme" in Super Mario Bros. 2 (U.S.)? WikiPro1981X (talk) 11:13, 21 July 2023 (UTC)

Original Famicom version?

Hey guys me again. As I said in for the Super Mario 64 article, I'm curious to see if there is unused content inside the original Japanese version's ROM that was cleaned up for the American release. I think a lot of the stuff in this article stems from the American version, but I'm not sure. I doubt that this game in particular would have anything special except for maybe one or two bug fixes since I guess they were also working on creating the NES version of the game at the same time as they were developing the Famicom version. Evilhamwizard 01:12, 13 May 2011 (EDT)

Nope. The US and Japanese versions are 100% identical. A lot of US carts even use the Japanese (HVC) ROM chips. The only way we're going to find anything interesting is if we get our hands on a prototype. --BMF54123 01:35, 13 May 2011 (EDT)

Unused levels besides minus world?

Does anyone know if their are unused levels in this game besides the accesible-by-glitch-only minus world? It probably stands to be noted that that the "minus world" water level is technically world "36-1" not " -1", apparently because the game uses a blank tile to display the number 36, at least according to wikipedia and its cited source. Could unused levels after world eight and prior to 36 exist? The preceding unsigned comment was added by Pharmakon (talk • contribs)

There are no unused levels in this game (or much other unused data, for that matter). --BMF54123 18:08, 8 September 2011 (EDT)
Actually, isn't -1 just garbage data that was somehow able to be read as a level? It's not a level that was made on purpose, so it's not actually an "unused level" to begin with. ...Right? {EspyoT} 07:03, 9 September 2011 (EDT)
Level -1 just happens to point to another level's data. Don't know which one, though. (All the water levels look the same to me.) The reason it loops forever is because warps are world-specific, allowing sublevels to be used without leading to the same world. As the ending pipe in -1 doesn't have a warp defined for World 36 (only the original world(s) it was used in), it defaults to the current level. Err, wait, how is that relevant again? --Smallhacker 11:12, 9 September 2011 (EDT)

Offset: 0000000800 (ROM)

10 12 04 03 02 00 24 05 24 00 08 07 06 00 00 00

04 03 02 (L1-2)

24 05 24 (L4-2)

08 07 06 (L4-2)

By using this glitch, he has the pipes of 4-2 and more specifically those leading to World 5. In the 4-2, there is a pipe instead of three. The other two are not present, but they use 36 by default (24). With a code, it is possible to visit the worlds 255 most of the game are the same with different graphics.

The glitch in the FDS version of the game is completely different, you can visit three levels. There is always -1, but it is very different. Then there is the -2 and -3. Example with this image:

SMB 1000Bloopers.png

--Dark Linkaël 11:38, 9 September 2011 (EDT)

Variable $03F0

According to the comprehensive disassembly of SMB, the RAM address $03F0 keeps track of the number of blocks hit, but it's not used by anything. Does this count as an unused material? --Purplebridge001 01:54, 16 February 2012 (EST)

Yep. I'd say it counts as unused code. It would be really interesting if someone suddenly found that it is used for an easter egg or something. {EspyoT} 06:54, 16 February 2012 (EST)

NSF Track 10

I just listened to that song and realized I'd heard it before... in pirate carts and Famiclones (especially Super Joy ones that are shaped like an N64 pad!) The music always sounds off on those. The game over music sounds very similar to the one listed on this page. Weird. // Foxhack 00:03, 23 April 2012 (EDT)

Is it possible to find roms for these things, or find them on ebay? --Hiccup (talk) 13:39, 15 February 2014 (EST)

Additional Unused Music

Using Game Genie codes PPPPPP, EPPPPP, etc, there are a few variants usually playing a looped version of the Intro to the Super Mario Bros. Theme and depending on the variant, the bass notes are held. Additionally, there is a Bowser's Castle variant that has light drums and I believe I have heard a different version of the Underwater music as well. Not entirely sure is going on here, maybe the music INIT is being modified in an obscure manner by these codes or something, I'd need to further investigate this oddity if indeed these songs are legitimate versions, just stored in an arbitrary memory range hence why they don't appear in any of the current NSF rips, or could have been omitted on purpose; though all of the variations could easily hacked into an existing rip. Nensondubois 00:37, 23 April 2012 (EDT)

Glitch Firebars, Non-moving Koopa... are they worth documenting?

There are several unused enemy IDs such as glitch Firebars or non-moving Koopas. Are they worth documenting?

It seems the glitch Firebars are placeholder of more Firebar variants. They lack proper initialization code but its behavior pointer is pointing to Firebar codes.

I can't say the same for non-moving Koopa, as they share the same basic behavior codes with other valid enemies. Purplebridge001 03:48, 17 August 2013 (EDT)

The game does special check for Blooper and Podoboo (?!) when stomped

The game seems to contain specific codes for giving bonus points when Podoboo (normally hurts Mario) or Blooper is killed by stomping. Is it worth mentioning in the main page? Purplebridge001 (talk) 22:55, 19 November 2013 (EST)

StompedEnemyPtsData:
      .db $02, $06, $05, $06

EnemyStomped:
      lda Enemy_ID,x             ;check for spiny, branch to hurt player
      cmp #Spiny                 ;if found
      beq InjurePlayer
      lda #Sfx_EnemyStomp        ;otherwise play stomp/swim sound
      sta Square1SoundQueue
      lda Enemy_ID,x
      ldy #$00                   ;initialize points data offset for stomped enemies
      cmp #FlyingCheepCheep      ;branch for cheep-cheep
      beq EnemyStompedPts
      cmp #BulletBill_FrenzyVar  ;branch for either bullet bill object
      beq EnemyStompedPts
      cmp #BulletBill_CannonVar
      beq EnemyStompedPts
      cmp #Podoboo               ;branch for podoboo (this branch is logically impossible
      beq EnemyStompedPts        ;for cpu to take due to earlier checking of podoboo)
      iny                        ;increment points data offset
      cmp #HammerBro             ;branch for hammer bro
      beq EnemyStompedPts
      iny                        ;increment points data offset
      cmp #Lakitu                ;branch for lakitu
      beq EnemyStompedPts
      iny                        ;increment points data offset
      cmp #Bloober               ;branch if NOT bloober
      bne ChkForDemoteKoopa
Technically, it already is. Apparently, Podoboo was deemed unimportant because it hands out default points, but Blooper awards 1,000. --AquaBat (talk) 23:25, 19 November 2013 (EST)

Regional and Revisional Differences

Anything specific? --8SomaCruzes (talk) 19:47, 24 March 2014 (EDT)

Not exactly. But there are quite a few versions. --Hiccup (talk) 03:59, 25 March 2014 (EDT)
...There's only two. A "World" version that was released worldwide (US, Japan, and UK), and a "Rev. A" which was released in other European countries, according to Bootgod's database. Any differences are likely to be just fixing the game (but most likely the music) to play at PAL speed (60 Hz), as opposed to NTSC speed (50 Hz). -Einstein95 (talk) 04:06, 25 March 2014 (EDT)
There are a few more, some on the list are remakes or different games though, and can be ignored. --Hiccup (talk) 09:28, 25 March 2014 (EDT)
Okay, so there's Original, Rev. A, FDS remake and some CHR hacks (NES Mini, 25th anniversary, etc.). -Einstein95 (talk) 15:09, 30 March 2014 (EDT)
If you count them, there's also Vs. Super Mario Bros. and All Night Nippon Super Mario Bros., both of which have a few changes in level design and borrowed a handful of them from Super Mario Bros. 2 (the latter also contained the slightly modified game mechanics), as well the mirrored Super Luigi Bros. in NES Remix 2. LinkTheLefty (talk) 09:23, 31 March 2014 (EDT)
I haven't played them, but something tells me the NES Remix games are not actually emulated in the traditional sense, and thus would not count as "revisions".
As for "Rev. A", it was updated to fix the game speed on PAL consoles, with...somewhat questionable results. --BMF54123 (talk) 17:06, 5 April 2014 (EDT)
I looked at the levels, and found that in the PAL version there is a block above the pipe in the underwater section of 2-2 & 7-2. In the NTSC version, there is no block there. Should I add that to the page? Although this may have been shown or told by someone else, I found this regional difference myself. --NesGuy69 (talk) 20:23, 17 December 2016 (EDT)
That's pretty interesting. I remember that in the All-Stars remake, the block was there to fix a bug where you could get stuck! I definitely think that should be added. Also, I don't think Vs. SMB and All Night Nippon count as revisions, cause they're different games! -Anton Cool Guy (talk) 02:59, 18 December 2016 (EST)

Vs. Super Mario Bros. didn't "borrow" anything. That's a common misconception. Vs. Mario was made first as an arcade port of Mario 1 and the new levels made from that version were then implemented into the FCD sequel. Miyamoto says as much in this interview. All-Night Nippon on the other hand, is basically Vs. Mario with the changes made in Mario 2 (such as the new ground tiles and Luigi mode instead of an alternating 2P mode), plus even further graphical changes. Anyway, I'm surprised there aren't any pages covering them in this wiki, considering how thorough the other Mario games are covered here. Jonny2x4 (talk) 16:00, 7 July 2017 (EDT)

Spiny Egg Horizontal Movement

In the disassembly, this code is under the CreateSpiny function:

DifLoop:  lda PRDiffAdjustData,y     ;get three values and save them
          sta $01,x                  ;to $01-$03
          iny
          iny                        ;increment Y four bytes for each value
          iny
          iny
          dex                        ;decrement X for each one
          bpl DifLoop                ;loop until all three are written
          ldx ObjectOffset           ;get enemy object buffer offset
          jsr PlayerLakituDiff       ;move enemy, change direction, get value - difference
          ldy Player_X_Speed         ;check player's horizontal speed
          cpy #$08
          bcs SetSpSpd               ;if moving faster than a certain amount, branch elsewhere
          tay                        ;otherwise save value in A to Y for now
          lda PseudoRandomBitReg+1,x
          and #%00000011             ;get one of the LSFR parts and save the 2 LSB
          beq UsePosv                ;branch if neither bits are set
          tya
          eor #%11111111             ;otherwise get two's compliment of Y
          tay
          iny
UsePosv:  tya                        ;put value from A in Y back to A (they will be lost anyway)
SetSpSpd: jsr SmallBBox              ;set bounding box control, init attributes, lose contents of A
          ldy #$02
          sta Enemy_X_Speed,x        ;set horizontal speed to zero because previous contents
          cmp #$00                   ;of A were lost...branch here will never be taken for
          bmi SpinyRte               ;the same reason
          dey
SpinyRte: sty Enemy_MovingDir,x      ;set moving direction to the right

Is this supposed to set the Spiny Egg speed relative to the Lakitu's speed? And if so, could someone make a patch so that this works like it should? --GoldS (talk) 17:19, 30 March 2014 (EDT)

Actually, I think I got the intended behavior working by moving the jsr SmallBBox to after the dey here. This patch should work on the JU PRG0 ROM: --GoldS (talk) 18:02, 30 March 2014 (EDT)
Download.png Download Spiny Egg Speed Patch
File: SMBSpinyEggPatch.ips (25 B) (info)

This also shows behavior that I don't think can be seen in the game properly: The spiny eggs bounce off of walls in the opposite direction.

From the corresponding disassembly of Super Mario Bros. 2 (Japan) it appears that this 'bug' in spiny egg behavior appears there as well. (Maybe it was deemed to be too difficult and the 'bug' was provided to dumb it down?) Regardless, should this be listed on that game's page as well...perhaps even with a similar patch to re-enable the original spiny egg behavior. That would certainly make Lakitu levels far more difficult! --Koohiisan (talk) 08:04, 5 October 2014 (EDT)
Nearly eight years later, I have bothered to do this (the key hex string to search for is A00295, corresponding to the "ldy #$02" followed by the "sta"), and also to create similar patches for all other releases of this and similar games on the NES and similar platforms; there were eight patches in total, and the one from GoldS works on both PRG0 and PRG1 NTSC ROMs, and on the SMB/Duck Hunt combination game, the PlayChoice 10 release, and most rom-hacks. The buggy code in other releases was in other places, and the filenames of the patches should make clear what they're for: PAL NES, SMB/Duck Hunt/World Class Track Meet, VS Super Mario Bros., All Night Nippon SMB (both promo and regular versions), SMB for FDS, and SMB2J.
Download.png Download Spiny Egg Speed Patches
File: SMBSpinyEggPatches.7z (386 B) (info)
I don't feel comfortable editing the bugs page at the moment to include this patch; also, I first planned to just upload the patches individually (a total of 200B without the overhead of an archive format) but figured that it would be too inconvenient to see all of those options to click. Julyo (talk) 11:46, 27 June 2022 (UTC)

Orginal ground theme and speculation from interviews

I'm not sure how relevant it is but I think it's interesting to point out. Various interviews with Koji Kondo reveals that SMB1 had a different ground theme originally from it's early prototype version, that had a lower tempo and was supposedly "laid back". While I don't have much hope of ever hearing this theme unless a early prototype of SMB1 leaks, it's one of the rare things that was revealed about SMB1 development from interviews such as the Iwata Asks one done for the 25th anniversary. Interestingly the lead part of the ground theme came from the original theme (first six notes or so).

In another interview, it was mentioned that some elements was brought over directly from Donkey Kong Jr in particular, so it's possible that the unused climbable object originally looked like the vines from Donkey Kong JR (as you can see a planning sheet shown in this interview (edit: higher res), which shows quite a few familiar objects from the final game too, and shows that the hills in the background is intended to be hills with trees! ;)), that hangs from objects/sky above opposed to the ingame vine that grows upwards. The Donkey Kong JR vines makes a sound effect when you climb them unlike the silent ones of SMB1 too, so I speculate the original sound effect is similar to the DK.JR one and was replaced when disused. --Ailure (talk) 09:11, 21 October 2014 (EDT)

I might be wrong as I only took a quick glance, but looking at the disassembly of SMB1, I see that it's possible that the "brick bump" sound playing while climbing might not necessarily be a leftover but more of a quirk with that the code. Apparently climbing vines triggers the "Mario hit his head against a bg block code", and it does a specific check where it doesn't play the "brick/shell bounce" if Mario happens to be climbing the vine object, but not for other climbable objects including the unused/old vine object. So it might not have been intended to play a sound after all, however I do still believe the game might had a different type of vines at some point as early design documents show (then again, Yoshi popped up in design documents for SMB3 and that didn't happen). --Ailure (talk) 10:23, 24 October 2014 (EDT)

Moved from notes page

In addition to the x-2 intro "hurry up!" music, we should probably check out track 10 as well. I get the feeling it's just playing the existing Game Over music data with the wrong "instruments" applied. How can we tell if it's a glitch or a legitimate unused variation, though? --BMF54123 02:47, 12 May 2010 (EDT)

Ask Drag, of course. Or Acmlm. If it reads from different data but plays the same melody, or uses a pointer that's within the valid range of others... --Xkeeper 02:51, 12 May 2010 (EDT)

Game Genie codes POLYGN, PPANNE, and PPIYOE might use the unused "plunkier" instruments. Somebody has to look into this a bit to find out, because I think it is playing the unused instruments. themudkip12 10:14, 8 August 2013 (EDT)

Is this worth adding?

Someone happens to mess around with the HEX editor to change music, and discovered a longer 1up fanfare. https://www.youtube.com/watch?v=U2wws5sb-zA The preceding unsigned comment was added by Derpy Sponge (talk • contribs)

It sounds like it's reading part of the level clear music as 1-Up sound data. I'm 99% sure this is not unused. --BMF54123 (talk) 08:16, 6 April 2018 (EDT)

Unused Goomba behavior

Years ago, I've discovered an undocumented behavior of the Goombas, but it took me until today for me to regain the codes so I could report the results. Using the Game Genie code ZEYKTP TAZKTY prevents the game from replacing the Goombas with Buzzy Beetles during the "hard mode". When stomped under normal conditions, the Goomba displays its flattened sprite for 30 frames before disappearing. When stomped during "hard mode", however, the Goomba displays its flattened sprite for 212 frames before coming back to life. — NES Boy (talk) 22:35, 4 March 2018 (EST)

New content discovered on Boundary Break

Click here The preceding unsigned comment was added by Marcram (talk • contribs)

Nope. Check the date on that video. --BMF54123 (talk) 08:02, 6 April 2018 (EDT)

Unused Tile?

Is this an unused tile (the blue tile in the image)? --Mario3264 (talk) 23:10, 16 September 2018 (EDT)

SMB1unusedTile?.png

Evidence of the title screen originally using the same palette as the sprites

I was looking at Super Mario Bros. in yy-chr and applied the palette the goombas and blocks use and looked at the background CHR data and the tile that Mario3264 was talking about looked like the title screen top border tile with the palette. Is this evidence of the title screen originally using the goomba and block palette? --daeasygamer 10:21, 14 March 2019 (EDT)

SMB1UnusedTitlescreenTileGoombaPalette.png

256 Worlds

in a (Most Likely Fake) Statement from a gamer, when a "lighting strike hit really close to his house" he was in World 9-1 (Glitch Level which is a Corrupt Level or Clone of another level) I don't remember all of the story but I do remember a dev saying "Yes there is a total of 256 Worlds" also known as the 8-bit integer plus 1 BrewmasterLo (talk)

Here is the source of the statement and the response. — NES Boy (talk) 12:37, 2 December 2021 (UTC)

Fireball Firing Sound Bug

Uncommonly when firing a fireball very close to an enemy the sound might bug out BrewmasterLo (talk)

Invisible Tile

SMB InvisibleTile.png

Not sure if it's worth mentioning, as it's technically used. The Sprite Tile FC is completely blank, but after modifying it with Tile Editor, it can be seen this tile is displayed above the objects. Like Mario is always a 16x32 sprite, regardless if he's big or small and other objects like Goomba are displayed as 16x24 sprites. - Sledge3 11:53, 14 January 2022 (CET)

Scroll-Locking Malfunctions, Leading to the Minus World

A recent video by DisplacedGamers explained why the following code, which he showed in the form of a commented disassembly but I will show as a raw diassembly from the NTSC PRG1 ROM, causes Mario to be sent to an invalid location after phasing through a wall into a Warp Zone and entering a pipe before the zone has completely loaded, and it's all down to buggy code for an enemy that should lock horizontal scrolling if Mario crosses below the status area and re-enable it once he's in the status area and to the right of the enemy, but instead usually re-enables scrolling even if he's below the status area:

37B4   AD 23 07             LDA $0723
37B7   F0 FA                BEQ $37B3
37B9   A5 CE                LDA $CE
37BB   25 B5                AND $B5
37BD   D0 F4                BNE $37B3
37BF   8D 23 07             STA $0723
37C2   EE D6 06             INC $06D6
37C5   4C 98 C9             JMP $C998

His fix amounted to changing the AND $B5 to CMP #$00, which in binary means 25 B5 to C9 00, and then changing the INC to an LDA, which means EE to AD.

With this change, it's actually easier than before to reach the Warp Zone in 1-2, because when scrolling is locked next to the exit pipe, the platforms can still be ridden and run from to make it to the Warp Zone; in SMB2J, the same sort of thing holds, except that what's beyond the purported "exit pipe" is just more of the level (you get another chance to go over the pipe if you didn't make it to the bricks at the top, but if you make it there and fall down, you still have to go through the pipe and try again).

With that said, as with the spiny-speed bug, the offending code is similar for all SMB-like games on all NES-like platforms, with the exception that All Night Nippon SMB and SMB2J do not have that unnecessary INC instruction to begin with, so only one instruction needs to be changed, and in every case, it's 25 B5 to C9 00; I was able to uniquely find the relevant code by searching for AD2307F0, corresponding to "LDA $0723" followed by "BEQ".

Unlike the spiny-speed bug, there are only seven patches, because the NTSC and PAL NES ROMs were changed in the same place.

Download.png Download Minus-World Blocking Patches
File: SMBNoMinus.7z (353 B) (info)

I realize that he prefers Game Genie codes over ROM-hacking, but it was just so simple to do. Julyo (talk) 12:22, 27 June 2022 (UTC)

Both this and the spiny-egg bugfix, along with some other notable changes, have been bundled into the Enhanced SMB1 patch. Julyo (talk) 01:09, 4 July 2022 (UTC)

Invisible Platform Bug

This link explains the many glitches associated with the platforms held by ropes in some of the x-3 levels in both SMB1 and SMB2J, and I wonder if there is any way this can be fixed/optimized. According to the link given, Super Mario All-Stars fixed most of the broken code, except for what causes the invisible platforms. (Original code removed due to length) WikiPro1981X (talk) 01:49, 4 October 2022 (UTC)

UPDATE, 2-9-2023: I have discovered via others (Shane M. and Kindle Kat) that in Super Mario All-Stars, these two lines of code were added within the "PlatformFall" instruction, after the TAX instruction, and it's these additions that helped make the "possessed pulley" issue disappear:
PlatformFall:
...
    tax
    lda Enemy_State,x         ;SMAS bugfix: get left platform's state
    bpl OtherPlat             ;SMAS bugfix: ignore left platform if not valid
    jsr MoveFallingPlatform   ;otherwise make left platform fall
OtherPlat:
    ldx ObjectOffset
...

Sources: [1] [2]

UPDATE, 2-10-23: And here's the other part of the invisible platform fix (by Shane M.)[3]:
BalancePlatform:	   
       lda Enemy_Y_HighPos,x       ;check high byte of vertical position
       cmp #$03
       bne DoBPl
       lda Enemy_State,x           ;SM get object's state (set to $ff or other platform offset)
       bpl DoBPl2                  ;SM if doing other balance platform, branch to leave
       rts
DoBPl2:
      tay                         ;SM save offset from state as Y for other platform
      jsr EraseEnemyObject        ;SM if far below screen, kill the first object
      tya                         ;SM transfer other platform to accumulator
      tax                         ;SM and move it to X to erase it
      jmp EraseEnemyObject        ;SM kill the second platform object
DoBPl: lda Enemy_State,x           ;get object's state (set to $ff or other platform offset)
       bpl CheckBalPlatform        ;if doing other balance platform, branch to leave
       rts
...
ChkForPlayerC_LargeP:
       ldy Enemy_Y_HighPos,x        ;SM load value to see if the platform is offscreen
       dey                          ;SM minus 1 from value to see if it's at 2xx+
       bne ExLPC                    ;SM and branch if so to cancel collision
       jsr CheckPlayerVertical      ;figure out if player is below a certain point
       bcs ExLPC                    ;or offscreen, branch to leave if true
       txa
       jsr GetEnemyBoundBoxOfsArg   ;get bounding box offset in Y
       lda Enemy_Y_Position,x       ;store vertical coordinate in
       sta $00                      ;temp variable for now
       txa                          ;send offset we're on to the stack
       pha
       jsr PlayerCollisionCore      ;do player-to-platform collision detection
       pla                          ;retrieve offset from the stack
       tax
       bcc ExLPC                    ;if no collision, branch to leave
       jsr ProcLPlatCollisions      ;otherwise collision, perform sub
ExLPC: ldx ObjectOffset             ;get enemy object buffer offset and leave
       rts
...

WikiPro1981X (talk) 22:15, 9 February 2023 (UTC)

Springboard Free Space Check Also in SMB2J

I have noticed that besides the PAL (50 Hz) release of SMB1, the additional check for free space for the springboard sprite in the enemy slot is also present in SMB2J (and thus, perhaps, also in VsSMB and All Night Nippon SMB). However, this check could also cause some issues, according to doppelganger's SMB2J disassembly notes.

Here's the same tweaked routine as found in doppelganger's SMB2J disassembly notes:

Jumpspring:
      jsr GetLrgObjAttrib
      jsr FindEmptyEnemySlot      ;find empty space in enemy object buffer
      bcs NoJs                    ;if none, cancel (potentially problematic!)
      jsr GetAreaObjXPosition     ;get horizontal coordinate for jumpspring
      sta Enemy_X_Position,x      ;and store
      lda CurrentPageLoc          ;store page location of jumpspring
      sta Enemy_PageLoc,x
      jsr GetAreaObjYPosition     ;get vertical coordinate for jumpspring
      sta Enemy_Y_Position,x      ;and store
      sta Jumpspring_FixedYPos,x  ;store as permanent coordinate here
      lda #JumpspringObject
      sta Enemy_ID,x              ;write jumpspring object to enemy object buffer
      ldy #$01
      sty Enemy_Y_HighPos,x       ;store vertical high byte
      inc Enemy_Flag,x            ;set flag for enemy object buffer
      ldx $07
      lda #$68                    ;draw metatiles in two rows where jumpspring is
      sta MetatileBuffer,x
      lda #$69
      sta MetatileBuffer+1,x
NoJs: rts

WikiPro1981X (talk) 04:45, 6 October 2022 (UTC)

Bullet on a String

[4] In World 6-3, according to the link above, the "bullet on a string" bug will occur if you drop the first two pulley lifts and stand on the gray platform that appears afterward.

Smb bullet on a string.png

In Super Mario Bros. 2 (Japan), this issue appears to have been fixed according to Shane M.: [5]

BalancePlatform:
...
ExBalP: rts

CheckBalPlatform:
       tay
       lda Enemy_ID,y
       cmp #$24        ;check to see if other object is balance platform
       bne ExBalP      ;if not, branch to leave
...

WikiPro1981X (talk) 23:50, 9 February 2023 (UTC)

Other versions

Its probably a good idea to document what is different (or if anything is different) in "Super Mario Bros. + Duck Hunt + World Class Track Meet", "Super Mario Bros. + Tetris + Nintendo World Cup", and the various emulated re-releases. --Hiccup (talk) 15:19, 22 March 2023 (UTC)

I fixed the SMB/DH information and added SMB/DH/WCTM. SMB/Tetris/WCTM doesn't have any differences from the European Rev. A ROM and thus does not need to be added. All other emulated releases are almost certainly identical to the originals, since there's nothing that needs to be patched in the game (e.g. high-frequency flashing). --Rachel Mae (talk) 06:31, 23 March 2023 (UTC)

No Vertical Speed When Underwater

In the original NTSC SMB1, as well as in SMB2J, this was the code that dealt with the player's vertical speed when underwater:

NYSpd: lda #$01           ;set player's vertical speed to nullify
       sta Player_Y_Speed ;jump or swim

The respective Super Mario All-Stars versions of the above code remain the same.

I think when A=#$01, was supposed to disallow the player's vertical speed whenever underwater, but for the PAL release it seemed vague, hence its own revision below.

For the PAL release (Rev. A), it was customized to better deal with the situation of possible block collision:

NYSpd:  ldy #$01           ;set player's vertical speed to nullify
        lda AreaType       ;PAL diff: Set vertical speed to 0 when underwater
        bne NYSpd2         ;branch if not water
        dey
NYSpd2: sty Player_Y_Speed ;jump or swim

The Super Mario All-Stars PAL release is coded the same.

However, I wonder how this was done for Super Mario Bros. 3, and how it could be customized further? For example, I may add these extra lines:

NYSpd:  ldy Player_Y_Speed ;get player's vertical speed
        cpy #$02           ;check if Y is $02 or higher
        bcc DoFootCheck    ;skip if either 0 or 1
...

WikiPro1981X (talk) 04:11, 23 April 2023 (UTC)

Unused firework effect

I'm not sure if this is worth a mention on the page, but since I haven't really seen it anywhere I thought I'd note it here:

https://www.youtube.com/watch?v=W9J1nE3ZIKY

If the chunks of a block are displayed on screen while the ending cutscene plays (so after the flag has descended, or after a flagpole glitch as in the video) its sprites are replaced. My guess is that it was intended to be an alternate visual for the fireworks, on account of the effect having a firework kind of look, and when it's displayed.

Specifically a result of this code here: https://gist.github.com/1wErt3r/4048722#file-smbdis-asm-L14163-L14171

The PAL version could show it for a single frame with some very specific manipulation.

--Threecreepio (talk) 01:56, 6 June 2023 (UTC)

According to the notes you cited, the flagpole ball object $75 was residual, and not actually used. WikiPro1981X (talk) 07:06, 6 June 2023 (UTC)

This isn't the flagpole ball object, it's the sprite that makes up the moving platform in coin heavens. The residual comment refers to the A register being overwritten before it's used in any situation that would occur normally in the game, since you can't break a block while in the autocontrolled 'cutscene' at the end of a stage. --Threecreepio (talk) 19:43, 6 June 2023 (UTC)

Thank you for correcting me. WikiPro1981X (talk) 10:48, 2 July 2023 (UTC)

Shell vs. Hammer Brother Bug?

In the NES/FDS SMB1 and the FDS release of SMB2J, whenever Mario uses a Koopa shell to destroy a Hammer Brother (i.e., World 8-3 in SMB1), the shell will often miss the Hammer Brother due to a bug.

Super Mario Brothers (Japan)-0.png

ProcEnemyCollisions:
      lda Enemy_State,y        ;check both enemy states for d5 set
      ora Enemy_State,x
      and #%00100000           ;if d5 is set in either state, or both, branch
      bne ExitProcessEColl     ;to leave and do nothing else at this point
      lda Enemy_State,x
      cmp #$06                 ;if second enemy state < $06, branch elsewhere
      bcc ProcSecondEnemyColl
      lda Enemy_ID,x           ;check second enemy identifier for hammer bro
      cmp #HammerBro           ;if hammer bro found in alt state, branch to leave
      beq ExitProcessEColl
      lda Enemy_State,y        ;check first enemy state for d7 set
      asl
      bcc ShellCollisions      ;branch if d7 is clear
      lda #$06
      jsr SetupFloateyNumber   ;award 1000 points for killing enemy
      jsr ShellOrBlockDefeat   ;then kill enemy, then load
      ldy $01                  ;original offset of second enemy

ShellCollisions:
      tya                      ;move Y to X
      tax
      jsr ShellOrBlockDefeat   ;kill second enemy
      ldx ObjectOffset
      lda ShellChainCounter,x  ;get chain counter for shell
      clc
      adc #$04                 ;add four to get appropriate point offset
      ldx $01
      jsr SetupFloateyNumber   ;award appropriate number of points for second enemy
      ldx ObjectOffset         ;load original offset of first enemy
      inc ShellChainCounter,x  ;increment chain counter for additional enemies

ExitProcessEColl:
      rts                      ;leave!!!

ProcSecondEnemyColl:
      lda Enemy_State,y        ;if first enemy state < $06, branch elsewhere
      cmp #$06
      bcc MoveEOfs
      lda Enemy_ID,y           ;check first enemy identifier for hammer bro
      cmp #HammerBro           ;if hammer bro found in alt state, branch to leave
      beq ExitProcessEColl
      jsr ShellOrBlockDefeat   ;otherwise, kill first enemy
      ldy $01
      lda ShellChainCounter,y  ;get chain counter for shell
      clc
      adc #$04                 ;add four to get appropriate point offset
      ldx ObjectOffset
      jsr SetupFloateyNumber   ;award appropriate number of points for first enemy
      ldx $01                  ;load original offset of second enemy
      inc ShellChainCounter,x  ;increment chain counter for additional enemies
      rts                      ;leave!!!

Super Mario All-Stars (USA) 012.png

In Super Mario All-Stars, it has been corrected so that the Hammer Brother is now the first enemy in the queue to be hit by a shell, hence the shell always hits a Hammer Brother perfectly and to award the player 1000 points as with all other means of defeating a Hammer Brother.

ProcEnemyCollisions:
      lda Enemy_State,y        ;check both enemy states for d5 set
      ora Enemy_State,x
      and #%00100000           ;if d5 is set in either state, or both, branch
      bne ExitProcessEColl     ;to leave and do nothing else at this point
      lda Enemy_ID,x           ;SMAS bugfix: check enemy identifier for hammer bro first
      cmp #HammerBro           ;if hammer bro found in alt state, branch to leave
      bne PEC2                 
      lda #$00                 ;SMAS bugfix: reset hammer bro state if defeated (perfect hit from shell every time)
      sta Enemy_State,x
PEC2: lda Enemy_State,x
      cmp #$06                 ;if second enemy state < $06, branch elsewhere
      bcc ProcSecondEnemyColl
      lda Enemy_State,y        ;check first enemy state for d7 set
      asl
      bcc ShellCollisions      ;branch if d7 is clear
      lda #$06
      jsr SetupFloateyNumber   ;award 1000 points for killing enemy
      jsr ShellOrBlockDefeat   ;then kill enemy, then load
      ldy $01                  ;original offset of second enemy

UPDATE 1-19-2024: Here is the specific code from Super Mario All-Stars that will correct the Koopa shell vs. Hammer Brother behavior to give you the correct 1000 points for that enemy:

SetupFloateyNumber:
       cmp FloateyNum_Control,x ;check against specific values in floatey number control data
       bcs ContinueSetupFloatey ;if valid, continue with the rest of the code
       rts                      ;otherwise leave

ContinueSetupFloatey:           ;original 'SetupFloateyNumber' code data here
       sta FloateyNum_Control,x ;set number of points control for floatey numbers
       lda #$30
       sta FloateyNum_Timer,x   ;set timer for floatey numbers
       lda Enemy_Y_Position,x
       sta FloateyNum_Y_Pos,x   ;set vertical coordinate
       lda Enemy_Rel_XPos
       sta FloateyNum_X_Pos,x   ;set horizontal coordinate and leave
ExSFN: rts

WikiPro1981X (talk) 10:25, 2 July 2023 (UTC)

Red Koopa Paratroopa Demotion Bug

Screenshot from 2023-07-22 18-19-00.png

Another bug exists in this game concerning the demotion of Red Koopa Paratroopas to Red Koopa Troopas. Normally, the regular Red Koopa Troopas will turn around near a pit and walk back, but what happens here is that after stomping on a flying Red Koopa Paratroopa to change it to a normal Red Koopa Troopa, it actually behaves similarly to the more common (green) Koopa Troopa, as it actually falls off a ledge if one is near it when demoted by the player.

According to Shane M., this bug can be fixed by doing this:

ChkForDemoteKoopa:
    cmp #$09                 ;branch elsewhere if enemy object < $09
    bcc HandleStompedShellE  
    and #%00000001           ;demote koopa paratroopas to ordinary koopas
    beq GoGreen              ;SM
    lda #$03                 ;SM if red paratroopa found, demote it properly to a regular red Koopa Troopa
GoGreen:
    sta Enemy_ID,x
    ldy #$01                 ;return enemy to normal state (SM: was #$00)
    sty Enemy_State,x
[...]

and also change

ChkToStunEnemies:
         cmp #$09            ;perform many comparisons on enemy object identifier         
         bcc SetStun
         cmp #$11            ;if the enemy object identifier is equal to the values
         bcs SetStun         ;$09, $0e, $0f or $10, it will be modified, and not
         cmp #$0a            ;modified if not any of these four values, note that piranha plant will
         bcc Demote          ;always fail this test because A will still have vertical
         cmp #PiranhaPlant   ;coordinate from previous addition, also these comparisons
         bcc SetStun         ;are only necessary if branching from 'StnE'
Demote:  and #%00000001      ;erase all but LSB, thus turning enemy object into green or red Koopa Troopa to demote them
         beq MakeItGreen     ;SM
         lda #$03            ;SM if red Koopa Paratroopa found, demote it properly to a normal red Koopa Troopa
MakeItGreen:
         sta Enemy_ID,x
SetStun: lda Enemy_State,x

WikiPro1981X (talk) 01:30, 23 July 2023 (UTC)

Area Change Timer

The game does a check for time between transitions of areas. The first value under 'AreaChangeTimerData,' value $A0, was only supposed to apply to the transition time between the pipe intro and the first screen of Worlds 1-2, 2-2, 4-2 and 7-2, but due to a programming oversight, this first value also affects the time delay for the first underground coin room in Worlds 1-1, 2-1 and 7-1.

PlyrPipe:
...
  ldy #$00                  ;set default offset of timer setting data
  lda ScreenLeft_PageLoc    ;load page location for left side of screen
  beq SetCATmr              ;if at page 0, use default offset
  iny                       ;otherwise increment offset

SetCATmr:
  lda AreaChangeTimerData,y ;set timer for change of area as appropriate
  sta ChangeAreaTimer
...
AreaChangeTimerData:
  .db $a0, $34

In Super Mario All-Stars, the first value under 'AreaChangeTimerData' was changed to $34 as well to shorten the time delay for leaving the first underground coin room, but this also shortens the delay for the transition time between the pipe intro and the actual Worlds 1-2, 2-2, 4-2 and 7-2.

According to TakuikaNinja, the issue can be fixed by changing the lda under ldy #$00 to load the AreaPointer RAM address, and then after that to add a cmp check for room ID #$29, which will fix it so the first offset applies only to the pipe intro scene, thereby fixing the time delay after leaving the first coin room's exit pipe (in worlds 1-1, 2-1 and 7-1):

PlyrPipe:
...
  ldy #$00                   ;set default offset of timer setting data
  lda AreaPointer            ;load area pointer flag
  cmp #$29                   ;pipe intro scene?
  beq SetCATmr               ;if so, use default offset
  iny                        ;otherwise increment offset

WikiPro1981X (talk) 11:19, 11 August 2023 (UTC)

World End Timer -- Redundant?

PlayerEndWorld:
               lda WorldEndTimer          ;check to see if world end timer expired
               bne EndExitOne             ;branch to leave if not
               ldy WorldNumber            ;check world number
               cpy #World8                ;if on world 8, player is done with game, 
               bcs EndChkBButton          ;thus branch to read controller
               lda #$00
               sta AreaNumber             ;otherwise initialize area number used as offset
               sta LevelNumber            ;and level number control to start at area 1
               sta OperMode_Task          ;initialize secondary mode of operation
               inc WorldNumber            ;increment world number to move onto the next world
               jsr LoadAreaPointer        ;get area address offset for the next area
               inc FetchNewGameTimerFlag  ;set flag to load game timer from header
               lda #GameModeValue
               sta OperMode               ;set mode of operation to game mode
EndExitOne:    rts                        ;and leave
EndChkBButton: lda SavedJoypad1Bits
               ora SavedJoypad2Bits       ;check to see if B button was pressed on
               and #B_Button              ;either controller
               beq EndExitTwo             ;branch to leave if not
               lda #$01                   ;otherwise set world selection flag
               sta WorldSelectEnableFlag
               lda #$ff                   ;remove onscreen player's lives
               sta NumberofLives
               jsr TerminateGame          ;do sub to continue other player or end game
EndExitTwo:    rts                        ;leave

According to this link[6], the world end timer ($07a1) is only called upon two times: it's set at near the end of the PrintVictoryMessages routine, and checked on once at the start of the PlayerEndWorld routine above. However, according to TakuikaNinja[7], for the PlayerEndWorld routine this is rather unnecessary and thus considered redundant. Do any of you here agree with his view? If so, when removing the world end timer check also make sure to reassign the world 8 check from Y to A.

PlayerEndWorld:
               lda WorldNumber            ;check world number
               cmp #World8                ;if on world 8, player is done with game
               bcs EndChkBButton          ;thus, branch to read controller
               lda #$00 
               sta AreaNumber             ;otherwise initialize area number as offset
               sta LevelNumber            ;and level number control to start at area 1
...

WikiPro1981X (talk) 06:50, 24 November 2023 (UTC)

Unused Cheep Cheep behaviour

Swimming Cheep Cheeps have an unused behaviour. When jumped on, Cheep Cheep will turn into a Koopa Troopa. Interestingly enough that in the leaked code for Super Mario All Stars Cheep Cheep's referred as "flying kame" ("kame" is a japanese word which means "turtle"). It seems that Cheep Cheeps were originally Koopa Paratroopas. MALMoresoProgram (talk) 10:32, 2 December 2023 (UTC)

Invalid World Select

There is a rare glitch that can be performed if you swap out Super Mario Bros. for Tennis or any other cartridge that happens to have RAM address 0x07FD that can cause strange levels to be loaded after you re-load the NES with Super Mario Bros. and then hold down A+Start (the continue code function), which is explained in great detail at this link[8].

The same thing can be done with a Family BASIC cartridge and going into BASIC mode [9]. When there, input these four lines of code:
10 FOR I=&H7D3 TO &H7DC:POKE I,0:NEXT
20 POKE &H7FF,&HA5
30 INPUT "WORLD=";A
40 POKE &H7FD,A+255AND255
Then hit Return on the keyboard and it will say "WORLD=?" on the screen. Input the desired world number (between 2 and 255), hit Return again and it will say "OK". Then remove the Family BASIC cartridge (while still leaving the system powered on), and replace it with the Super Mario Bros. cartridge and reset the console. Press A+Start on Controller I and you will be at the world number you selected in BASIC! WikiPro1981X (talk) 08:51, 8 March 2024 (UTC)

According to TakuikaNinja, this glitch can be fixed by modifying these routines[10], [11]:

Start:
...
WBootCheck: lda TopScoreDisplay,x  ;check each digit in the top score
            cmp #10                ;to see if we have a valid digit
            bcs ColdBoot           ;if not, give up and proceed with cold boot
            dex
            bpl WBootCheck
            lda WarmBootValidation ;second checkpoint, check to see if
            cmp #$a5               ;another location has a specific value
            bne ColdBoot
            lda ContinueWorld      ;glitch world fix: third checkpoint,
            cmp #$08               ;check against max world value + 1
            bcs ColdBoot           ;if invalid world, do cold boot
            ldy #WarmBootOffset    ;if passed all, load warm boot pointer
ColdBoot:   jsr InitializeMemory   ;clear memory using pointer in Y
...


GameMenuRoutine:
...
ChkContinue: ldy DemoTimer         ;if timer for demo has expired, reset modes
             beq ResetTitle
             asl                   ;check to see if A button was also pressed
             bcc StartWorld1       ;if not, don't load continue function's world number
             lda ContinueWorld     ;load previously saved world number for secret continue function
             cmp #$08              ;glitch world fix: check against max world value + 1
             bcs StartWorld1       ;if invalid world, skip continue and begin new game instead (no more cold starts)
             jsr GoContinue        ;otherwise world < 8, so do continue function when pressing A+Start
StartWorld1: jsr LoadAreaPointer
...

I am wondering if the 'CheckInvalidWorldNum' routine in Super Mario Bros. 2 (Japan) was supposed to have corrected this?

NMIHandler:
...
CheckInvalidWorldNum:
   lda WorldNumber    ;if world number somehow goes past 9, just end the game
   cmp #$09
   bcc ExecutionTree
   jsr TerminateGame
ExecutionTree:
...
UPDATE 3-7-2024: I actually tried this code a while ago (but changing the CMP value from #$09 to #$08) and it did do its job perfectly. What this does is that it checks the world number flag (RAM $075F) to see if it ever goes past the maximum valid world number, and if so, to simply reset it back to the title screen. When I tried the continue world feature on cold start, this fix also bypassed the A+Start continue feature (RAM $07FD) if that world number (as read in $075F) was invalid, and it also fixed the minus world glitch in World 1-2. WikiPro1981X (talk) 08:54, 8 March 2024 (UTC)

For Super Mario Bros., you will want to also add the following under the BCC:

CheckInvalidWorldNum:
   lda WorldNumber     ;if world number somehow goes past 8, just end the game
   cmp #$08          
   bcc ExecutionTree
   lda #Silence        ;NEW CODE must be added to satisfy fix
   sta EventMusicQueue ;NEW CODE must be added to satisfy fix
   jsr ResetModes      ;NEW LABEL so fix will work perfectly in both 1-player and 2-player games
ExecutionTree:
...

and also add this label under 'TerminateGame':

TerminateGame:
...
ResetModes:
;NEW LABEL
    lda #$00
    asl               ;residual ASL instruction
    sta OperMode_Task ;reset all modes to title screen and leave
    sta ScreenTimer
    sta OperMode
    rts

WikiPro1981X (talk) 23:56, 18 December 2023 (UTC)