Prev: 63226 Up: Map Next: 63262
63236: Read Control Kempston
Control mode 2: reads Kempston joystick port 31 remaps the active-high bits to the game's active-low five-bit format.
Read_Control_Kempston 63236 IN A,(31) Read the Kempston joystick port.
63238 LD B,0 Zero the bit accumulator.
63240 RRA Shuffle the Kempston active-high direction and fire bits into the game's active-low format.
63241 RR B
63243 RRA
63244 RL B
63246 RL B
63248 RRA
63249 RL B
63251 RRA
63252 RL B
63254 RRA
63255 RL B
63257 LD A,B Transfer the remapped bits to A and invert to active-low.
63258 CPL
63259 OR %11100000 Force the upper three bits high to match the inactive-key state.
63261 RET Return to Read_Control_Input_Return.
Prev: 63226 Up: Map Next: 63262