![]() |
Routines |
| Prev: 53310 | Up: Map | Next: 53404 |
|
Used by the routine at ReadControls.
Reads the controls from a Kempston joystick.
|
||||||||
|
Set each control bit from the Kempston port.
|
||||||||
| ReadKempstonJoystick | 53367 | IN A,(31) | Read the joystick. | |||||
| 53369 | LD C,0 | Set the controls to none. | ||||||
| 53371 | BIT 0,A | Set the right control if the joystick is pushed right. | ||||||
| 53373 | JR Z,ReadKempstonJoystick_TestLeft | |||||||
| 53375 | SET 1,C | |||||||
| ReadKempstonJoystick_TestLeft | 53377 | BIT 1,A | Set the left control if the joystick is pushed left. | |||||
| 53379 | JR Z,ReadKempstonJoystick_TestDown | |||||||
| 53381 | SET 0,C | |||||||
| ReadKempstonJoystick_TestDown | 53383 | BIT 2,A | Set the pick up control if the joystick is pushed down. | |||||
| 53385 | JR Z,ReadKempstonJoystick_TestUp | |||||||
| 53387 | SET 4,C | |||||||
| ReadKempstonJoystick_TestUp | 53389 | BIT 3,A | Set the walk control if the joystick is pushed up. | |||||
| 53391 | JR Z,ReadKempstonJoystick_TestFire | |||||||
| 53393 | SET 2,C | |||||||
| ReadKempstonJoystick_TestFire | 53395 | BIT 4,A | Set the jump control if the fire button is pressed. | |||||
| 53397 | JR Z,ReadKempstonJoystick_Done | |||||||
| 53399 | SET 3,C | |||||||
| ReadKempstonJoystick_Done | 53401 | JP ReadControls_Finish | Jump to ReadControls_Finish. | |||||
|
View the equivalent code in;
|
||||||||
| Prev: 53310 | Up: Map | Next: 53404 |