NEWS, EDITORIALS, REFERENCE

Subscribe to C64OS.com with your favorite RSS Reader
May 17, 2024#126 Hardware

RAD Review

Post Archive Icon

I haven't done a hardware review in a while, but I have acquired a few new pieces of hardware to test with C64 OS for compatibility. Today we're going to talk about the "RAD" RaspberryPi-based REU cartridge for the C64.

Before we get into that, a couple of very brief updates about C64 OS and c64os.com. I have been hard at work on the next major update to C64 OS, v1.07. For context, Version 1.06 was released in March 2024 and brought fast app switching via REU. This has been huge, it totally changes how C64 OS can be used and makes it significantly more powerful.

In version 1.07 C64 OS is gaining networking abilities. I won't go into details yet on how the networking in C64 OS works, but, I think it's going to be pretty great. I am quite far along in its development, and am now in the phase of testing and debugging and implementing the first few Utilities and Applications that make use of the internet.

Lots more to come soon. And when I'm a bit further along I'll write up a technical blog post explaining how the networking support is designed.

I've added a new page to the C64 OS sub-site of c64os.com, called "The C64 OS Video Guide." It is a kind of gallery of videos that I've previously posted either to Twitter, Youtube or both, and which are now available on the OpCoders Inc Youtube channel.

I thought it would be nice if you could find those videos on a page on c64os.com. They are in a few categories, and go back to the very beginning. So, many of these videos show super early builds of C64 OS, it's quite a blast from the past. And some of the most recent videos are from just a couple of months ago. I'll continue to add videos to this "Video Guide" as they get uploaded to YouTube.

The C64 OS Video Guide.
The C64 OS Video Guide  

My short REU history

I heard about the RAD when it first became a thing, though I can't remember exactly when that was. It promised to be a very inexpensive 17xx-compatible REU option for your Commodore 64, which is built around a Raspberry Pi 3A+ (or some other models). That sounds pretty good.

I watched some videos out of curiosity, but I already have a couple of real REUs; one from CMD, 2MB 1750XL and a Super 1750 clone 512KB from Chip Level Designs. The CMD 1750XL I acquired new in the 90s and I picked up the 512KB clone at a tradeshow in the early 2000s for a good price. Additionally, I have an Ultimate64 which has REU functionality built-in, plus I have a 1541 Ultimate II+ which I have installed in my C64 Luggable. I'm pretty set for REUs I think; I don't really need another.

CMD 1750XL 2MB. CLD Super 1750 Clone 512KB.
CMD 1750XL 2MB (left), CLD Super 1750 Clone 512KB (right)

A couple of guys on the C64 OS Community Support Discord server started talking about the RAD and wanted to know if it was compatible with C64 OS. Now, that actually is a reason to buy more hardware; testing it for compatibility with C64 OS. And if any incompatibilities are discovered, having the hardware on hand is useful for rapid testing of changes to C64 OS to fix the issues.

I went to World of Commodore 2023, and fancy that, someone was at the show with a table on the showroom floor for demoing the RAD, the Sidekick64, and a couple of other things. Both of those use a Raspberry Pi. The Sidekick64 can do more stuff, but I'm not that interested in how much it can do, I wanted the RAD specifically so that I could test it. If it works, I could check it off the list as being C64 OS compatible. He had a bunch of boards there for sale. So I bought the RAD, for $65 CAD, and he gave me his email address and we talked about the easiest way for me to procure the appropriate Raspberry Pi.

What is the RAD

Well first, what is an REU? Commodore released the first 17xx REU in 1985 alongside the C128. Then a few different models with different memory capacities were released, including some marketed specifically for the C64, even though all of them are compatible with the C64, on the condition that you update your power supply to one that can handle the extra load.

The REU (RAM Expansion Unit) is a clever little device. It is a cartridge that plugs into the C64/C128's expansion port. It has external RAM (128KB, 256KB, 512KB, 1MB, 2MB, 4MB, 8MB or 16MB, in its modern implementations) and a custom controller chip known as the REC or RAM Expansion Controller.

