ZZTOP SOFT Posted June 21, 2016 Share Posted June 21, 2016 (edited) Hi folks. Few years ago I made an Atari controlled pinball. All works fine. I make a couple of custom cards to have more outputs, specifically to control the cpu lamps. All ok, but from the start I did'nt like the "comunication" method, too many wires, too many chips... I dream seeing outputs directly from the Atari guts, winning order and less electrical noise. As real pinballs are. Now I want to improve that issue for my next pinball. The Atari PIA let just 8 bits free (PORT A). Too short for big proyects. On pinballs some of the outputs must remain locked (on), dinamic scan not allowed. For that reason more outputs are needed. I made my research, focus on add a second PIA to my Atari, winning two 8-bits ports for a total of 16 outputs, or inputs. Now, I'm wondering if anyone has done this mod before (add another PIA), and the method used. I want to compare experiences and see if I did well or not. Edited June 21, 2016 by ZZTOP SOFT Quote Link to comment Share on other sites More sharing options...
ZZTOP SOFT Posted June 22, 2016 Author Share Posted June 22, 2016 ¿No one? ¿anybody? ¿nobody? Quote Link to comment Share on other sites More sharing options...
+David_P Posted June 22, 2016 Share Posted June 22, 2016 Try: http://www.realdos.net/downloads/Docs/pia%20upgrade.doc Quote Link to comment Share on other sites More sharing options...
ZZTOP SOFT Posted June 23, 2016 Author Share Posted June 23, 2016 (edited) The page cannot be found Thanks David_P, but I don't need instructions. I already have another PIA running very smooth on my 800XL. Just want to share the experience with other AA users. Edited June 23, 2016 by ZZTOP SOFT Quote Link to comment Share on other sites More sharing options...
ZZTOP SOFT Posted June 23, 2016 Author Share Posted June 23, 2016 (edited) The Atari PIA PORTA Adr. D300 (54016) PORTA PACTL Adr. D302 (54018) PACTL Note: Don't mess with PORTB or your Atari may crash because three ouputs makes subcontrol between PIA and MMU (memory management). ALL PORT-A INPUT 1 POKE 54018,56 2 POKE 54016,0 3 POKE 54018,60 Now PIA is ready to GET data 4 DATA=PEEK(54016) ALL PORT A OUTPUT 1 POKE 54018,56 2 POKE 54016,255 3 POKE 54018,60 Now PIA is ready to PUT data 4 POKE 54016,DATA In booting process, PORT-A is set all input to read joysticks. If you want the oposite, type "all output routine". To back, type "all input routine", or just press reset. Warning, if you set PIA as all output, don't short any line to ground or Vcc or may damage the PIA. This is for the Atari PIA. Edited June 23, 2016 by ZZTOP SOFT Quote Link to comment Share on other sites More sharing options...
ZZTOP SOFT Posted June 23, 2016 Author Share Posted June 23, 2016 (edited) With the original PIA, if you want more output or inputs, you are in trouble. I solve this problem like this: I take a good look at the 800XL schematic and see how the PIA talk with the CPU. Adress A0 A1 Data Bus D0 to D7, Clock 02, Reset, R/W, IRQ and...... CS2. There's the magic. (CS means Chip Select). The 800XL have a small 74LS138 chip at U2. This one decodes three adress (A8 A9 A10) to eight outputs. Each one to select chips from D000 to D700. Like this: PIN 15 D000 select GTIA PIN 14 D100 free PIN 13 D200 select POKEY PIN 12 D300 select PIA PIN 11 D400 free PIN 10 D500 cartridge (cctl) PIN 9 D600 free PIN 7 D700 free I already use D500 for many other mods, so, I know is a very safe direction to make anything. I use D500 U2 pin10 to pin 23 of the second PIA. Here is the equivalence between the standard PIA addressing mode and the second one: PORTA D300 54016 ==> D500 54528 PORTB D301 54017 ==> D501 54529 PACTL D302 54018 ==> D502 54530 PBCTL D303 54019 ==> D503 54531 All signals can be taken directly from the existing PIA (piggback) or from parallel port or cartridge port. The only exeption is CS2 (pin 23), this one must be connected to U2 pìn 10. Now, you can use both ports of this second PIA to have 16 extra outputs, or 8 inputs and 8 output... or what you want. And notice, you still having the PORTA free. The only issue: you cant use the cartridge and the second PIA at the same time. But if you dont use the cartridge.... no problem. Now I'm testing D100, aparently is absolute free and let me use the cartridge at the same time... testing. ZZT Edited June 23, 2016 by ZZTOP SOFT Quote Link to comment Share on other sites More sharing options...
ZZTOP SOFT Posted June 23, 2016 Author Share Posted June 23, 2016 (edited) Just for test. Edited June 23, 2016 by ZZTOP SOFT Quote Link to comment Share on other sites More sharing options...
ZZTOP SOFT Posted June 24, 2016 Author Share Posted June 24, 2016 Here the interaction between the 800XL and PIA. Quote Link to comment Share on other sites More sharing options...
ZZTOP SOFT Posted June 24, 2016 Author Share Posted June 24, 2016 (edited) Here the schematic for a extra PIA: Here the interaction between the 800XL and PIA and how I connect the second one. Dashed line for D500 or D100 to choose. both address work fine for me, but if D500 is used, you can't run the cartridge. So, you can put another PIA! One in D100, two in D300 (standard) and three at D500. Also two extra outputs at CA2 and CB2! __________________________________________ Here PIA 2 setup at D500 ALL PORT-A INPUT 1 POKE 54530,56 2 POKE 54528,0 3 POKE 54530,60 Now PIA is ready to GET data 4 DATA=PEEK(54528) ALL PORT-A OUTPUT 1 POKE 54530,56 2 POKE 54528,255 3 POKE 54530,60 Now PIA is ready to PUT data 4 POKE 54528,DATA --------------------- ALL PORT-B INPUT 1 POKE 54531,56 2 POKE 54529,0 3 POKE 54531,60 Now PIA is ready to GET data 4 DATA=PEEK(54529) ALL PORT-B OUTPUT 1 POKE 54531,56 2 POKE 54529,255 3 POKE 54531,60 Now PIA is ready to PUT data 4 POKE 54529,DATA Edited June 24, 2016 by ZZTOP SOFT Quote Link to comment Share on other sites More sharing options...
ZZTOP SOFT Posted July 7, 2016 Author Share Posted July 7, 2016 Running at D1XX. Quote Link to comment Share on other sites More sharing options...
Van Posted April 5, 2017 Share Posted April 5, 2017 Thanks for posting this I had seen something similar along time ago and in fact bought a PIA for doing this but never got around to it; Till now. Been re-thinking the MidiJoy project http://www.phobotron.de/midijoy_en.htmland thought a 2nd PIA would improve the data flow, which was an issue with the project. It seems I remember something about the 6520 being able to handshake and latch data in, which is what I'd like to do. One question I have is how to handle the 2nd PIA's IRQ? I'll have to dig deeper in the datasheet Yogi 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.