Prev: 61C2 Up: Map Next: 61FE
61E0: Input: Accelerate
Used by the routine at 6D12.
Check if this should be read from the Kempston joystick instead?
ReadInputAccelerate 61E0 LD A,($5E3E) If GameOptions indicates the control method is via the Kempston joystick then jump to ReadKempstonJoystick.
61E3 BIT 1,A
61E5 JR NZ,ReadKempstonJoystick
Check for "Accelerator" button input.
61E7 LD B,$02 B=02 (counter for checking two ports).
61E9 LD A,$FB Read from the keyboard;
Port Number Bit
0 1 2 3 4
$FB Q W E R T
$DF P O I U Y
ReadInputAccelerate_Loop 61EB OUT ($FD),A
61ED IN A,($FE)
61EF AND %00011111 Keep only bits 0-4.
61F1 CP $1F If any buttons were pressed jump to Input_Accelerate.
61F3 JR NZ,Input_Accelerate
61F5 LD A,$DF A=switch to port DF.
61F7 DJNZ ReadInputAccelerate_Loop Decrease counter by one and loop back to ReadInputAccelerate_Loop until counter is zero.
61F9 JR Input_None Jump to Input_None.
Return "Accelerator" button pressed.
Input_Accelerate 61FB LD A,$F7 A=11110111.
61FD RET Return.
View the equivalent code in;
Prev: 61C2 Up: Map Next: 61FE