HDMI Output for Your Commodore!

The Background: Why Did I Bother?

As much as we all love our aging little boxes of fun and discovery, one thing I think we can all agree upon is that the stock picture they produce is pretty… well, crap.

Back in the day, many of us got our feet wet in the computing world with our precious devices connected to a television, and at the time, the only way to make that connection was to use a little RF modulator box that connected directly to the television set’s antenna terminals.

You connected the box to the screw terminals on the back of the TV set, your antenna to the box’s screw terminals, and the computer to the RF jack. Then, when you wanted to use the computer, you switched the box to “COMPUTER”, and tuned the television to channel 3 or 4, depending on what channel your computer was sending out on. To get a little technical, a broadcast TV channel was a simple number system that actually represented a specific frequency on the broadcast spectrum. 3 and 4 were often fairly “out of the way” of many major stations, but having a choice meant you could move away from interference caused by a local TV station actually using that channel. The little switch box was intended to make sure your computer connection was the strongest local signal available, but if you were using channel 4 for your computer, and you had a TV station a couple blocks away also using channel 4, you could still get a lot of garbage on your screen, just from the signal the TV is able to pick up, even without an external antenna. Switch the computer’s RF output switch to channel 3, change the TV to channel 3, and boom: no more screen garbage.

Now I’ll never know if He-Man won!

Or at least, a lot less of it. Back then, we were used to seeing weird stuff on the screen all the time; it was just the nature of the technology of the day, like listening to the radio in a rural area and dealing with static from a weak signal. Mom firing up the vacuum cleaner in the middle of weekday afternoon cartoons was an instant trigger for agonized groans of frustration, in our house.

Cable TV was still pretty new, as were VCRs. Televisions simply weren’t designed with all the input options we have today, because using them to receive something other than broadcast signals was not really something the manufacturers were considering in the first place, at least for the home market.

So we were stuck with the little antenna switch box, and thanks to having gotten used to seeing interference on many stations, if we were also lucky enough to be one of the early owners of a Commodore 64, the cruddy video signal it was putting out went largely unnoticed. I mean, we had a computer connected to our TV! We were actually in direct control of what was being displayed on the screen! This was a really big deal for us kids. So what if the picture was blurry and warbling around slightly? We were making things actually happen there, and as developers got better at making that little graphics chip work for its supper, the more engrossed we became in the action and stories we played out with their games.

It wasn’t long before we started meeting friends whose families had joined the Commodore family later, and took advantage of the more refined options provided by dedicated monitors appearing on the market. From the simple and reliable amber Magnavox screen, to the flagship (and coveted) Commodore 1702 composite/component color monitor, I kept encountering more examples that the Commies were quite capable of producing clear and sharp pictures (for the day), and I was envious of them all.

Then, years after my first introduction to the Commodore 64, I was granted the amazing gift of a Commie rig to call my very own, one Christmas. I had the whole kaboodle: a late-model C64, a 1541 floppy drive (swing latch, not the pullbar style), a Magnavox 12 inch amber screen, a 1526 dot-matrix printer, a 1670 1200bps modem, and of course a few different joystick styles to play with. This was the rig that saw me through my high school years and after. It was a well-loved friend, and I never saw at that system on an RF hookup again, right through the day I donated the whole thing to a local computer museum for lack of space.

Fast-forward a couple decades, and I’ve come to regret parting ways with that system and the endless memories it made for and with me. I cast about the internet to see if I might be able to find a similar secondhand unit, and was shocked to see that not only was there a huge number of like-minded people trading these things around, but also an active and thriving community of tinkerers and developers creating all kinds of software and gizmos that improve its functionality and push its limits continually upward.

Barf!

I pulled the trigger on a C64 with a reasonable asking price, opened the box, excitedly hooked it up to my LED TV’s s-video input, fired it up, and… sighed. It was back: that weird, ugly cousin that you always accepted as a kid when you didn’t know better, but get the creeps to be around today. The Static. The Noise. The… blech.
Colors were washed out, details were blurred and nearly doubled in some places, and an annoying broad band of mild noise was sweeping top-to-bottom about twice per second. This was The Beast at work; the shambling, groaning homunculus of a video chip that was always “good enough” back when the Commodore 64 was still brand new, and when nobody’s television was able to do better itself, anyway. Small aside before the crowd starts gasping: I did do some inspection before just blithely hooking up a used system. The previous owner had re-capped it (even marking the recent date on the RF enclosure lid) and provided a new aftermarket power supply as well. It was obvious he cared for this machine, and ensured the next user wouldn’t be plagued by the issues of an aging unit. So yeah, I knew it was safe to start working with right away,

Anyway, I did discover that new flat panel screens need a minor modification to the s-video cable (300 ohm resistor on pin 6), but even after doing that, I only succeeded in (mostly) getting rid of the sweeping bar. The rest of the smeared mess stubbornly remained.

