the "infinite" lives trick in Super Mario Bros (NES)

Discussion in 'General Gaming' started by everett1911, Apr 14, 2009.

  1. everett1911

    everett1911 Robust Member

    Joined:
    Jul 30, 2008
    Messages:
    232
    Likes Received:
    2
    I had always wondered... why is it that after getting past a certain number of lives with that trick, mario'd die and the game over screen is shown right after that? I mean, I know there had to be a limit to how many lives you can possibly get, but why would that kill mario?
     
  2. graphique

    graphique Enthusiastic Member

    Joined:
    Oct 17, 2007
    Messages:
    578
    Likes Received:
    25
    Depending on whether the "life counter" is treated as signed or unsigned, if you keep adding to it it'll loop back around either to negative numbers or to zero, respectively. (I don't know which is actually the case in Mario 1, not having disassembled it) Think of it like an odometer turning over.
     
  3. ave

    ave JAMMA compatible

    Joined:
    May 21, 2006
    Messages:
    5,644
    Likes Received:
    61
    Haven't heard of it before, are you talking about this trick where Mario uses to jump on a turtle again and again in a certain angle so that it can't escape or die?
    I think the maximum was something like 99. There was a different number in SMB 2 though (the Japanese SMB 2 for Famicom Disk System).
     
  4. ccovell

    ccovell Resolute Member

    Joined:
    Jan 29, 2005
    Messages:
    954
    Likes Received:
    10
    The maximum is probably 127... Get over that, and when the game deducts 1 from your life counter when you die... it's in the negatives (128-255 in an unsigned byte), so the games assumes it's the transition from 0 to -1, meaning a game over.
     
  5. Jamtex

    Jamtex Adult Orientated Mahjong Connoisseur

    Joined:
    Feb 21, 2007
    Messages:
    5,472
    Likes Received:
    16
    Basically it increments an 8 bit memory location, when this gets to 255 increment it once more and it will make it zero.

    The programmers didn't think you would get more then 19 lives which is why the lives display goes a bit funny.

    It reads the number of lives and adds 1, if this is less then ten then it prints the graphic of the number 0-9 as if you have more then ten lives then subtracts 10 from this and then prints a crown, however if you have 20 lives or more then it starts print graphics 10 and upwards which are parts of the text and graphics blocks.

    It only increments lives if you chain a number of kills or get 100 coins so a simple check would have stopped you getting more then 19 lives.
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page