Zybex Posted March 16, 2005 Share Posted March 16, 2005 I'm using the pia port (porta), of my 65XE. I can set the pia for output with Poke 54018,56, to send signal to outside i use the 54016 address, but... ¿ how i can send and receive data by this port? (simultaneously) In other words... With what value must be poked the $D302 to allow I/O ? How i can read/write it? What pins are for In and Out? I try to get info from Mapping but i dont understand the explaination of the $D302 address (PACTL) Quote Link to comment Share on other sites More sharing options...
Kr0tki Posted March 16, 2005 Share Posted March 16, 2005 Oh, that's quite easy. PACTL (54018) doesn't set the PORTA (54016) for output, it only allows to change the meaning of PORTA's bits. Normally, all PORTA's bits are set for reading. By clearing PACTL's 2nd bit (like you did with POKE) you turn PORTA into programming-mode. Then you can write varoius values into PORTA to program the PIA ports. For example, if you want to set all PORTA bits for writing, you set all bits of PORTA to 1 (by writing 255 there). If you want to set all bits for reading, you clear all bits of PORTA, by writing 0. And if you want to use bits 0, 2 and 4 for writing and the rest for reading, you set PORTA's value to 2^0 + 2^2 + 2^4 = 1+4+16 = 21. The last step is to re-set the 2nd bit of PACTL (by writing 60 there). Then you can use PORTA just as you've programmed it before. Here is a diagram telling how joystick ports' pins connect to PORTA's bits. -------------------------/ 1 2 3 4 5 / * * * * * / 6 7 8 9 / * * * * / / -------------/ port pin PORTA's bit 1 1 0 1 2 1 1 3 2 1 4 3 2 1 4 2 2 5 2 3 6 2 4 7 Hope that helps Quote Link to comment Share on other sites More sharing options...
Bryan Posted March 16, 2005 Share Posted March 16, 2005 Right. You can think of it this way: There are 2 different registers needed to control a port: the data register and the direction register. Both are accessed at the PORTx register address, so the PxCTL register allows you to select which one you want. When you're writing to the direction register, 0=input, and 1=output. You have total control over all 8 bits. Then, flip back to the data register to read the data at that port (all bits that are set to output will simply read back the data stored there). -Bry Quote Link to comment Share on other sites More sharing options...
Cybernoid Posted March 16, 2005 Share Posted March 16, 2005 Well, this has got me thinking... What are all the known devices that connect to the Joystick ports that are not joysticks/paddle/trackballs/etc. I know of the following: Keypad CX-85 MPP-1000C/E modems XEP80 And whatever multiplexer this is: http://www.atarimagazines.com/v6n4/computalk.html I am sure I am missing a few. Any multi-game links via this port? ~C~ Quote Link to comment Share on other sites More sharing options...
Shawn Jefferson Posted March 16, 2005 Share Posted March 16, 2005 There was the corvus hard drive system that connected to ports 3 + 4 on the 800... as I've read. Never seen one myself. Quote Link to comment Share on other sites More sharing options...
Zybex Posted March 17, 2005 Author Share Posted March 17, 2005 Kr0tki Thanks for the info. Quote Link to comment Share on other sites More sharing options...
raster/c.p.u. Posted March 17, 2005 Share Posted March 17, 2005 What are all the known devices that connect to the Joystick ports that are not joysticks/paddle/trackballs/etc. Interface MULTIJOY8 (16) This easy multiplayer interface allows connect up to 8 joysticks to one Atari XE/XL computer via both joystick ports (MultiJoy16 up to 16 joysticks.) http://raster.infos.cz/atari/english.htm#MULTIJOY or http://raster.infos.cz/atari/hw/multijoy.htm Quote Link to comment Share on other sites More sharing options...
Cybernoid Posted March 17, 2005 Share Posted March 17, 2005 Interface MULTIJOY8 (16) Oh, yeah. I've seen this. Forgot about this... very cool! ~C~ Quote Link to comment Share on other sites More sharing options...
danwinslow Posted March 23, 2005 Share Posted March 23, 2005 What about the 5th bit...ie, the button. Can you read/write on that pin as well? Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted March 23, 2005 Share Posted March 23, 2005 Hi, When I used to develop on an STE, cross-assembling for the A8, I had a parallel cable which split into two joystick connectors. On the XL you'd load a 'bootstrap' loader from disk, then this would sit and wait for instructions to come down the cable. Using the 4 bits of each port to make an 8-bit value and the triggers for handshaking, transfer rates were quite good. All that you needed to do on the ST was to 'print' the binary you wanted to send. Pretty neat. I did also manage as well connect an XL and a C64 together via a single joystick extender cable with an female-2-female adapter on one end. using a reset cartridge I had to type in the hex code for the 'send' routine somewhere into the C64 memory and then run it. This way I managed to get across the memory for some 'screens', e.g. "The Sentinel" loader screen - so that I could then play with the data on the Atari. There must have been an easier way?! Best wishes, Mark Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted March 25, 2005 Share Posted March 25, 2005 Amazingly, I've dug up the old code Doesn't appear to drive much itself - just reads for the A8 side. But worth a look port.zip Quote Link to comment Share on other sites More sharing options...
drac030 Posted March 31, 2005 Share Posted March 31, 2005 What about the 5th bit...ie, the button. Can you read/write on that pin as well? No, it is read-only. 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.