Showing posts with label Game Controllers. Show all posts
Showing posts with label Game Controllers. Show all posts

Friday, September 3, 2021

Lag Testing on a Budget

Keeping input and display latency to a minimum is very important when playing any kind of vintage video game which relies to some extent on reflexes.  There are some methods which can test display lag of any display, like the Time Sleuth or the Leo Bodnar Display Lag Testers.  Other methods may require running the same software on two consoles at the same time or connecting one console to two displays via splitters and adapters.  Testing controller latency often requires wiring up an LED or shooting video of a screen and button pressing at a very high frame rate.  These methods tend to be expensive, but what if we consider an approach that is likely to be inexpensive and perhaps cost you nothing?

Sunday, November 4, 2018

Newly-Made High Quality Controllers for Vintage Consoles

When you see new controllers being sold for your retro video game systems in your local retro video game store and in many online stores, they are typically of the atgames, Tomee, Cirka, Retro-bit, Gamerz-Tek or Hyperkin quality, which is essentially no-quality.  When you buy these controllers, expect cheap plastic, stiff or rattling buttons, thin and short wires, useless turbo options and terrible D-pads.  Occasionally one can find quality products that go above and beyond and try to compete or exceed the quality of original, first-party controllers.  Let's take a look at some of the respectable options for your classic consoles.


Thursday, December 8, 2016

Spin the Knob, Roll the Ball, Drag the Puck : Rotary-Based Video Game Controllers

A rotary encoder is a wheel that sends positional information as it is moved.  The rotor or disk looks like a wheel with spokes and holes.  The wheel is attached to a shaft which is moved.  The movement can be tracked electromechanically or optically.  Electromechanical rotary encoders send information as an electrical circuit is made and broken by movement of the rotor.  Optical rotary encoders send information as the spokes and holes of optical transmitter/receiver allow and break an infrared beam.

A rotary encoder can be found at the heart of several input devices, namely spinners, mice and trackballs.  The earliest arcade spinners, such as those found on Pong and Breakout, were just knobs stuck on the shaft of a potentiometer.  Movement would typically be calculated by measuring the charge or discharge time of a resistance/capacitive circuit. These knobs could be moved in either direction to a stopping point, they could not perform a full 360 degree rotation.


Wednesday, August 17, 2016

The PC Joystick to Tandy 1000 Joystick Port Adapter

IBM PC-compatible joysticks using the DA-15 connector came in all shapes and sizes.  Some have a hat switch, some have a throttle wheel, and many are quite durable.  The CH Flightstick Pro is among my favorite PC joysticks.  Its large enough to fit in my hand, has easy movement and feels very precise.

Unfortunately, Tandy 1000 users do not have many options, thanks to the 6-pin DIN connector the 1000 line used.    The official Tandy joystick line consists of the miserable black box joystick with the single button and non-self centering stick, the Deluxe Joystick which fixes those issues but is still rather boxy and uncomfortable, and the Pistol Stick Joystick, which has a handle but is really basic.  Not many third parties released joysticks with the Tandy plug, but in this blog article, I will tell you how to adapt any standard PC-style joystick to work in a Tandy 1000 joystick port.


Wednesday, August 3, 2016

The Tandy 1000 Digital Joystick Adapter

IBM PCs and compatibles had an analog joystick interface.  The Tandy Color Computer and clones like the Dragon 32/64 computers also had an analog joystick interface.  Inside an PC or CoCo joystick were a pair of potentiometers.  The chief difference between the two interfaces is how the potentiometers were connected.  PC sticks used the potentiometers as variable resistors, wiring two of the three terminals, one of which to +5v and the middle would be connected to the interface's input.  CoCo sticks used the potentiometers as voltage dividers, where all three terminals would be connected, one outer terminal to +5v, one outer terminal to ground and the middle terminal would be connected to the interface's input.

In the early days of home computers, a joystick could be used for more than just playing games.  It could function as a cursor controller like a mouse, which was useful for drawing programs.  It could also be used for flight simulators, where the analog control could be appreciated.  Most home computer games from the 1980s that support a joystick were ported or derived or inspired by the popular home console and arcade games of the time.  Games like Pac-Man, Pitfall and Space Invaders did not really need an analog stick, they usually used digital joysticks.  When platforming games like Super Mario Bros and Prince of Persia became popular, they often or exclusively used digital gamepads.


Wednesday, December 16, 2015

Analog Controllers in Consoles and Computers

A digital joystick is just four contact switches activated by pressing a directional instead of a button.  This includes the Intellivision's controller, which has sixteen discrete positions, and most console "joysticks".  An analog control allows for smoother movement instead of relying solely on the amount of time a directional has been pressed.  Originally, analog knobs or paddles were used with Pong and other ball and paddle games. Eventually the combination of two of these "paddles" with a common control became a joystick and achieved some popularity for racing and flight simulators.  Outside these pigeonholes, most of the popular games of the 70s and 80s used digital joysticks, trackballs and rotary spinners (the latter are used in the Breakout-derived Arkanoid).  Only in the mid-90s with the rise of first and third person 3D games did a compelling need for a general analog controller present itself.  In the blog post, I will discuss how analog controllers used to be used and how they are used today.

True analog controllers in the video game world use variable resistors.  The humble variable resistor, also called a potentiometer, has had a wide variety of applications.  You will see them at work in light switches, to change volume or temperature.  They were often used in video game controllers.

There are two ways in which analog control was implemented at the hardware level, and both involve potentiometers.  The most common way is to use the potentiometer as a variable resistor in a resistor/capacitor discharge network.  In this method, a capacitor is discharged then a port is read until the capacitor indicated it was recharged.  The time it took for the capacitor to charge gave the position of the potentiometer.  More resistance equals a longer charging time.  Only two wires are connected to the potentiometer in this case, one of the end terminals (to +5v) and the middle terminal is connected to the console.

The second method is to use the potentiometer as a voltage divider with a comparator.  In this method, the potentiometer's output voltage is compared to a voltage ramp, which is reset, and the time it takes for the voltages to become equal indicates the stick's position.  In this case, all three terminals of the potentiometer, one end to +5v, one end to GND and the middle terminal gives the signal to the console or computer.

Atari 2600 & 7800

The Atari 2600 usually came with a pair of paddle controllers.  Each paddle had a potentiometer connected to two terminals, making it function like a variable resistor.  Each controller port could support a pair of paddles but only one of any other type of controller.  Paddle games were the only official solution for four-player gaming.  The output line of these potentiometers is connected to the TIA chip.  The rating of these potentiometers is 1MOhm.  Each paddle had a single button, which shared the same line as the left or right joystick directional.  Button inputs are connected to the 6532 RIOT chip.

Interestingly, while not an analog controller the Keypad Controllers and their clones also make use of the potentiometer lines.  There are insufficient digital inputs on the 2600 controller port to read a 4x3 matrix.  What the 2600 does is to set the joystick inputs as outputs and send a signal through each of the four lines.  These correspond to each horizontal row of keypad keys.  One column is read via the joystick fire button input on the TIA and the other two columns are read through one of the paddle input lines with the assistance of a 4.7KOhm resistor.

The Atari 7800 is backwards compatible with the Atari 2600 and includes a TIA and 6532, but no 7800 games support analog controllers.

Apple II

The Apple II and II+ came with a 16-pin socket which could accept four paddle inputs.  These systems came with a pair of paddles with the Apple logo branded on them.  Like the Atari paddles, these operate as variable resistors.  They use 150KOhm potentiometers.   Soon someone figured out that you can pair two paddle inputs to make a joystick input.  Unfortunately, there were only three button inputs, making the use of two joysticks rare.  Typically a single joystick would only use the first two button inputs.

The Apple IIe kept the joystick socket but also added an external DE-9 port containing the lines necessary to support the four analog inputs and three digital inputs.  This port uses the same lines at the 16-pin socket, but it is easier to plug in and remove peripherals from the external port than the internal socket.  The Apple IIc removed the internal socket and required the joystick to share the port with a mouse, limiting the joystick to two analog and digital inputs.  For the IIe and IIc Apple released a joystick and paddles separately that use the DE-9 connector.  The Apple IIgs has the capabilities and connectors of the IIe but also supports a fourth digital input for four buttons.

Tandy Color Computer, IBM PC & Tandy 1000

The IBM PC uses a DA-15 gameport supporting four axes and four buttons.  The Tandy Color Computer and 1000 uses a pair of DIN-6 connectors, each supporting two axes and two buttons.  All of these computers use 100KOhm potentiometers, but the IBM standard wires them as variable resistors and the Tandy machines wire them as voltage dividers.  Like the Apple II, these interfaces use discrete circuitry instead of a custom chip.

Tandy's regular CoCo joystick uses one button and are non-self centering.  They are not regarded highly.  The Tandy Deluxe Joystick is self-centering, has two buttons and can be set to free-floating mode.  The IBM PCjr. joystick has the same features and look identical to the Tandy Deluxe Joystick, but has a different connector and is wired as a variable resistor.  Both joysticks hail from Kraft-designed joysticks, which were pretty much the standard for the early to mid 80s for the Apple II and IBM/Tandy.

See here for more discussion of issues relating to the IBM PC joystick : http://nerdlypleasures.blogspot.com/2014/03/wheres-my-digital-joystick.html

The Apple II usually runs at one speed and unless an accelerator is being used, the constant speed eliminates issues with reading from the joystick port.

Commodore VIC-20 & Commodore 64

The VIC-20 has one joystick port, so only one pair of paddles is supported.  The paddles are connected to the 6560 VIC chip, which provides video and audio.  Because the paddles are wired to the Atari standard, the buttons are handled by one of the 6522 VIA chips.

