Showing posts with label Atari. Show all posts
Showing posts with label Atari. Show all posts

Sunday, March 22, 2015

The Forgotten Switch : The Atari 2600's B&W/Color Switch

The original Atari 2600 VCS had six switches to control the various game functions, Power On/Off, B&W/Color, Left Difficulty, Right Difficulty, Game Select and Game Reset.   In the early models of the console, there were six aluminum switches, symmetrically spaced on either side of the cartridge slot, three on the left, three on the right.  Later, Atari redesigned the console to reduce costs and put the left and right difficulty switches on the back of the console and used standard plastic switches instead of aluminum.  Even with this change, there were still two switches to the left of the cartridge slot and two to the right.  This continued into the Atari 2600jr, except that all the chrome switches had been replaced with plastic.  Nonetheless, the symmetry of the Atari 2600 is an aesthetic that has been seldom been so rigorously pursued in a console's design throughout its lifespan.

Atari 2600 Light Six Switch
The standard Atari joystick only had one button and the cartridges were too small at first for title screens, menus and logos.  Changing settings were done by these switches and the program reading the appropriate port.  Only the Power On/Off switch had a fixed function, it was connected directly to the electrical path that powered the console.  The other five switches were each connected to a bit on an I/O port.  The game could do whatever it wanted with them, but by convention the Game Select and Game Reset switches usually did just as they indicated.  While Left and Right difficulty were originally intended to set a handicap for one or both players, human or computer, they could just as easily be used to adjust game characteristics.

Atari 2600 Woodgrain Four Switch
The Black and White switch is the focus on this blog entry.  It is just as important as the other switches, yet too frequently overlooked and left off modern products.  The original intent of this switch was to alter the game to switch its colors when the switch was set to the B&W position.  The player should set it if playing on a B&W TV to improve contrast between the player/missile/ball graphics and the playfield/background.  The Atari 2600 had sixteen choices of colors or hues and eight levels of brightness or luminances.  Typically, when the B&W side of the switch was activated, the program would switch to using the eight monochrome shades offered by the 2600.  Sometimes, it would use more muted colors.  On a Color TV, the B&W choices would come very close to simulating what the image would like on a true B&W TV.  Here are two examples to show when this would be useful :

Combat - Color Switch
Combat - Color Switch on Simulated B&W TV
Combat - B&W Switch
Air-Sea Battle - Color Switch
Air-Sea Battle - Color Switch on Simulated B&W TV
Air-Sea Battle - B&W Switch
However, it is very important to remember that a B&W TV was often the second TV in American households in the late 1970s and early 1980s.  If the parents did not want the kids to hog the main TV with video games, they would hook the system up to a second TV.  Few U.S. TVs had two color TVs during this time frame.  Many kids grew up playing video games on B&W TVs, it is a very important part of retro gaming that too often overlooked.

From 1977 until 1982, most Atari and then Activision (made up of ex-Atari programmers) games used the B&W/Color Switch as originally intended.  In fact, until Atari's silver label cartridges and Activision's special label cartridges, it is easier to compile a list of games that did not use the B&W/Color switch as originally intended.  They are as follows :

Atari/Activision Games that Do Not Support B&W

Atari
3-D Tic-Tac-Toe
Asteroids
Superman
Backgammon
Demons to Diamonds
Super Breakout
Yar's Revenge

Activision
Activision Decathlon
Crackpots
Dolphin
Enduro
Frostbite
Keystone Capers
Oink
Plaque Attack
Pressure Cooker
Robot Tank
Spider Fighter

When it comes to Atari Silver, Children's or Red labels or Activision's Special labels, unless the game was previously released as a text or picture label, it will almost certainly not use the B&W/Color switch as intended.  In addition, relatively few third party games released during the 2600's official lifespan use it.  There are some exceptions, and this is not intended to be a complete list but for illustrative purposes :

Other Companies that Support B&W as Originally Intended

Alien
Star Wars ESB
Bank Heist
Dragonstomper
Frogger
Music Machine
Star Voyager
Seamonster
Space Tunnel
Realsports Volleyball
M.A.S.H.
Malagai
Mega Force
Worm War I
Crash Dive
Revenge of the Beeksteak Tomatoes
Joust

Finally, there are several games that use the B&W switch for a special function unrelated to its original intent. Often it could be used to pause the game, but other games assigned a unique function to it.  Here is a list of games that I have verified :

B&W Switch used for Something Else

Space Shuttle (engine controls)
Cosmic Ark (turn on/off star field on some cartridges)
Fantastic Voyage (pause)
Solaris (inverts planet horizons)
Mouse Trap (removes playfield)
Starmaster (brings up Galactic Chart)
Beany Bopper (pause)
Flash Gordon (pause)
Spacemaster X-7 (pause)
Secret Quest (brings up Status Screen and password)

