Friday, August 13, 2021

Digital Joysticks and the Apple II

The Apple II had thousands of games released during its long life-span, and from its first game, Breakout (later known as "Brick Out" and "Little Brick Out"), many of them used analog controllers like paddles and joysticks.  Other home computers and consoles used digital joysticks, which were often better for single-screen games than analog devices.  During the Apple II's commercial life, there were a few attempts to bring digital joystick support to the computer.  When it became a retro-computing machine, there have been a few more homebrew hardware efforts to bring digital input to older games.  This article will give an overview of attempts both old and new.

The Joystick Interface and Connectors

The Apple II was a bit old-fashioned when it came to connecting things like paddles or joysticks to the machine.  On the II and II+, the input for a joystick, paddle or a device alternate to the keyboard was a 16-pin DIP socket on the mainboard.  This socket has three types of signals.  The first are four resistive inputs.  Each input is intended to be connected to a variable resistor, which completes the circuit which goes to the inputs on the 558 timer chips.  There are three digital 1-bit inputs, intended for pushbuttons.  There are also four digital 1-bit toggled outputs, called annunciators.  Finally, there is a strobe output which drives the line low for a CPU clock cycle when accessed.

The Apple IIe, IIc and IIgs also have 9-pin connectors which provide the resistive input and pushbutton input signals, but nothing else.  The IIc's 9-pin connector doubles for the mouse port, but when a mouse is plugged in, the signals for the mouse movement and direction bypass the timer chip.  The connector also loses two resistive inputs and one pushbutton input.  

The IBM PC supported a nearly-identical joystick interface, adding support for a 4th button and using 100KOhm variable resistors in place of the 150KOhm variable resistors Apple specified.  The Apple II was generally fixed at 1MHz operation for most of its operational life and virtually every joystick-supporting piece of software for the Apple II expects joystick reads to occur at 1MHz.  CPU accelerators were available for the Apple II, and the Apple IIc+ and the IIgs can accelerate 8-bit software, but the expectation remained 1MHz for timing sensitive tasks like sound output, disk drive access and joystick reads.

Wico Command Control Joystick Adaptor

This is a black box with two DE-9 input ports for Atari 2600-style digital controllers and a 16-pin ribbon cable to connect to the Apple II's Game I/O Socket.  Inside the device was a chip and circuitry which set a position on the joystick, when pushed, to a resistance level.  This was essentially the Gravis Gamepad approach in the IBM PCs.  While this was potentially compatible with any Apple II game which supported a standard joystick, some games had really picky joystick input routines and required more than the three levels of resistance per axis this adapter provided.  

Sirius Joyport

The Apple II took a significant amount of CPU time to read the joystick's resistive inputs and they had to be read several times in succession to obtain an accurate position of the stick. Two companies decided to provide a faster to joystick reading interface.  The first was from Sirius and called the Joyport and was supported in many of its games.  It was adopted by companies outside Sirius and if you see a game providing an option for an "Sirius Joyport", "Atari Joyport" or just "Joyport", it expects this interface.  The official Joyport can passthrough a pair of Apple joysticks or use a pair of Atari joysticks, and the functionality can be toggled by a switch on the device.

The Joyport works by multiplexing the four joystick positions and one button on the three digital pushbutton input lines.  The annunciators would be used to toggle which directions or button on the joystick would be read and to get all the positions the programmer would have to cycle through the annunciators.  So, when you set annunciator 1 to on, you can read state of the fire button, the Up direction and the Down direction on the three pushbutton inputs.  When you set annunciator 1 to off, then you can read the the state of the fire button (again), the left direction and the right direction.  Annunciator 0 selects either the left (on) or right (off) joystick.

H.A.L. Labs Gizmo

H.A.L. Labs was an early provider of Apple II games and bore no relation to the Japanese company HAL Laboratory.  It made the infamous Taxman Pac-Man clone and, dissatisfied with the time it took to read the Apple II analog joysticks, decided to come up with a similar multiplexing device to the Joyport for an Atari 2600-style joystick.  This device was much simpler than the Sirius Joyport and only saw support in two H.A.L. Labs games.  

