Prev: D0DB Up: Map Next: D0F2
D0E3: Read Controls
Used by the routines at CheckForEarlyDraw, HandleCrosshair and HandleSheriff.
Reads the controls using the method in bits 1 and 2 of Options.
Bit Meaning
00 Left
01 Right
02 Up
03 Fire
04 Down
05 Rotate the view
Output
B The controls, with bits 0 and 1, and 2 and 3, made exclusive
C The controls
Fetch the control method from Options.
ReadControls D0E3 LD A,($A21C) Fetch Options.
D0E6 RRCA Move the type of controls into the low bits.
D0E7 AND %00000011 Keep the two bits.
D0E9 JP Z,ReadKeyboard Jump to ReadKeyboard if the method is the keyboard.
D0EC DEC A Jump to ReadKempstonJoystick if it is a Kempston joystick.
D0ED JR Z,ReadKempstonJoystick
D0EF DEC A Jump to ReadCursorJoystick if it is a cursor joystick.
D0F0 JR Z,ReadCursorJoystick
Continue on to ReadInterface2Joystick.
View the equivalent code in;
Prev: D0DB Up: Map Next: D0F2