![]() |
Routines |
| Prev: 63262 | Up: Map | Next: 63314 |
|
Control mode 4: reads the Fuller Box joystick port 127 (active- high bits; fire is at bit 7) and remaps direction and fire bits to the game's active-low format.
|
||||||||||||||||||||
| Read_Control_Fuller | 63293 | IN A,(127) | Read from the joystick;
|
|||||||||||||||||
| 63295 | OR %01110000 | Mask to the relevant direction bits. | ||||||||||||||||||
| 63297 | LD B,A | Save the raw input and rotate one position. | ||||||||||||||||||
| 63298 | RLCA | |||||||||||||||||||
| 63299 | OR %11111000 | Force the upper five bits high. | ||||||||||||||||||
| 63301 | LD C,A | Save the rotated result. | ||||||||||||||||||
| 63302 | LD A,B | Reload the raw input. | ||||||||||||||||||
| 63303 | OR %11110111 | Isolate bit 3 from the raw input. | ||||||||||||||||||
| 63305 | AND C | Merge with the rotated result. | ||||||||||||||||||
| 63306 | LD C,A | Save the combined result. | ||||||||||||||||||
| 63307 | LD A,B | Reload the raw input. | ||||||||||||||||||
| 63308 | OR %11111011 | Isolate bit 2 from the raw input. | ||||||||||||||||||
| 63310 | RLCA | Shift the bit into position. | ||||||||||||||||||
| 63311 | RLCA | |||||||||||||||||||
| 63312 | AND C | Merge with the combined result. | ||||||||||||||||||
| 63313 | RET | Return to Read_Control_Input_Return. | ||||||||||||||||||
| Prev: 63262 | Up: Map | Next: 63314 |