There are undoubtedly more games than on this list, but it serves as an illustrative example of why the B&W/Color switch should not be utterly ignored.  Devices like the Atari Flashbacks which do not include the B&W/Color switch will not function as originally intended with these games.  

Activision Logo

On a totally unrelated Atari 2600 subject, it is interesting to note how consistent Activision was with its in-game logo.  Activision always displayed its logo "Activision" on the game screen for every game.  In its early games like Fishing Derby, the logo would simply be present somewhere on the bottom of the screen.  For the later games, like Pitfall, the text Copyright 198x would appear, then the Copyright text would scroll up and Activision would appear. On games released near the crash, there would be a rainbow leading into the A in Activision.  The A itself was redesigned, otherwise the logo pixel pattern seems identical :

Scrolling Logo 1982-1983
Scrolling Rainbow Logo 1983-1984
Beamrider is the only game where the Activision logo is not always seen during gameplay from the pre-crash era.   Beamrider was the first game to use the (c) character instead of the word Copyright.  It is also the last time the rainbow version of the Activision logo would be used.  Ghostbusters is unique in that it does not have the word Activision is not using the standard appearance.   After Ghostbusters, the (c) and year would be instantly replaced with the non-rainbow Activision logo, no scrolling.  Also, if the game was licensed from another company, that company's name would appear after Activision's.  

Saturday, January 10, 2015

A Harmonious Relationship - The Harmony Cartridge for the Atari 2600
























The earliest Atari 2600 cartridge that could load games was the Cuttle Cart.  This used the Starpath Super Charger method to load games by converting the binary file into an audio signal which the Cuttle Cart would receive and load into its 64KB of RAM.  It was very impressive for its time because it could run virtually the entire 2600 library.  However, it was slow, every file had to be converted, only one game could be stored in its RAM at a time and the audio connection was not always reliable.  (There was a utility to convert binary files on the fly, and when I onwed one I rarely had an issue when a game was corrupted.)  Next came the Krokodile Cart, which supported serial transfers and a menu but was not as compatible with as many games.  It did come with 512KB of Flash to load games and 32KB of RAM for games that required it.

This Christmas I was extremely fortunate to acquire an Atari 2600 Harmony Cartridge.  The Harmony Cartridge is a flash cart that can load games off SD cards (SD Version) or microSD cards (microSD Version).  It will work with just about any Atari 2600 game ROM in existence.  The Harmony supports SD and microSD cards up to 32GB in size, and has 32KB of Flash and 8KB of RAM for games.

When the Harmony boots, you will see a Ying/Yang symbol for a second, then go to a menu.  The Harmony supports folders and can display ten files or folders on a page and twenty four characters of a file or folder name.  It has a page number to help keep your place in directories.  It will not automatically sort files and folders alphabetically, use a Windows program like Drive Sort for that.  You may wish to truncate file names for a more refined cosmetic experience and make a note if they require a controller other than a joystick.  I place the games that require Paddles in separate directories.

When you select a game, you will see the Ying/Yang logo for a second or three as the game is burnt to the Flash, but it is very quick.  Then the game will start as if you had the original cartridge in the slot.  And this cartridge will play anything ever released during the 2600's lifespan (with one exception, see below) and most homebrews and reproductions (provided you can find a good dump of the ROM).

The price of $60 is so reasonable I wonder how any money is being made off these carts, and unlike some other flash carts, they are readily available for purchase.  Even collectors can take advantage of the Harmony.  If you collect games with boxes, you can keep the original cartridge in its box and use the Harmony to play a game.  A 32MB SD or microSD card can easily fit every ROM ever made for the 2600, but you can use far larger cards.  If you buy a 2600 at a garage sale or on Craigslist just to play games, save the money you would have had to spend on cartridges and just buy this instead.

The Harmony Cart can be navigated with a joystick, paddle or driving controller.  This is slightly annoying for the few games that principally use the Keyboard or Kid's Controllers because you will have to plug in a joystick to select the game and then replace it with the Keyboard or Kid's Controller.  It also works with Sega Genesis gamepads, but you should hold the B button when you turn the power on so it is properly detected.

BIOS updates used to be accomplished with a miniUSB cable and software available for Windows, Mac and Linux.  The software will load an updated BIOS, downloaded from AtariAge, to the cart.  The BIOS, v1.5, was last officially updated in 2010.  However, as of v1.5, the USB method is no longer required, you can update the BIOS just by selecting it in the menu.  There is a v1.6 beta BIOS available. 

At least 80% of all Atari 2600 games ever made were released in 2KB or 4KB cartridges with nothing special inside them.  Many later games use extra hardware to add bankswitching to get around the 4KB cartridge ROM limitation and memory to the paltry 128 bytes inside the 2600.  Anything known to require no more than 32KB of ROM is supported.  Here is a list of the bankswitching schemes each cartridge supports :

