![]() |
Routines |
Prev: 29502 | Up: Map | Next: 29587 |
Used by the routine at JetmanThrust.
|
||||||||||||||||||||||||||
Check if this should be read from the Kempston joystick instead?
|
||||||||||||||||||||||||||
ReadInputFire | 29556 | LD A,(23795) | If GameOptions indicates the control method is via the Kempston joystick then jump to ReadKempstonJoystick. | |||||||||||||||||||||||
29559 | BIT 1,A | |||||||||||||||||||||||||
29561 | JR NZ,ReadKempstonJoystick | |||||||||||||||||||||||||
Check for "Fire" button input.
|
||||||||||||||||||||||||||
29563 | LD B,2 | B=2 (counter for checking two ports). | ||||||||||||||||||||||||
29565 | LD A,253 | Read from the keyboard;
|
||||||||||||||||||||||||
ReadInputFire_Loop | 29567 | OUT (253),A | ||||||||||||||||||||||||
29569 | IN A,(254) | |||||||||||||||||||||||||
29571 | AND %00011111 | Keep only bits 0-4. | ||||||||||||||||||||||||
29573 | CP 31 | If any buttons were pressed jump to Input_Fire. | ||||||||||||||||||||||||
29575 | JR NZ,Input_Fire | |||||||||||||||||||||||||
29577 | LD A,191 | A=switch to port 191. | ||||||||||||||||||||||||
29579 | DJNZ ReadInputFire_Loop | Decrease counter by one and loop back to ReadInputFire_Loop until counter is zero. | ||||||||||||||||||||||||
Return "no input".
|
||||||||||||||||||||||||||
29581 | LD A,255 | A=11111111. | ||||||||||||||||||||||||
29583 | RET | Return. | ||||||||||||||||||||||||
Return "Fire" button pressed.
|
||||||||||||||||||||||||||
Input_Fire | 29584 | LD A,239 | A=11101111. | |||||||||||||||||||||||
29586 | RET | Return. | ||||||||||||||||||||||||
View the equivalent code in;
|
Prev: 29502 | Up: Map | Next: 29587 |