Prev: 6C00 Up: Map Next: 6D1E
6CAA: Game Initialisation
Used by the routines at 6D21, InitialiseDemoMode and CheckPassword.
GameInitialisation 6CAA CALL PrintGameDisplay Call PrintGameDisplay.
This entry point is used by the routine at 76D7.
SetNewGameStates 6CAD LD HL,$3400 Write 3400 to *Fuel.
6CB0 LD ($783C),HL
6CB3 LD HL,$7815 Write 00 to 7815.
6CB6 LD (HL),$00
6CB8 DEC L Write 00 to 7814.
6CB9 LD (HL),$00
6CBB LD L,$1A Write 01 to 781A.
6CBD LD (HL),$01
6CBF INC L Write 00 to 781B.
6CC0 LD (HL),$00
6CC2 INC L Write ShadowBuffer to 781C.
6CC3 LD (HL),$00
6CC5 INC L
6CC6 LD (HL),$B2
6CC8 LD L,$21 HL=7821.
Write 80 to 7821, Speed and 7823.
6CCA LD B,$03 B=03.
GameInitialisation_0 6CCC LD (HL),$80 Write 80 to *HL.
6CCE INC L Increment L by one.
6CCF DJNZ GameInitialisation_0 Decrease counter by one and loop back to GameInitialisation_0 until counter is zero.
Write 00 to 7824, 7825, 7826, 7827, 7828, 7829, 782A and 782B.
6CD1 LD B,$08 B=08.
GameInitialisation_1 6CD3 LD (HL),$00 Write 00 to *HL.
6CD5 INC L Increment L by one.
6CD6 DJNZ GameInitialisation_1 Decrease counter by one and loop back to GameInitialisation_1 until counter is zero.
6CD8 INC L Write A113 to *LevelProgressPointer.
6CD9 INC L
6CDA LD (HL),$13
6CDC INC L
6CDD LD (HL),$A1
6CDF INC L Write 03 to *7830.
6CE0 LD (HL),$03
6CE2 INC L Write BB00 to *7831.
6CE3 LD (HL),$00
6CE5 INC L
6CE6 LD (HL),$BB
6CE8 INC L Write 0B to *7833.
6CE9 LD (HL),$0B
6CEB INC L Write 00 to *Wheelie.
6CEC LD (HL),$00
6CEE CALL InitialiseLevel Call InitialiseLevel.
6CF1 LD L,$10 L=10.
6CF3 LD A,($782D) Jump to GameInitialisation_4 if the game is not in "demo mode" (the high-order byte of ControlMethod_Pointer does not contain 73).
6CF6 CP $73
6CF8 JR NZ,GameInitialisation_4
6CFA LD HL,$A1E0 HL=A1E0.
GameInitialisation_2 6CFD LD A,(HL) A=*HL.
6CFE DEC L Decrease L by one.
6CFF DEC A Decrease A by one.
6D00 JR Z,GameInitialisation_3 Jump to GameInitialisation_3 if A is zero.
6D02 CP $31 Jump to GameInitialisation_2 if A is higher than 31.
6D04 JR NC,GameInitialisation_2
6D06 CP $2D Jump to GameInitialisation_2 if A is lower than 2D.
6D08 JR C,GameInitialisation_2
GameInitialisation_3 6D0A LD A,L A=L.
6D0B INC A Increment A by one.
6D0C LD ($782E),A Write A to *LevelProgressPointer.
6D0F DEC L Decrease L by two.
6D10 DEC L
GameInitialisation_4 6D11 LD H,$9E H=9E.
6D13 XOR A A=00.
6D14 CALL $6800 Call 6800.
This entry point is used by the routine at 6E18.
GameInitialisation_5 6D17 LD A,($5C78) A=*FRAMES.
6D1A INC A Increment A by one.
6D1B JP $EBF6 Jump to EBF6.
Prev: 6C00 Up: Map Next: 6D1E