Pantomchap Posted May 19, 2017 Share Posted May 19, 2017 So I have a reference on the 2600's specs and I found these here. Are they for reading input from the controller? If so, how do I read it? If not, what do I use to read the input? 38 INPT0 1....... read pot port 39 INPT1 1....... read pot port 3A INPT2 1....... read pot port 3B INPT3 1....... read pot port 3C INPT4 1....... read input 3D INPT5 1....... read input Thank you for reading this far. Quote Link to comment Share on other sites More sharing options...
alex_79 Posted May 19, 2017 Share Posted May 19, 2017 (edited) If you haven't already, get the Stella Programmer's Guide" here. That's the official programming guide for the 2600.The answer to your question depends on what controller you're trying to read (joystick, paddle, driving, trackball, keypad...).For joystick, which is the most common case, the firebuttons are read from TIA registers INPT4 (left port) and INPT5 (right port).Only bit 7 is used (bit7="0"-> button pressed; bit7="1"-> button released).Joystick directions are read from RIOT register SWCHA. Bits 7 to 4 are for left port, bits 3 to 0 for the right one. See section 5.3 in the Stella guide.Check the Collect tutorial to see example code. Each step include a fully commented source.http://atariage.com/forums/blog/148/entry-13884-collect-tutorial-index/ Edited May 19, 2017 by alex_79 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.