With the Gizmo, only the first pushbutton input is used, the first three annunciators, when toggled in various combinations of on and off, can read the state of the button or one directional.  

Support for Later Systems

The Joyport and the Gizmo rely on access to the annunciator pins, which are not present on the DE-9 connector of the IIc, IIgs or IIe.  So you can only use the Joyport or the Gizmo on an Apple II, II+ or IIe.  There are two challenges to using the Sirius Joyport.  The first is that it and the popular shift-key mod both use the same pushbutton input.  However pushbuttons are pulled down and the shift keys are pulled up, so they will cause a short circuit if they share that pin.  However, not everyone apparently installed the shift key mod, and Apple IIe's do not enable it by default until the Platinum IIe motherboards.

The Apple IIe presents another challenge to the Sirius Joyport.  It wires the Open Apple and Closed Apple keys to the first two pushbutton inputs.  When Control + Open Apple + Reset is pressed, the Apple IIe will go into a diagnostic testing program.  But when you just want to press Ctrl + Reset, the Joyport will make it seem as though Open Apple is also held down, throwing you into the diagnostics program instead of just resetting the machine.

Modern Digital Interfaces

The Apple II scene has some hardware tinkerers who have come up with new and better ways to handle digital input.  One such device is the Apple II 4play Joystick Card.  This plugs into an expansion slot, which makes it fully compatible with the Apple IIe and IIgs.  As its name implies, it allows a program to read up to four Atari-style joysticks. It can handle joysticks with more than one fire button, and with adapters can even handle Sega Genesis controllers.  The board is rather simple, using four 3-state buffers, one for each joystick.  Each I/O slots provide sixteen memory addresses to an interface card without the card needing extra decoding logic, and each joystick is given a memory address from which it can be read.  About twenty-five Apple II games have been hacked to use this interface.

Another, more recent board, is the SNES MAX.  This board, as its name suggests, supports two SNES-style controllers.  It comes in a Cable version, intended for wired controllers and a Socket version, intended for 8bitdo Bluetooth Retro Receivers and similar.  Either can be purchased from ReactiveMicro.com.  The SNES controller provides four directionals and eight buttons, and is supported by the recent homebrew game Attack of the PETSCII Robots.  That game can use all buttons on the SNES controller.  

List of Games with Support for Each Digital Joystick Interface

Sirius Joyport Digital Joystick Adapter :

  • Bandits
  • Beer Run
  • Borg
  • Boulder Dash
  • Boulder Dash II
  • Boulder Dash Construction Kit
  • Bouncing Kamungas
  • Buzzard Bait
  • Computer Foosball
  • Cyclod
  • Dino Eggs
  • Free Fall
  • Fly Wars
  • Hadron
  • Jawbreaker II
  • Jellyfish
  • Lemmings
  • Lunar Leeper
  • Mating Zone
  • Mouskattack
  • Miner 2049er
  • Miner 2049er II
  • Minotaur
  • Outpost
  • Pest Control
  • Plasmania
  • Sea Dragon
  • Snake Byte
  • Stellar 7
  • Spy's Demise
  • Twerps
  • Wavy Navy

H.A.L. Labs Gizmo Digital Joystick Adapter :

  • Super Taxman 2
  • Vindicator

4play Joystick Card Conversions :

  • Apple Galaxian (Starcraft)
  • Alien Typhoon
  • Boulder Dash
  • Boulder Dash II
  • Buzzard Bait
  • Dino Eggs
  • Galaxian (Atari)
  • Kaboom!
  • Lode Runner
  • Mario Bros
  • Miner 2049er
  • Miner 2049er II
  • Pac-Man (Atari)
  • Plasmania
  • Robotron 2084
  • Sea Dragon
  • Spy's Demise
  • Star Blazer
  • Stellar 7
  • Super Puckman
  • Super Taxman 2
  • Tapper
  • Vindicator
  • Wavy Navy

SNES Max Serial Interface Card :

  • Attack of the PETSCII Robots!
  • Robotron 2084 (Conversion)

No comments:

Post a Comment