Cuttle Krokodile Harmony
2K 2K 2K
CV (2K ROM + 1KB RAM) CV (2K ROM + 1KB RAM) CV (2K ROM + 1KB RAM)
4K 4K 4K
F8 (8KB) F8 (8KB) F8 (8KB)
F8S (8KB with 128B SARA Super Chip RAM) F8S (8KB with 128B SARA Super Chip RAM) F8S (8KB with 128B SARA Super Chip RAM)
F6 (16KB) F6 (16KB) F6 (16KB)
F6S (16KB with 128B SARA Super Chip RAM) F6S (16KB with 128B SARA Super Chip RAM) F6S (16KB with 128B SARA Super Chip RAM)
F4 (32KB) F4 (32KB) F4 (32KB)
F4S (32KB with 128B SARA Super Chip RAM) F4S (32KB with 128B SARA Super Chip RAM) F4S (32KB with 128B SARA Super Chip RAM)
FA (12KB with 256B RAM+ RAM) FA (12KB with 256B RAM+ RAM) FA (12KB with 256B RAM+ RAM)
E0 (8KB)
E0 (8KB)
E7 (up to 16KB of ROM with or without 2KB of RAM)
E7 (up to 16KB of ROM with or without 2KB of RAM)
FE (8KB)
FE
3F (up to 64KB) 3F (up to 512KB ROM and 32KB RAM) 3F (up to 32KB ROM and 4KB RAM)
F0 (Megaboy 64KB)

Starpath Supercharger (direct load from audio file)
AR Starpath Supercharger (binary conversion)

UA (8KB) UA (8KB)

EF (64KB)


DPC (Pitfall 2)


0840 Econobanking


Custom (DPC+, Star Castle, Chetiry)

One important original game that the Harmony cart supports it Pitfall 2, which used a complex bankswitching chip that allowed for more complex sound and was not emulated in the earlier flash carts.  For this and the sheer number of bankswitching schemes supported, and the ease of putting games on the cart and the number of games you can have on the cartridge, the Harmony cart has essentially made the older carts almost completely obsolete.  The Harmony's firmware can be reprogrammed to support new bankswitching schemes.  

In 2014, the maker of Harmony Cartridge, batari, released an updated model of the cartridge known as the Harmony Encore.  The Encore can support games with a chip that can be configured as 512KB of ROM, RAM or any power of two combination.  It costs $25 more, but the number of additional games it can play is severely limited at the moment.  It adds support for the F0 Megaboy 64KB cartridge, the only cartridge released during the 2600's lifespan that reached 64KB in size.  However, the Encore makes the serial-port based Krokodile cartridge totally obsolete.

The Harmony Encore can play several advanced homebrew games and demos, such as Boulderdash (3E, demos only, full game ROM not released) and Stella's Stocking (X07, ROM not released) and Zippy the Porcupine (demo only, full game ROM not released) homebrews.  It also supports new bankswitching schemes, EF (64KB), DF (128KB) and BF (256KB), all with or without a 128B SARA chip.  However, in my opinion there is precious little software for it to be worth the extra $$.  In a year or two, my opinion may change.  Moreover, you can upgrade your Harmony to a Harmony Encore for $25 by sending it back.  

In conclusion, should you buy a Harmony Cartridge?  If you want to play 2600 games on real hardware and don't want to go through the hassle of tracking them down, then absolutely.  

Sunday, December 28, 2014

Atari 2600 - Just How Many Games?

The Atari 2600 was the most successful of all the pre-crash consoles, but unfortunately its game library is somewhat inflated.  The 2600, even though it games were sold for it in North America from 1977-1990, , had far fewer games than the NES, with games available from 1985-1995.  However, the number of unique NES games available in North America, licensed and unlicensed, reached 750.  Unique for the NES means no cartridge label variations, re-releases prototypes, contest only-games or multi-cartridges where single carts exist.  Atari 2600 games only approached 400, but often numbers of 600-700 games are quoted in places around the internet.

Atari itself bears much of the blame here.  It marketed its console as the Atari Video Computer System (VCS) and later as the Atari 2600.  In Sears' department stores the console was called the Sears Video Arcade, and while the label covering the switches may have been different, underneath they were exactly the same system as the Atari-branded system being sold in non-Sears stores.

Similarly, Atari allowed Sears to sell Atari's cartridges under the Sears Tele-games label.  Thus each game would have two releases, and the names would not be the same but the ROMs would be identical.  Thus the game Atari called Breakout, Sears called Breakaway IV, Circus Atari was shortened to Circus, and Outlaw became Gunslinger.  Sears' actual contribution are three games Atari never released under its own label.

In addition to the Sears license, Atari kept most of its early titles in circulation with corresponding differences in labels.  Space Invaders has a text, picture, silver and red label, but it should always be counted as one game.  Sometimes games would be renamed, as Hunt & Score was renamed to A Game of Concentration and also released by Sears as Memory Match.  Finally, Atari did release games in its Red Label era originally published by rivals in the pre-crash era such as Coleco's Donkey Kong & Donkey Kong Jr.