The REC chip is like a special purpose processor. It has a number of registers mapped into a small region of I/O space, and it has access to the data bus and the full address bus, as well as having control over the /DMA line. It also gets input from the /BA line that comes from the VIC-II. Your program sets into the REC's registers an address in the C64's main memory (16-bit, 2 address bytes, maximum range 64KB), and it sets an address into the REU's own memory (24-bit, 3 address bytes, maximum range 16MB.) You also set a 16-bit size to transfer, and a data direction: C64 to REU, REU to C64, or full swap. There are two ways to trigger the start of the action, but I won't get into that here. When the action is triggered the REC chip asserts the /DMA line which halts the 6510 CPU and puts the CPU's address and data lines into HighZ. In other words, it's like the 6510 temporarily doesn't even exist. The REC then proceeds to directly read and write main memory and does the transfer with maximum theoretical speed.

The fastest that memory can be accessed (read or written) is 1 byte per cycle. And the C64 runs at ~1 million cycles per second, so the REC can read or write main memory at around 1MB/s. Since the C64 only has 64KB total memory, it can replace the entire contents of main memory with whatever is in external memory in around 1/16th of a second, or it can do a full swap in 1/8th of a second. By C64 standards this is very fast. In practice it gets slowed down by a few things. The VIC-II still needs to access main memory every 8th raster line, during which it asserts the /BA (Bus Access) line, which temporarily pauses the REC the same way it temporarily pauses the CPU. Even with this, the REU is still very fast.

The REC has been used to great effect by games and demos (and by C64 OS) to accelerate moving blocks of memory around. The REC chip, by its design, is much more efficient at moving a block of memory than the CPU is. The only problem is that the REC chip is a custom controller, and when those chips became scarce in the early 2000s the REU quickly became unobtainable. A little bit like the SuperCPU is now.

As the years passed, there became a few options to overcome this shortage. The TurboChameleon64 has the functionality of an REU built-in, the aforementioned Ultimate64 and Ultimate II+ have the REU functionality built-in. And of course, VICE also has REU emulation support, which means TheC64 mini and Maxi also have access to an REU. But what about adding an REU to the good ol' breadbin or a C64c that you have and want to use? The only real options are the TC64 or the UltimateII+, both of which do a lot more than just an REU, but they also cost a fair bit of money.

Another thing that developed over the last so many years is the Raspberry Pi, a small, easily programmable, low-cost computer with a standardized GPIO port that is ideally suited for being embedded into hardware projects that need some brains.

RAD board, top side. RAD board, bottom side.
Top side on the left, and bottom side on the right.

The RAD is, therefore, the love child of necessity and opportunity. The RAD is, at its core a very simple board, with very few parts, that can be plugged into the C64's expansion port and has a female header perfectly sized for a Raspberry Pi's GPIO male pin header. You plug the Raspberry Pi into the RAD, you plug the Raspberry Pi into the wall (for power), and you plug the RAD into the C64's Expansion port. Then you install the bare-metal RAD software onto a microSD card which you insert into the Raspberry Pi. Power up the Pi, then power up the C64, and bingo bango, your C64 has an REU for the very low cost of just that simple RAD PCB and its very few and off the shelf parts.

That's the theory anyway.

My journey with RAD

First of all, I was pretty excited to try the RAD. It's primarily an REU, 17xx compatible, but it has some other features too. It has a menu button that lets you enter into its menu screen. When in its menu screen it streams a .WAV file (installed on the microSD card) at the SID chip so you hear (yeah, I'm gonna say it) totally rad digitally sampled music with a pretty cool bitmap waveform animating on the screen too.

