Prev: D0C0 Up: Map Next: D0E4
D0C8: Keyboard
Used by the routine at check_user_input.
The whole keyboard is in use, a pair of half-rows to each action. The bottom row alternates: Z, C, B and M turn left, X, V, N and Symbol Shift turn right. A to G and H to Enter walk forward, Q to T and Y to P jump, and the number keys pick up and drop. Caps Shift and Space are left alone -- they are the pause keys (handle_pause).
keyboard D0C8 LD A,$FE half-row Caps..V; Z to bit 0, X to bit 1, C to bit 2, V to bit 3
D0CA CALL read_port
D0CD RRCA
D0CE LD C,A Z and X
D0CF AND $03
D0D1 SRL C fold C onto Z and V onto X
D0D3 SRL C
D0D5 OR C
D0D6 AND $03
D0D8 LD C,A C = left and right so far; half-row B..Space
D0D9 LD A,$7F
D0DB CALL read_port
D0DE BIT 1,A Symbol Shift: right
D0E0 JR Z,keyboard_m
D0E2 SET 1,C
Prev: D0C0 Up: Map Next: D0E4