Prev: E239 Up: Map Next: E250
E241: Read Controls
Used by the routine at UpdatePlayerLegs.
Reads the controls using the method in bits 1 and 2 of GameOptions, and keeps them in Controls. The methods are the keyboard, a Kempston joystick, a Cursor joystick and a Sinclair joystick.
Bit Meaning
00 Left
01 Right
02 Forward
03 Fire
04 Down
05 Turning the view
Output
C Controls
Fetch the control method from GameOptions.
ReadControls E241 LD A,($BBB0) Fetch GameOptions.
E244 RRCA Move the type of controls into the low bits.
E245 AND %00000011 Keep the two bits.
E247 JP Z,ReadKeyboard Jump to ReadKeyboard to read the keyboard if it is the keyboard.
E24A DEC A Jump to ReadKempstonJoystick if it is a Kempston joystick.
E24B JR Z,ReadKempstonJoystick
E24D DEC A Jump to ReadCursorJoystick if it is a Cursor joystick.
E24E JR Z,ReadCursorJoystick
Continue on to ReadInterface2Joystick.
View the equivalent code in;
Prev: E239 Up: Map Next: E250