From the menu, you can adjust the size of the REU (though to be honest, I'm not quite sure why you'd ever set it to less than 16MB, I guess it's for compatibility with some older software.) You can also, alternatively, configure the RAD as a GEORAM. GEORAM is a different type of RAM Expansion, it's a simpler technology and has numerous other commercial options today, but, nonetheless it's nice that the RAD can double as a GEORAM too. And it's configurable in increments up to 4MB (the GEORAM's maximum.) Another rad feature of RAD is its ability to dump .PRG files directly into memory using DMA. This is something the UltimateII+ can do too. It's not a solution for multi-load disk games, but for a great many games, demos, and other utility software that consists of just one file, you can put those files on the SD Card, and **wham** they can be loaded into memory and run with lightning speed. I could see all these things from the demo videos, so I was excited to try this stuff out with the actual hardware.

Acquire the RAD

I was selling C64 OS at the show. So, I sold some C64 OS bundles, and then turned around and bought a RAD, for $65 CAD. What you get though is just the board, the naked board. No power supply, no Pi, no case, etc. Technically you can make the boards yourself by sending the files to PCBWay, and you can buy the parts and solder them on, but like I did with the Versa64Cart, it only makes sense if you want to make at least 10 of them, because you can't really buy the parts you need in the exact quantities you need them in. Plus, the chips are surface mount, and my soldering skills are poor, so it was worth it to buy one from someone who'd already preassembled it.

Oops. I just noticed this message on the RAD GitHub readme.

I’m frustrated to see that some people try making money from open source projects of others although they have been released under a non-commercial license (such as the RAD Expansion Unit).

The production cost for a complete RAD is below 10 Euros/Dollars per piece. There are a few commercial sellers with a permit to sell RADs. They have to not only cover production cost, but also pay taxes, bear additional expenses and comply with various regulations which justifies a higher price tag.

However, if someone who is NOT on the list below charges you more than 15€/$15 US/$20 CAD this is not only a violation of the license (commercial intent), but YOU have been ripped off. I don't blame you as the buyer, but perhaps you should ask the seller how he/she justifies this. Feel free to let me know about these sellers.

https://github.com/frntc/RAD

I honestly do not want to get into the weeds of whether the person selling the RAD for $65 CAD at World of Commodore is in violation of the license. I should just say, I didn't feel like I was being ripped off. Although it seems that at that price a profit was being made. I have redacted the name of the seller from this blog post.

Acquire the Raspberry Pi

During COVID there was a sudden dearth of Raspberry Pi availability. This is a major consideration. I was reluctant to buy a RAD at the show because I didn't have a Pi and I had heard they were really hard to come by. He assured me that they are available, and recommended a site, rpilocator.com. It essentially tracks the availability of different Raspberry Pi models from all over the world and lists the prices and the sites at which they are currently in stock. I was convinced, but that had to happen before I bought the RAD.

At home, I used rpilocator.com to find and order a Raspberry Pi 3A+ from a Canadian source, pishop.ca for a reasonable price (in my opinion) of $52 CAD. There are other Pi options that might work, however, the shape of the RAD board itself is designed ideally to fit a 3A+, and there is a 3D printable case that is also designed around the RAD with Raspberry Pi 3A+ combined.

Acquire a power supply

There is a pair of pins on the RAD which you can close with a jumper to power the Raspberry Pi from the C64. However, the official site itself warns against using this (strangely). Powering the Pi externally via its micro USB port relieves strain on the C64 and its power supply and can give you better and more reliable results. Externally powering it also means you can power on the RAD before you power on the C64, and later you can power cycle the RAD without needing to power cycle the C64.

USB comes in a myriad formats.
USB comes in a myriad formats

USB comes in a bewildering number of form factors. The rPi 3A+ has a USB micro B port on the end that faces away from the back of the C64 when its all hooked up. So you need to get an appropriate USB cable and connect it to an appropriately powerful USB port. The Raspberry Pi 3A+ requires a minimum of 2.5Amps, this means that most iPhone chargers are not sufficient to power the Pi. Checking this site: https://support.apple.com/en-us/HT210133 we can see that the 5W adapter is only 1A, the more common 10W adapter is only 2.1A, the nearly identical looking 12W adapter is still not enough at only 2.4A. Which means only the newest kind of adapter, the 18W or 20W USB-C power adapters provide 3A. And then you're stuck trying to get a cable from USB-C to micro-USB-A. You're unlikely to find that cable, so you'd likely need a USB-C cable plus an adapter.

Alternatively, you can just buy a 3amp (or 2.5A) USB power brick and a regular USB-A to micro-USB cable. Those bricks are about $20, and the cables are around $8 maybe. I got lucky. When my friend Jérémie of Double-Sided Games moved back to France he gave me a pile of power adapters that are only useful in North America. One of them just happened to be a power brick with a built-in cable that terminates with a micro-USB jack, and it was rated at 2.5 amps. He probably bought it to power a Raspberry Pi! Lucky me!

Acquire a case

When the Pi arrived, I was hooking it up and trying it out with just the bare PCB hanging out the back of the computer. But, that sort of thing worries me. Especially as I have screws and other conducting materials (like paperclips) on the display stand above the computer. If a screw should fall on that PCB while the computer is on, that just makes me nervous.

I downloaded the 3D Printable files from Thingiverse, that is linked to from the official RAD GitHub page. Found a (somewhat) local source to produce it. There used to be a guy in my home city, Kingston, who I would use. That was convenient because I could run over to his neighborhood after work, usually that day, and just pick it up and save the shipping cost too. He's not in service anymore, so I ordered from Montreal. It cost $40 CAD to print and ship the case. I got a red one; a red RAD.

Boot up problems

This is where my frustration began.

I'm a pretty smart guy, and I can follow instructions without much trouble. But I could not get my RAD to work. Now, bear in mind, I'm also totally unfamiliar with the Raspberry Pi; this is my first rPi anything.

The official RAD GitHub has a set of files you can download and instructions to put the files on a microSD card. Insert the microSD card into the rPi, power it up and enjoy your RAD experience. The problem is that this just didn't work. I kept getting an odd blinking pattern in the LEDs on the Pi. I had an email exchange with the seller, and his suggestions ultimately weren't helpful. Now to be fair, he is not the creator of the project and so is not expected to know the ins and outs of the firmware and its compatibility, etc.

I just had no idea where the problem lay. Some people said it might be the microSD card, so I ordered another one of those, for $20 CAD. When it arrived, and I tried it, there was no difference. I contacted the tech support people at PiShop.ca, because I didn't know if maybe my Pi was broken. They said the number one problem is insufficient power, but I was sure the power supply I'm using meets the stated requirements. Next they told me to use the official Raspberry Pi OS installer and walk through that to configure the software. I downloaded that for macOS, and installed a full Raspberry Pi OS on the microSD card. I tested that, and it worked! Connecting the HDMI cable to a TV I use for my Ultimate64, the Raspberry Pi booted up. So that wasn't the problem.

As a side note, I was getting frustrated by this process. What I wanted to have was a cheap REU for my Commodore 64, and the ability to test it for C64 OS compatibility. But where I found myself was installing software on my Mac notebook, then installing a full Linux OS on the microSD Card, and then booting up a Raspberry Pi as a whole computer. It just didn't feel to me like I was using a piece of retro-kit for my Commodore 64. By seeing Linux on the Pi, it broke the magic that the Pi is just a blackbox generic bare-metal programmable brain for a retro computer expansion device, like an REU.

After trawling through forum posts, and reading documentation about the Pi for the meaning of the blinky LED patterns, I figured out that the Pi was failing at some stage of the boot loader when running the RAD software. Eventually I figured out the relationship between the Raspberry Pi's provided software and the part that is custom for the RAD. For example, when you download the RAD firmware release and unzip it, there are a bunch of files. The following files are not actually specific to RAD:

  • bootcode.bin
  • fixup_cd.dat
  • fixup.dat
  • start_cd.elf
  • start.elf

These are files that are provided by Raspberry Pi's own GitHub page, and are the same ones that would be used by almost any bare-metal project. They boot up the hardware and provide some sort of basic I/O for the custom RAD files (rad-prefetch.bin, kernel_rad.img, config.txt, etc.) The generic files are included in the RAD release as a convenience. Just download one .zip file, and copy all of its contents to the microSD card, and you're done!

What I later discovered is that there is more than one hardware revision of what is called "Raspberry Pi 3A+", there is the 2018 revision and the 2022 revision. The only way to tell them apart is by the year silkscreened onto the PCB. Plus, if you're very saavy, the chips and their layout in one small area of the Pi are slightly different. This turns out to make a huge difference. Those files listed above that are (were? I don't know if they've updated them yet,) included in the RAD release are only compatible with the 2018 revision!!

I went to the official Raspberry Pi GitHub repository, and found the most up-to-date versions of all of the files with the same names in the RAD release, and replaced them. Understand, I know next to nothing about how the Pi works, and frankly, I'm not doing any of this because I want to know how the Pi works either. So it felt pretty gangster to be replacing files in the official RAD firmware release with files from a completely unrelated GitHub repo, and even a different account, that I'd found through independent research.

To my shock and surprise, it worked.

The point is simply this: RAD's repo drew in and included some boot files from the Raspberry Pi repo, because it's convenient for the RAD end user. But then, a new revision of the Pi 3A+ was released, and the people who maintain the RAD repo either didn't know this or didn't test their release against the new hardware. And I was left high and dry with no clue why it wasn't working.

Acquire the screws

Once I had it working, and I had the 3D printed case in my hands, it was certainly more satisfying. But we're done yet. The 3D printed case is only the plastic printed parts. When they arrived, there is part that kind of snaps together with these little clips that are part of the case. But there is a bottom piece that covers over the Pi that has to be held to the upper piece by four screws.

It turns out that these screws are extraordinarily rare. They have to 2.5mm diameter, in order to pass through the tiny corner holes of the Pi and RAD PCBs, plus they have to be within a very specific length, 22mm to 24mm. 25mm is too long and the screws won't fit flush into the bottom of the case. 20mm is too short, they won't reach the inside of the top case to hold them together. I searched high and low, with organic web searches, on Amazon, on ebay, on ebay from different countries, on Alibaba… I swear to god these screws are like fantasy screws that don't really exist.

I asked on Twitter, and found a single source. A random hobby shop in middle of rural United Kingdom. When I tried to order some they told me that they don't ship to Canada. I can't even remember how, now, but somewhere, from the thingiverse.com page for the 3D printed cases, I found a link to some other page that gave a link to where you can find the screws. When I was finally able to order them, I scarcely believed it. I paid $28 CAD for a bag of like 30 of them. Of course, I only need 4 screws. Now I have 26 leftovers of some of the rarest screws on earth.

Acquire the sticker

The GitHub page for RAD includes some high-res JPEGs of the sticker that ought to go on the top piece of the 3D printed case. The actual quality of the 3D print is not particularly high. I suppose I could have ordered it with a higher print quality, but at $40 CAD already, I didn't really want to spend more money.

I printed the sticker out in color to paper with an ink-jet printer. I have yet to glue the sticker to the case, because I feel like there should be some way to sand and buff the 3D printed case to improve its appearance and smooth its rough edges. After I've done that I'll glue on the label, and then to prevent the ink from getting smeared on the top, I'm thinking I'll paint over it with some clear-drying hodge-podge or something like that.

Bag of screws and a home printed sticker. Screws in the bottom of the case.

Using the RAD

I got warned by some people in Discord that the RAD might not play nicely with other cartridges. If there is I/O conflict the RAD could damage either the computer or the other cartridge. This disclaimer is actually on the official RAD GitHub page:

Be careful not to damage your RPi or 8-bit computer, or anything attached to it. I am not responsible if you or your hardware gets damaged. In principle, you can attach the RPi and other cartridges at the same time, as long as they do not conflict (e.g. in IO ranges or driving signals). I recommend to NOT do this. Again, I'm not taking any responsibility -- if you don't know what you're doing, better don't... use everything at your own risk. https://github.com/frntc/RAD

It actually says, in principle it should be usable with other carts. But then it also explicitly says, I recommend to NOT do this. The official site recommends NOT combining the RAD with other cartridges. Well, in order to boot up C64 OS on my C64c, the only machine I'm willing to sacrifice in the name of science (though I'd be bloody upset if it got damaged) I typically use with an IDE64. However, there is so little guarantee that it won't damage my IDE64 that I cannot in good conscience take the risk. If this thing were to damage my IDE64, I would be far beyond pissed off. So, I'm not doing it.

And so, in the end, I still have not yet tested the RAD with C64 OS. That's still on my list of things to do, when I get around to hooking up an SD2IEC to that C64c (which doesn't have JiffyDOS, but the IDE64 usually obviates the need for it.) Eventually I'll get back to this.

