Kicking off project and Planning

I’ve had a project in the back of my mind for a while now and with the Coco Crew holding a CocoFest contest it was the perfect time to start it. Joysticks for the Coco may not be rare now but with time they will become more so. In addition modern game controls have become more comfortable. For this reason I’ve been wanting to build an adapter that will take a USB game control, probably an Xbox 360 control, and adapt it to the Coco joystick port.

To read the USB controller the plan is to use Arduino UNO with USB Host shield. Raspberry Pi is a reasonable contender in this arena but the boot times are long. It is also overkill though that isn’t a huge consideration considering the low price for the Pi Zero. I also looked at a couple of microcontroller boards based on the SAMD21 chip which is an ARM Cortex M0 with integrated USB host controller. The chip is 3.3v so it can be hard to find boards based on this chip that are 5V compatible but there are a couple that I found that are. Both the Seeeduino XIAO and the Seeeduino Cortex-M0+ are capable of this. The nice thing is that the USB Host library already comes with great examples of reading the major types of USB game pads including Xbox, PlayStation and USB HID in the software so that portion of the project is pretty easy.

To connect to the CoCo I have 2 major options I am exploring. One of them is using a DAC and mosfet transistors to drive the joystick port. An advantage of this is that a 12bit DAC will give excellent resolution and isn’t terribly expensive or hard to find in a through hole component. The other option is to use a digital potentiometer and solid state relays. This has more isolation from the CoCo as it won’t drive port but instead act just like a joystick did in the circuit. It also has the potential to work for systems that didn’t read voltage changes but instead resistance changes at the port like the Apple II or IBM PC which the DAC wouldn’t be able to do. The big downside is that it is nearly impossible to find more than 128 taps in a through hole component and the price is slightly higher.

My current list of parts is:

Arduino Uno R3
Arduino USB Host shield
TLP222A-2 Digital Relay
MCP41010-I/P Digital Pot 10kohm 256tap
30N06L N-channel mosfet
MCP4922-E/P 12bit DAC
6pin DIN connector pigtails

Next steps, are to breadboard the circuit with DAC and mosfet as well as the one with digital pot and solid state relays and see if I can programatically set joystick values that are read on the coco.