Prev: CB7B Up: Map Next: CBC5
CBAC: Check Player Dead
Used by the routine at StartGame.
Checks whether the player has died. If so, a new life is started (or the game is over if there are no lives left).
The routine also checks that the instruction at CBDD has not been changed, which is part of the copy protection. The computer is reset if it has been.
CheckPlayerDead CBAC LD A,($BC8E) Return if the player is still alive.
CBAF AND A
CBB0 RET NZ
CBB1 LD A,($CBDD) Fetch the opcode of the instruction at CBDD, and reset the computer by jumping to BuildRandomTable_Reset unless it is 35 (DEC (HL)).
CBB4 CP $35
CBB6 JP NZ,BuildRandomTable_Reset
CBB9 LD A,($BBCD) Fetch the number of lives left and jump to StartNewLife to start a new life if there are none.
CBBC AND A
CBBD JR Z,StartNewLife
CBBF LD DE,$C839 Play the tune for losing a life.
CBC2 CALL PlayMusic
Prev: CB7B Up: Map Next: CBC5