Prev: 9798 Up: Map Next: 9910
97AC: Start Game
Used by the routine at GameEntry.
StartGame 97AC LD HL,$4000 Writes 00 to all 1800 screen buffer address locations (clears the screen).
97AF LD DE,$4001
97B2 LD BC,$17FF
97B5 LD (HL),$00
97B7 LDIR
97B9 LD HL,$5800 Writes 07 to all 0300 attribute buffer address locations.
97BC LD DE,$5801
97BF LD BC,$02FF
97C2 LD (HL),$07
97C4 LDIR
97C6 LD HL,($B87B) Writes B87B to Score.
97C9 LD ($5BA4),HL
97CC XOR A Write 00 to 5BA0.
97CD LD ($5BA0),A
97D0 CALL $BC48 Call BC48.
97D3 LD A,$01
97D5 LD ($5C6B),A
97D8 LD A,($5BA9)
97DB AND A
97DC JP NZ,GameEntry_0
97DF LD A,($5BA0)
97E2 AND A
97E3 CALL Z,GameOverPrint
97E6 LD A,($5BA0)
97E9 AND A
97EA CALL NZ,Congrats_Print
97ED LD HL,$B86F
97F0 LD DE,$915F
97F3 LD BC,$0055
97F6 LDIR
97F8 LD A,$01
97FA LD ($5C6B),A
97FD LD HL,($5B8E)
9800 LD A,($B87C)
9803 CP H
9804 JP C,StartGame_4
9807 JP NZ,StartGame_0
980A LD A,($B87B)
980D CP L
980E JP C,StartGame_4
StartGame_0 9811 LD A,($B88A)
9814 CP H
9815 JP C,StartGame_5
9818 JP NZ,StartGame_1
981B LD A,($B889)
981E CP L
981F JP C,StartGame_5
StartGame_1 9822 LD A,($B898)
9825 CP H
9826 JP C,StartGame_6
9829 JP NZ,StartGame_2
982C LD A,($B897)
982F CP L
9830 JP C,StartGame_6
StartGame_2 9833 LD A,($B8A6)
9836 CP H
9837 JP C,StartGame_7
983A JP NZ,StartGame_3
983D LD A,($B8A5)
9840 CP L
9841 JP C,StartGame_7
StartGame_3 9844 LD A,($B8B4)
9847 CP H
9848 JP C,StartGame_8
984B JP NZ,BestScoresPrint
984E LD A,($B8B3)
9851 CP L
9852 JP C,StartGame_8
9855 JP BestScoresPrint
StartGame_4 9858 CALL $B6D0
985B LD HL,$B860
985E LD DE,$B86F
9861 LD BC,$000C
9864 LDIR
9866 LD HL,($5B8E)
9869 LD A,L
986A LD ($B87B),A
986D LD A,H
986E LD ($B87C),A
9871 LD HL,$915F
9874 LD DE,$B87D
9877 LD BC,$003C
987A LDIR
987C JP BestScoresPrint
StartGame_5 987F CALL $B6D0
9882 LD HL,$B860
9885 LD DE,$B87D
9888 LD BC,$000C
988B LDIR
988D LD HL,($5B8E)
9890 LD A,L
9891 LD ($B889),A
9894 LD A,H
9895 LD ($B88A),A
9898 LD HL,$916D
989B LD DE,$B88B
989E LD BC,$002D
98A1 LDIR
98A3 JP BestScoresPrint
StartGame_6 98A6 CALL $B6D0
98A9 LD HL,$B860
98AC LD DE,$B88B
98AF LD BC,$000C
98B2 LDIR
98B4 LD HL,($5B8E)
98B7 LD A,L
98B8 LD ($B897),A
98BB LD A,H
98BC LD ($B898),A
98BF LD HL,$917B
98C2 LD DE,$B899
98C5 LD BC,$001E
98C8 LDIR
98CA JP BestScoresPrint
StartGame_7 98CD CALL $B6D0
98D0 LD HL,$B860
98D3 LD DE,$B899
98D6 LD BC,$000C
98D9 LDIR
98DB LD HL,($5B8E)
98DE LD A,L
98DF LD ($B8A5),A
98E2 LD A,H
98E3 LD ($B8A6),A
98E6 LD HL,$9189
98E9 LD DE,$B8A7
98EC LD BC,$000F
98EF LDIR
98F1 JP BestScoresPrint
StartGame_8 98F4 CALL $B6D0
98F7 LD HL,$B860
98FA LD DE,$B8A7
98FD LD BC,$000C
9900 LDIR
9902 LD HL,($5B8E)
9905 LD A,L
9906 LD ($B8B3),A
9909 LD A,H
990A LD ($B8B4),A
990D JP BestScoresPrint
Prev: 9798 Up: Map Next: 9910