Prev: 73B6 Up: Map Next: 73F1
73B7: Demo Mode Input
Input method; used by the routine at GetControls.
In demo mode, we never let the game run out of fuel or lives.
DemoModeInput 73B7 LD A,$04 Write 04 to *Lives.
73B9 LD ($7839),A
73BC LD HL,$3400 Write 3400 to *Fuel.
73BF LD ($783C),HL
73C2 CALL KeyboardInput Call KeyboardInput.
73C5 AND A Jump to DemoModeControls if no keys are being pressed.
73C6 JR Z,DemoModeControls
73C8 NOP No operation.
73C9 NOP
73CA NOP
73CB NOP
73CC NOP
73CD NOP
Any input jumps back to the start screen.
73CE JP StartScreen Jump to StartScreen.
Randomly send controls for the game.
DemoModeControls 73D1 CALL GetRandomNumber Call GetRandomNumber.
73D4 AND %00001100 Ensure the random number is either 04, 08 or 0C.
73D6 JR Z,DemoModeControls
73D8 XOR %00001100 Flip bits 2-3 so 04 becomes 08, 08 becomes 04 and 0C becomes 00.
73DA LD HL,($7831) HL=*7831.
73DD INC L Increment L by three.
73DE INC L
73DF INC L
73E0 LD D,A D=A.
73E1 LD A,($7822) A=*Speed.
73E4 CP (HL) Compare A with *HL.
73E5 LD A,$00 A=00.
73E7 JR Z,DemoModeInput_1 Jump to DemoModeInput_1 if A was equal to *HL on line 73E4.
73E9 JR C,DemoModeInput_0 Jump to DemoModeInput_0 if A was lower than *HL on line 73E4.
73EB LD A,$03 A=03.
DemoModeInput_0 73ED XOR %00000001 Flip bits 0.
DemoModeInput_1 73EF OR D Set the bits from D.
73F0 RET Return.
Prev: 73B6 Up: Map Next: 73F1