Pepsi Invaders and Atlantis II are variations on the originals and were provided only to a select few, so I consider them as to prototypes, and they should not be counted in an official list of a system's games.  However, there are several other extremely rare games like CommaVid's Video Life, only available to people who purchased the MagiCard.  Essentially it would have been purchased only by the few of the few. And then there were games like Birthday Mania, sold only in a limited geographic area and so rare that the ROM has not been dumped.  Unlike Pepsi Invaders and Atlantis II, they are not hacks of existing games, so they are included.  While there are several games that are very rare, they were at least available to the general public, usually only via mail order.  However, even if included, the final number would not significantly change.

Two issues with a list of North American Atari games is that games only released in PAL territories must be weeded out.  Prototypes and reproductions should also be filtered out.  The final number is focused on games released during the console's lifespan, so homebrew games are not counted.  What games were released in North America is mostly well-known, but when you go to the many European countries, South America and Taiwan, the titles really start to become difficult to manage.  If pirate cartridges are considered, the PAL territories probably had more games released than the U.S. and Canada, where relatively little piracy occurred.

Finally, games released by pirate labels, which frequently only rename the game, should also be left out unless that has been confirmed as the only a game found a North American release.  Thus most, but not all, releases by Zellers should not be counted.  Cartridges that are not games like diagnostic carts, copy carts, rewritable cartridges.  Nor are the Gameline Master Module or the Starpath Supercharger counted, but the former allowed exclusive access to Save the Whales (included under 20th Century Fox) and the latter came with Phaser Control.  The term "game" is liberally interpreted to include any kind of cartridge or cassette software intended to have some kind of entertainment or edutainment purpose.  Carts like Basic Programming, Music Machine and MagiCard are thus included.  Double-ended cartridges are always counted as one game so long as one-half of the cartridge was not released as a single game.  Virtually all the games so released were also released as single cartridges.  Here is the Tally :

Company   Unique Games
Atari, Inc. / Sears 101
Activision 44
Parker Brothers 21
Atari Corp 19
M Network 17
20th Century Fox 18
Imagic 16
U.S. Games 14
Coleco 13
Spectravision 11
Arcadia / Starpath 11
Apollo 11
Tigervision 10
Telegames 10
Sega 9
CBS Electronics 9
Xonox 8
Panda 8
Data Age 8
CommaVid 7
Telesys 6
Playaround 5
Avalon Hill 5
Zimag 4
Bomb 4
Absolute Entertainment 4
Zellers 3
Mythicon 3
Mystique 3
Konami 3
Epyx 3
Wizard Video 2
Ultravision 2
Puzzy 2
Milton Bradley 2
Exus 2
Answer Software 2
Amiga 2
VentureVision 1
Universal Gamex 1
TNT Games 1
Sunrise 1
Sparrow 1
Simage 1
Selchow & Righter 1
Personal Games Company 1
MenAvision 1
K-Tel Vision 1
Gammation  1
First Star Software 1
DSD/Camelot 1
American Videogame 1


Total Unique Games 436

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.

Saturday, November 22, 2014

The Purity of RF Output

Before the NES and Sega Master System, all video game consoles only supported RF output.  RF combines video and audio output and modulates those signals into frequencies suitable for an analog TV.

Analog Television Broadcasting

Until the mid 1980s, there were typically only one type of input on an US TV, RF terminals.  There were a pair of screw terminals to attach the cable for a VHF antenna and a pair of screw terminals to attach a UHF antenna.  The VHF antenna mounted on top of the TV and comprised of two telescopic metal rods that could bemoved, a.k.a. "rabbit ears".  People would have to adjust these rods to get the best signal for each channel or invest in an externally mounted antenna.  A typical UHF antenna was just a big, round loop that was not really capable of adjustment.  VHF used channels 2-13 and UHF 14-83.  Typical TVs would have one dial for each.

With Digital Television, the same VHF and UHF channels are used, but the ATSC signals are digitally modulated and are vastly different from the analog NTSC signals.  In the advent of digital TV, analog TVs cannot understand the encoding of the digital signal and these dials are useless as of September 1, 2015 without a digital converter box.

RF Switchboxes

A typical pre-crash (1st and 2nd generation) console came with an RF switchbox with a pair of prongs that screwed into the VHF terminals with the wire for the VHF antenna.  The VHF antenna would have a wire with two prongs on it which would screw into a pair of terminals on the switchbox.  The old-style switchboxes would have a sliding switch with the label TV/GAME.  When the switch was slid to the TV, the TV would receive regular broadcast reception.  When set to GAME mode, the switchbox would block the over the air signals and let the console's signal go through.

The 4-port Atari 5200 and the RCA Studio II use unique RF Switchboxes which also provide power to the console.  Other US consoles use generic switchboxes.

