Joystick, keyboard, mouse handling
Read joystick input from CIA#1 for player control. Simple, reliable, and cycle-efficient.
Read the ZX Spectrum keyboard matrix by polling I/O ports. Simple, efficient, and no ROM routines required.
Read the NES controller by strobing and shifting 8 button bits into a variable. Simple, reliable, standard approach.
Detect newly-pressed joystick directions, ignoring held inputs. Essential for grid-based movement and menu navigation.
Read Amiga joystick using the JOY1DAT register with XOR decoding for up/down directions.
Detect newly-pressed buttons, ignoring held inputs. Essential for menus and single-action triggers.