The promise and the sad reality

The promise is that for very little money, you can get an REU (plus some other nice features) on your Commodore 64 or 128. Why spend all that cash on something like an Ultimate II+ when you can get a RAD for so much less?

The reality is somewhat different. If you already have a bunch of Raspberry Pi's kicking around because you're that kind of person, and you don't mind not having a case because you just like playing with projects, and you are handy with a soldering iron or already have the tools you need, and you are cool with having extra parts hanging around, and ordering parts from different places, then... I think you actually could put this together for fairly cheap.

But if what you want is a finished product, then here's what it cost me: (in Canadian dollars.)

  • The RAD itself, $65
  • The Raspberry Pi, $52
  • 3D printed case, $40
  • microSD card, $20
  • screws, $28
  • power supply, lucked out in having one, but more like $20

The grand total in cash is $225. But that doesn't quite capture the true cost, because I had to spend a huge amount of my personal time hunting down and ordering bits and pieces from all over the internet. Plus I had to spend a lot of time sorting out how to even get the firmware to work with the Pi that arrived in my mailbox.

Although you could use the Pi for other projects, so that $52 could be considered not tied to the RAD, in practice, once you screw the case closed with the Pi neatly concealed inside and the RAD is plugged into the C64, that Pi and all the other parts (like the power suppy and cable and the microSD card) are for all intents and purposes required to stay tied to that device, essential for it to actually work.

