Prev: D352 Up: Map Next: D4D6
D469: Start Game
Used by the routine at Game_Loop.
StartGame D469 LD A,$02 Write 02 to:
D46B LD ($D830),A
D46E LD ($D831),A
D471 LD ($D82E),A
D474 LD ($D82F),A
D477 LD A,$09 Write 09 to *D834.
D479 LD ($D834),A
Spend a life to play the game.
D47C LD HL,$D827 HL=Lives.
D47F DEC (HL) Decrease *HL by one.
D480 JP Z,GameOver Jump to GameOver if the player is out of lives.
D483 LD HL,$D83A Write 00 to *Time.
D486 LD (HL),$00
D488 CALL $F31E Call F31E.
D48B LD HL,($D872) HL=*D872.
D48E LD (HL),$2D Write 2D to *HL.
D490 INC HL Increment HL by one.
D491 LD (HL),$2D Write 2D to *HL.
D493 INC HL Increment HL by one.
D494 LD ($D872),HL Write HL to *D872.
D497 LD DE,$001E HL+=001E.
D49A ADD HL,DE
D49B LD (HL),$2D Write 2D to *HL.
D49D INC HL Increment HL by one.
D49E LD (HL),$2D Write 2D to *HL.
D4A0 LD HL,$D83A HL=Time.
D4A3 SET 0,(HL) Set bit 0 of *HL.
This entry point is used by the routine at D352.
StartGame_0 D4A5 LD A,($D83A) A=*Time.
D4A8 AND %11110001 Keep only bits 0, 4-7.
D4AA LD ($D83A),A Write A to *Time.
D4AD LD A,($D830) Write *D830 to *D82C.
D4B0 LD ($D82C),A
D4B3 LD A,($D831) Write *D831 to *D82D.
D4B6 LD ($D82D),A
D4B9 LD A,($D824) Write *Timer_Crack_13 to *D832.
D4BC LD ($D832),A
D4BF LD A,($D835) Jump to StartGame_1 if *PlayerCursor_Flag is not equal to 00.
D4C2 CP $00
D4C4 JR NZ,StartGame_1
D4C6 LD A,($D834) Jump to StartGame_1 if *D834 is equal to 09.
D4C9 CP $09
D4CB JR Z,StartGame_1
D4CD CALL Display_PlayerCursor Call Display_PlayerCursor.
StartGame_1 D4D0 CALL $D97E Call D97E.
D4D3 JP $D352 Jump to D352.
Prev: D352 Up: Map Next: D4D6