17

All systems that use the Atari 9 pin joystick standard make use of the following pins in consistent ways, with each direction and the fire button being connected to the ground pin when pushed.

1 - up
2 - down
3 - left
4 - right
6 - fire
8 - ground

However the Sega Master System also has a second fire button that connects pin 9 to ground.

In addition, the Kempston compatible interface available from ByteDelight for the ZX Spectrum (http://benophetinternet.nl/ebay/Kempston%20Joystick%202013%20manual%20small.jpg) can read a second button that connects pin 9 to ground.

Furthermore, (correct me if I'm wrong) the Commodore Amiga can also read a joystick button wired this way being pushed, as although it treats pin 9 as an analog input, the Amiga's analog pins are active low.

However, although the Cheetah Annihilator joystick used with the Commodore 64 GS (and compatible with a regular Commodore 64) was a 2 button joystick that used pin 9 for the second button, it connected it to the 5 volts on pin 7 instead as the Commodore 64 analog pins are active high.

Is there some circuit I could create (maybe using 74 series logic gates, transistors, capacitors and resistors) that could detect the absence of a voltage on pin 9 when plugged into a c64 that would allow me to create a 2 button joystick that would automatically work in all these scenarios? Or at least one with a switch that if it were set incorrectly would at least not cause any damage to any system it might be plugged into?

Edit: I understand that many other systems also use a variant of the Atari standard, but I'm primarily interested in building a joystick that only needs to support the ones I've mentioned in my question. It seems most systems with more than 1 joystick button connected a pin to ground somehow anyway (other than the C64), so a simple rewired pass through adapter might be usable elsewhere.

I guess the crux of my question involves how to detect the joystick is plugged into a C64 rather than something else and auto-switch accordingly without damaging any chips in the computer.

5

2 Answers 2

3

Furthermore, (correct me if I'm wrong) the Commodore Amiga can also read a joystick button wired this way being pushed, as although it treats pin 9 as an analog input, the Amiga's analog pins are active low.

All the "early" Atari-derived systems read pins 5 and 9 as analog. There may be later designs, like MSX, that work differently, but the Atari, C64 and Amiga all support this.

The standard used connect-to-ground for the "digital" functions, including both the joysticks and fire buttons on both the sticks and pretty much everything else. So, normally-high.

In the Atari, the only one I'm really familiar with, the paddle controllers were wired to send the +5 into the potentiometers in the paddle, and then into the I/O port where they connected to a capacitor. The resistance in the POT controlled the charging rate of the cap, and when it reached a certain threshold (3.7V?) it triggered an interrupt. That simply copied the value of the color clock, the current horizontal location of the TV beam, into a RAM "shadow register". Since the sprites used the same values for their horizontal position, simply copying that value to the sprite's X-axis register did all you needed.

So, in the Atari at least, the pins would be normally low. And you mention that the Amiga was the same. So the surprising thing about your post is that you state the C64 does not work this way. Are you sure? I ask for two reasons; one is that I know people who use Atari pot controllers on the C64, and two, it seems extremely odd they would change this, and then change it back.

In any event, I strongly suspect there is no possibility of "damage" caused by plugging in a joy with this button into any Atari or Commodore, but I am less clear on what you mean by "the systems you mention"? The ZX interface was designed to work with CX40s, so I assume that is also compatible.

UPDATE: According to the paddle page on the C64 wiki, the C64 is indeed normally low and works exactly like the Atari system with pots between pin 7 and 5/9 and caps to ground.

6
  • Oh, I should add that reading this second fire on the Atari should simply be a matter of turning on the POT scanner and looking for any value in the shadow register. I assume this would be almost identical on the C64 and Amiga. May 28, 2018 at 14:59
  • Although I was aware that the Atari 2600 joystick ports were wired the same as in a C64, it's a good point that you make that it's everyone else that deviates from the Atari standard. As for the Amiga, I have been incorrect in stating how its joystick ports were wired. I've read that it could read the second button on a master system/megadrive joypad that connects pin 9 to ground. Indeed, some games such as the Amiga version of the game Flashback made use of this capability. Out of interest, would such a button between pins 8 and 9 cause any damage to the pots in the c64? May 29, 2018 at 18:34
  • 1
    I really doubt connecting 8 to 9 would be a problem on the C64. The analog port is normally low, so connecting it to ground should do exactly nothing. But what of the Amiga? If the trigger was connect-to-ground, that does imply it was being held high, and thus different from the Atari and C64. Are you sure this is the way the port worked? I'd recommend looking that up in the Amiga hardware refs. May 29, 2018 at 18:52
  • I'm not sure that how the Amiga's ports worked, only what was written in the manual for that game (search for "unmodified Mega Drive type"): lemonamiga.com/games/docs.php?id=653 May 29, 2018 at 19:30
  • @MauryMarkowitz: On the Atari 2600, the paddle-pot hardware supports have five operations: 1. Reset four timers whose duration is proportional to resistances attached to the four paddle inputs (an open-circuit is a near-infinite resistance, yielding a near-infinite time); 2. Check whether the paddle 0 timer has expired yet; 3. Likewise for the paddle 1 timer; 4. ...paddle 2 timer; 5 ...paddle 3 timer. There is no "shadow register".
    – supercat
    May 29, 2018 at 20:13
0

In the finish, I decided that Sega MegaDrive/Genesis joypads are by far what I'm most likely to encounter now that use some variant of the Atari 9 pin layout. Although it doesn't detect which system it's plugged into, I'm now using this device with my C64 which can be manually configured with jumpers to use a megadrive joypad with various mappings:

https://www.tindie.com/products/SukkoPera/openc64megadrivepadadapter-v3/

For MSX and x68000 systems, a similar adapter can be made:

http://frs.badcoffee.info/hardware/joymega-en.html

This adapter also has the advantage that it allows all the buttons on sega controllers to be used with specially written software, such as pointless fighting (http://msxbanzai.tni.nl/compo/2014/entries.html)

The Kempston joystick interface I use with my ZX Spectrum is a modern one that works fine already with the B and C buttons on a megadrive joypad.

I've also found an adapter that adapts Sony PS2 controllers to the MegaDrive pinout:

http://www.tototek.com/store/index.php?main_page=product_info&cPath=23&products_id=54

With this I can use my Hori PS2 joystick or wireless PS2 controllers (which can still be found cheaply on Amazon https://www.amazon.co.uk/s?k=ps2+wireless+joypad&ref=nb_sb_noss) with just about any system.

I've also seen Megadrive to 15 pin neo-geo adapters: http://retroelectronik.com/en/supergun/142-ganesis-and-megadrive-pad-to-neo-geo-and-supergun-adapter-autofire-7854564564567.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .