![]() |
Routines |
| Prev: B075 | Up: Map | Next: B0B4 |
|
Reads the Sinclair interface 2 joysticks. The keys 06 to 00 are one joystick and the keys 01 to 05 are the other; both are used at once.
|
||||||||||||||||||||
| ReadInterface2 | B085 | LD A,$EF | Read from the keyboard;
|
|||||||||||||||||
| B087 | CALL ReadKeys | |||||||||||||||||||
| B08A | LD C,A | Keep the keys in C. | ||||||||||||||||||
| B08B | LD A,$F7 | Read from the keyboard;
|
||||||||||||||||||
| B08D | CALL ReadKeys | |||||||||||||||||||
| B090 | OR C | Combine the keys of both. | ||||||||||||||||||
| B091 | LD C,$00 | Clear the controls. | ||||||||||||||||||
| B093 | BIT 0,A | Jump if the first key is not pressed (00 or 01). | ||||||||||||||||||
| B095 | JR Z,ReadInterface2_Key2 | |||||||||||||||||||
| B097 | SET 3,C | Set the bit for firing the second weapon. | ||||||||||||||||||
| ReadInterface2_Key2 | B099 | BIT 1,A | Jump if the second key is not pressed (09 or 02). | |||||||||||||||||
| B09B | JR Z,ReadInterface2_Key3 | |||||||||||||||||||
| B09D | SET 2,C | Set the bit for moving forward. | ||||||||||||||||||
| ReadInterface2_Key3 | B09F | BIT 2,A | Jump if the third key is not pressed (08 or 03). | |||||||||||||||||
| B0A1 | JR Z,ReadInterface2_Key4 | |||||||||||||||||||
| B0A3 | SET 6,C | Set the bit for the action key. | ||||||||||||||||||
| ReadInterface2_Key4 | B0A5 | BIT 3,A | Jump if the fourth key is not pressed (07 or 04). | |||||||||||||||||
| B0A7 | JR Z,ReadInterface2_Key5 | |||||||||||||||||||
| B0A9 | SET 0,C | Set the bit for turning right. | ||||||||||||||||||
| ReadInterface2_Key5 | B0AB | BIT 4,A | Jump if the fifth key is not pressed (06 or 05). | |||||||||||||||||
| B0AD | JR Z,ReadInterface2_Finish | |||||||||||||||||||
| B0AF | SET 1,C | Set the bit for turning left. | ||||||||||||||||||
| ReadInterface2_Finish | B0B1 | JP FinishJoystickControls | Jump to finish. | |||||||||||||||||
| Prev: B075 | Up: Map | Next: B0B4 |