![]() |
Routines |
| Prev: E250 | Up: Map | Next: E2AE |
|
Used by the routine at ReadControls.
Reads the controls from a Kempston joystick.
|
||||
| ReadKempstonJoystick | E289 | IN A,($1F) | Read the joystick, and start with none of the controls. | |
| E28B | LD C,$00 | |||
| E28D | BIT 0,A | Set the control for right if the joystick is pushed right. | ||
| E28F | JR Z,ReadKempstonJoystick_Left | |||
| E291 | SET 1,C | |||
| ReadKempstonJoystick_Left | E293 | BIT 1,A | Set the control for left if the joystick is pushed left. | |
| E295 | JR Z,ReadKempstonJoystick_Down | |||
| E297 | SET 0,C | |||
| ReadKempstonJoystick_Down | E299 | BIT 2,A | Set the control for down if the joystick is pushed down. | |
| E29B | JR Z,ReadKempstonJoystick_Forward | |||
| E29D | SET 4,C | |||
| ReadKempstonJoystick_Forward | E29F | BIT 3,A | Set the control for forward if the joystick is pushed up. | |
| E2A1 | JR Z,ReadKempstonJoystick_Fire | |||
| E2A3 | SET 2,C | |||
| ReadKempstonJoystick_Fire | E2A5 | BIT 4,A | Set the control for fire if the fire button is pressed. | |
| E2A7 | JR Z,ReadKempstonJoystick_ViewKey | |||
| E2A9 | SET 3,C | |||
| ReadKempstonJoystick_ViewKey | E2AB | JP ReadViewKey | Jump to ReadViewKey to read the key for turning the view. | |
|
View the equivalent code in;
|
||||
| Prev: E250 | Up: Map | Next: E2AE |