The C64 has two joystick ports, so two pairs of paddles are supported.  The paddles are connected to the 6581 SID chip, which also handles the audio for the computer.  The SID chip only has two analog potentiometer inputs, so the inputs from two pairs of paddles are multiplexed and read with the assistance of one of the 6526 CIA chips.  The CIA chip also handles button reading.

Commodore's paddles can be used with either system and they use a resistance value of 470KOhms.  Atari 2600 paddles are more common and usually work OK, indicating that Commodore's paddles are wired as variable resistors.

Atari 8-bit Computers and 5200

The Atari 400 and 800 computers could support four pairs of paddles using its four controller ports.  These are connected to the POKEY chip inside the system, which has eight analog input pins.   Super Breakout for the Atari 8-bit computers supports eight paddles used in a sequential fashion.  POKEY is also used for audio generation and other system functions including scanning the keyboard for pressed keys. The buttons are read by the 6520 PIA chip.  The 2600 paddles are used in these computers.

The Atari 5200 was noted for being the first system to come with an analog joystick.  The Atari 5200's joysticks manipulates a pair of potentiometers (not smaller than those found in paddles) and use a resistance value of 500KOhms.  The 4-port system could, as its name implies, support for of these joysticks.  The 2-port system could only support two joysticks.  No paddles were specifically made for the 5200.  There is no PIA chip in the 5200, so the joystick buttons are read by the GTIA chip.  The keypad buttons are read similarly to the keyboard keys in the 8-bit machines by the POKEY, but multiplexers are used.

The later Atari 8-bit machines, from the 1200XL, 600XL, 800XL, 65XE, 130XE and XE Game System eliminate two of the controller ports, so you can only use two pairs of paddles with these machines.

Vectrex

The Vectrex controller may not have had quite as many buttons as the 5200 controller, but four independent fire buttons was a rarity.  Its joystick was smaller than the 5200's and apparently less brittle.  Also, far more importantly, the joystick is self-centering.  The innards of the joystick look very similar to those of the Sony Dual Shocks to come in the following decade.

Not only does the Vectrex controllers contain a pair of potentiometers attached directly to the joystick, but there are also a separate pair of trimmer potentiometers located elsewhere on the PCB.  Apparently these can be adjusted without opening the joystick and serve to fine tune the joystick's centering, not too dissimilar to how Apple and PC joysticks work.  These trimmer potentimeters are 10KOhms.

Unlike the Tandy sticks, which have one end terminal of the potentiometer connected to +5v and the other end terminal connected to GND, the Vectrex stick has one end terminal connected to +5v and the other end terminal connected to -5v.  The resistance value for these potentiometers also appears to be 10KOhms.

Because Vectrex controllers are rare and only two commercial Vectex games use the analog function, Sega Genesis 3-button controllers have been converted to work with them.

NES & Famicom

NES Controllers are primarily digital, they send out a bit for a pressed button.  However, the NES and Famicom versions of Arkanoid were released with a paddle controller.  This controller, called the VAUS Controller in the US, could be used instead of the gamepad.  The Famicom controller plugged into the expansion port and the NES controller plugged into Controller Port 2.  The paddle had one button.  The NES and Famicom controllers are not compatible with each other, they function identically but use different bits to send their data.  No other NES game used its Arkanoid controller, but the Famicom games Chase HQ and Arkanoid 2 could use the Famicom Arkanoid controller.  The NES controller has a small screw that could be used to adjust the sensitivity of the controller via a trimpot.  The Famicom controller does not have a trimpot.

The interior of the Arkanoid controller shows a 556 timer and potentiometer wired only to two terminals.  This means that it works just like in the Apple II or IBM PC.

Thumbsticks - Sony PlayStation Dual Shock controllers and their successors

Outside the classic consoles, most systems of the third and fourth generation of video games did not support analog controllers.  In the fifth generation, things began to change.  The Nintendo 64 was released with an "analog" thumbstick, but the thumbstick uses optical sensors and is not really an analog controller for the purposes of this article.

The basic principle of how the analog thumbsticks operate on a PlayStation Dual Shock controller is similar to how the Tandy CoCo joysticks work.  Although its successors may offer more analog controls, the basic functionality is unchanged.  Essentially each thumbstick manipulates a pair of potentiomers, one for each axis of the stick.  These potentiometers are wired in the three pin style, making them voltage dividers.  When the stick is in the neutral position, the sticks should be outputting half the maximum voltage (2.5V).  The controller chip of the controller reads these values and converts them into a digital 8-bit value which is sent with other stick and button information as a multi-byte serial packet to the console.

I have read that using a voltage divider is more precise than using a resistor/capacitor network as used in PCs and Atari consoles and computers.  However, potentiometers are notoriously loose with their tolerances (20% seems to be the norm).  I imagine Sony and its competitors may have higher quality parts and the lower resistance ranges (0-40KOhms seems to be about right) and the shorter travel distances may tighten the tolerance a bit (10% seems reasonable)

Every PlayStation game that supports the thumbsticks should use a standard routine to calibrate the thumbsticks when the game is bootup.  Even with tighter tolerances and more compact form factors, the dead center position may not reflect the midpoint voltage reading.

Tuesday, October 13, 2015

Seize the Advantage, the NES Advantage




The NES Advantage was the first arcade-style controller for the NES, but it would not be the last.  It is, however, the best of the bunch.  In this post I would like to explain why it is the best and what kind of games for which it is best suited.

Design

The NES Advantage appears to have been designed in-house by Nintendo.  While it is similar to products from ASCIIWARE, it is of a very high build quality.

There were other arcade-style joysticks.  Camerica brought over the Freedom Stick and the TurboTronic, the latter has the same button layout as the ASCII Turbo Jr Stick for the Famicom.  Beeshu marketed the Jammer and Ultimate Superstick, but the only thing ultimate about it was the terrible build quality.  The Quickshot Arcade was another arcade-style stick.  The Ultimate Superstick and the Freedom Stick are wireless infrared sticks.

The NES Advantage uses a light gray color for its plastic like the NES front loader.  It comes with crevices cut into the plastic to give it some style.  These crevices are hard to clean if they get really filthy and I always thought they were a bit over the top.  The red lettering on the top can also get worn down by sunlight and abuse.

The bottom of the NES Advantage has a metal base and four rubber feet.  This gives it some heft.  To open the advantage, you need to remove the bottom feet (which are attached to the base by an adhesive) and the turbo knobs, because they screw into the top plastic with hex nuts on the potentiometers.

Features

The NES Advantage has three spring latched switches for the Turbo B, Turbo A and Slow buttons.  It has a sliding switch for the 1/2 Player button.  The four directionals and four regular buttons use rubber domes to make contact, just like a regular NES controller except these are larger.  Most arcade sticks of the day came in two varieties, leaf switches and micro switches.  Leaf switches are quiet but may be less precise, while micro switches are noisy but clicky.  Each button or directional has a separate pad, making replacement somewhat easier.  The stick has a knob that can be unscrewed and has a metal coil inside it to recenter it like a spring.

The Turbo control knobs allow for a very finely tuned turbo selection for each button independently.  This is very important because some games work better with a lower Turbo setting and other games work better with a higher Turbo setting.  An adjustable Turbo setting may simulate pressing the button one time per second, fifteen times per second or thirty times per second.  Some games do not respond to the Turbo at all, as in one shot at a time games like Galaga.

The LEDs above the buttons flash with the button presses.  As you turn the dial up on the Turbo knows, you will see the LED light up faster and faster until it turns a solid red.  At that point your eyes can no longer track the discrete turning on and off of the LED.  Because there are switches on the Turbo to turn it on and off, you never need to bother with it if you don't want to.

For many sidescrolling games, the A button is used to jump.  Turbo is not usually helpful in this instance.  The NES Advantage is often used where only the B button has any Turbo on it.  Nor is it useful in shooter games to activate a secondary weapon with a limited supply of ammo or select a weapons option.

The Slow button is essentially a Turbo Start button.  This means that you will often hear the annoying sound assigned to a press of the Start button.  Also, not every game allows you to pause, making this useless when it is pressed.  Other games will bring up a menu or subscreen, which is very distracting.  Pressing the Start button can cause you to lose other button presses, making this feature really something of a novelty.

The cable for the NES Advantage has two connectors on the end.  The end connectors are separated for the last four inches of the cable length and one of the connectors has a white stripe.  This allows you and a friend to use your own NES Advantages.  The connector with the white stripe always goes into Controller Port 1 and the connector without the white stripe always goes into Controller Port 2.  You also need to make sure that the Player 1/2 switch is set appropriately.

You can use four NES Advantages with a NES Four Score or NES Satellite.  The NES Advantage plugged into Controller Port 3 should have its switch set to Player 1 and the NES Advantage plugged into Controller Port 4 should have its switch set to Player 2.

If you are playing a two-player alternating game, you can share the NES Advantage between you and your friend.  In this case, you must flip the switch when you pass the NES Advantage back and forth.  This is useful even when you are playing alone for practice because you can play two games at once.

Overall, the NES Advantage is very durable and very responsive.  One complaint about the internals is that the buttons can get stuck.  I have read that this usually happens when the carbon pads underneath the A and B buttons get worn out or are not properly underneath the button.  You should test the buttons before you buy one if possible.

When Nintendo releases a first-party product for the NES with a Turbo and Slow features, is it really cheating to use them?  You may recall that Nintendo released the NES Satellite, which also had Turbo support, in the NES Sports Set.  Sega also put out a Genesis controller with Turbo and NEC's Turbo Grafx-16 came with a Turbo-supporting controller.  Under these circumstances, it is really hard to say that Turbo is cheating.  After all, Turbo is only simulating the rapid pressing of a button.

If one takes the argument further, then what about the Game Genie?  Nintendo never licensed the device, which came out for the NES, SNES and Game Boy.  However, Sega did license the Genesis and Game Gear versions.

