Forum
I've created an Arduino Library which can be used to emulate a CD-i controller. Currently it supports four different modes (Relative, Maneuvering, Absolute Coordinate and Absolute Screen). I'm hoping to also add Keyboard support once I can find some documentation on the subject.
I've been using this library together with a USB Host Shield to connect some modern controllers (in my case a Wii U and Switch Pro controller) to the CD-i with acceptable to good results, depending on the title used. I've included these as examples in the library.
The library can be found on: https://github.com/TwBurn/cdi-controller-library
For future updates I hope to include some more examples (like an USB mouse, keyboard), workout some issues, as well as moving my hardware beyond a prototyping phase so I don't have random wires running over my desk.
This so admirable!
Congratulations! Can I add this on our Open-source section?
Let us informed about it!
Keep up the amazing work!
You can definitely add it to the section if you want, I've released the library as open source so maybe others might find it useful.
I knew the USB 2 CD-i was going to "cracked" soon or later.
I am writing for a magazine and I talk about that, but now I can confirm we will finally soon be able to use a modern USB controller on the CD-i.
Many thanks, really!
Great news!
What keyboard documentation is missing, for Arduino/USB or for CD-i?
For CD-i, I recommend the cdi605t_techdoc_r13.pdf from http://www.icdia.co.uk/techdocs/index.html
Mind that is only used very rarely; the software titles I know are the encyclopedias, CD-Online and the 660 Key Disc. And of course the FTS function of the players.
I was missing the CD-i specification for keyboards, I was using documentation on http://www.icdia.co.uk/docs/ for the pointing devices, but the links to the keyboard specification there were dead.
I know it's rarely used, but for completion I'd wanted to include it.
I've added experimental keyboard support, but haven't tested that yet. I've also added some examples, one where you can use a USB mouse and/or keyboard to simulate a mouse/joystick on the CD-i (cursor keys for movement on the keyboard) and one where you can use a WiiMote with sensor bar to simulate a light gun.
I'm hoping to receive a smaller Arduino Pro Mini and small USB Host Shield in the coming days/weeks so I can finalize the hardware portion and build something a little more permanent than my current prototype. Then I want to document that as well so other people can build one a bit easier.
It's rolling on!
Really impressive all the diversity you are working on.
So any PC USB will be compatile soon?
Can you add pictures of some work you have already done?
It would be awesome to let people watch them here.
Way to go! I've already ordered a regular and a small USB Host Shield and hope to experiment with them soon. Meanwhile, I've added your project to the Adapters and cables section of my Modifications for Philips CD-i Players article.
https://retrostuff.org/2020/01/12/modifications-for-philips-cd-i-players/#Adapters-and-cables
I've attached an image of my prototype setup. The bluetooth stick is used for the WiiMote/WiiU controllers, the other one is an adapter for the Switch Pro controller.
@omegalfa The biggest issue is that there doesn't seem to be a generic way to read USB Joystick input, they all seem to work a bit differently. It could be that the generic USB ones are all somewhat similar, but I don't have any of those laying around (on the PC I'm more of a keyboard/mouse gamer, and I only own a few Nintendo consoles, hence the Wii, Wii U and Switch controllers I'm using). Within the USB Host Shield Library there are libraries for Wii, Playstation and XBox controllers using Bluetooth, each having a slightly different interface. The interface for the Switch controller I derived myself.
USB Keyboards and Mouse on the other hand are very generic, so that works pretty good as input for the CD-i player. Also since these both of these are more event driven than just sending a stream of data to the USB port like the joysticks do, I can continuously send data to the CD-i player. With the joysticks I need to slow the rate down else the USB buffer fills up to much (Sending data to the CD-i is slow) causing lag. For most games this doesn't seem to be a problem, but "The Apprentice" is not really playable this way.
@rosewood - cool thanks for adding it! Let me know how your experiments go. If you need any help feel free to ask
I have corrected the missing ICDIA keyboard documentation and also added some new stuff.
January 17, 2021
- Updated the CD-i Technical Information / System section, adding information about CD-i Keyboards, CD-i Picture Quality and a Full-Motion Video announcement.
A lot of information about input devices is also contained in the Chapter 9. Input devices of the Technical Documentation for CDI 605 / 605T Users documents in the CD-i Technical Documentation section.
I've updated the library on Git. It now uses a timer/interrupt for communication with the CD-i player, which doesn't block the normal execution, so it's no longer necessary to limit the throughput for USB controllers which have buffer. This fixes the issue with The Apprentice, and also makes the input feel tighter in other games.
Gaming with a wireless Switch SNES controller connected to the MagicNS is pure bliss.
Great improvement.
Congratulations and thank you very much for keeping us updated!
For completion, I'd like to include a link to the Wiki of the library, where I describe how to build one:
https://github.com/TwBurn/cdi-controller-library/wiki
