Showing posts with label wiimote. Show all posts
Showing posts with label wiimote. Show all posts

Saturday, February 16, 2013

PCBs for USB Datasette and Wiimote2Amiga arrived

My USB Datasette and the Wiimote-Amiga-Joystick-Adapter (now better called "Wiimote2Amiga") finally reached the state of being implemented on professional PCBs using the company PCB-Pool.

2 "USB Datassettes" and 3 "Wiimote2Amiga" Boards are left

USB Datasette

Top: Old version with stripboard and cables. Bottom: New version with just one PCB.
The cables that were required for the connection to the datasette and the C64 itself are now gone and replaced with an edge connector and a female connector. This way it's a little bit more compact and less "wiry".

It even has a "feature" that you get if you design hardware without looking at the port locations.
WHY THERE IS IEC PORT? - Rage-Face from http://alltheragefaces.com
But as the main purpose of the device is the connection to the datasette without the usage of the c64 itself this is not that of a matter.

Wiimote2Amiga

Left: STEITEC Evalkit Version, Right: New PCB with everything in one.
The board equipped to my 1200 with plugged in bluetooth stick.
As this project never leaved the evaluation board before, this was my first circuit board with an LPC1768 controller. And of course this leads to some errors that are clearly visible in the photo.....
The current needed to drive this project is reduced by a fifth to 70mA (@5V) which is great for the Amiga 1200 which has a resistor in series at the joystick port effectively reducing the possible current you can draw.
Also the size of the device is now greatly reduced to 48x48 mm and should be small enough to be placed inside the "rear trap door" of an Amiga 1200 to make it even more compact.
To reduce problems with the C64's sound this board offers the possibility to disconnect the power supply of your computer from the device and a port to connect an external 5V source.

Conclusions

In the past I preferred designing with stripboards as they could be developed and debugged easily and incremental. But the beauty and cleannines of real etched PCBs is just untouchable.
As I had a minimum order quantity with boards as small as this I decided to sell the remaining unequipped boards for the cost price if there is interest.

Of course there is no warranty and I'm a little bit pedantic about releasing source code. ;-)


Friday, December 21, 2012

Amiga-Wiimote-Joystick-Adapter



My first topic. Yeah !
So lets start with something very personal and recently developed in this or the last year. I'm a very big fan of retro gaming. I'm used to have about 17 consoles and 7 home computers. Check out some photo !
Some of my consoles :3
In this post I want to go specific to the home computers. In my youth (The 90s) I got an amiga 500 from my dad. It was awesome then and it's awesome today. So, whats the problem you might guess. I can tell you. After a few years of playing with your gaming equipment, which also includes the joystick, the equipment breaks someday.

Here's a photo of my favourite gamepad. With this you are the king of Turrican !! ... or at least a few years before ...
What makes it great is the auto fire function which is controllable with a button and not a switch like some other joysticks have.
The AMIGA HYPERPAD. The name fits
The problem with these gamepads is the synthetic material that is used as spring for the buttons. After some use these tend to break. So... buy another one ? Yeah ! I wish we could today but thats not possible anymore. It's also a miracle for me how the other retro fans seem to handle this problem.

We need some replacement! I was inspired by the big number of "PS/2 to Amiga Mouse Adapters" that you can buy at some stores. These are also very important as the amiga mouses don't even last as long as the joysticks :-(. Of course I've built one myself with a PIC16F628. But thats not so special. Maybe later about that.
My PIC based ps/2 mouse adapter
What is more important is that there is no pendant for joysticks. Like... connecting an usb joystick to your amiga. Or... maybe ... a Wiimote ??
That would be crazy and ingenious at the same time. And it's wireless! OH MY GOD ! :-O. And most important, It's hardware that is still built today. ...And it probably will, as the Wii U also uses this...

So I've bought myself a ARM evaluation kit that is known to feature a USB Hostcontroller. It's this one from STEITEC.
ARM LPC1768 Cortex M3 LCD Board (STEITEC)
The positive thing about USB is that there is so much stuff that you can plug in it. Take for example USB Bluetooth adapters. They are so cheap. Much cheaper than a professional bluetooth module for industrial applications. And as matter of fact a lot of people just have them lying around.

After that I've discovered the mbed which offers also a LPC1768 and it's gigantic collection of libraries for miscellaneous purposes. On of these libraries is called "BlueUSB". It's a complete "usb-bluetooth-keyboard-mouse-wiimote"-stack, which is great for this project.

I've modified it a little bit to get it working on my STEITEC board. After that I was possible to get the button states printed on the debug uart. Then I designed a breakout board which has npn transistors for the open drain type of interface that is used by atari type joysticks. It also does the levelshifting as the amiga uses 5v and the ARM only can handle 3.3v like almost every new IC. Connected to the user I/O header I had to modify the sources again a little bit to get the logic I wanted. For example autofire... which is important If you like to play Turrican without having a cramp (right english word?) in your thumb ! Then after outputting the button states to the necessary GPIOs I had it working.
The whole project.
What you basically get is a clone of my amiga gamepad in the form of the wiimote. You hold it horizontal of course. The button 1 is fire, button 2 is auto-fire. The button A is secondary fire at the moment.

After a few weeks of usage I added support for usb mouses, the classic controller (better dpad somewhat) and usb joysticks.
The support for usb joysticks is something very important as this project has problems operating with the commodore 64. After plugging it in you can hear the noise that is caused on the voltate supply by the bluetooth module.
Not very nice and I don't know how to fix that as I'm a noob in analog design. Maybe some suggestions from the audience? :3

However on other systems like amiga, atari st, zx spectrum (kempston interface only!) and the amstrad cpc (only with adapter) it works perfectly.

The next step that is needed for this project is a dedicated printet circuit board especially for this purpose. This way I could also sell this boards...