Monday, March 06, 2017

Amiga CD32 Controller For Under £20

Anyone who followed the Amiga will remember the famous advertising hoarding outside Sega UKs headquarters that Commodore UK cheekily put up just after the launch of the CD32. The Sega advertising proclaimed 'To be this good takes ages' where the 'ages' transformed into 'sega'. Very clever. But Commodore went one better.

For some context, Commodore were actually the first to release a mainstream 32-bit CD games console despite the fact that it was really an A1200 with a CD-ROM (and not a very good one either) with only the addition of the Akkiko chip being really any different.

That didn't stop Commodore pulling one of the greatest feats in advertising:

Brilliant.
According to Amiga Format that month, the advertising hoarding was then mysteriously booked for the next ten years by an 'anonymous' advertiser...

Anyway, I owned an Amiga CD32. I actually bought it from a shop in Coventry Cathedral Lanes which I think was called Kompleat Computing (or something). A loooong time ago. To my eternal shame, when I moved house in 2003 I threw it in the skip. A decision I have regretted ever since.

Fast forward to today. I now have an A1200 safely tucked into a Micronik tower with a SCSI CD-ROM and full 68020 accelerator with 68881 FPU and 4Mb of extra RAM. It also does a decent impression of a CD32. I can play Liberation, Alien Breed Tower Assault and many other games that didn't use Akkiko (the planar to chunky converter for the more geeky amongst you).

But it's missing one thing. A proper CD32 controller. This isn't normally a huge problem but for some games, such as Guardian, you have to have a controller otherwise the game is not playable. Unfortunately, the CD32 controllers were a bit, er.. crap. Not many survive and those that do are stupendously stupidly expensive on places like evilBay.


Yes, it really looked like that...
There are other options such as the Competition Pro CD32 controller but these are even more expensive on evilBay that the originals by an order of magnitude.

To get around this I asked my parents for a 'slightly specialised' Christmas gift in the form of a KMTech AmiArcade CD32 controller board. This clever little board provides exactly the same internals of the CD32 controller but in a small square package. The idea is that the board provides the complicated signal bit and you provide the switches and buttons. The main audience is arcade fans who build their own boxes with arcade grade switches, buttons and joysticks. For my project I was aiming a bit lower partly due to space constraints but also down to costs. I had to make my CD32 controller for next to nothing.

First step, to find a donor controller. On evilBay I managed to locate an old Gameport PCSprintPad, originally for use with PC. This would be perfect for my project as the size is similar to the CD32 controller and it had more buttons than I needed. It cost me 2 quid. Bargain.

Cheap.

After dismantling it I started to wonder if I could make use of any of the additional switches and buttons on the board. After some pondering I decided against it. It would get far too complicated and possibly wouldn't work correctly with the KMTech board. So to simplify things, I removed ALL the components on the internal board. Everything. Nothing was spared. By doing this I basically stripped the board down to a set of simple switches.

Shiny Buttons - but from the wrong side....

At this point, I realised I had a slight issue. The cable with the joypad had a Gameport connector on the end (not for long! *SNIP!*) but this meant that the cable had only 10 cores. For my CD32 I would need:

  • Up
  • Down
  • Left 
  • Right
  • Play/Pause
  • Red
  • Green
  • Blue
  • Yellow
  • Shoulder Right
  • Shoulder Left
  • Ground

Now, I may not be a maths professor but last time I checked, ten is less than twelve. I could get some 12 core from evilBay or Amazon but, as I said, I have to do this for next to nothing and my budget of 'nothing' had already been blown by the two quid on the donor controller. Fortunately, I had some other cables free. You might remember my 'el cheapo' joystick. I nicked the cable from that to provide my extra two cores. My plan was to twist the two cables together and secure with cable ties. Cheap and ugly but effective.

Earths all connected - I really did take everything off...

Next, I examined the donor controller circuit board to identify all of the ground connections. I needed to link them all together so only one wire would be needed back to the controller board. This took a little bit of careful tracing of tracks but was relatively straightforward. Where necessary I soldered wires to appropriate points and ran those through the board back to a central point on the reverse. Eventually, I had all of the grounds connected into a professional looking solder joint*.

*does not look professional

