![]() |
Routines |
Prev: 45233 | Up: Map | Next: 45306 |
Used by the routine at HandlerControls.
|
||||||||
ReadKempstonJoystick | 45273 | IN A,(31) | A=controls. | |||||
Initialise the controls as "none" in C.
|
||||||||
45275 | LD C,0 | C=0. | ||||||
Check joystick "RIGHT".
|
||||||||
ReadKempstonJoystick_Right | 45277 | BIT 0,A | If bit 0 is set/ "RIGHT" is NOT being pressed then jump to ReadKempstonJoystick_Left. | |||||
45279 | JR Z,ReadKempstonJoystick_Left | If not jump to ReadKempstonJoystick_Left. | ||||||
45281 | SET 1,C | Set bit 1 of C. | ||||||
Check joystick "LEFT".
|
||||||||
ReadKempstonJoystick_Left | 45283 | BIT 1,A | If bit 1 is set/ "LEFT" is NOT being pressed then jump to ReadKempstonJoystick_Down. | |||||
45285 | JR Z,ReadKempstonJoystick_Down | If not jump to ReadKempstonJoystick_Down. | ||||||
45287 | SET 0,C | Set bit 0 of C. | ||||||
Check joystick "DOWN".
|
||||||||
ReadKempstonJoystick_Down | 45289 | BIT 2,A | If bit 2 is set/ "DOWN" is NOT being pressed then jump to ReadKempstonJoystick_Up. | |||||
45291 | JR Z,ReadKempstonJoystick_Up | If not jump to ReadKempstonJoystick_Up. | ||||||
45293 | SET 3,C | Set bit 3 of C. | ||||||
Check joystick "UP".
|
||||||||
ReadKempstonJoystick_Up | 45295 | BIT 3,A | If bit 3 is set/ "UP" is NOT being pressed then jump to ReadKempstonJoystick_Fire. | |||||
45297 | JR Z,ReadKempstonJoystick_Fire | If not jump to ReadKempstonJoystick_Fire. | ||||||
45299 | SET 2,C | Set bit 2 of C. | ||||||
Check joystick "FIRE".
|
||||||||
ReadKempstonJoystick_Fire | 45301 | AND %00010000 | Keep only bit 4. | |||||
45303 | OR C | Merge the kept bit into C. | ||||||
45304 | LD C,A | |||||||
45305 | RET | Return. |
Prev: 45233 | Up: Map | Next: 45306 |