RF Modulators and Channel Select

All home console systems of the first and second generation of video games connected via this method.  Inside each console is an RF modulator that takes video and audio information and modulates them into a signal a TV would recognize as sufficiently similar to a broadcast signal that it would demodulate it into picture (hue, saturation and brightness/luminescence and sync) and sound.  The original Fairchild Channel F used and internal speaker like many of the Pong home consoles, and the RCA Studio II does not output color.  The difference between the TV station and a console was that the TV station typically broadcast over the air and the console sent its information directly through a wire.

Consoles in the US "broadcast" on channels 2 (54-60MHz), 3 (60-66MHz) or 4 (66-72MHz).  Early consoles may not have had a channel selector switch.  The Fairchild Channel F and some heavy-sixer Atari 2600s do not have a channel selector switch and broadcast only on channel 3.  Channel 3 was not typically used by TV stations.  Channel 2 was usually the local PBS station and Channel 4 often belonged to one of the big three network's local affiliate.  Other heavy-sixers and all later Atari 2600s have a channel selector switch, channel 2 or 3 can be selected.  The RCA Studio II, Atari 5200 and 7800 also use channel 2 and 3.  The Arcadia, Odyssey 2, Astrocade, Intellivision and Colecovision allows channel 3 or 4 to be selected.  This would become standard in post-crash systems.

RF Connectors

Even in the early 1980s, some TVs were coming with a screw-threaded coaxial connector instead of the two screws for VHF.  In this case, early TV switchboxes would require a 300 Ohm to 75 Ohm connector.  Later switchboxes, like for the NES, SMS and every console thereafter, would only use coaxial wires.  To connect to an older TV, reverse connector, the 75 Ohm to 300 Ohm connector, would have to be screwed into the VHF screw terminals of an older set.  Even Atari eventually released a coaxial version of its manual switchbox.

Today, unless you rely on OTA transmissions, typically the only thing a TV coax screw will be used for is cable input.  Newer high definition capable cable boxes use HDMI and Component video for the Hi-Def signals. If you are not using this coax for cable, you can typically connect a simple RCA to coax adapter and toss the switchbox.  Some switchboxes, like the ones you could buy from Radio Shack, degrade the signal.  Other switchboxes, like the most recent Atari switchboxes with coaxial wires, do not, so I have read.

Exceptions to the General Rule of RF Availability

No pre-crash console allowed for composite video output.  Mods were not generally known during the pre-crash era or for many years thereafter.  Composite video monitors were seldom found outside of studios and computer monitors until the mid-1980s when VHS players became ubiquitous in US households.  However, composite video and audio may be appropriate for two systems, the Atari 5200 and Colecovision, due to their computer based roots.  The Atari 5200 uses the same chips and behaves similarly to the Atari 400 and 800 computers.  The Atari 800 had a jack that provided composite and separated chroma/luma output. Composite video was found on computer monitors at this time.  Separated chroma/luma is essentially S-Video.  I would strongly advise against an S-video mod because it eliminates the composite artifacting effect that games like Choplifter on the 5200 use.

The Colecovision uses the TMS9928A Video Display Processor, which natively outputs a form of component video which is converted to RF in the system.  The Colecovision only offers RF, but the Coleco Adam, which can play Colecovision carts, offers composite video and audio.  Coleco composite, S-video and even component video mods exist.  Also, the Colecovision is a very close hardware cousin to the MSX home computers, which could support RGB video.  Many MSX games have been ported to the Coleco in recent years.

3rd Generation & Beyond

The NES and SMS switchboxes did not have a sliding switch. Instead, the signal from the console would switch the signals automatically when the console was turned on.  Earlier consoles do not provide the power to cause the switch automatically.  Both also allowed for composite video and audio connections and came with AV cables.  All post-crash systems could provide at least composite video (in their first iteration at least and some require special cables or an adapter).  For this article, the Atari 7800 is a pre-crash system, it was designed and test marketed before the crash.

Of course, I must make an exception to the exception for the Japanese Famicom, released in 1983 and which would become the NES when released in the US in late 1985.  By its date, the Famicom is in the 2nd Generation, but its graphics and sound capabilities are substantially superior to any second generation console.  I recommend that the Famicom be modded to support composite video like the NES, the Famicom AV, the Twin Famicom and the Sharp Famicom and NES TVs.  However, the best mods may require lifting the PPU out of its socket and placing a copper sheath around it, so that is not for everybody.

The Famicom only supports RF output, but the Japanese TV broadcasting used different frequencies than US broadcasting.  The Famicom broadcasts on Japanese channel 1 (90-96MHz) or 2 (96-102Mhz).  In the United States, these broadcast frequencies were and are assigned to FM radio (87.9-107.9MHz).  Japan's FM radio frequencies (76MHz-90MHz) are mainly taken up in the US by TV channels 5 (76MHz-82MHz) and 6 (82MHz-88MHz).