Next, to wire up each of the controls. This wasn't that hard as most of them had a convenient hole and pad to solder to from the original wiring.

Finally, put the whole thing together and check the switches/dpad etc worked as expected. Fortunately, it went back together without too many issues (trapped a wire or two but easily sorted) and the switches looked fine for operation when I checked with my multi-meter.

All wires connected.
Next job, build the controller board. I was given the kit version of the board which is quite a bit cheaper than the built version. If you have any soldering experience I'd recommend you save a few pennies and go for that version. The board is very good quality and the components easy to identify and install.

Installing the cable from the controller to the board was straightforward too, once I found the piece of paper I'd written the button colours and corresponding pin numbers on...

The last part of the controller build was to attach the provided 9 core cable and plug. This cable is the actual link to the Amiga joystick port. No problems, nice and easy soldering job at the connector and the board.

Construction Complete

Time to test.

First, the good news. As a simple two button joystick it worked great.

The bad news. It just would NOT work as a CD32 controller. I got my oscilloscope out to have a look, and I read up on how the CD32 controller actually works. I learnt quite a lot. Everything in fact, except why this wasn't working.

I thought maybe I'd damaged the chips or that the chips were just dud so I changed them. No difference.

I checked all of the connections from the Amiga to the board. No problems (but we'll come back to that).

I checked all of the connections to the controller buttons. No problems.

I even found two different joystick test programs in case the first one wasn't working but they both told me the same. The controller would not switch into CD32 controller mode.

A quick summary of how the CD32 controller works. When pin 5 on the joystick port is high i.e. a binary '1' then it is in normal mode. Usually, this is a one or, more rarely, a two button digital joystick with the basic UDLR and fire1 and fire2. When the Amiga switches into joypad mode, pin 5 is pulled low which tells the controller to use the built in shift register. This polls the status of each button (UDLR still switch like a normal joystick) and every few milliseconds send this data as serial data into pin 9. A more detailed explanation can be found here.

In my case, I could see the pulse of pin 5 switching low, pin 6 sending a clock timing signal and, what looked like data being sent on pin 9. But the thing would not work. I noticed that if I pressed certain button combinations some other button might work. So if I pressed the blue button and the pause button, the pause button would work. None of this made any sense.

I should probably point out that through all this I was in contact with the manufacturer of the board. He was extremely helpful and patient through all my rambling emails and pleas for help. I can't thank him enough for his patience and sensible suggestions of things I should try to make it work.

After another days thinking about all this I remembered something I had read about the serial connection. The cable shouldn't be over a certain length or problems might occur. I couldn't find where I had read it or what the maximum length should be, but I hatched a slightly drastic plan. I would cut off about 6-8 inches of the cable from the Amiga to the board, re-solder it using just that short section and see if it made any difference.

Super Short Link Cable
Guess what.

It worked. No problem. Every button worked perfectly.

Given that the controller itself has quite a generous length of cable, using such a short connector from the board to the joystick port isn't a problem. I still haven't worked out if the length of the cable was the problem or if there is an intermittent connection issue on one of the cores in the longer section of cable but, who cares? :)  It's now working and I can finally play Guardian.

At this point the KMTech board is still bare and exposed but at some point I may try and make up a small box or, if I'm feeling flush, see if there's a suitable project box at Maplin.

Here is my monstrosity in all its glory, cable tied cables and all. It's bloody marvelous!


Mission Accomplished
The eagle eyed out there may notice that the buttons are in a different order than the redundant switches proclaim. This was to more closely match the button layout of the original CD32 controller. This one has the buttons in a diamond shape whereas the CD32 controller has them in a square. I thought that the red button at the bottom made more sense than at position 1 so that's what I went with. It works pretty well in that layout too.

A final word. At this point in time, gameport joysticks etc. are common and cheap. Sacrificing a PC joypad for use on an Amiga is no loss to me. In the future, others may read this and weep in the same way I shed a tear every time I see an Amiga A1000 butchered with a PC motherboard and power supply. To my mind, there is not a single piece of PC hardware that has the character or mystique that the 16-bit machines (Amiga, ST or Archimedes) have. There is not a single piece of PC hardware since the inception of the PC that I, to be blunt, give a s*** about.


1 comment:

thedevilbunny said...

Great and helpful! Nice info!