Jump to content







Photo

Wico Trackball Resurrection Project

Posted by BigO, 29 July 2007 · 101 views

The following is a rambling, stream-of-consciousness description of my latest hardware project:


I bought a Wico Command Control Trackball for the Atari 2600 a few months back. I was disappointed to find it was dead. However, this purchase coincided with my beginning to get learned up on microcontrollers. So, instead of taking it back I decided to learn PIC microcontollers by building a replacement for the dead controller chip in the Wico trackball.

I needed a simpler first project so I built an adapter to play Atari 2600 Indy 500 with a joystick. I did that with an 8 pin 6 I/O 12F629, so I kept on using the 629 to develop the gray code decoder for reading the trackball. The trackball project is pretty much the opposite of the driving controller project in that the driving controller encodes to gray code and the trackball decodes from gray code.

I took the dead chip out of the trackball and wired the socket to pass the 4 sensor outputs directly through to the 9 pin cable (which was also bad and had to be replaced.) Now I could use a breadboard to do my development and testing without having the unit open.

So far, I have the decoding logic working for the horizontal movement. My next move is to switch to a chip with the necessary 8 I/O lines then code the logic to handle the vertical movement.

It was a bit of a challenge to get the joystick emulation working properly. At first, I was just decoding the trackball outputs and activating the appropriate joystick direction for each state change detected. The microcontroller was apparently either sampling so fast that it was seeing the same state more than once or was missing states. Either of those would result in a "no move" decode and shut off the "joystick" signal. I suppose it's possible that my code was also faulty in some way that I didn't detect. Regardless, the output was a bunch of really short pulses that never seemed to be detected by the 2600.

I tried inserting a delay to hold the output state longer. That didn't work worth beans. I think it was missing a bunch of state changes resulting in illegal/invalid sequences that had to be interpreted as "no move". It didn't do much. On to the next idea.

Next, I modified the code to once again sample as fast as possible. This time, I aggregated the results into a net "increment" or "decrement". Based on the state change detected, either a 1, -1 or 0 is returned from a lookup table. These numbers are added up throughout the sampling cycle. At the end of the predetermined number of cycles, the output buffer contains a number that is tested for three conditions: less than zero, zero, greater than zero. Zero means that the net result of the sample was no movement. Less than zero is mapped to the "Left" joystick function and greater than zero is mapped to the "Right" joystick function. The resulting move direction is output onto the I/O bus which is in turn connected to the joystick port on the 2600 console.

The first test with a sample size of 10 readings looked promising. The Outlaw gunfighter actually moved this time. He was a might twitchy though. I adjusted the sample size up to 50 then to 100. 50 seems to be functional, so I'm leaving it there until I get the vertical control working. I'll tweak and tune after the gross functionality is working. I was getting very smooth and joystick-speed movement in Space Invaders, so I don't think I'll need to do much adjustment. Missile command will be the real test, I think.

All in all, it looks as though I will be able to meet my goal of creating a replacement for the trackball's chip. I found one other reference to such chip death on the internet so there may be other Wico Command Control trackballs out there that need to be resurrected. I may add functionality to allow the Wico to work in actual "trackball" mode so I can play the hacked version of Missile Command with it for the truer arcade experience.

If anyone's actually interested in this, I'll take the time to put together a more coherent description of the project and more details including the schematic I threw together and actual code.




Yay! My first ever game of Missile Command played with the trackball! For some reason, it's better that way.

Anyway, I got the little 8 pin PIC from early trials swapped out for one with sufficient I/O ports, reconfigured the code, fixed 3 or 4 major mistakes and she's a runner. I'm currently using a 16F628A. There may be a better match for this application, but it's what I had.

I'll probably clean up a few inefficiencies in the code that can be removed due to a difference in how this chip reads the input port.

To achieve my goal of creating a plug-in functional replacement for the Motorola SC87152P (about which I could find zero information), I still need to adapt this 18 pin chip to a 28 pin socket and install it inside the trackball controller instead of having it on a breadboard between the controller and the console.

I'll go back and clean up the project documentation a little and post code, schematics, whatever at some point. If you want code or specific info before then, PM me.

For my next trick, I'm thinking of adding modes to this trackball controller. Possibilities include:
* Trackballs for other (Atari?) systems: Straight Gray Code output, direction and pulse output (only surface level understanding of these at the moment.)
* Driving controller emulation (should be relatively easy having done the joystick driving controller emulator project earlier)
* The most interesting one is probably the most challenging: paddle control emulation. Success here would open up a couple of other projects that I plan to do. I'm going to dive in to the PWM capability offered by certain PIC micros to see how effective that will be.
  • Report

May 2012

S M T W T F S
  12345
6789101112
13141516171819
2021 22 23242526
2728293031  

Recent Comments