Results 1 to 14 of 14

Thread: Super Mario Bros. - 128 Lives Fix

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #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

    Sorry to re-open this thread, but now I've figured it out.

    In Super Mario All-Stars, this was how it got fixed:
    Code:
    CheckLives:
        INC NumberofLives ;increment the lives counter by one
        LDA NumberofLives ;then reload it to see if player has 128 lives
        CMP #$80             
        BCC WereGood      ;if not past 128 lives yet, we're good
        LDA #$7F             
        STA NumberofLives ;otherwise, set A=128 lives
    WereGood:
        RTL               ;end of routine
    Another way to do this:
    Code:
    CheckLives:
        INC NumberofLives ;increment the lives counter by one
        LDA NumberofLives ;then reload it to see if we have more than 128 lives
        BPL WereGood      ;if not past 128 lives yet, we're good
        DEC NumberofLives ;otherwise decrement counter by one to prevent overflow
    WereGood:
        RTL              ;end of routine
    ~Ben (ColecoFan1981)
    Last edited by ColecoFan1981; 01-07-2024 at 08:34 PM.

  2. The Following User Says Thank You to ColecoFan1981 For This Useful Post:

    Nz17 (08-28-2023)

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
  •