Prev: B085 Up: Map Next: B0D9
B0B4: Controls: Kempston Joystick
Used by the routine at ReadControls.
Reads the Kempston joystick.
ReadKempstonJoystick B0B4 IN A,($1F) Read the joystick.
B0B6 LD C,$00 Clear the controls.
B0B8 BIT 0,A Jump if the joystick is not pushed right.
B0BA JR Z,ReadKempstonJoystick_Left
B0BC SET 0,C Set the bit for turning right.
ReadKempstonJoystick_Left B0BE BIT 1,A Jump if the joystick is not pushed left.
B0C0 JR Z,ReadKempstonJoystick_Down
B0C2 SET 1,C Set the bit for turning left.
ReadKempstonJoystick_Down B0C4 BIT 2,A Jump if the joystick is not pushed down.
B0C6 JR Z,ReadKempstonJoystick_Up
B0C8 SET 6,C Set the bit for the action key.
ReadKempstonJoystick_Up B0CA BIT 3,A Jump if the joystick is not pushed up.
B0CC JR Z,ReadKempstonJoystick_Fire
B0CE SET 2,C Set the bit for moving forward.
ReadKempstonJoystick_Fire B0D0 AND $10 Jump to finish if the fire button is not pressed.
B0D2 JR Z,FinishJoystickControls
B0D4 SET 3,C Set the bit for firing the second weapon.
B0D6 JP FinishJoystickControls Jump to finish.
View the equivalent code in;
Prev: B085 Up: Map Next: B0D9