On higher end CRTs sold in the US, channels 95 and 96 tune to the Japanese channel 1 and 2 frequencies, respectively.  No TV manufacturer ever intended that these channels would be used to receive over the air broadcasts.  These channels were a late addition to the US channel lineup and placed in higher end TVs that were intended to be marked in NTSC countries like the US and Japan with only minor changes to the TV's firmware necessary to assign the appropriate channels to the appropriate countries.

The Famicom came with a white RF adapter with some screw terminals.  A (S)NES or Sega Master System/Genesis RF adapter can be used, but you will need to use the switches on the back of the Famicom to switch the input and the channel.

Home Computers

When the Apple II was first released, it had an RCA composite video output jack and a video pin header on its motherboard.  However, most buyers of the device only had a TV set with antenna leads.  Third parties marketed RF modulators that plugged into the header on the motherboard and connected to an external RF switch.  The most popular one was the Sup'R"Mod. II, which came out in a version that broadcast on Channel 3 and another version that broadcast on Channel 33.  This is the only example of a popularly available RF modulator broadcasting on a UHF channel.

When IBM released the PCjr., it believed that many buyers would want to hook it up to a standard TV set.  It designed and released an RF adapter with a special 2x3 BERG connector that was keyed for the Television port on the back of the PCjr.  This adapter took a standard video and audio signal from the PCjr.  The adapter was in a long, silver box and contained both the modulation circuitry and the switchbox circuitry.  It had a "TV/Computer" switch and a Channel Select (3-4) switch.  Unfortunately it only has screw terminal input and output, so you will need both types of converters to use the box on a modern TV and with cable TV input.  This photo shows a fully modernized version of this beast :


IBM had previously released the IBM Color/Graphics Adapter.  This adapter had an RGB monitor output, a composite video RCA jack and a header for an RF adapter.  IBM never released its own RF adapter for the PC.  The RF is 4 pins and is identical to the Apple II header except it does not have the pin or connection for the -5v line.

Matching Transformers

Twin lead connectors require 300 ohm impedance connections.  Coaxial connectors require 75 impedance connectors.  Therefore, in addition to using completely different physical connectors, electrically these signals are not quite compatible.  If you are trying to use one type of connector with another type of connector, you need an appropriate matching transformer, or Balun.  A 300-to-75 ohm transformer, shown in the top of the above photograph, will allow you to connect to a coaxial connector on a new TV.  A 75-to-300 ohm transformer, shown on the left of the above photo, will allow you to connect a twin lead connector on an old TV.  These can be purchased cheaply at Radio Shack.

Conclusion

Prior to the 3rd generation, home video game consoles were often treated as toys and marketed and designed as such.  High end video connections had barely reached into the home.  Higher end-audio was somewhat more common, but there is not a lot of sophisticated music to be heard in the pre-crash era.  The B&W switch on the Atari 2600s was not placed there simply for cosmetic purposes, many game consoles connected to B&W TVs.  Consumers were generally satisfied when they got the system to work.  RF provided a known quantity for programmers, they had to make their graphics look clear with it.  Tiny text and high resolutions lost much of the detail on the modulated signal.  RF was the way these consoles were meant to be seen.  Except where indicated, it is the way these consoles should be played.  Anything better is not true to the classic console experience.

Tuesday, November 18, 2014

The Latest is not Always the Greatest

Atari 2600 6-Switch and 4-Switch vs. Jr.

Apparently many 2600Jr.s have a buggy TIA chip that causes Kool-Aid Man to be unplayable.  It is possible that it may affect other games, but Kool-Aid Man is confirmed.  See here :

http://atariage.com/forums/topic/165168-kool-aid-man-rom-problem/?hl=+kool#entry2950077
http://atariage.com/forums/topic/45244-why-does-this-2600-game-only-play-on-the-2600-jr/?hl=%2Bbuggy+%2Btia#entry547110

Unlike all 6-switchers and many 4-switchers, the chips in the Jr. are socketed and not easily replaceable.

Some Atari 2600jr. have a single chip instead of the three chips of most Jr.s and all other 2600.  They have video issues with the Harmony Cart's menu, and Kool-Aid Man and some interesting graphical anomalies with Pitfall II : http://atariage.com/forums/topic/196368-unicorn-boards-and-harmony-cart-menus-single-chip-2600-compatibility/

As far as the 6-switch vs. the 4-switch models go, the 6-switches (and the Jr.) have a video buffer chip that provides better video quality than the 4-switch.  Some cartridges or controllers may find it easier to fit in a 4-switch or a Jr. than the Light or especially a Heavy Sixer.

Atari 5200 4-Port vs. 2-Port