While looking for information about what could be wrong, realized that the problem was endemic to its design: the VIC-II chip in my adopted Commie was one of the first models produced, and carried all the First Attempt Bugs(tm) that go along with it. I could try replacing that chip, but the preferred model is not direct-swap capable; I would have to adapt the motherboard to be able to work with a newer revision. Still, I maintained some doubt about whether replacing the chip would be a final solution, so I kept digging into other possibilities.

That’s when I encountered some buzz about projects that were developed specifically to address these issues, and dug in to figure out what would work best.

Clearing Up the Noise

It took some time, research and LOTS of reading of comments and feedback, but I finally settled on the VIC-II-dizer, which comes to the dance with a plus-one. You keep your VIC-II chip, but some added components will provide you with a crystal clear modern output format at the end. This is the best you’re going to see, if you want something that’s true to the system’s architecture, and is fully reversible too! Oh, and it does nothing short of magic to bring you a perfect display.

So here’s the gist (in really loose layman’s terms) of how it works:

The VIC-II-dizer intercepts the video stream at the point in the process just before the color information is merged in. There are quite a few components involved at that stage, and it’s the point where most of the noise is being introduced.

So the VIC-II-dizer produces a stripped down grayscale image that you can actually hook up to a monitor and work with, if you’ve got a black-and-white or monochrome screen. The results at this point are already pretty incredible, with most of the weird cyclic bars and warbles completely gone. This is what the developer, C0pperdragon, refers to as “LumaCode”. He’s essentially converted the video signal into a stream that can be colorized on the fly, by applying a color palette digitally to the image, assigning a specific luminance (brightness) level a unique color.

Which is what the RGBtoHDMI Pi hat does! The hat handles importing the grayscale signal, and determines the initial brightness levels we’re working with. The Pi (Zero) takes frame “snapshots” of the stream, colorizes the data according to the currently-selected palette (yes, you can decide to totally change the color palette if you want), then sends that frame out over HDMI connection to your screen, resulting in a display that is super smooth, razor sharp, and extremely low-lag.

This is THE best way to do this, in my opinion. Some people are so hung up on the nostalgia factor and experience that they’ll continue to accept all of the shortcomings of the technology of the day, but I simply can’t do that. Look, I really do appreciate what I had back then, but I simply can’t commit to dealing with physical floppy disks and flawed transfer speeds, while watching an image that is so bad it makes my eyes water, or being stuck with a tiny little display. Nostalgia is great, but after having experienced the current state of the art in display and storage technology, I really can’t bring myself to step that far back into the quicksand. A single SD card did away with hundreds of dollars of floppies in shoeboxes and countless wasted hours waiting for irrationally-long load times, and now, LumaCode brings a proper pixel-perfect image to our beloved systems, on big digital screens that we already have in the home.

Okay so how do you get it going for yourself?

Gather components

First, get over to C0pperdragon’s Tindie store. You’re going to need a few components:

  • The VIC-II-dizer itself, which comes with clip cables. If you have an early VIC-II chip, you’ll need to message C0pperdragon with your order to let him know, because the timings were odd with this chip, and the firmware needs to be setup to match that. See the closeup shot of my own VIC-II chip for reference. If it’s purplish with a yellow stripe, that’s red flag #1. The later more compatible VICs were in a standard black package.
  • RGBtoHDMI hat, comes with RCA/composite connection. This is an add-on hat for Raspberry Pi Zero, and again, you want C0pperdragon’s variation, as it comes pre-set for use with LumaCode output, and there’s no fussing around with getting the input cable hooked up (RGBtoHDMI is a broader project that supports many other systems, but Commodores, as always, are… er… special.)
  • Raspberry Pi Zero (to complete the RGBtoHDMI module). This is the unit that will actually give you the HDMI output to connect to your screen. You don’t need a Pi Zero 2 or 2W, though they will work fine if you happen to have either laying around already.
  • MicroSD card for the Raspberry Pi, of course. You can use just about any size you like; the firmware is tiny, nowhere near a full RPi OS installation, so even if you only happen to have a crappy 2GB card laying around, it’ll do just fine.
Install Vic-II-dizer into Computer

Broad strokes:

  • Open computer
  • Remove VIC-II chip
  • Install VIC-II-dizer interceptor in VIC-II socket
  • Plug VIC-II chip into interceptor
  • Disconnect original RCA output
  • Clip on VIC-II-dizer output to RCA jack and ground

So first, shut down, disconnect and open up your Commodore 64. Remove the RF shield, if you still have one mounted.

Gently remove the VIC-II chip from its socket. Pry on each end just a little bit with a plastic pry tool until the chip is loose enough to remove from the socket with your fingers

Slot in the VIC-II-dizer interceptor board. Look at the socket frame; there will be a divot in the “top” end. That divot should go into the main board socket facing the same direction that the VIC-II chip’s divot was facing. In my 3D model image, “top” is on the left end of the chip, so the interceptor goes into the socket with its divot facing left. The output pins should be pointing back toward the RF can.

