The RGBtoHDMI project uses a Raspberry Pi Zero to generate an HDMI output based on the video signals from a classic computer. A CPLD is used to convert these signals into a common format for the Pi to read on the GPIO. This post goes into why and how I developed an Amiga 500 variant of this.

History

Whilst I don’t know the full history of the project, I believe it started as a way of getting an HDMI output for Acorn computers and extended to other platforms. c0pperdragon created an Amiga 500 variant which worked a little differently. Instead of using a CPLD it uses fixed logic gates to sync everything correctly.

It has a jumper to switch between Denise and Super Denise video chips in Amigas because the timings are slightly different between them.

But, there are down sides to this design. First of all physically the adaptor locates the Pi in such a place that it makes it very difficult to use an accelerator such a TF536. More importantly every Amiga appears to have slightly different timings. This has caused users to have a sparkling effect in some areas of the screen as the pixel clock is ever so slightly out of sync. This issue was further complicated when there were attempts to relocate the Pi and therefore making some of the connections from the logic to the Pi slightly longer, almost guaranteeing there will be issues.

There are workarounds for this, but IanSB, who is a heavy contributor to the RGBtoHDMI project, suggested a solution based around an adaptor which connects to the common CPLD board would be a better design that eliminates these kinds of issues.

My Design

I agreed with IanSB’s assessment, but I figured with the Amiga a simpler physical implementation was possible. Instead of an adaptor board for Denise and a separate CPLD board for the Pi, I decided to combine everything into a single solution. I also made the design relocate the Pi to the side so that there was a much better clearance for accelerators.

There were a few initial teething problems getting this working properly, in theory the software on the Pi should enter recovery mode on first boot to flash the CPLD firmware. Unfortunately this particular menu was designed for three buttons. I decided to go for a single button design to better align with how users expect it to work based on previous designs. Even hard coding single button mode on does not work correctly for this menu. For my first prototype I physically soldered on temporary wires to act as the buttons.

For subsequent boards I hacked together a connector for my JTAG programmer so I could flash the initial CPLD image from the Pi.

After this and some software configuration tweaks we are good to go. This design has been tested on several different Amigas now and on some of them an initial calibration is needed, but this is very simple to do any only needs to be done once. If you raise a TF accelerator by one CPU socket it also fits pretty well.

The image is pixel perfect and it can be softened or scanlines added. Due to the completely different way the pixel clock is derived (using the RGB and sync instead of the Amiga’s clocks) there is no sparkling pixels.

Once this was fully tested and I was able to write up all my notes, I released this project as Open Source on GitHub. Now anyone can go build one!

7 responses to “Design of the Amiga 500 CPLD RGBtoHDMI”

  1. […] my previous post about my RGBtoHDMI board there have been several updates including software changes and new boards. So I figured I’d […]

  2. spaceflightorange avatar
    spaceflightorange

    I’ve just had 5 PCB’s made and I’ve assembled 3 of them. All work perfectly. Thanks for this

  3. Benjamin Dressler avatar
    Benjamin Dressler

    I’ve used the c0pperdragon variant which has been working really well overall after tweaking, but your CPLD version has been rock solid without any pixel shimmer nor any image jitter/tearing even under load. It’s been great. Also, should I ever get an accelerator that requires relocation, having the Pi off to the side should make it much easier to fit one. Thank you so much for publishing this design, great work.

    1. Given that the CPLD chips are unobtanium, I have the fixed logic (c0pperdragon variant) of the adapter. Does it use the same software distribution as the CPLD version? If not, where can I obtain the version that works with this version of the board? Can’t find any info about this. Thanks!

      1. Yes, the software is the same. There is a way the software can detect which hardware is in use and sets things up appropriately.

  4. Is there any specific issues in terms of which pi can be used? I bought one of these boards and I can’t seem to get it to work at all. The pi doesn’t even boot up….
    I’ve tried all kinds of things to get it to work and get nothing so any help would be great..

    1. Hi Philip,

      Only the Pi Zero can be used, it doesn’t matter if it is a regular Zero or a Zero W / WH.

      Make sure the microSD card is formatted as FAT32 before copying the contents of the zip file onto it. Otherwise the Pi won’t boot. It should be noted that you may not see the Pi boot. It shows a colour flash very quickly which some monitors don’t show and then it is booted.

      If you have done this and the menu button doesn’t even do anything I recommend contacting who you bought the RGBtoHDMI from for support.

Leave a Reply

Your email address will not be published. Required fields are marked *