EricBall #26 Posted August 27, 2014 (edited) If you really want to roll your own, then you can take a queue from NES/SNES controllers and use shift registers. A single 8-bit register will get you 8 inputs, or you could use 2 in parallel for 16 inputs, or go whole hog and chain as a bunch serially so you can use a Sinistar 49-direction joystick and 32 buttons! Yeah, but how many cycles would it take to read the joystick? STX SWCHA # 4 set clock pin high LDA SWCHA # 4 read data pin ROL # 2 shift bit 7 to carry (ROR for player 2) STY SWCHA # 4 set clock pin low ROR JOY1 # 5 shift C into ZP register So that's 19 cycles for one bit, or 158 cycles (and 104 bytes) for all 8 bits. (Adding 4 cycles to set up X & Y and 6 cycles to send the LATCH, but making the first ROL into a STA.) Actually, that's not too bad. Edited August 27, 2014 by EricBall Quote Share this post Link to post Share on other sites
+iesposta #27 Posted August 27, 2014 Why isn't RevEng's post #6 http://atariage.com/forums/topic/228835-atari-7800-and-2600-joystick-port-question/?p=3055063 the end of this topic? He shows with an abundantly available 3 button Genesis pad, 2 swapped pins, and a 10K resistor, the Atari 7800 and 2600 can read a joystick, including diagonals, with 4 buttons (button A, B, C, and Select). Then you don't need a matrix and all the processor time to read it. Quote Share this post Link to post Share on other sites
Moonbeam #28 Posted August 28, 2014 Why isn't RevEng's post #6 http://atariage.com/forums/topic/228835-atari-7800-and-2600-joystick-port-question/?p=3055063 the end of this topic? He shows with an abundantly available 3 button Genesis pad, 2 swapped pins, and a 10K resistor, the Atari 7800 and 2600 can read a joystick, including diagonals, with 4 buttons (button A, B, C, and Select). Then you don't need a matrix and all the processor time to read it. Perhaps it was not the end of the topic because even if it is an excellent solution, depending on what you want to do, another one may be preferred :-) I'm very glad I've had all your posts, ideas and help. I have learnt some very interesting stuff. Thanks to all of you ! Quote Share this post Link to post Share on other sites