Plug the VIC-II chip into the interceptor board’s socket, again making sure your alignment marks are on the same end. Again, in my case and example, that is the left end, as you look from the front toward the back of the main board.

Now we need to get into the RF can, that silver box at the back, where the RCA jack comes out from. You might need to gently pry up the lid which is crimped to the lower half. Now, clip the teeny tiny wire that connects the RCA jack center post with the main board. This is the original output signal, which you will no longer need. Just snip it and move it aside to disconnect it, you don’t need to rip the wire out completely.

Now, slip the those wires that came with the VIC-II-dizer onto the output pins of the interceptor board. They will be labeled “LUM” and “GND” for the live signal and ground lines. Run the LUM pin (the yellow wire in my example) to the center pin of the RCA jack inside the RF can. In my case, the center pin looks like a globbed-up soldered mess, just above that white arrow pointing outward. That glob provides a handy, “meaty” section for the alligator clip to get a good grip. Make sure the snipped line on the board side is pushed away and NOT making contact with your alligator clip, and therefore the RCA jack center post.

Now, the GND line from the VIC-II-dizer just needs a decent ground position, and the more exposure the contact point has to the ground, the better for removing any potential noise. For this project, I’m using the shroud of the cartridge port.

You are now done with the internal modifications, and it’s time to move on to the RGBtoHDMI unit.

At this point, your Commodore is sending out a straight grayscale image on the RCA jack. You could use this signal as-is if you’re only connecting to a monochrome CRT monitor, but if you want color and modern video connection, continue on.

Assemble RGBtoHDMI

Broad strokes:

  • Download, extract and copy firmware files to microSD card
  • Assemble RGBtoHDMI hat, Raspberry Pi Zero, microSD card and case (if purchased/printed)
  • Plug RGBtoHDMI tail into Commodore composite output
  • Plug HDMI monitor and power into Raspberry Pi
  • Turn on Commodore

First, you’ll need to make sure you’ll be using the very latest firmware revision for the RGBtoHDMI. Some earlier versions suffered from problems with default display timings, format, and saving changes between reboots. Any current release from “20240213_e630d36f” (https://github.com/IanSB/RGBtoHDMI/releases/tag/b6a2b79) and up should be good.

Download and extract the zip file to your computer. Format the SD card as FAT32, and drop the extracted files onto the card.

If you ordered the kit and 3D printed box from C0pperdragon as well, mount the Pi into the bottom half of the box with two of the included screws. The spacers go into the holes in the Pi’s board on the side opposite the pin headers.

Insert the SD card into the Pi. There is an opening on the left side of the case that should allow you to do this. Note that unless you have crazy Nosferatu nails, you’re probably going to need a set of fine tweezers to get that card back out later, if you need to update or change something around.

Now install the RGBtoHDMI hat atop the Pi’s GPIO pins. You can see the little spacers provide support for the hat on the side opposite the pin header, which is good because that’s also the side where all the navigation buttons are!

Now snap on the case top.

Plug the RGBtoHDMI into the Commodore’s RF jack, connect your display HDMI cable to the Raspberry Pi (remember the Pi Zero needs mini-HDMI, so bring a dongle or converter cable to the party!) and finally, connect power to the Pi.

Now, the moment of truth: turn on the Commodore. If your settings are right, you should see a display immediately. My photos can’t really do justice to the actual image, but compare the last photo with the original image quality shown:

Incidentally, yes, I did change the kernal ROM between the “before” and “after” images. I had a little 8-in-1 switchable ROM I wanted to try out, so I slapped it in while I was under the hood installing the VIC-II-dizer. That’s why you see the original Commie boot screens before, and JiffyDOS after.


If you don’t see magic right away, you might need to navigate the menus and change some things. Here’s what those little buttons on the RGBtoHDMI box do (from the RGBtoHDMI quick-start guide):

SW1:
  • Short press = Call up menu
  • Long press = toggle scanlines (if available) on/off
SW2:
  • Short press = Screen capture (File is written to SD card)
  • Long press = Toggle NTSC artifact colours on/off
SW3:
  • When NTSC artifacts are enabled, SW3 short press cycles though the four NTSC artifact phases
  • When Manual timing sets are enabled, SW3 short press switches between set 1 and set 2
  • If neither of the above are enabled, SW3 short press enables (if disabled) or refreshes the genlock
  • Long press = Calibrate sampling position
When the menu is on screen:
  • SW1: Select menu option or enter editing mode for the selected parameter
  • SW2: Cursor Down or increase selected parameter
  • SW3: Cursor Up of decrease selected parameter

Pressing SW2 and SW3 together will take a screencap with the menu on screen

As an initial pointer, don’t forget about the 50/60hz difference between NTSC and PAL video output types. Try switching the timing rate in the menu to see if that brings the display up.

For more detail, check the guide linked just above.

You may also like...

Leave a Reply