Prev: 24972 Up: Map Next: 25056
25026: Input: Brake
Used by the routine at 27922.
Check if this should be read from the Kempston joystick instead?
ReadInputBrake 25026 LD A,(24126) If GameOptions indicates the control method is via the Kempston joystick then jump to ReadKempstonJoystick.
25029 BIT 1,A
25031 JR NZ,ReadKempstonJoystick
Check for "Brake" button input.
25033 LD B,2 B=2 (counter for checking two ports).
25035 LD A,253 Read from the keyboard;
Port Number Bit
0 1 2 3 4
$FD A S D F G
$BF ENTER L K J H
ReadInputBrake_Loop 25037 OUT (253),A
25039 IN A,(254)
25041 AND %00011111 Keep only bits 0-4.
25043 CP 31 If any buttons were pressed jump to Input_Brake.
25045 JR NZ,Input_Brake
25047 LD A,191 A=switch to port 191.
25049 DJNZ ReadInputBrake_Loop Decrease counter by one and loop back to ReadInputBrake_Loop until counter is zero.
25051 JR Input_None Jump to Input_None.
Return "Brake" button pressed.
Input_Brake 25053 LD A,251 A=11111011.
25055 RET Return.
View the equivalent code in;
Prev: 24972 Up: Map Next: 25056