Furthermore, for my $225 dollars, the 3D printed case is pretty crappy. It's quite low quality and requires extra work (and research, and time) to buff and polish it to make it look half decent. The sticker is super home-brew, being printed on paper and then glued and hodge-podged. But getting a commerical sticker printed up would have added to the overall cost.

AND, after all this, the device is incredibly temperamental. It cannot be used, safely, with other devices that one would want to use concurrently with an REU.

If you contrast this with, say, an Ultimate II+, it's like night and day. The UII+ is only slightly more expensive. But the UII+ can do dramatically more, is powered safely from the C64 itself, has a high quality professional enclosure, has a firmware update system that is 100% reliable, and the UII+ can also be safely used with other cartridges. Plus, when you order an Ultimate II+, you place one order for one thing from one source and it arrives as a complete product ready to plug in and use.

Final Thoughts

This is a quote from the official RAD GitHub page:

You've built it yourself? Cool, this project is for tinkerers! https://github.com/frntc/RAD

I believe that this sums up the RAD almost perfectly. This is a project mostly aimed at tinkerers.

There is nothing wrong with being a tinkerer who likes projects for tinkerers. I'm sure that a great many people in the retro computing world fit this description. And I am in no way attempting to disparage their hobby. If ordering parts and assembling things yourself is part of the fun for you, then this might be right up your alley. But you need to know this before you go down the path that I did, because if you're looking for a buy-once, and it works and is very polished, reliable and compatible, then this might not be for you.

View of the side of the case. View of the back end of the case.

Do you like what you see?

You've just read one of my high-quality, long-form, weblog posts, for free! First, thank you for your interest, it makes producing this content feel worthwhile. I love to hear your input and feedback in the forums below. And I do my best to answer every question.

I'm creating C64 OS and documenting my progress along the way, to give something to you and contribute to the Commodore community. Please consider purchasing one of the items I am currently offering or making a small donation, to help me continue to bring you updates, in-depth technical discussions and programming reference. Your generous support is greatly appreciated.

Greg Naçu — C64OS.com

Want to support my hard work? Here's how!