Not much of a comparison here, the ability to play four player games on the 4-port 5200 is balanced against  the ability to use the VCS Cartridge Adapter to play 2600 games on the 2-port 5200.  However, the 4-port 5200 can be modded with eight passive components to provide the required compatibility.  See Here : http://www.atarimuseum.com/videogames/consoles/5200/cx55.html

In addition, the 4-port 5200 uses a combination RF and power switchbox that is known for its fragility.  The 2-port uses a simple power adapter and separate RF output.  Fortunately, it is not too difficult to mod a 4-port for separate power and AV output.

NES - Front Loader vs. Top Loader

The Front Loader may have issues with its connector, but typically a good cleaning of the connector and carts a visual inspection of the pins can solve virtually any problem.  The Front Loader has AV out, which the Top Loader lacks.  Top Loaders are RF only.  In addition, the output on a Top Loader is crap.  A fix like this : http://www.stoneagegamer.com/nes-toploader-av.html would will restore the video quality, but you have to drill holes in your system's case or remove the RF unit.  Not a beginner's mod.

Also, Game Genies don't fit properly in a Top Loader.  There was an official adapter made for the Game Genie, but it is extremely rare.  You could use a NES PowerPak or Everdrive N8, which support five Game Genie Codes as opposed to the three codes of the real Game Genie.  Finally, there is no power LED on a Top Loader.

Sega Master System Model 1 vs. Model 2

Compared to the Model 2, Sega Master System Model 1s have a card slot in addition to the cartridge slot. The card slot let you play those games that shipped on a Sega Card.  It also is required for the Sega 3-D Glasses.  They also have an Expansion Port, which was unused officially but can be used for an FM Chip mod.  They have a port with composite video and RGB connections on the back whereas the Model 2 is RF only.  You can officially only play the Snail Maze game on early Model 1s, and the Model 2s lack the Opening Logo and Tune on startup.  There is no power LED or reset switch on a Model 2.

Genesis - Model 1 vs. Successors

The Model 1 is the only system which works as designed with the Power Base Converter.  While there are SMS adapters that fit in the Model 2, they do not offer a card slot.

Most Model 1s do not have the TMSS protection, which adds a second or two to the boot time of any game with the message Produced By or Under License from Sega Enterprises, LTD.  At least five US games will not work with TMSS Genesis machines.

There are two types of of Genesis Model 1s with TMSS.  One has the words HIGH DEFINITION GRAPHICS in white around the circle bordering the cartridge port.  The second omits the words.  All consoles with those words are widely considered to produce the best sound of all Sega Genesis models.  Some of the Model 1s without the text have a much poorer sound, it depends on the motherboard.  See here to find out how to determine the good Model 1s from the bad Model 1s : http://www.sega-16.com/forum/showthread.php?7796-GUIDE-Telling-apart-good-Genesis-1s-and-Genesis-2s-from-bad-ones The Sega Genesis Model 2s have variable sound quality, but none are considered to be as good as the Model 1s.

Model 1s have a headphone jack and use a power adapter with a plug that also fits into NESes, Famicoms and Sega Master Systems.  Model 2s omit the headphone jack but have stereo audio on their AV ports.

Game Boy - Original vs. Successors

The original Game Boy is larger than the Pocket, Light or Color.  It has larger buttons and a larger speaker and better quality audio.  There are games like Castlevania II : Belmont's Revenge and The Legend of Zelda, Link's Awakening which rely on the properties of the green LCD screen found in the larger Game Boy for certain graphical effects.  The Game Boy 4-player adapter does not require a converter.  Batteries last much longer in it than the Pocket or the Light.

SNES - Original vs. 1-Chip & SNES Mini

Most of the original boxy SNESes use a separate CPU and a two-chip PPU solution.  Late SNESes and all SNES Minis combine the CPU and both PPU chips into one large chip, called the 1-Chip.  While the graphics are slightly sharper than on earlier SNES models, some games suffer from graphical inaccuracies on the 1-Chip models, some games with enhancement chips run slower, some colors combinations suffer from ghosting and the whites are overly bright.  See here for more info : http://www.racketboy.com/forum/, go to forum called Guides under The Garage and look for the following thread, "SNES Console Revision Differences. SHVC-CPU-01 vs 1CHIP-Mini".

Playstation vs. PSOne

The PSOne is the slim version of the Playstation console.  It has a different looking menu for CD-audio playing, and a port for a matching Sony LCD.  But it looses the separate reset button, Serial and Parallel Ports, both of which have their uses, officially (serial for PlayStation Link Cable) or otherwise (parallel for Game Sharks).  It is harder to install a mod chip in a PSOne due to the tighter space.  There is an upcoming SD card solution for the Playstation called the PSIO which allows you to play CD backups from disc images, but it fits into the parallel port found on the SPCH-7xxx and lower, so no PSOne users need buy.

Friday, June 6, 2014

Arcadia/Starpath Supercharger - Cassette Games on Consoles

