Results 1 to 18 of 18

Thread: Super Mario Bros. - Spiny Egg Intended Behavior

  1. #1
    Cherry (Level 1)
    Join Date
    Oct 2010
    Location
    Milwaukie (Oak Grove), Oregon
    Posts
    351
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default Super Mario Bros. - Spiny Egg Intended Behavior

    Has anyone here been aware that the Spiny Egg movement in the NES version of Super Mario Brothers is not as intended? The link below will tell.

    Link about this:
    https://tcrf.net/Talk:Super_Mario_Br...ontal_Movement

    What we got:
    Code:
    DifLoop:  lda PRDiffAdjustData,y
              sta $01,x
              iny
              iny
              iny
              iny
              dex
              bpl DifLoop
              ldx ObjectOffset
              jsr PlayerLakituDiff
              ldy Player_X_Speed
              cpy #$08
              bcs SetSpSpd
              tay
              lda PseudoRandomBitReg+1,x
              and #$03
              beq UsePosv
              tya
              eor #$ff
              tay
              iny
    UsePosv:  tya
    SetSpSpd: jsr SmallBBox
              ldy #$02
              sta Enemy_X_Speed,x
              cmp #$00
              bmi SpinyRte
              dey
    What should have been:

    Code:
    SetSpSpd: ldy #$02
              sta Enemy_X_Speed,x
              cmp #$00
              bmi SpinyRte
              dey
    SpinyRte: jsr SmallBBox
    Move the jsr instruction to below the dey instruction, and the movement will be as intended.

    This same fix can also be applied to these other SMB variations:
    Super Mario Bros. (FDS)
    Super Mario Bros. 2 (Japan) (FDS)
    All-Night Nippon Super Mario Bros. (FDS)
    Vs. Super Mario Bros.
    (Please note the offsets for the SetSpSpd instruction will be different for these versions than the NES cartridge version, which is at offset 0x4444 when using a hex editing program like Hexecute or Hex Workshop.)

    ~Ben
    Last edited by ColecoFan1981; 03-04-2015 at 01:49 PM.

  2. #2
    Strawberry (Level 2) JohnnyA's Avatar
    Join Date
    Dec 2004
    Posts
    578
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    I would be very interested to see a before and after video of the behavior, as it's hard for me to picture how the behavior would change from just the description. Neat nonetheless.

  3. #3
    ServBot (Level 11) Custom rank graphic
    Graham Mitchell's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles, CA
    Posts
    3,623
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    1
    Thanked in
    1 Post
    Xbox LIVE
    Psygnosis8
    PSN
    Psygnosis8
    Steam
    Psygnosis8

    Default

    Quote Originally Posted by JohnnyA View Post
    I would be very interested to see a before and after video of the behavior, as it's hard for me to picture how the behavior would change from just the description. Neat nonetheless.
    It sounds like they're supposed to bounce before turning into a spiny. Pretty interesting!

    The page also talks about an alternate ground theme music that Koji Kondo has alluded to in interviews. I'd like to hear that as well.

  4. #4
    Cherry (Level 1)
    Join Date
    Oct 2010
    Location
    Milwaukie (Oak Grove), Oregon
    Posts
    351
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    Here's an "after" video:
    https://www.youtube.com/watch?v=b-jwlt24NLo

    ~Ben

  5. #5
    Kirby (Level 13) Tanooki's Avatar
    Join Date
    Aug 2012
    Posts
    5,964
    Thanks Thanks Given 
    3
    Thanks Thanks Received 
    2
    Thanked in
    2 Posts

    Default

    I wondered what this was all about as code means nothing to me. That would have made the game quite a bit harder than probably even necessary so I can see why they left it out. I'm more surprised as downright ugly as the FDS SMB2 was they didn't include it in there.

  6. #6
    ServBot (Level 11) Custom rank graphic
    Graham Mitchell's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles, CA
    Posts
    3,623
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    1
    Thanked in
    1 Post
    Xbox LIVE
    Psygnosis8
    PSN
    Psygnosis8
    Steam
    Psygnosis8

    Default

    Wow, looks like it would've been more challenging. I'd like to patch it into vs smb and try it.

  7. #7
    Cherry (Level 1)
    Join Date
    Oct 2010
    Location
    Milwaukie (Oak Grove), Oregon
    Posts
    351
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    On the side, here's a recently uncovered SMB glitch: you have to beat the game the first time around. When the secondary hard mode is activated, start a 2 player game.

    Go to World 5-2 (provided both Mario and Luigi have enough lives) and be Small on the vine and wait for the Hammer Brother to throw a Hammer at you while on the vine. When it is the next player's turn, the next player should be at 1-2, 2-2 or 4-2 and a vine will grow from the ground. In 1-2, this vine allows you to rack up infinite lives from a Buzzy Beetle.

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

    ~Ben

  8. #8
    Insert Coin (Level 0)
    Join Date
    Oct 2014
    Posts
    68
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    Quote Originally Posted by Tanooki View Post
    I wondered what this was all about as code means nothing to me. That would have made the game quite a bit harder than probably even necessary so I can see why they left it out. I'm more surprised as downright ugly as the FDS SMB2 was they didn't include it in there.
    It's been awhile since I've played it but I have SMB2j on my wii and I'm pretty sure the spiney behavior is different in it

  9. #9
    Kirby (Level 13) Leo_A's Avatar
    Join Date
    Jul 2004
    Posts
    5,880
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    How do we know that this was how it was intended to work, and that how it instead worked in four different releases was just a bug?

  10. #10
    Red (Level 21) Jorpho's Avatar
    Join Date
    Jul 2002
    Location
    We're all mad here
    Posts
    13,554
    Thanks Thanks Given 
    2
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    I read about this on TCRF some time ago. Great site, TCRF.

    How do we know that this was how it was intended to work, and that how it instead worked in four different releases was just a bug?
    Presumably because it's a fairly minor change of the sort one might expect a programmer to accidentally make.
    "There is much pleasure to be gained from useless knowledge." --Bertrand Russel (attributed)

  11. #11
    Cherry (Level 1)
    Join Date
    Oct 2010
    Location
    Milwaukie (Oak Grove), Oregon
    Posts
    351
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    Having discussed all about how to patch the original Spiny Egg behavior to the original 8-bit NES versions, I'm wondering how this could be done on Super Mario All-Stars for Super NES and Super Mario Bros. Deluxe for the Game Boy Color, considering those two ports use different coding languages (65816 for the former; and Z80 for the latter)?

    The NEC PC-8801 series used a variation of the Z80 platform known as µPD780 (µPD70008 on PC-8801 FH and MH).

    ~Ben
    Last edited by ColecoFan1981; 03-06-2015 at 02:04 PM.

  12. #12
    Kirby (Level 13) Leo_A's Avatar
    Join Date
    Jul 2004
    Posts
    5,880
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    Quote Originally Posted by Jorpho View Post
    Presumably because it's a fairly minor change of the sort one might expect a programmer to accidentally make.
    Just because the behavior can easily be altered, doesn't mean that how it has always been portrayed was merely the result of a bug.

  13. #13
    Red (Level 21) Jorpho's Avatar
    Join Date
    Jul 2002
    Location
    We're all mad here
    Posts
    13,554
    Thanks Thanks Given 
    2
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    Quote Originally Posted by ColecoFan1981 View Post
    Having discussed all about how to patch the original Spiny Egg behavior to the original 8-bit NES versions, I'm wondering how this could be done on Super Mario All-Stars for Super NES and Super Mario Bros. Deluxe for the Game Boy Color, considering those two ports use different coding languages (65816 for the former; and Z80 for the latter)?
    I understand All-Stars actually uses a lot of unaltered code from the original NES games, as per https://tcrf.net/Super_Mario_All-Stars . Various bugs present in the original are still there, and some are even present in SMBDX, according to http://www.themushroomkingdom.net/bugs/smb .

    The original arcade port of Vs. Super Mario Bros. was also Z80-based.
    Are you sure about that? The (non-Super) Mario Bros was Z80-based, but I thought the Vs Unisystem was mostly the same as the NES hardware. Or was there more than one port?
    "There is much pleasure to be gained from useless knowledge." --Bertrand Russel (attributed)

  14. #14
    Cherry (Level 1)
    Join Date
    Oct 2010
    Location
    Milwaukie (Oak Grove), Oregon
    Posts
    351
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    I will point out that in both Super Mario Bros. 3 and Super Mario World Lakitu throws the Spiny Eggs at an angle, so that would mean in SMB 1 the straight behavior of the Spiny Egg throw is indeed wrong and using the patch will restore the original behavior.

    ~Ben

  15. #15
    Kirby (Level 13) Leo_A's Avatar
    Join Date
    Jul 2004
    Posts
    5,880
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    Quote Originally Posted by ColecoFan1981 View Post
    I will point out that in both Super Mario Bros. 3 and Super Mario World Lakitu throws the Spiny Eggs at an angle, so that would mean in SMB 1 the straight behavior of the Spiny Egg throw is indeed wrong and using the patch will restore the original behavior.
    All that means is that in SMB3 and SMW, Lakitu throws spiny eggs at an angle and that an enterprising homebrew has delved into SMB1's code and changed it slightly to create something similar.

    You very well may be correct, but it simply can't be proven by the code alone.
    Last edited by Leo_A; 03-07-2015 at 12:00 PM.

  16. #16
    ServBot (Level 11) davidbrit2's Avatar
    Join Date
    Feb 2003
    Location
    Southwest Michigan, USA
    Posts
    3,860
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Granted, we can only really speculate at this point, but the fact that there's a bunch of code already in the game which calculates the speed and direction, and handles rebound, but which accidentally overwrites the result in the register with a zero at the last moment, seems to strongly suggest that was the intended behavior.

    It seems like a pretty obvious bug, though, so it's weird that it wouldn't have been corrected before release. Perhaps it was done deliberately if they felt the lateral movement was too difficult. Zeroing out the results would be the safest way to put in an 11th-hour patch like that without modifying much code. Again, just speculation.

  17. #17
    Insert Coin (Level 0) Pr3tty F1y's Avatar
    Join Date
    Oct 2011
    Location
    fhqwhgads
    Posts
    145
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    11
    Thanked in
    11 Posts

    Default

    Quote Originally Posted by Jorpho View Post
    Are you sure about that? The (non-Super) Mario Bros was Z80-based, but I thought the Vs Unisystem was mostly the same as the NES hardware. Or was there more than one port?
    You are correct. Also, the PlayChoice-10 system looks to have used a z80 to power the menu screen which also displayed some game information and controls, but nothing related to NES game play. The Vs Unisystem was mostly bog standard NES. However, it looks like ColecoFan1981 edited his post.

    Nonetheless, the SNES' 65c816 was fully capable of running 6502 code. This is is why Anthrox was able to release NES ports of certain "Mapper #0" NES games (sans sound) via BBS back in the 90s. It's a bit of a shame Nintendo didn't add the hardware to make the SNES fully backwards compatible.

    Therefore, it seems very reasonable that the same bugs that existed in Super Mario Bros. for the NES would re-appear in Super Mario All-Stars. Why they f'd up the brick smashing physics in SMB1; however, is anyone's guess.

  18. #18
    Red (Level 21) Jorpho's Avatar
    Join Date
    Jul 2002
    Location
    We're all mad here
    Posts
    13,554
    Thanks Thanks Given 
    2
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    Oh, right, I was going to mention that. How very puzzling. That, at least, is surely a bug.
    "There is much pleasure to be gained from useless knowledge." --Bertrand Russel (attributed)

Similar Threads

  1. Super Mario Bros. Toy - Two Ladders & Mario Luigi Figures
    By ZackyH in forum Buying and Selling
    Replies: 5
    Last Post: 10-31-2007, 02:06 AM
  2. FS: N64 Mario Kart 64, Mario Golf, Super Smash Bros $35
    By Perkar in forum Buying and Selling
    Replies: 2
    Last Post: 08-24-2006, 11:31 PM
  3. NEW Super Mario Bros. an evolution of classic 2D Mario
    By Jasoco in forum Classic Gaming
    Replies: 28
    Last Post: 05-19-2005, 03:25 PM
  4. FA: Mario Bros / Zelda Toy Chest, Super Mario 2 Inside Out
    By TisLord in forum Buying and Selling
    Replies: 2
    Last Post: 10-21-2004, 09:25 AM
  5. Everybody Rejoice ---- Super Mario Bros. Super Show! - Vol 1
    By www.consolegames.org in forum Classic Gaming
    Replies: 11
    Last Post: 06-28-2004, 04:28 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •