QL-VGA (part 1?)

By | 2019-04-21

The QL and its non-standard video interface has always been a problem, even more so since the introduction of LCD monitors. Since I got my QL out of storage a few years ago I’ve been looking for a solution. I bought all kinds of Chinese video converters, the GBS8220 for example produced a very unstable picture for me. The small black HDMI converter without a name worked a lot better, but here pixels went missing on the left side. Only a small adjustment would be needed, but the manufacturer has filed off all chip markings, making modifications even more difficult.

One and a halve year ago I tried to tackle the problem the only way a software guy like me could: with software. I took a Raspberry Pi, learned to program it without any operating system (“bare metal”) and connected it to the QL bus. The idea was to listen to any access to the screen memory and mirror an emulation of it on the HDMI output. This is what it looked like:

QL-PI HDMI adapter

It almost worked but there were problems with the address decoding GAL. With my knowledge today I probably could have solved it, but I also bought myself a Tetroid GoldCard later and it’s not exactly easy to get to the required bus signals when that is fitted, so the project was put on the back-burner.

Due to the mentioned GoldCard I also created a new version of the QL-SD device (as the original was incompatible) and for this I had to learn the Verilog hardware description language. A few months later I invested even more time to update the QL core for the MiSTer FPGA board (in progress and a tale for another time), also written in Verilog.

With this FPGA experience under my belt I revisited the display problem and tried another approach: using an old Cyclone II FPGA board plus some other chips I had laying around I managed to implement a QL-RGB -> VGA converter. It converts the 512×256 50Hz QL screen into a standard 1024×768 60Hz VGA signal that can be processed by probably every monitor in existence or further converted into HDMI if needed (the Cyclone II is too old to generate HDMI directly). This is what that looks like, a lot simpler than my previous approach:

FPGA based QL video converter

This is the very first prototype and it can actually only do mode 4: the SRAM I had in my bits-and-pieces box has an access time of 55ns. The VGA pixel clock is 65Mhz, meaning I need to generate a new pixel every 15ns. As pixels are doubled in x direction I need a new colour every 30ns. With 2 pixels per byte this means I need a new byte every 60ns. This would fit the requirement but the QL screen must also be captured and written to RAM at the same time! So currently it only works by packing 4 pixels into a byte, but this can easily be changed using a faster RAM chip.

In the end the effort paid of, the picture is pleasantly rock steady and complete:

Next step is to order some faster RAM and create a PCB for it, but now that it finally works I can start sleeping at night again, so this might take a while šŸ˜‰

Forum thread

6 thoughts on “QL-VGA (part 1?)

  1. Marco Banchero

    Great Marcel, I use the GBS8220 v 4.0 and the image on the monitor is stable but it could be more well defined and bright, as yours it is; so I am ready to buy one of these as soon as it is ready for selling.
    Time ago I bought a new sd-card from you, but, shamefully, never found the time to install it. When It will be, I ‘ll tell you the result, good I’m sure.
    Time is NOT by my side.

    Cheers

    Reply
    1. Marcel Post author

      Thanks! Installing QL-SD only takes 15 minutes, you should try it šŸ˜‰ Debugging the hardware, improving the driver and building the boards took at least a few hundred hours on the other hand, so time is not exactly on my side either… not sure I’ll do another hardware run, the shipping part is very time consuming and boring.

      Reply
  2. Pingback: QL-VGA, the second | Kilgus.net

  3. Pingback: QL-VGA | Dilwyn Jones Sinclair QL Blog

  4. Jean-Claude Faguin

    Hi, it’s a great device and I hope It will be available in few months to buy two devices.
    Well done for this great work!

    Reply
    1. Marcel Post author

      Thanks! Iā€˜m working on v2 that will hopefully be easier to produce in bigger volumes.

      Reply

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.