Prev: 27886 Up: Map Next: 28903
28777: Routine at 7069
Used by the routine at 27886.
28777 DI Disable interrupts.
Check if the control method is the Kempson joystick?
28778 LD A,(26358) Jump to Player_Input_AGF if *ControlMethod is not the Kempston joystick.
28781 CP 2
28783 JR NZ,Player_Input_AGF
The control method is Kempston joystick, so test the fire button.
28785 IN A,(31) A=read from the Kempston joystick port.
28787 AND %00010000 Keep only bit 4 (the fire button input).
28789 JR 28810 Jump to 28810.
Check if the control method is the AGF joystick?
Player_Input_AGF 28791 CP 1 Jump to Player_Input_Keyboard if *ControlMethod is not the AGF joystick.
28793 JR NZ,Player_Input_Keyboard
28795 LD A,239
Port Number Bit
0 1 2 3 4
239 0 9 8 7 6
28797 JR 28801 Jump to 28801.
Else, the only control option left is the keyboard.
Player_Input_Keyboard 28799 LD A,127
Port Number Bit
0 1 2 3 4
127 SPACE FULL-STOP M N B
28801 IN A,(254) Read from the keyboard.
28803 AND %00000001 Keep only bit 0.
This entry point is used by the routine at 27886.
28805 LD A,16 A=16.
28807 JR Z,28810 Jump to 28810 if ?? is equal to 16.
28809 XOR A A=0.
28810 LD (26262),A Write A to *26262.
28813 CP C Jump to 29006 if A is equal to C.
28814 JP Z,29006
28817 OR A Jump to 29006 if A is zero.
28818 JP Z,29006
28821 LD A,(26355) Jump to 28856 if *Flag_ActiveDemoMode is set.
28824 OR A
28825 JR NZ,28856
28827 PUSH DE Stash DE on the stack.
28828 LD B,22 B=22.
28830 LD HL,82 HL=0082.
28833 PUSH BC Stash BC and HL on the stack.
28834 PUSH HL
28835 LD A,16 A=INK:BLACK, PAPER:RED.
28837 DI Disable interrupts.
28838 OUT (254),A Set border to the colour held by A.
28840 LD DE,1 DE=0001.
28843 CALL 949 Call BEEPER.
28846 DI Disable interrupts.
28847 POP HL Restore HL from the stack.
28848 INC HL Increment HL by four.
28849 INC HL
28850 INC HL
28851 INC HL
28852 POP BC Restore BC from the stack.
28853 DJNZ 28833 Decrease counter by one and loop back to 28833 until counter is zero.
28855 POP DE Restore DE from the stack.
28856 LD A,(26349) L=*26349-31.
28859 SUB 31
28861 LD L,A
28862 LD H,90 H=90.
28864 LD A,(HL) Jump to 29006 if *HL is not zero.
28865 OR A
28866 JP NZ,29006
28869 LD (HL),71 Write INK:WHITE, PAPER:BLACK(BRIGHT) to *HL.
28871 CALL ConvertAttributeToScreenBufferAddress Call ConvertAttributeToScreenBufferAddress.
28874 SET 2,H Set bit 2 of H.
28876 PUSH HL Stash HL on the stack.
28877 LD A,(26278) A=*26278.
28880 OR A Set the bits from A.
28881 LD B,A B=A.
28882 LD A,1 A=1.
28884 JR Z,28890 Jump to 28890 if HL is equal to A.
28886 SLA A Shift A left (with carry).
28888 DJNZ 28886 Decrease counter by one and loop back to 28886 until counter is zero.
28890 POP DE Restore DE and BC from the stack.
28891 POP BC
28892 PUSH BC Stash BC and DE on the stack.
28893 PUSH DE
28894 LD HL,26270 HL=26270.
28897 INC HL Increment HL by one.
28898 DJNZ 28897 Decrease counter by one and loop back to 28897 until counter is zero.
28900 LD (HL),A Write A to *HL.
28901 JR 28999 Jump to 28999.
Prev: 27886 Up: Map Next: 28903