The Arcadia/Starpath Supercharger for the Atari 2600 was a very peculiar device from the second generation of video games.  It was a very large cartridge that plugged into the 2600's cartridge port.  It contained 6K of S-RAM for loading games off cassette tapes and 2K of ROM for the loading code.  The Supercharger was packaged with the game Phaser Patrol.  The initial cost of acquiring the Supercharger was higher ($44.95) than a standard 2600 cartridge ($29.95 for many new titles), but the games themselves were often priced lower than cartridge games ($14.95-17.95) due to the use of cassettes, which were much cheaper to mass produce than cartridges. Not included in that price was the cost of the cassette recorder, which the player had to supply.  The cassette recorder's line out would be connected via the Supercharger's audio cable.

Ten games were widely available during the accessory's life, two could be purchased by mail order, and four prototypes are known to exist.  Among the Supercharger's best games were Dragonstomper, one of the first console RPG games.  Communist Mutants from Outer Space is a fun shoot-em-up in the Galaxian vein, and Fireball is a fun Breakout clone.  Escape from the Mindmaster uses a very impressive first-person perspective.  Even though the library is small, the overall quality of Starpath's 2600 games, in my opinion puts the company in the first rank of 2600 game designers alongside Atari, Activision and Imagic.

I must give special mention to the version of Frogger released for the Supercharger.  This version, the so-called Official Release looks, sounds and plays far better than the Parker Bros. cartridge. In fact, it is superior to just about every cartridge release of the game.  The arcade original has five lanes of roads and five lanes of water, but many console ports only give you four road lanes. Even more impressive is the fact that the arcade music plays throughout as it should despite the rather humble audio capabilities of the 2600. Many ports cut the theme short and leave you with silence during most of the gameplay.  The SNES version is particularly atrocious in this regard because it has no music at all!

When the Supercharger was inserted into the 2600 console, the screen would show "REWIND TAPE PRESS PLAY".  Once the player did that, the game would proceed to load, with colored bars on the screen closing in informing the player of the progress of the load.  When done, the screen would display "STOP TAPE" for a moment, then the title screen of the game would appear and the player could start playing.

Most games were fully loaded within one load of the cassette, but four games (Dragonstomper, Party Mix, Survival Island, Sweat! - The Decathalon Game) used three loads and one (Escape from the Mindmaster) used four.  The tape would be rewound to the beginning, then the first load would start the game, requiring the player to stop the tape.  When the game needed the next load, the player would have to start the tape again.  If he waited too long in stopping the tape, he would have to rewind it and play it until the game found the beginning of the right load.  A load may take approximately 20-40 seconds, depending on the game and which side of the tape was being used.  Side A was the fast-load side, Side B was a slower load if Side A did not work with the player's cassette recorder.

The Supercharger digitized the binary data of a game onto an audio cassette.  A "0" bit would be an audio wave pulse of 158ms and a "1" bit would take 317ms (fastest speeds) or 900ms/2450ms (slowest speeds).   The controller chip in the Supercharger would use an ADC to convert the audio into binary data for the RAM.  The Supercharger supports three banks of 2KB of RAM and one bank for the 2KB ROM.

People talking about the Supercharger often state that it increased the RAM capacity of the 2600 (128 bytes) 49-fold.  This is not really an apt comparison.  An average cart uses a 4KB ROM chip to store program code, graphics and sound.  That data must be stored in the Supercharger RAM.  A Supercharger game is really like a 6KB cart (with a single load game, otherwise 18KB/24KB cart).  However, any portion of that 6KB can be used as extra RAM.  Each load of a Supercharger game transforms into an 8448 byte binary file, but that file includes a good deal of space not used by the game (including the space occupied by the ROM bank and a header).  Additionally, all ten of the officially released Supercharger games include a "demo" load at the end of the last game load on the tape to show previews of other games.  For multiload games, a combined binary file is used with emulators and cartridges like the Harmony Cartridge.

Comparatively, 8KB, 12KB, 16KB and even a 32KB cart were released during the 2600's lifetime.  The three 12KB carts from CBS came with 256 extra bytes of RAM, and sixteen of the 8KB, 16KB and 32KB carts from Atari came with 128 bytes of RAM.  One game from M-Network, Burgertime, used 12KB of ROM and 2KB of RAM.

The Supercharger was not the only 2600 peripheral that could utilize cassette storage.  The CommaVid Magicard programming cartridge came with 2KB of ROM and 1KB of RAM.  There were instructions in the manual to modify the cartridge to add support for saving and loading programs to cassette.  The Spectravideo Computmate came with 16KB of ROM and 2KB of RAM.  The Compumate turned your 2600 into a cheap computer as it came with a 42 key membrane keyboard that would fit on the front grill of a pre 2600jr. machine.  It supported saving and loading programs from cassette using a standard cassette recorder.  But the impact of these devices pales in comparison to the Supercharger and its games.

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.