Sunday, 24 June 2018

Amiga 500 USB keyboard with Raspberry Pi 3

Here we have a Commodore Amiga 500.
This one's not working, showing only a green screen.
The green screen usually indicates a RAM fault, sometimes Gary or Agnus or their sockets.
In this case it could also be due to corrosion. This look like it's had one of the A501 upgrades installed which leaked into the machine.
That's fine because I want to borrow it's case, I'll repair the board later.
I have been sent a kit of 3D printed parts designed by MattSoft to allow a Rapsberry Pi and one of my Amiga 500 USB keyboard and dual joystick boards to be fitted into an Amiga case in a reversible way with no cutting. These were kindly sent to be by Matt, who had written a forum post about it.
This consists of four parts. First is a bracket which takes a micro USB extension lead and an HDMI extension lead.
The second takes two USB extension leads.
The extension leads are attached to the brackets, which are designed to fit through the existing holes in the Amiga 500 case.
Inside, they fit around the existing mounting pillars, this is the third bracket, the one for the USB keyboard controller.
That attached to the bracket with 4 screws.
The fourth bracket is for a Raspberry Pi to be mounted.
The Pi is thoughtfully positioned by the expansion slot cover, so you can open that to access the microSD card. Shame they cheaped out on the Pi 3 and lost the push push microSD socket, so it's a bit more fiddly that it could be to change the card.
With all that put together and wired up, you have an Amiga 500 Pi 3.
All the connections are accessible on the rear, microUSB power, HMDI video,
Two USB ports and the two 9 way D joystick ports.
The two audio out jacks are blanked off, however, I have a new version of the Amiga 500 USB keyboard and dual joystick controller which has audio pass through.
With a slight modification to the bracket, the two phono sockets are now accessible from the rear.
These are connected to a 3.5mm jack socket, so with a plug to plug lead (supplied in the kit), you can connect that up to the audio out on the Raspberry Pi.
It's then just a case of configuring the Pi to output audio via that jack rather than (or as well as) HMDI.
That completes the Amiga 500 Pi 3 build.
All that remains is to plug in the Amiga 500 keyboard and test it out.
In the original post on the 3D printed kits, the Amiberry DietPi distribution was suggested, so I gave that a go.
This does a lot of downloading and updating when first booted, not very clearly shown here as the overscan was set a bit high for my monitor. (I later removed the card and edited config.txt to correct the overscan)
After about 10 minutes, it rebooted, straight into the UAE 'Universal Amiga Emulator', all the hardware was detected, and that ran nicely.
And of course, I had to test Lemmings.
I have been asked a couple of times about the LEDs on the Amiga 500 keyboard. The top one is configured as a power LED, so is always on.
The other is numlock. UAE can be configured to flash this for disk activity, which is just how it would have looked.
Alternatively, if you are running a desktop setup, you use the numlock LED to show disk activity on a linux system. Anything with a 4.7 or later kernel (such as Raspian Stretch) you should be able to type something like
echo mmc0 > /sys/class/leds/input0\:\:numlock/trigger
It may be input 1 or higher, use tab completion to check what your system is showing. This does not appear to be persistent on Raspian, so it would need to be added to a startup script.
The Amiga 500 USB keyboard and dual joystick boards are available from my Tindie Store, with and without audio pass through.
And also in a version with a USB connector on the rear in case you want to use the Amiga 500 as a massive USB keyboard.

If you want to support this blog, you can donate via Patreon or Paypal, or buy something from my store.