![]() |
Routines |
| Prev: 618C | Up: Map | Next: 61E0 |
|
Used by the routine at 6D12.
|
||||||||||||||||||||||||||
|
Check if this should be read from the Kempston joystick instead?
|
||||||||||||||||||||||||||
| ReadInputBrake | 61C2 | LD A,($5E3E) | If GameOptions indicates the control method is via the Kempston joystick then jump to ReadKempstonJoystick. | |||||||||||||||||||||||
| 61C5 | BIT 1,A | |||||||||||||||||||||||||
| 61C7 | JR NZ,ReadKempstonJoystick | |||||||||||||||||||||||||
|
Check for "Brake" button input.
|
||||||||||||||||||||||||||
| 61C9 | LD B,$02 | B=02 (counter for checking two ports). | ||||||||||||||||||||||||
| 61CB | LD A,$FD | Read from the keyboard;
|
||||||||||||||||||||||||
| ReadInputBrake_Loop | 61CD | OUT ($FD),A | ||||||||||||||||||||||||
| 61CF | IN A,($FE) | |||||||||||||||||||||||||
| 61D1 | AND %00011111 | Keep only bits 0-4. | ||||||||||||||||||||||||
| 61D3 | CP $1F | If any buttons were pressed jump to Input_Brake. | ||||||||||||||||||||||||
| 61D5 | JR NZ,Input_Brake | |||||||||||||||||||||||||
| 61D7 | LD A,$BF | A=switch to port BF. | ||||||||||||||||||||||||
| 61D9 | DJNZ ReadInputBrake_Loop | Decrease counter by one and loop back to ReadInputBrake_Loop until counter is zero. | ||||||||||||||||||||||||
| 61DB | JR Input_None | Jump to Input_None. | ||||||||||||||||||||||||
|
Return "Brake" button pressed.
|
||||||||||||||||||||||||||
| Input_Brake | 61DD | LD A,$FB | A=11111011. | |||||||||||||||||||||||
| 61DF | RET | Return. | ||||||||||||||||||||||||
|
View the equivalent code in;
|
||||||||||||||||||||||||||
| Prev: 618C | Up: Map | Next: 61E0 |