Best Games

Many of Nintendo's early releases were based off arcade games.  Donkey Kong, Donkey Kong Jr., Donkey Kong 3, Popeye and Mario Bros. are direct ports.  Balloon Fight is a clone of Joust and Mach Rider is a clone of Hang-On.  Galaga, Pac-Man, Ms. Pac-Man, Defender, Joust, Elevator Action, the list can go on and on.  The NES Advantage offers a somewhat more authentic arcade style experience when playing these games.

The NES Advantage has its place elsewhere.  The classic Konami games like Contra, Jackal, Super C, Gradius and Life Force can all take advantage of the NES Advantage's Turbo.  Compile's top-down shooters, Zanac, The Guardian Legend and Gun-Nac are also good games for the Advantage.  Fester's Quest becomes much more playable with the Turbo function of the Advantage.  The few fighting games for the NES like TMNT Tournament Fighters could benefit from the smooth motion of the stick.

Tuesday, October 6, 2015

NES Satellite : Pinnacle of Early Wireless Controller Solutions

Ever since the Nintendo WaveBird controller was released for the Gamecube, wireless controllers have finally entered their own.  Using high frequency RF technology in the 900MHz and later 2.4GHz bands, it combined long distance wirelessness without a significant;y bulky design.  Later controllers for the Xbox 360, Xbox One, Wii, Wii U, PS3 and PS4

Before the advent of the Nintendo Wavebird, previous wireless controllers, with one important exception, used infrared technology.  Infrared technology is typically used in TV remotes and is a cheap, low powered way to communicate signals without a wired connection.  In the 1980s it was fairly compact and did not add a great deal of bulk to a controller.

The NES was the first console which wireless controllers were fairly common.  Examples include the Camerica Freedom Stick, Supersonic Joystick and Freedom Connection (the latter is an adapter only) and the Acclaim Double Player Wireless Head-to-Head System and Wireless-Infrared Remote Controller.  There was even a wireless Light Gun, the Playco Toys Video Shooter (which looks like a Sega Light Phaser).

The trouble with infrared technology is that the technology requires a line of sight between the controller and the console.  This is why TV remotes tend to work only within a "sweet spot" and the NES wireless controllers were no different.  But while you can typically hold a TV remote in a fixed position, even if channel surfing, the same cannot be true for a wireless video game controller.  Excited gamers will move their controller all over the place, confusing the infrared controller and causing lag and missing hits.



The other option at the time was the rf technology used in the Atari CX-42 Wireless Joysticks.  These sticks came with a large receiver with an antenna.  Each stick required a 9V battery and had an extremely large base compared to the regular CX-40 joystick.  The sticks had an antenna sticking out the side.  In addition to the bulk of the sticks and the ugly receiver box, the sticks did not have a very long range.

Enter the NES Satellite.  Nintendo understood the problem that gamers would not keep their controllers in a straight line with the infrared receiver, so it designed an adapter that was not designed to move.  The Satellite can easily add eight feet of distance to the sev

en and a half foot controller cords Nintendo used with its NES controllers.  This is especially useful if you have AV Famicom controllers, which plug into NES controller ports but have very short cable lengths at less than three feet long.

The Satellite may not look particularly heavy, but it uses six C-cell batteries, adding a bit of heft to the unit. However, with the slack in the controller cable, a gamer is free to move his controller about without disturbing the infrared connection.  It is unlikely that someone will yank it away.

Why large, bulky C-cell batteries?  The NES Satellite is a four player adapter and the infrared unit, the adapter circuitry and the turbo circuitry all need power.  Also, the Satellite has to provide power for four controllers.  The Satellite is rated for 9VDC, 150mA.  Six C-Cell betteries connected in series provide 9VDC and have a maximum 8000mA-H capacity.  Fresh batteries should give at least 20 hours of usage out of the Satellite.  Unfortunately, Nintendo did not provide an AC adapter or plug for the device, but if you can find a 9V brick of sufficient amperage, you should not have a problem with powering the device by soldering the split wire to the battery terminal connectors.

The Satellite has a power button to avoid draining the batteries when the NES is not in use.  It has separate turbo buttons for A and B.  The turbo buttons work, but the turbo cannot be adjusted, so it is not as great as the adjustable turbo of an NES Advantage. When the Satellite is communicating with its receiver, you will see a LED on the receiver light up.

It works with the NES Advantage.  The NES Advantage has an adjustable turbo feature and a slow feature, so it may drain the batteries a bit more quickly than a standard controller when the turbo is active.  It also works with the Zapper, but only in Controller Port 2.  Also, the Ctlr/Gun switch must be in the Gun position.  Finally, you will need to turn the power off and back on again (if the switch was in the Ctlr position) before the device will register the trigger function of the Zapper.  It should work with other Controller Port 2 peripherals like the Arkanoid VAUS paddle controller or the NES Power Pad.

The Satellite's only other disadvantage, other than its battery consumption, is that it must maintain a line of sight with the receiver plugged into the NES controller ports.  Moreover, that line of sight should be dead-on straight and not at anything more than a slight angle, either horizontally or vertically.  If you feel like the game is not responding appropriately, adjust the Satellite unit and turn the power off and back on.

The Satellite, when properly focused on the receiver, does not offer any appreciable lag to your gameplay.  I have tested it with games like Contra, Battletoads and Duck Hunt.  I could observe no appreciable decrease in my performance and no obvious time where button presses and game response seemed out of sync.  Modern RF-based controllers cannot make this claim.  They will add lag compared to a wired controller.  Some people state they notice it, others do not.  This is typically important for systems with a wired and a wireless option like the Gamecube and Xbox 360.  For systems that more or less exclusively use wireless controllers, the programmers should have factored in the lag from the controller.


There were not too many four player games released for the NES.  Here is the list of licensed NES games that support the NES Satellite adapter and its wired version, the NES Four-Score :

Bomberman II
Championship Bowling
Danny Sullivan's Indy Heat
Gauntlet II
Greg Norman's Golf Power
Harlem Globetrotters
Kings of the Beach
Magic Johnson's Fast Break
Monster Truck Rally
M.U.L.E.
NES Play Action Football
A Nightmare on Elm Street
Nintendo World Cup
R.C. Pro-Am II
Rackets & Rivals
Roundball: 2 on 2 Challenge
Spot: The Video Game
Smash TV
Super Off Road
Super Jeopardy!
Super Spike V'Ball
Swords and Serpents
Top Players' Tennis

Of all those games, Bomberman II, M.U.L.E. and Smash TV are the best games in my opinion.  Bomberman II allows for four-player simultaneous fun.  M.U.L.E. has a change to the town area in its NES version that makes purists scoff, but outside that change to the town, the game offers a lot of four player fun and strategy.  Its usually much easier to find a NES and a four player adapter than an Atari 400 or 800 home computer.

Smash TV is very clever, the game only supports two players at maximum.  However, with a four player adapter, each player can use the D-pads of two standard controllers to mimic the arcade controls much more precisely than by using one D-pad for each player.

Gauntlet II allows for four player simultaneous action, but while that port appears to be pretty faithful to the arcade game, it feels a little bland and has no in-game music (like the arcade).  I'm not a huge sports game fan, even on the NES.  Some people like Pat the NES Punk extol the virtues of Danny Sullivan's Indy Heat, but I am not a big fan of Super Sprint-style games on the NES.  R.C. Pro-Am II is a good single player game, but is not good for multiplayer.  I personally have a fondness for Swords and Serpents, but I cannot imagine four people coming together to play this game (the first player controls the movement).

Wednesday, September 16, 2015

The NES Zapper - How it Works, What it Works With and What is Worth Playing



NES Zapper - Original Gray Version
The NES Zapper is a nice piece of technology, consisting of a plastic housing containing a focusing lens, a photo sensor and a spring-loaded double action trigger. It was originally released as the Family Computer Gun on February 18, 1984.  It looked like a western-style six shooter and was in all black.  Nintendo even marketed a holster for it in Japan so you could simulate drawing the weapon.  Nintendo released three games in Japan for the gun, Wild Gunman, Duck Hunt and Hogan's Alley..  Only three games were released for the Famicom after that that had support for the Gun, and the support for all of them was optional : Gun Sight (a.k.a. Laser Invasion), Mad City (a.k.a. The Adventures of Bayou Billy) and Operation Wolf.

NES Zapper - Later Orange Version



























In the United States, Nintendo redesigned the Zapper to have the look of a futuristic laser gun and bundled it with the initial launch NESes, then the Deluxe Set, the Action Set and finally the Power Set.  It was also sold in a standalone package for those people who only bought a Control Deck.


Wednesday, September 9, 2015

What about R.O.B.? - The NES's First Mascot


R.O.B. with all Gyromite Accessories (missing Cartridge)
Nintendo originally released R.O.B. as the Family Computer Robot for the Famicom in Japan on July 26, 1985.  In this form, the Family Computer Robot uses off-white plastic for its body and red plastic for its arms and the bottom half of his hexagonal base.  This corresponds to the colors of the Famicom.  The Robot had to be purchased separately, it did not come bundled with games.  It cost 9,800 Yen.  In 1985, $1 USD was worth an average of 238 Yen.

The first game for it, released alongside the Robot itself, was called Robot Block and retailed for 4,800 Yen.  This game came with five different Colored Blocks (white, red, yellow, green and blue), five Block Trays for the Blocks to be stacked onto and a pair of Block Hands for the Robot with rubber ends.  Robot Block directs the Robot to move and stack the Colored Blocks onto the various stands while the player usually hops around.  It relies on the honor system.  Interestingly, it is one of the few Nintendo games from the pre-Disk System and "black box" eras that reproduces something like recognizable human speech.

