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:
LDA NumberofLives ;load the lives counter
INC NumberofLives ;then increment it by one
CMP #$80 ;does player have 128 lives?
BCC EndCheckL ;if not, skip to end of routine
LDA #$7F ;if so, set A=127 lives
STA NumberofLives
EndCheckL:
RTL ;end of routine
Another way to do this:
Code:
CheckLives:
LDA NumberofLives ;load the lives counter
INC NumberofLives ;then increment it by one
BPL EndCheckL ;skip to end of routine if negative flag not yet set
DEC NumberofLives ;otherwise decrement counter by one to prevent overflow
EndCheckL:
RTL ;end of routine
~Ben (ColecoFan1981)