# Hand controllers and console buttons ## Hand controllers (DOC: SCH sheet 1; VW "Port", "Reading Controllers") Each controller is a knob on a stick: it moves forward, back, left and right, twists clockwise and counter-clockwise, and pulls up and pushes down (eight switches, any non-opposite combination at once; the "Jet Stick" variant wires its fire button in parallel with push, so it can report push and pull together, VW). - Right controller -> CPU port 1; left controller -> port 4 (SL31253 port A). Bit order on both: 0 right, 1 left, 2 back, 3 forward, 4 counter-clockwise, 5 clockwise, 6 pull up, 7 push down. A pressed switch reads **0** (VW; software complements with `COM`). - On SCH each switch line goes through a 7404 inverter and a series resistor with a 1000 pF feed-through capacitor to ground; the buffers are enabled by port 0 bit 6 ("ENABLE-N"). The same port pins also carry outputs (colour on port 1 bits 6-7, column on port 4), so what a read returns depends on the F8 port pin model (the latch written last and the switch both pull the line: `../f8-python/docs/cpu.md`, "I/O port pins", U8 there). VW's recipe clears the latches first: `CLR; OUTS 0; OUTS 1; INS 1; COM` (right), `CLR; OUTS 4; INS 4; COM` (left). - Reading the right controller takes two short cycles (`INS 1` on the CPU); the left needs a port transaction on the bus (`INS 4`: L L S), so it is slower, as VW notes. The Channel F's controllers are hard-wired; the Channel F II's unplug (VW, "Channel F II"). Neither changes the programming model. ## Console buttons (DOC: SCH sheet 1; VW) Five buttons on the console: **RESET**, and four read by software on port 0 bits 0-3: **TIME (1), MODE (2), HOLD (3), START (4)** (VW numbers them 1-4 in that bit order; active low). The BIOS uses them as "1-4" for game and option selection. RESET is wired to the reset circuit (SCH: to confirm against the CPU's EXT RES pin, U6 in the brief); it does not appear on port 0. ## For the board - A `Controller` input state per side (8 booleans) and a `ConsoleButtons` state (4 booleans plus reset). - Inputs are sampled by the port read itself (`INS` at its phi stamp); no latching or debouncing in hardware beyond the RC on each line (SCH). The BIOS debounces in software (VW: a delay loop after reading the buttons). - Host mapping is a host matter (the play site), but the rotate and pull/push axes must stay separate inputs.