Robot Block Box
The second game, Robot Gyro, followed on August 13, 1985 and retailed for 5,800 Yen.  This game came with larger pieces, two Gyros, a Gyro Spinner, a Gyro Holder and a Gyro Tray for the Controller.  It also has a pair of Gyro Hands to grab the Gyros.  Oddly enough, the box for Robot Gyro shows a different type of spinner that is taller.  Robot Gyro requires both controllers and the second controller sits in the Gyro Tray.  The Gyros, when sitting on the red and blue platforms, depress the buttons on the second controller.  A player can still play Gryomite without R.O.B., but most of the challenge is lost.

Robot Gyro Box
Nintendo introduced the NES in the United States in New York City as a test market on October 18, 1985. The console originally retailed for $249.00 and came with the Control Deck, two Controllers, the Zapper Light Gun, the R.O.B. (Robotic Operating Buddy), and the games Gyromite and Duck Hunt, fully boxed. When introduced nationally, Nintendo also released the Control Deck and two Controllers as the Basic Set with ($99.99) and without Super Mario Bros. ($89.99) as a more budget friendly option.  The set with R.O.B. was now called the Deluxe Set.  By 1988, Nintendo was pretty much just selling the Action Set with a Super Mario Bros./Duck Hunt cartridge and a Zapper for $149.99.  Eventually, the Power Pad would replace R.O.B. in the Power Set as the fad peripheral of choice.

R.O.B. was available for purchase separately, as was Gyromite with a large box that came with its accessories.  Both are rare to find today.  Gyromite was the same exact game as Robot Gyro.  Stack-Up was the same exact game as Robot Block and was available to purchase at the initial launch.  In fact, Nintendo did not even bother to change the title screens for these games, because the Gyromite and Stack-Up cartridges boot up as Robot Gyro and Robot Block, respectively.  Also, some Gyromite and all Stack-Up cartridges use Famicom PCBs and a converter that converts the 60 pins of a Famicom connector to the 72 pins of a NES connector.  This extra converter board also adds the lockout chip for the NES.  While not the only games that have these converters, they are often sought after for them.

Stack-Up was never bundled with a console and could only be purchased separately.  On account of this, it is far rarer than Robot Block.  More Japanese consumers bought Robot Block because it was cheaper than Robot Gyro.  Of course, Nintendo bundled R.O.B. with Gyromite with each Deluxe Set sold, and the Deluxe Set probably sold at least a million units, so Gyromite and its parts are far more common than Robot Gyro or anything else.

Physically and functionally, the parts for Robot Block and Stack-Up are identical.  Cosmetically, the Block Hands for Robot Block are red and the Block Hands for Stack-Up are dark gray.  The Block Trays are off-white for Robot Block and light gray for Stack-Up.  Many times on auctions for Stack-Up you will see white Block Trays and red Block Hands, and they came from Robot Block.  

Stack-Up Box
Physically and functionally, the parts for Robot Gyro and Gyromite are identical, with one exception.  That exception is the Gyro Tray.  The Gyro Tray for Robot Gyro is shaped for the rounder, smaller Famicom Controller with the bump in the middle of the edges.  The Gyro Tray for Gyromite is larger and squarer, shaped for the NES Controller.  Here is another example of region locking :)  Cosmetically, all parts use off-white plastic for Robot Gyro and the Gyro Hands, the base of the Gyro Spinner and the top rails of the Gyro Tray are red.  Gyromite uses light gray plastic for its parts except the Gyro Hands, Gryo Spinner base and top Gyro Tray rails, which are dark gray.  The off-white plastic of the Robot and its peripherals are much more prone to yellowing than the light gray plastic of R.O.B. and its peripherals.

R.O.B. works similarly to a Zapper light gun in that it receives information from the TV screen.  The TV screen will strobe green light when it wants to issue a command to R.O.B.  The photo-receptors inside R.O.B.'s head will receive the light stream and send it to a microcontroller for processing.  R.O.B. can accept six commands : Move Torso Up, Move Torso Down, Rotate Shaft Left, Rotate Shaft Right, Open Arms and Close Arms.  The microcontroller sends electricity to motors in R.O.B's Torso and Base which control the movement via gears and grooved tracks.

R.O.B. moves his Torso Up and Down in a shorter distance for Stack-Up than Gyromite because of the way the blocks stack. Stack-Up allows you to stack blocks up to five blocks high, so R.O.B. will move five times up or down the shaft from his head to his base.  Gyromite will only allow you to move three times up or down the shaft, and you really only need to move him up or down one position.  He has five positions to move left or right and his arms either are fully open or fully closed.  He has five numbered slots to insert the accessories for each game which correspond to the positions he can move.

Family Computer Robot box, hands not included
Unfortunately, R.O.B. relies on the speed and intensity of the light being pulsed by the TV screen and will not respond to the strobing on an LCD TV.  In fact, Nintendo included a filter strip for R.O.B.'s eyes should the light of the screen or the ambient light be so intense that R.O.B. would not function correctly.  R.O.B. was later released in the PAL territories.  Because PAL screens refresh slower than NTSC screens, the microcontroller in R.O.B. may have had to be adjusted.  The ROMs for Gyromite and Stack-Up are identical around the world.  The early Zapper and R.O.B. games use the same ROMs regardless of region.  The European R.O.B. and Zappers may not compatible with NTSC TVs.

R.O.B.'s communicates with the robot via a pattern of alternating green and black screens.  When the game issues a command to R.O.B., it always turns the screen black for three frames.  Then comes a green frame followed by a black frame and followed by a green frame.  For every command, this sequence is the same.  Then the sequence of green and black screens alternates in a different pattern for seven frames.  Here is how the commands are encoded :

Up (Short) Down (Short) Left Right Open Close Up (Long) Down (Long)
b b b b b b b b
b b b b b b b b
b b b b b b b b
g g g g g g g g
b b b b b b b b
g g g g g g g g
g b b g g b b g
g g g g g g g g
g b g b b g g g
g g g g g g g g
b g b b g g b b
g g g g g g g g
b b b b b b g g

b = black screen, g = green screen.

The last two frames seem to indicate only whether an up or down movement by R.O.B. is a short (Stack-Up) or a long (Gyromite) movement.  The test feature for both Gyromite and Stack-Up continuously alternates black and green screens in a 1:1 ratio after the first three black frames.  Given that the code is at least five bits (32 possibilities), there could be up to 24 other commands that R.O.B. could recognize by timing the screen flashing appropriately.

R.O.B. takes 4 x AA batteries.  The LED on top of its head lights up to tell the user that it is functioning.  It is not on all the time.  It will turn on when you use the Test mode correctly in either game.  It also turns on when R.O.B. is not moving, indicating that R.O.B. can accept a command.  R.O.B. should be situated as directly in front of a TV screen as possible.  The manual indicates that he should be no further than 45 degrees from the center of the screen and works best within 3 feet of the screen.  More than 6 feet is not recommended.

The gyro spinner additionally takes 1 x D battery.  The spinner is not active until a gyro or other object depresses the black piece.  R.O.B. should keep his hands on the gryo when in the spinner to avoid slowing down the spinning speed.  When you turn on R.O.B., you should notice one thing immediately, he is loud.  The next thing you will notice is that he is slow.  The spinner makes noise as well.  Playing either game as intended is a real challenge because you have to think several moves ahead so R.O.B. can catch up with you.  Once the novelty wore off, and it usually did pretty quickly, then R.O.B. typically got put back in the box or on the shelf.  Children would often ask their parents why they did not get them Super Mario Bros. instead.

The bundling of R.O.B. signaled a shift in Nintendo's strategy.  Nintendo's first attempt at bringing the Famicom to western markets, the Advanced Video System, failed to excite buyers when it was previewed at the 1984 Consumer Electronics Shows.  The AVS included the hardware of the Famicom with a built in keyboard, essentially the Family Computer Keyboard merged with the Famicom.  It also came with a westernized version of Family BASIC built in or bundled with it.  It also had a resdesigned version of the Family Computer Data Recorder and wireless gamepads, zapper and joystick.

Considering the video game crash taking place, Nintendo initially had a good thought to "computerize" its console.  However, the market for cheap home computers was dominated by the $300 Commodore 64.  Retailers were not impressed, perhaps because the Nintendo AVS had a few too many features in common with other failed home computers like the Coleco Adam and TI/99 4A.  (Cassette-based storage was seen as cheap in 1984).  Fortunately, the video game crash had eviscerated the home console market in North America, leading to opportunity in the lower end of the market.  Nintendo took a dual approach.  It went to lengths to distinguish its system from other systems by designing it to look like a Hi-Fi "Entertainment System."  However, it also marketed its product as a toy to toy stores.  Of course, it had to include a toy to make the pitch plausible, so R.O.B. was the "face" of Nintendo at first.

Ultimately, while video game histories may point to Nintendo's marketing of the NES as a toy rather than a video game console, I doubt any consumer was fooled into thinking that the NES was substantially different than the Atari and other systems.  The system used cartridges and hand-held controllers like its predecessors. The Famicom looked more like a toy than the NES, the NES looked like a electronic entertainment device.  Nintendo avoided using previous terms like console and cartridge and joystick, using Control Deck and Game Pak and Controller respectively.  Ultimately, it was the overall quality of the games that sold kids and their parents on the system, it was too expensive for a novelty toy.

Does R.O.B. have character?  Nintendo thought so, because it included him as a playable character in Super Smash Bros. for the 3DS and Wii U and gave him many cameo appearances before then.  Both color variations now have Amibos.  R.O.B. was released a year before a robot with a similar design appeared in in the film Short Circuit and twenty-three years before another similar robot was introduced in WALL-E.  These design successors demonstrate that R.O.B. does have character in and of himself.  He represents a 1980s version of an electronic toy, sleek lines and minimalist function.  Unlike earlier toys, he relies on micro computing technology instead of pure electro-mechanical functioning.  However, despite his empty, soulless eyes. he has a humanoid shape and makes natural noises.  Moreover, he does not suffer from the uncanny valley effect like another 1980s popular toy, Teddy Ruxpin.  So yes, I would conclude that R.O.B. has a good deal of character and deserved more games than he got.  If nothing else, he is always a conversation piece.

