Prev: 6CEE Up: Map Next: 70E7
7069: Routine at 7069
Used by the routine at 6CEE.
7069 DI Disable interrupts.
Check if the control method is the Kempson joystick?
706A LD A,($66F6) Jump to Player_Input_AGF if *ControlMethod is not the Kempston joystick.
706D CP $02
706F JR NZ,Player_Input_AGF
The control method is Kempston joystick, so test the fire button.
7071 IN A,($1F) A=read from the Kempston joystick port.
7073 AND %00010000 Keep only bit 4 (the fire button input).
7075 JR $708A Jump to 708A.
Check if the control method is the AGF joystick?
Player_Input_AGF 7077 CP $01 Jump to Player_Input_Keyboard if *ControlMethod is not the AGF joystick.
7079 JR NZ,Player_Input_Keyboard
707B LD A,$EF
Port Number Bit
0 1 2 3 4
EF 0 9 8 7 6
707D JR $7081 Jump to 7081.
Else, the only control option left is the keyboard.
Player_Input_Keyboard 707F LD A,$7F
Port Number Bit
0 1 2 3 4
7F SPACE FULL-STOP M N B
7081 IN A,($FE) Read from the keyboard.
7083 AND %00000001 Keep only bit 0.
This entry point is used by the routine at 6CEE.
7085 LD A,$10 A=10.
7087 JR Z,$708A Jump to 708A if ?? is equal to 10.
7089 XOR A A=00.
708A LD ($6696),A Write A to *6696.
708D CP C Jump to 714E if A is equal to C.
708E JP Z,$714E
7091 OR A Jump to 714E if A is zero.
7092 JP Z,$714E
7095 LD A,($66F3) Jump to 70B8 if *Flag_ActiveDemoMode is set.
7098 OR A
7099 JR NZ,$70B8
709B PUSH DE Stash DE on the stack.
709C LD B,$16 B=16.
709E LD HL,$0052 HL=0052.
70A1 PUSH BC Stash BC and HL on the stack.
70A2 PUSH HL
70A3 LD A,$10 A=INK:BLACK, PAPER:RED.
70A5 DI Disable interrupts.
70A6 OUT ($FE),A Set border to the colour held by A.
70A8 LD DE,$0001 DE=0001.
70AB CALL $03B5 Call BEEPER.
70AE DI Disable interrupts.
70AF POP HL Restore HL from the stack.
70B0 INC HL Increment HL by four.
70B1 INC HL
70B2 INC HL
70B3 INC HL
70B4 POP BC Restore BC from the stack.
70B5 DJNZ $70A1 Decrease counter by one and loop back to 70A1 until counter is zero.
70B7 POP DE Restore DE from the stack.
70B8 LD A,($66ED) L=*66ED-1F.
70BB SUB $1F
70BD LD L,A
70BE LD H,$5A H=5A.
70C0 LD A,(HL) Jump to 714E if *HL is not zero.
70C1 OR A
70C2 JP NZ,$714E
70C5 LD (HL),$47 Write INK:WHITE, PAPER:BLACK(BRIGHT) to *HL.
70C7 CALL ConvertAttributeToScreenBufferAddress Call ConvertAttributeToScreenBufferAddress.
70CA SET 2,H Set bit 2 of H.
70CC PUSH HL Stash HL on the stack.
70CD LD A,($66A6) A=*66A6.
70D0 OR A Set the bits from A.
70D1 LD B,A B=A.
70D2 LD A,$01 A=01.
70D4 JR Z,$70DA Jump to 70DA if HL is equal to A.
70D6 SLA A Shift A left (with carry).
70D8 DJNZ $70D6 Decrease counter by one and loop back to 70D6 until counter is zero.
70DA POP DE Restore DE and BC from the stack.
70DB POP BC
70DC PUSH BC Stash BC and DE on the stack.
70DD PUSH DE
70DE LD HL,$669E HL=669E.
70E1 INC HL Increment HL by one.
70E2 DJNZ $70E1 Decrease counter by one and loop back to 70E1 until counter is zero.
70E4 LD (HL),A Write A to *HL.
70E5 JR $7147 Jump to 7147.
Prev: 6CEE Up: Map Next: 70E7