Prev: D022 Up: Map Next: D046
D03E: Interface II joysticks
Both of the Interface II's joysticks are read, and either will do. The one is the keys 1 to 5 (left, right, down, up, fire) and the other 6 to 0 in the same order. The two half-rows come in with their keys in opposite orders, so the 1 to 5 bits are reversed first to line up with 6 to 0.
interface_ii D03E LD A,$F7 half-row 1 to 5
D040 CALL read_port
D043 PUSH BC five bits to reverse, keeping B
D044 LD B,$05
Prev: D022 Up: Map Next: D046