Thursday, December 25, 2014

Atari Joysticks on the PC : Four Historical Interfaces

The standard PC joystick was an analog design that uses potentiometers to vary the rate of a capacitor's charge.  Most console systems of the time used joysticks with pure digital switches.  Before console emulators became popular with PCs, there were some historical hardware that could implement a digital, Atari-style joystick.  This post will describe the methods used to implement them.

1.  Amstrad PC-1512 & 1640

The Amstrad PC-1512 and PC-1640 supported a digital joystick, with a port built into the keyboard.  The joystick directionals and fire buttons function just like keyboard keys, and send the following untranslated scancodes :

77 Fire 2
78 Fire 1
79 Right
7A Left
7B Down
7C Up

A program can read the raw scancode, but most typically use Int 16H to read a translated scancode.  The Amstrad translates the joystick directions into the XT compatible numberpad cursor scancodes.  Thus the joystick functions identically to the 2, 4, 6 & 8 keys on the numberpad, assuming the program is not trying to distinguish between the number pad cursor keys and the dedicated cursor keys with their raw scancodes.  The buttons are not defined by the BIOS and are ignored until an assignment is given to them by writing to the systems' non-volatile RAM.  As its name implies, this RAM will retain its contents even after the system is powered down.  This provides for maximum configurability, because games commonly use the Spacebar, Enter/Return or even F1 as a fire key.

Amstrad connects pins 1-4 and 6-8.  Pin 7 is normally unconnected on an Atari joystick, but Amstrad uses it as a second button.  Amstrad CPC JY2 and JY3 joysticks function properly with this pin arrangement.

2.  Covox Sound Master

The original Covox Sound Master has two DE-9 ports.  Having viewed closeups of the PCBs of the board, I can give a fair analysis of how the joysticks work.  The joystick lines for each joystick are connected to pullup resistors and then a 74HC365 line buffer, non-inverting.  From the solder side of the board, there are lines connecting pins 1-5 and 8 & 9 to these buffers.  Pin 9 is used on a Sega Master System controller as button 2, but it is unconnected on an Atari one-button controller.  However, pin 6, which is the only button on an Atari controller, is unconnected on the Covox's PCB.  Pin 5, which is unconnected on an Atari controller, is connected.  This leads me to believe that Covox either sold its own joysticks or, more likely, connected pins 5 & 6 on the component side of the board.  We cannot see underneath the plastic.

From the line buffers, the joystick inputs appear to be connected to the I/O pins of the AY8930.  The AY8930 contains a pair of 8-bit I/O ports that can be set to input or output.  The original SimCity has explicit support for Covox Sound Master Joysticks.  It sets the I/O ports to input and reads the values of the pins.  More information will have to wait until the project to clone the board has been completed.

3.  The FTL Sound Adapter

This device was a parallel port dongle that output sound in the manner of a Covox Speech Thing and had a DE-9 port on the end of it.  It was included in some releases of Dungeon Master for the IBM PC.  PCB and schematic for the device can be found here :

http://dmweb.free.fr/?q=node/1514

As you can see, each joystick input is connected to one of the five status port lines.  Four of those five inputs are also connected to a separate control port line.  Here are the connections :

1 Up     15  1 (Strobe - Error)
2 Down   13 14 (Select - Line Feed)
3 Left   12 17 (Paper Out - Select Printer)
4 Right  10    (Acknowledge)
5 NC
6 Fire   11 16 (Busy - Reset)
7 NC
8 Ground 18
9 NC

When a directional or button is pressed, a bit in the status port will flip to indicate that the direction has been pressed.  As you can see, you cannot use more than a one button joystick by this method.

The control port lines, which are not intended to function as input lines, are connected to allow Dungeon Master to detect the presence of the FTL Sound Adapter.  First, the game writes 0C to the control port and checks to see if bit 5 is a 0 on the status port.  Then it writes 04 to the control port and checks to see if bit 5 is a 1 on the status port.  If either check fails, the game will not allow the user to select the FTL Sound Adapter.  Now recall how the DB-25 parallel port connector is wired :

           Bit 7 6 5 4 3 2 1 0
Data Port    Pin 9 8 7 6 5 4 3 2
Status Port Pin 11 10 12 13 15 NC NC NC
Control Port Pin NC NC NC NC 17 16 14 1

underlined = inverted input or output from value written

0C = 0000 0011
04 = 0000 0100

Now, bit 5 of the status port is connected to bit 1 of the control port, which inverts.  If a 1 is written to bit 1 of the control port, then a 0 will appear at bit 5 of the status port.  Conversely, if a 0 is written to bit 1 of the control port, then a 1 will appear at bit 5 of the status port.

Dungeon Master will attempt this check for every parallel port address reported by the BIOS.  Once it has passed, then it will allow the user to select the FTL Sound Adapter and should allow the user to use the joystick plugged into the Sound Adapter.  The adapter cannot actually verify if a joystick is connected, however, unless it asks the user to move the joystick around and press the button.

The PC version of Dungeon Master that came with the FTL Sound Adapter shows an Atari joystick plugged into the back of the Adapter.  It says that the joystick port is the next best thing and the user can plug in any switch style joystick for easy game play.  (The computer in the photo looks like a Tandy 1000 TL, SL or SL/2).  However, the quick start guide only talks about analog joysticks and identifies the DE-9 port on the Sound Adapter as "Future expansion port".  The sound functionality is adequately described in the quick start guide, but because the joystick isn't specifically mentioned, I wonder whether the game actually supports a digital joystick.

If it does, then it would read the joystick in parallel, with a 0 value on each bit of the status port, except for bit 7, which would be a 1, indicating that a directional or button was pressed.

4.  The Dyna Blaster Adapter

The Dyna Blaster Adapter, on the other hand, is a truly working Atari parallel port joystick adapter.  Dyna Blaster, a.k.a. Bomberman in the U.S. and Japan, was released for DOS only in Europe.  Apparently it was a somewhat obscure release; it is not easy to find.

This adapter has two DE-9 ports and supports two Atari joysticks.  Uniquely for a PC game, the dongle functions as the copy protection.  The system requirements label on the box states that an Atari joystick is required, and without the joystick and the dongle you cannot make any selections on the main menu screen. Fortunately the dongle's function has been more or less reverse engineered.  (There is also a crack available for the game to use the keyboard at the menu).

When the game starts up, it calls a subroutine that writes FF to the data port and then checks to see if bit 6 of the status port is 0.  Then it writes 7F to the data port and then checks to see if bit 6 of the status port is 1.  This sequence then loops 20 times for each parallel port the BIOS reports.  In terms of bits, the patterns are

FF = 1111 1111
7F = 0111 1111

Therefore, data port bit 7 is connected to status port bit 6 because that is the only bit that is changing.

The second subroutine is called at the menu and when playing the game.  It writes the following values to the data port twice :

3E = 0011 1110
3D = 0011 1101
3B = 0011 1011
37 = 0011 0111
2F = 0010 1111

The first time this data is written, bit 5 of the status port is checked after each write, and if 0, then a directional bit is set in the program's memory.  The second time this data is written, bit 7 of the status port is checked after each write, and if 1, then a directional bit is set in the program's memory.  Obviously, this corresponds to the first and second joysticks.

The bit pattern for the five values above gives us the key as to how each joystick is wired.  The joystick is being read in a serial fashion.  Instead of the status lines being connected to each switch, instead the common line of each joystick is connected to a single status bit.  The low five bits of the data port are connected to the five switch lines of both joysticks.  The data lines send logical 1s to everything but the joystick switch being queried.  If the first joystick switch is pressed, a logical 0 will appear on status bit 5.  If a second joystick switch is pressed, a logical 1 will appear on status bit 7 (which is inverted at the parallel port adapter)..

One last necessary observation is that data bit 6 is always a logical 1.  I believe that this is to allow a pull-up resistor on status bit lines 5 & 7.  According to this page, 4.7K resistors should be sufficient as a pull up resistor : http://arcadecontrols.com/arcade_tormod.html  Otherwise, the program would have no way to determine whether a joystick switch has stopped being pressed.  As a consequence of the pull-up resistor, when the joystick switch is no longer pressed, then the line will settle back to a logical one 1.  Thus the FTL problem is solved.

While Bomberman does not use diagonals, what happens if a user pushes the stick in a way that closes two switches or pushes the button as he holds the joystick down?  As the adapter can only test one joystick switch at a time, there will be a 0 and 1 (or two 1s if the diagnonal is pressed) coming down the status line.  Fortunately, it is almost impossible to press two directionals and or the fire button exactly at the same time. The game, however, only cares about 0s on the first joystick port.  Each time it reads the port, it is only reading for one direction.  Presumably it will read the stick several times to make sure it finds the 0, if there is one.

Tuesday, November 18, 2014

Half of Me, Useless to Thee

Some vintage computing and gaming devices came with two interconnected components.  They came with two distinct physical elements that combined together to function.  Here I will give examples of what I mean :

Roland MPU-401 Units

