This article is a contribution by TwBurn, the author of the USB2CDi (USB to CD-i) adapter solution, by offering a software library that you can use with an Arduino. But how exactly? TwBurn explains: "A few people have asked me about it, so I thought I'd type something up for the USB-to-CD-i prototype."
Parts List:
First you need the following things:
- Arduino Uno
- Arduino USB Host Shield Rev. 2
- Mini DIN-8 cable (CD-i controller connector cable) - Note that for both of these smaller versions are available, those will work too, and I plan on building a more permanent prototype using them, but for development/prototyping I prefer the bigger ones.
Hardware:
The USB Host Shield needs some preparation, there are a few connections you need to solder, two for the input power (5v and 3.3v) and one for the VBus power (5v) to power the USB devices that are connected. Then you need to connect the controller cable to the board. I used a basic multimeter to figure out which pins are connected on which cable. The important ones are pin 7 (RTS), which I connected to digital input 2 on the Arduino, and pin 2 (RXD), which I connected to pin 3. You can also use other pins, but then you need to modify the examples in the library. Also pin 0 and 1 are used to program the Arduino, and the USB Host Shield uses pins 9-12 if I'm not mistaken.
Software:
Software:
For programming the Arduino you need the Arduino IDE software which you can download for free from https://www.arduino.cc/en/software To install the CD-i libary, download a zip from https://github.com/TwBurn/cdi-controller-library and use the function "Sketch->Use Library->Install ZIP Library" from within the IDE. After this you can restart the Arduino IDE and load the examples from "File->Examples->CD-i Controller" menu. I suggest starting with the USBKeyboardMouse example, since this is the simplest one. Then you send the program to the Arduino, connect an USB keybourd/mouse to the Arduino Host shield, connect the cable to the CD-i player and turn the player on and the controller should work. From within the Arduino IDE you can open the "Serial Monitor" from the "Tools" menu, there it should list some debug information. Good luck and please share if you got it to work and feel free to ask any questions if you get stuck somewhere!
Where to Buy:
Where to Buy:
For where you can get the stuff here are a few links to where you can buy the parts I listed above. I'm not affiliated with these shops in any way, it's just where I ordered some stuff, they seem to have good and fast service for a reasonable price.
- Arduino Uno: The first one doesn't have a USB A-B cable, so you can save a bit of money if you already have one of these lying around. - https://www.tinytronics.nl/shop/en/arduino/main-boards/uno-r3-compatible-usb-b - https://www.tinytronics.nl/shop/en/arduino/main-boards/uno-r3-with-usb-cable
- Arduino USB Host Shield: https://www.tinytronics.nl/shop/en/communication/usb/usb-host-shield-arduino-compatible
- DIN 8 cable: I got this one together with an extention cable, which I cut in half to connect to the CD-i player https://www.allekabels.nl/din-kabel/130/1182800/mini-din-naar-mini-din-kabel-8-polig.html
[Thanks, TWburn (aka Jeffrey Janssen)