Prev: 53467 Up: Map Next: 53490
53475: 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
0 Left
1 Right
2 Up
3 Fire
4 Down
5 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 53475 LD A,(41500) Fetch Options.
53478 RRCA Move the type of controls into the low bits.
53479 AND %00000011 Keep the two bits.
53481 JP Z,ReadKeyboard Jump to ReadKeyboard if the method is the keyboard.
53484 DEC A Jump to ReadKempstonJoystick if it is a Kempston joystick.
53485 JR Z,ReadKempstonJoystick
53487 DEC A Jump to ReadCursorJoystick if it is a cursor joystick.
53488 JR Z,ReadCursorJoystick
Continue on to ReadInterface2Joystick.
View the equivalent code in;
Prev: 53467 Up: Map Next: 53490