The original Roland MPU-401 unit housed all its circuitry (microcontroller, RAM and firmware) in a metal box.  This box connected via a male  to male DB-25 cable to an interface card or cartridge for the computer in question.  The unit had DIN connectors for MIDI IN and OUT and was intended to connect to MIDI devices.  The interface card (MIF-IPC, MIF-IPC-A) was always a simple bit of circuitry to provide an input and an output port to the MPU-401.  Typically, when a Roland MPU-401 is marketed for sale, it will only come with the unit, and not an interface card.  While the circuitry in the unit handles all the intelligent MPU-401 commands, without an interface card, a PC has no way to connect to it.  Designing a prototype interface board is possible, but not necessarily something that just anybody can do.  Recently, there are clones available for the MIF-IPC-A, which is compatible with just about any PC with an ISA slot.  However, they are really pricey for a simple card with no custom chips.

You can purchase perfectly functional replicas of the interface board here : https://www.lo-tech.co.uk/

Roland MPU-IPC Line

Roland later released the MPU-IPC, MPU-IPC-T and MPU-IMC.  In this case, while there was a combo of an ISA card and an breakout box, this time all the circuitry was placed on the ISA card.  The breakout box contained just the physical MIDI ports and some passive components.  Usually, when these are advertised, only the breakout box is listed.  The box on its own is useless.  The card without the box also has no practical purpose unless you are trying to explore the MPU-401 as a programmer.  Fortunately, if you have the card, it is feasible to solder together a MIDI OUT port so you can connect your MT-32 or other MIDI device to it.  Even implementing a MIDI IN port is feasible with an opto-isolator.  The MPU-IPC-T's manual, freely available online, gives the schematic for both it and the MPU-IPC.

The Roland LAPC-I is not useless without its breakout box, the MCB-1.  The MCB-1 is useless without its card.  However, they were sold separately, whereas for the MPU-IPC packages, card and box came together.  The only thing you miss with an MCB-1 is the ability to connect external MIDI modules.  The same applies for the IBM Music Feature card and its breakout box, but in IBM's case, the card came with the box.  I have read that you can repurpose a common gameport-to-MIDI adapter to substitute for an MCB-1 because they both use a DA-15 connector.  This pinout would almost certainly work :

LAPC I DA-15 Connector
+5v - 8, 11
GND - 9, 11
MIDI IN - 14
MIDI OUT - 13

Sound Blaster DA-15 Connector
+5v - 1, 8, 9
GND - 4, 5
MIDI OUT - 12
MIDI IN - 15

Wireless Controllers : Atari Remote Control Wireless Joysticks to Nintendo GameCube WaveBird Controller

Each Atari Wireless Joystick has an antenna jutting out of it and, compared to a wired joystick, a huge base housing the RF circuitry and the battery compartment.  The receiver is a black box with a retractable metal antenna that plugs into the joystick ports of the 2600.  The 2600's power adapter plugs into the receiver, which then has a cable which channels the power to the console.  The range on these controllers was so poor that they were not worth the all the hassle.

Due to the unwieldy nature of Atari's RF solution, for the rest of the 1980s and 1990s, most controllers used Infrared Receiver Technology.  This is the same type of technology found in your cable remote.  Some controllers had an IR transmitter built into them, which did not add nearly as much weight and bulk (even with batteries) as the RF solutions did.  All required a receiver to be plugged into a controller port. Nintendo released a 4-player adapter called the NES Satellite.  The Satellite had a base where you could plug in four controllers.  It also had a receiver which plugged into both of the NES's controller ports.  Similarly, the SNES Super Scope also used a wireless IR receiver to determine the "gun's" position.

The WaveBird controller was the first modern wireless controller.  It used RF signals in the 900MHz and 2.4GHz bands and did not require an unobstructed line-of-sight like previous IR controllers.  The range was superior to IR controllers, supporting operation 20 feet from the console.  It no longer mattered where the player was in relation to the receiver or what was between him and the receiver (within reason).  The WaveBird was not substantially larger than the regular wired GameCube controller, unlike the Atari Wireless Joysticks.  Unfortunately, the receivers are really small and often times get lost and thus are not included with every WaveBird auction.  By the seventh generation, all wireless controllers used Bluetooth technology, with the transmitter/receiver located in the console.

Game Boy Player

The Nintendo Game Boy Player attaches to one of the ports underneath a Nintendo GameCube.  It allows you to play Game Boy, Game Boy Color and Game Boy Advance Cartridges on the GameCube and on a TV screen, similar to the Super Game Boy for the SNES.  However, while the Super Game Boy contained everything it needed to run inside its cartridge, the Game Boy Player includes a software disc.  This disc must be present in the GameCube and must load before you can use the Game Boy Player.  The Player screws into the underneath of the GameCube, but the mini-disc and its small case tended to get lost.  The GameCube's copy protection must be bypassed to use a backup of the software disc.  This is the only official way to play Game Boy Color or Game Boy Advance games on a TV screen.

However, you need not despair anymore if you have the Player and don't have a disc.  You can run Game Boy Interface, which can do even a better job than the real disc!   Start here : http://retrorgb.com/gameboyinterface.html

Games Designed for a Particular Peripheral : R.O.B.

(I am not going to go through every example of a game that works with only a certain peripheral, but a few special cases come to mind)

Nintendo released R.O.B., the Robotic Operating Buddy, with the NES Deluxe Set back in 1985.  R.O.B. came in this set with the pack-in game Gyromite.  R.O.B. was also released alone and without a pack-in game.  It is not uncommon to find loose R.O.B.s or Gyromite or even Stack-Up cartridges.  However, without the special accessories for each game, R.O.B. is useless.  Because the Gyromite accessories came with systems, they are more common than the Stack-Up accessories.  However, finding complete sets of accessories is also a hit or miss affair.  Gyromite has five pieces (two gyros, gyro holder, gyro spinner, controller stand) and Stack Up has ten (five blocks and five stands).

Games Designed for a Particular Peripheral : Miracle Piano Teaching System

The Miracle Piano Teaching System was a peripheral for the NES, SNES and Genesis, and also worked with the PC, Macintosh and Amiga systems.  The Miracle Piano was a 49-key MIDI keyboard and came with software either on cartridge or disk.  It is enormous as far as peripherals go.  It also came with a custom cable to plug into the console's controller port and a foot pedal.  On a PC, a pair of MIDI ports would work.  All sound would be generated by the keyboard's speakers.  The piano itself is the same regardless of the system it was intended for, only the software and cable differs from system to system.  Loose carts do appear as well as loose pianos, but the cables tend to get lost.  Pinouts for the cables can be found here : http://pianoeducation.org/pnompcab.html

Saturday, October 11, 2014

Three Flight Simulator Joysticks for DOS

I want to compare and contrast the three DOS-era joysticks I own suitable for DOS Flight Simulators, Racing Simulators and the like.

1.  CH Flightstick Pro

One of the first modern joysticks, this almost-completely ambidextrous joystick has four buttons, a 4-position hat switch, two trims and a throttle wheel.  The throttle wheel acts as the Y-axis of the second joystick.  The 4-position hat switch is implemented as button combinations.  Hat up is buttons 1,2 3 & 4, Hat down is buttons 1, 2 & 3, Hat right is buttons 1, 2 & 4 and Hat left is buttons 1 & 2.  Due to this, the individual buttons will not register simultaneous button presses.  Button 1 will have priority over buttons 2, 3 and 4, button 2 will have priority over buttons 3 and 4 and button 3 will have priority over button 4.


This joystick is by far the "loosest" of the three.  The stick offers little resistance and it seems you can move the stick much further than you would think.  With my joystick the trims frequently get dislodged, causing things to go haywire.  I put electrical tape over them to keep them in place.

To open the joystick, you must dislodge all four of the rubber feet around the edges to get at the screws.  This is annoying because you can scrape the sticky stuff holding the rubber feet to the bottom off.

The stick's design has been very popular over the years, and the basic design is still being sold today in a USB form.

2.  IBM 76H1571 Joystick

Despite IBM introducing the PC joystick interface in 1981, I believe this may be the only IBM-branded joystick released for the PC-compatible platform that is suitable to hold in your hand.  It was made for IBM by Anko Electronic Co., Ltd., and was branded for its Aptiva line of computers.  Its for right handed people only.


It has four buttons, a 4-position hat switch, two trims, a throttle wheel and a pair of two position switches.  This joystick is fully Thrustmaster Flight Control System compatible, where the hat switches represent resistance values of 0.2 (Up), 20 (Left), 40 (Right), 60 (Down), 82 (Center) kOhms on the Y-axis of the second joystick.

The left switch, when set to the right position, enables Thrustmaster compatibility.  When set to the left position, it disables the hat switch and allows the throttle wheel to function on the Y-axis of the second joystick.  It does not provide full CH Flightstick Pro compatibility because the HAT switch is disabled.

The right switch, when set to the left position, enables rapid fire action for button 1 only.  The right position is normal button operation.

Unlike the other two joysticks, it has suction cups on the base.  It also has steel weights screwed into the inside of the base to give it extra weight.  This stick has the stiffest feel and the travel distance feels short.  The screws for opening the stick are all completely visible.

As I do not own a true Thrustmaster joystick, I do not know how well the build quality or stick and button action compare to the real thing.  Even still, it fills a hole in my joystick collection.

3.  Microsoft Sidewinder 3D Pro

Microsoft's first joystick shows a transition between DOS-compatible hardware and Windows-feature hardware.  It is more-lefty friendly than the IBM stick, but despite its shape it is not truly ambidextrous.  It has four buttons and a hat switch on the stick, a throttle wheel and the stick can be twisted for a X-axis.  It has four buttons on the base and a mode switch on the bottom of the base with two positions.


The CH and IBM joysticks use traditional potentiometers to indicate stick movement and need the trim controls.  The Microsoft joystick uses optical sensors to determine stick movement and converts the data into an analog resistance value.  There is also a "digital" mode which allows for direct optical support, ultra precise input and the use of the four buttons on the base, but the driver must have explicit support for it with DOS.  The four extra buttons on the base of the stick also require specific driver support.  The Windows drivers should allow for full game support.  As far as I know, only Mechwarrior 2 for DOS supports the "digital" mode of this stick.  Descent does not and Descent 2 does only with its Windows version.

