Connect Atari compatible joystick to the ZX81/TS 1000. Plugs into back of computer; expansion connector for other peripherals. Instructions for patching popular games. Uses port 1Dh.
Program to read and display joystick values
1 REM 123456789
2 POKE 16514,219 ; IN A,[1Dh]
3 POKE 16515,29 ;
4 POKE 16516,47 ; CPL
5 POKE 16517,230 ; AND A,1Fh
6 POKE 16518,31 ;
7 POKE 16519,6 ; LD B,0
8 POKE 16520,0 ;
9 POKE 16521,79 ; LD C,A
10 POKE 16522,201 ; RET
20 PRINT USR 16514