Prev: F6FA Up: Map Next: F71E
F704: Read Control Kempston
Control mode 02: reads Kempston joystick port 1F remaps the active-high bits to the game's active-low five-bit format.
Read_Control_Kempston F704 IN A,($1F) Read the Kempston joystick port.
F706 LD B,$00 Zero the bit accumulator.
F708 RRA Shuffle the Kempston active-high direction and fire bits into the game's active-low format.
F709 RR B
F70B RRA
F70C RL B
F70E RL B
F710 RRA
F711 RL B
F713 RRA
F714 RL B
F716 RRA
F717 RL B
F719 LD A,B Transfer the remapped bits to A and invert to active-low.
F71A CPL
F71B OR %11100000 Force the upper three bits high to match the inactive-key state.
F71D RET Return to Read_Control_Input_Return.
Prev: F6FA Up: Map Next: F71E