Unfortunately, this stick may only be compatible in its digital mode with Windows 95 or 98.  I have read that it can be tricky to get working in ME, 2000 or XP.  You may want to try and build a gamepad to USB converter.

The mode switch, when set to the 1 position, enables full CH Flightstick Pro compatibility.  When set to the 2 position, it enables full Thrustmaster FCS compatibility.  Due to the way the Hat switch works in these modes, the hat switch is only a four way switch.  (This also applies to the CH and IBM sticks).  The twisting function is recognized in either mode, so it will register as input on the 2nd joystick's x-axis.

There is one notable flaw in the design, the throttle control.  The throttle control rubs plastic against plastic and is particularly open to attracting dust and debris through the slot.  There is grease that will need to be cleaned out and replaced.  My stick's throttle control is very stiff, some lubricant can help.

The lack of trims is both a blessing and a curse.  The blessing is that your joysticks will not drift because the trims get adjusted.  The curse is that you may not be able to get a perfect center for your game.  Depending on how sensitive your game is, it may throw you the game's calibration off.

To open the stick requires not only removing the feet on the "tips" of the joystick but also a screw covered by the Microsoft label on the bottom.  There are weights on each side of the stick for balance.  One optical sensor handles all four joystick axes.

One thing to note is that this stick's DA-15 connector does not have all the pins on it.  Pins 5, 8, 9, 12 and 15 are not  supposed to be present on the connector.  If you see a stick for sale with these pins missing, do not let it faze you.

The Microsoft default drivers for this stick in Windows are very speed sensitive.  This stick was released during the Pentium era, but apparently the designers did not future proof their drivers because the stick will go haywire with a Pentium III.  This is despite the optical encoders having the precision of a mouse.  Fortunately there are custom drivers that will allow you to get an adjustable speed setting, to a point.

Saturday, March 8, 2014

Joystick Problems with DOS and Approaches to the Problem

IBM's Game Control Adapter was designed as something of an afterthought, a simple to use expansion card (for a programmer) as a way to provide for connecting a low-priority input device.  It sat at port 201, supported four digital inputs, intended for buttons and four analog inputs, intended for paddles or joystick axes.

When it was released as one of the original expansion cards for the new IBM PC, it was perfectly adequate for the time.  The Apple II joystick port operated in the same way but only supported three buttons.  The Tandy Color Computer also supported four analog axes and four buttons, and its joysticks were later used in the mostly-PC compatible Tandy 1000 line.  The Commodore VIC-20 only supported one Atari-style joystick or two Atari-style paddles.  Only the Atari 400 and 800, with their four joystick ports, supported more game inputs.

In IBM's design, a joystick is a pair of potentiometers which are turned by moving the joystick.  Each three-terminal, 100 kOhm potentiometer is connected through the joystick cable to a +5v line and a capacitor on the game control adapter.  This capacitor is tied to an input on the NE558 Timer IC.  The Timer compares the capacitance on its input with a reference capacitance, and outputs a 1 when the capacitance is not equal and a 0 when the capacitance is equal.  The resistance value from the potentiometer determines how quickly the capacitor on the input will be charged.  If the capacitor is turned to a lower resistance, the capacitor charges more quickly, and if turned to a higher resistance, the capacitor charges more slowly.

When the programmer wants to read the joystick position, he writes to port 201.  This discharges the capacitors.  Then the programmer reads and reads port 201 until there is a 1 for the axis he is trying to measure.  The time taken for the value to become a 0 represents the position of the joystick.  Many games have joystick calibration prompts requiring the player to move his stick to its maximum positions and its center to obtain the timing required to properly calibrate the stick.

Eventually the limits of the design began to emerge.  The first was that the joystick had to be read several times to get an accurate measurement of the stick's position.  This took a substantial portion of a 4.77MHz  8088 CPU's time.  However, when there was only one CPU and one speed used in PC and compatibles, this was just an inconvenience, because the timing would be equivalent on all machines.  For many simpler games, which relied on digital controls, fine measurement of the joystick axes was not an issue.  However, when faster CPUs and clock speed began to emerge, joystick routines would consequently run faster.  Thus routines would take 20% of the CPU's time an 8088 may only take 10% or less of the CPU's time on the more efficient 286.  When CPU speeds began increasing to 6MHz, 8MHz and beyond, routines that were designed for the IBM PC would complete themselves far too quickly to get an accurate read of the joystick.

A second issue with the inherent accuracy of the components used to determine the joystick's position. Linear potentiometers such as used in the PC are not known for their rigorous accuracy.  While the adjustment dials on each axis can help, they can shift or loosen over time.  Moreover, the housings containing the resistive element and wiper are not hermetically sealed or anything close to it.  Dust and dirt and oils over time can seep in and cause jittery or inaccurate reads.  Wear on the resistive element can make it harder for the stick to give an accurate resistance.

IBM gave a formula to measure the time the stick would take to charge the capacitor at any given resistance (0-100).  When it released the IBM PC AT, with its 6MHz 80286 CPU, it introduced Int 15, subfunction 84 to give a BIOS routine to read the joystick.  Unfortunately, the clone PC makers had already spent substantial time and money cloning the original IBM PC BIOS, and this new BIOS call did not necessarily make it into every clone.  Tandy 1000s do not support it.  The advantage of the function was to give reliable reads because the routine was tied to the processor and speed(s) which the system board was designed to run.

Other companies tried to offer solutions to these problems.  Tandy 1000 joysticks used the design from the Tandy Color Computer.  Instead of using the potentiometers as variable resistors, Tandy uses them as voltage dividers by connecting the third terminal to ground.  Inside the machine, the voltage is compared to a voltage ramp which, when port 201 is written to, is charged from 0v to +5v in a set period of time.  When the voltage ramp is greater than the voltage from the joystick, a 0 is reported.  This method has been said to give more precise and less jittery results than the timer-resistance method used on a true PC.

The Amstrad PC-1512 gave a unique solution to the joystick problem.  It supported one Atari-style digital joystick with two buttons.  This joystick plugged into the keyboard.  The directionals and buttons for the joystick were assigned to unique keyboard scancodes 7C-77.  However, when reported by the BIOS, pressing the directionals would give scancodes assigned to the cursor keys on the numeric keypad.  Since many, many games used the keypad cursor control keys for movement, this was a highly compatible way to implement digital input.  It would not work if the program read directly from the keyboard input port instead of the BIOS unless the program was Amstrad-aware.  The two joystick buttons could be assigned to represent any key through the use of a program which would write to the Amstrad's non-volatile RAM.  This memory would retain the buttons' settings until the next time the buttons' settings were changed.

When the Sound Blaster came along, it implemented a standard joystick port.  Until the Sound Blaster 16, the port did not change.  In the Sound Blaster 16, the old DIP-style NE558 timer was replaced with surface mounted components, which presumably have lower latencies which work better with faster processors. The Gravis Ultrasound implemented a hardware version of a speed adjustable gameport, and came with a program to adjust the sensitivity of the gameport without the use of an external dial or jumper.

Other companies made speed-adjustable gameports.  In these gameports, a dial would be routed outside the computer to adjust the speed of the gameport.  In the Thrustmaster ACM Game Card, the dial was a potentiometer which would adjust the resistance going to the reference capacitor.  The ACM Game Card had a second joystick interface at port 209, requiring a second NE558.  The dial controls the resistance for both reference capacitors.

The Gravis Gamepad was very popular in the early 90s because it provided four buttons and a NES-style D-pad.  However, inside the Gravis Gamepad were transistors to convert the digital values of a D-pad into the analog resistance values expected by the PC gameport.  Essentially pressing one side of the pad would give the maximum resistance value of the axis, the other side would give the minimum resistance value and not pressing the pad would give the middle of the resistance value.

Later joysticks, like the Gravis Gamepad Pro and the Microsoft Sidewinder gamepads would give options for truly digital controller with more than four buttons.  These sticks would use the gameport to send binary codes to the program.  The downside is that a DOS program had to have specific support for the gamepad, or the digital functionality of the gamepad would only work in Windows 95 with a driver.

Another late innovation was to take inspiration from computer ball mice.  Computer mice and trackballs use optical rotary encoders to track movement, just like the dials on most arcade machines, the Atari driving controller and the N64 thumbstick.  Reading from the encoders is much more reliable than the timer-potentiometer method and not prone to speed sensitive issues or the same kind of wear.  The Microsoft Sidewinder 3D Pro had this function and many buttons, but unless a DOS program understood it, it had to emulate the analog potentiometer method

Once IBM ceded leadership of the PC market, no other company came up with a standardized digital gameport solution.  Eventually, USB input devices of all kinds, gamepads, joysticks, driving wheels, rudder pedals, throttles, yokes put all the speed issues to software.  However, USB really didn't catch on until Windows 98, so for almost twenty years game players had to deal with the analog gameport.

Wednesday, January 16, 2013

The Industry Standard Atari-Style Joystick

In 1977, Atari released its Video Computer System (VCS), which later became known as the Atari 2600.  Its was the third programmable home video game system, following the Fairchild Video Entertainment System, later restyled the Fairchild Channel F, and the RCA Studio II.    It was the first system with a detachable game/joystick ports.  It used 2 DE-9 screwless male joystick ports at the back of the system.  These ports were double-duty ports, they supported either one joystick or a pair of paddles.  Because this was the first implementation for digital joysticks and worked simply, other manufacturers also used the design, sometimes adding to it.

Joystick

