Prev: B063 Up: Map Next: B085
B075: Read Controls
Used by the routines at MainLoop and EnterInitials.
Reads the controls, using the method that has been chosen in the menu: keyboard, Kempston joystick, cursor keys or Sinclair interface 2. The controls are kept as bits that stay set until the robot has used them.
Bit Meaning
00 Turn right
01 Turn left
02 Move forward
03 Fire the second weapon
04 Fire the first weapon
06 Use the action key
Output
A The controls
C The controls
ReadControls B075 PUSH BC Save BC.
B076 LD A,($961A) Fetch the method of control...
B079 RRCA ...and keep the bits that choose it.
B07A AND $03 Jump to read the keyboard if the method is zero.
B07C JP Z,ReadKeyboard
B07F DEC A Jump to read the Kempston joystick if it is one.
B080 JR Z,ReadKempstonJoystick
B082 DEC A Jump to read the cursor keys if it is two.
B083 JR Z,ReadCursorKeys
Prev: B063 Up: Map Next: B085