Prev: F71E Up: Map Next: F752
F73D: Read Control Fuller
Control mode 04: reads the Fuller Box joystick port 7F (active- high bits; fire is at bit 7) and remaps direction and fire bits to the game's active-low format.
Read_Control_Fuller F73D IN A,($7F) Read from the joystick;
Port Number Bit
0 1 2 3 4
7F UP DOWN LEFT RIGHT -
F73F OR %01110000 Mask to the relevant direction bits.
F741 LD B,A Save the raw input and rotate one position.
F742 RLCA
F743 OR %11111000 Force the upper five bits high.
F745 LD C,A Save the rotated result.
F746 LD A,B Reload the raw input.
F747 OR %11110111 Isolate bit 3 from the raw input.
F749 AND C Merge with the rotated result.
F74A LD C,A Save the combined result.
F74B LD A,B Reload the raw input.
F74C OR %11111011 Isolate bit 2 from the raw input.
F74E RLCA Shift the bit into position.
F74F RLCA
F750 AND C Merge with the combined result.
F751 RET Return to Read_Control_Input_Return.
Prev: F71E Up: Map Next: F752