The Atari 2600 CX-40 Joystick is a box with a stick in the middle and a fire button on it.  The stick provides directionals and sits on top of four switches, Up, Down, Left and Right.  The button also sits on top of a switch.  When the stick is in the center, no contact is made with any of the directional switches.  The button rests on a spring and only makes contact with its switch when pressed.  When a directional or the button is pressed, a circuit is completed with the common or ground line and the button or directional line.  The console can then determine which switches were pressed by reading a particular memory location.   These are strictly digital controllers.  Diagonals can be represented by two closed directional switches.  The canonical pinout is here :

1 2 3 4 5
 6 7 8 9

1 - Up
2 - Down
3 - Left
4 - Right
5 - Not Connected
6 - Button
7 - Not Connected
8 - Common Ground
9 - Not Connected

This joystick pinout is explicitly followed on the Atari 2600, all Atari 8-bit Computers, the Commodore VIC-20, 64 & 128.

Paddles

The Atari 2600 CX-30 Paddle Controllers are a pair of boxes with a dial knob and a button on each.  The paddles are attached via a Y-type connector to a common DE-9 female connector.  Each dial sits on the stem of a 1000kOhm (1mOhm)  potentiometer.  On the side is a pushbutton with a spring to keep the switch from always making contact.  The potentiometer is supplied with +5v and provides a resistance value in a resistor-capacitor network.  For this reason, these are also called analog controllers.  The system can tell the position of each knob by measuring the time it takes for a capacitor to charge and discharge.  The more resistance, the long the capacitor takes to charge, and vice versa.  Each pushbutton is a switch which connects the ground line when pressed, functioning in the same way as the Left or Right directional on a joystick to the console.  The pinout is as follows :

1 2 3 4 5
 6 7 8 9

1 - Not Connected
2 - Not Connected
3 - Paddle 1 Button
4 - Paddle 2 Button
5 - Paddle 2 Potentiometer Output
6 - Not Connected
7 - Common +5v
8 - Common Ground
9 - Paddle 1 Potentiometer Output

This paddle pinout is explicitly followed on the Atari 2600, all Atari 8-bit Computers, the Commodore VIC-20, 64 & 128.  However, Commodore paddles use 470kOhm potentiometers.

Fairchild Channel F System II Hand-Controllers

The original Fairchild console had two hard-wired hand controllers, but the System II uses DE-9 connectors at the console for the hand controllers.  The Hand-Controllers were unique control devices, with a hand grip and a triangular knob on the top.  This knob could be pushed in any of the four directions like a joystick, pushed down and pulled up for the equivalent of buttons and twisted to one side or the other like a paddle.  However, this device is a strictly digital controller, even with the twisting and push/pulling motions.  Thus, except for the twisting, more conventional controllers can easily be adapted for the System II.  This also demonstrates the limit of the DE-9, for without multiplexing only eight digital inputs from a joystick are possible.

1 - Twist Left
2 - Twist Right
3 - Pull Up
4 - Push Down
5 - Right
6 - Up
7 - Down
8 - Left
9 - Ground

Magnavox Odyssey²

The early consoles had two hardwired controllers, in the later consoles they were detachable.  The two ports support digital joysticks, and they function the same, but the wiring is different :

1 - Common Ground
2 - Button
3 - Left
4 - Down
5 - Right
6 - Up
7 - Not Connected
8 - Not Connected
9 - Not Connected

Coleco Colecovision

Two ports, but each controller has one button on each side and a 12-button numberpad.  When in joystick mode, the functionality is identical to the Atari joystick, and the left button is used.  When in numberpad mode, the number keys and the right button can be used.  The inputs function as a matrix for the numberpad. Pin 5, +5v/Ground, from the console selects the mode which it will use.  A Colecovision game can therefore use Atari joystick if it does not require the numberpad functionality.

Texas Instruments TI/99 4A

The TI/99 4A uses one DE-9 connector to support two digital joysticks.  There are two separate ground lines on this connector, one for each controller.  In addition to a Y-adapter, the pinout is non-standard :

1 - Not Connected
2 - Joystick 2 Ground
3 - Up
4 - Button
5 - Left
6 - Not Connected
7 - Joystick 1 Ground
8 - Down
9 - Right

Atari 7800

Two ports, supporting joysticks or paddles.  In 7800 games, Pin 6 registers the Right button and Pin 9 the Left button.  Pin 7 must provide +5v for the 7800 controller to work correctly.  If a 2600 style controller is connected, its button will register both buttons to a 7800 game.  This system was officially released with a stick controller (Proline) in the U.S. or a gamepad in Europe.

Sega Master System

Two ports, the Master System uses a D-pad style gamepad controller like the NES, but pad is more of a square shape.  Two buttons on each controller.  Functions identically to the Atari 2600 joystick but uses pin 9 for the second button.  Although Sega Genesis controllers are easier to find, these are almost certainly the most compatible gamepad style controllers for the older systems, and they do not have a chip inside them.

Atari ST

All Atari ST and STe systems support two joystick ports, calling the two ports Port 0 and Port 1.  Port 0 supports either a joystick or mouse, while Port 1 is strictly for joysticks.  With a Joystick, only the strict Atari Joystick functionality is officially supported.  However, the Left Mouse button corresponds to Button 1, so it is not beyond reason that a controller like the Master's System's could be seen as the Right Mouse button, as Pin 9 is used for it.  Atari STe machines also have two HD-15 ports which Atari Jaguar controllers can plug into.

Commodore Amiga

The Amiga has two joystick/mouse ports.  It can support two mice, two joysticks, or one of each.  The joysticks support a second button on pin 9 like the Sega Master System and Atari 7800, but this was kind of unofficial as Commodore's official sticks (designed for their 8-bit machines) only had one button.  Some games do support two button joysticks.  Button 1 and 2 use the same pins as the Left and Right mouse buttons.

Sega Genesis/Mega Drive

The ordinary crescent shaped gamepad has a circular shaped D-pad and four buttons.

Pin 1 - Up
Pin 2 - Down
Pin 3 - Left/Ground
Pin 4 - Right/Ground
Pin 5 - +5v
Pin 6 - Button B/ButtonA
Pin 7 - Ground/+5v*
Pin 8 - Ground
Pin 9 - Button C/Start

Pin 7 activates a multiplexer chip inside the gamepad to enable the pad to support more than eight inputs.  The input before the / is when Pin 7 is ground and after the / is the input when Pin 7 is +5v.  It was designed for future expansion, as the standard pad only provides eight inputs.  These pads work on the Master System, (Button B = Button 1, Button C = Button 2), except for certain games.  They also work on earlier machines which support strict Atari-style joysticks.  If you wire pin 7 permanently to ground, you should be able to fix any incompatibilities with SMS games.

On the six-button controller, Pins 1, 2 & 3 also correspond to Buttons Z, Y & X.  I am uncertain how well a six button controller works with older systems.

Amstrad PC-1512/1640, CPC 6128

Only one port in Amstrad's machines.  Two buttons are supported, with Pin 7 given to the second button.

The original Covox Sound Master PC sound card supported a pair of DE-9 for Atari-style joysticks, it is unknown whether they support a second button.

Sinclair ZX Spectrum

The Spectrum had no joystick ports built-in, but one or two could be added through the expansion connector.  There were several popular yet software incompatible interfaces on the market, including the Kempston (most popular), the ZX Interface 2, the Protek and other Cursor interfaces and the Fuller Audio Box.  Spectrum and Fuller support two ports, the rest support one port.  Wiring is standard.

Sinclair ZX Spectrum +2/+3

Two joystick ports, but pin wiring is completely different :

Pin 1 - Not Connected
Pin 2 - Ground
Pin 3 - Not Connected
Pin 4 - Button
Pin 5 - Up
Pin 6 - Right
Pin 7 - Left
Pin 8 - Ground
Pin 9 - Down

MSX, Sharp X68000

Almost identical to the Atari standard, except supports button 2 on pin 7 and the ground is on pin 9.  Pin 8 functions as an output pin from the computer.  

FM Towns/Marty

Completely different pin arrangement.  Supports four buttons : Button 1, Button 2, Run and Start.  Diodes are used to make Start the equivalent of pressing Up and Down at the same time and Run is the equivalent of pressing Left and Right at the same time.  

Pin 1 - Not Connected
Pin 2 - Right
Pin 3 - Left
Pin 4 - Down
Pin 5 - Up
Pin 6 - Ground
Pin 7 - Not Connected
Pin 8 - Button 2
Pin 9 - Button 1

Covox Sound Master

This was an early IBM PC compatible sound card that never caught on and was only supported in a handful of PC games.  It does have two DE-9 ports that are supposedly Atari-compatible, which do not function anything like a typical PC joystick.

Apple IIe, Enhanced //e, //c, //c+, //gs

Not compatible with digital joysticks, but has many similarities with paddles when connected.  One female port on back of computer.  Also shared with mouse on the //c & //c+.  150kOhm potentiometers are used.  Button 3 is almost never used, and even though four analog inputs are supported only one pair of paddles are intended to be connected at a time.  Apple paddles are hard to find.  A two-button analog joystick was the more common device connected.

Pin 1 - Button 2
Pin 2 - +5v
Pin 3 - Ground
Pin 4 - Paddle Input 3
Pin 5 - Paddle Input 1
Pin 6 - Button 3
Pin 7 - Button 1
Pin 8 - Paddle Input 2
Pin 9 - Paddle Input 4

Incompatible DE-9 Joysticks

The 3D0 may use a DE-9 gamepad, but it uses a serial interface with a Data and a Clock line. Ditto for Famiclones and NESclones.  The Milton Bradley Vectrex has an analog stick with four pushbuttons, but the analog stick functions as a voltage divider and thus is not quite compatible with the Atari-style analog paddles.  The Mattel Intellivision II had detachable DE-9 ports, but that controller uses an 8-bit binary code to signal the state of the 16-position disc, 12-button numberpad and 3 buttons.