Prev: B5CC Up: Map Next: B61E
B5FC: New High Score
Used by the routine at GameOver_ControllerRestart.
Called when the game has ended to see whether either of the scores has made it into the hall of fame. The player with the highest score is dealt with first (see NewHighScore_Enter) and then the other player, so if both players have scored enough the higher score is entered first.
Before After NewHighScore
new-high-score-before new-high-score-after
NewHighScore B5FC LD HL,$9698 Point HL at the score of 1UP at 1UP_Score_1.
B5FF LD DE,$969B Point DE at the score of 2UP at 2UP_Score_1.
B602 CALL NewHighScore_Compare Compare the two scores.
B605 LD A,$00 Clear the hall of fame updated flag in HallOfFameUpdated (without changing the flags).
B607 LD ($96BA),A
B60A JR Z,NewHighScore_Process Jump to NewHighScore_Process if the score of 1UP is higher than (or equal to) the score of 2UP.
B60C JR C,NewHighScore_Process
B60E CPL Flip the bits to make 2UP the active player.
B60F EX DE,HL Swap the score pointers, so HL points to the score of 2UP.
NewHighScore_Process B610 LD ($969E),A Set the active player to the one with the highest score.
B613 CALL NewHighScore_Enter Enter the high score.
B616 EX DE,HL Swap the score pointers back, so HL points to the other score.
B617 LD A,($969E) Fetch the active player from Flag_ActivePlayer.
B61A CPL Flip the bits to switch to the other player.
B61B LD ($969E),A Set the other player as the active player.
View the equivalent code in;
Prev: B5CC Up: Map Next: B61E