Prev: F4EE Up: Map Next: F52A
F4FC: Game Over
Used by the routine at LoseLife.
Ends the game for the current player. It prints the number of the player and the text GAME OVER, updates the high score and plays a tune. Then it waits for a while or until the 0 key is pressed, clears the playfield and (with two players) swaps the players.
GameOver F4FC CALL PrintPlayer Call PrintPlayer.
F4FF LD DE,$F5CE The text: game over.
F502 CALL PrintText Call PrintText.
F505 CALL UpdateHighScore Call UpdateHighScore.
F508 LD DE,$F580 The tune: game over.
F50B CALL PlayMusic Call PlayMusic.
F50E LD B,$0C B=0C.
GameOver_Wait F510 CALL Delay Call Delay.
F513 LD A,$EF A=EF.
F515 OUT ($FD),A Send A to port FD.
F517 IN A,($FE) Read port FE.
F519 AND %00000001 Keep the bits of A that are set in 01.
F51B JR Z,GameOver_Done Jump to GameOver_Done if the zero flag is set.
F51D DJNZ GameOver_Wait Decrease B and jump to GameOver_Wait until none remain.
GameOver_Done F51F CALL ClearPlayfield Call ClearPlayfield.
F522 LD A,($F2E2) The two player flag.
F525 AND A Call SwapPlayers if A is not zero.
F526 CALL NZ,SwapPlayers
F529 RET Return.
Prev: F4EE Up: Map Next: F52A