![]() |
Routines |
Prev: 29556 | Up: Map | Next: 29618 |
Used by the routines at JetmanThrust and JetmanWalk.
|
||||||||||||||||||||||||||
Check if this should be read from the Kempston joystick instead?
|
||||||||||||||||||||||||||
ReadInputThrust | 29587 | LD A,(23795) | If GameOptions indicates the control method is via the Kempston joystick then jump to ReadKempstonJoystick. | |||||||||||||||||||||||
29590 | BIT 1,A | |||||||||||||||||||||||||
29592 | JR NZ,ReadKempstonJoystick | |||||||||||||||||||||||||
29594 | LD B,2 | B=2 (counter for checking two ports). | ||||||||||||||||||||||||
29596 | LD A,251 | Read from the keyboard;
|
||||||||||||||||||||||||
ReadInputThrust_Loop | 29598 | OUT (253),A | ||||||||||||||||||||||||
29600 | IN A,(254) | |||||||||||||||||||||||||
29602 | AND %00011111 | Keep only bits 0-4. | ||||||||||||||||||||||||
29604 | CP 31 | If any buttons were pressed jump to Input_Thrust. | ||||||||||||||||||||||||
29606 | JR NZ,Input_Thrust | |||||||||||||||||||||||||
29608 | LD A,223 | A=switch to port 223. | ||||||||||||||||||||||||
29610 | DJNZ ReadInputThrust_Loop | Decrease counter by one and loop back to ReadInputFire_Loop until counter is zero. | ||||||||||||||||||||||||
Return "no input".
|
||||||||||||||||||||||||||
29612 | LD A,255 | A=11111111. | ||||||||||||||||||||||||
29614 | RET | Return. | ||||||||||||||||||||||||
Return "Thrust" button pressed.
|
||||||||||||||||||||||||||
Input_Thrust | 29615 | LD A,247 | A=11110111. | |||||||||||||||||||||||
29617 | RET | Return. | ||||||||||||||||||||||||
View the equivalent code in;
|
Prev: 29556 | Up: Map | Next: 29618 |