Sven Krasser’s Blog

Musings on technology, security, and sundries.

Building a Commodore 64

The C64 has a special place in my heart. My uncle bought one of the initial breadbin versions when it came out in the 80’s, and my cousins taught me programming in BASIC on it. I was hooked on computing. Later, I got my first computer at home as well, a C64C—or C64-II as it was marketed in Germany.

Nearly four decades later, the C64 community is still going strong. There is even new commercial software released for the platform to this day. There are a number of ways to experience the C64 today. The quickest route is by emulation, e.g. using the VICE emulator. I’ve used VICE and the ACME cross-assembler to write a small game a few years ago (ACME is the same assembler used for my breadboard 6502 project). Cloanto sells C64 Forever, which wraps VICE in a convenient launcher and comes with a bunch of software to try out.

Another option is to buy THEC64, which also emulates the looks of the C64. Under the hood, it uses an ARM CPU to run an emulator. There’s also THEC64 Mini in a smaller form factor and without a working keyboard (I own a Mini, mainly to play California Games). Outside of emulation, there are FPGA/ASIC-based implementations such as the C64DTV. The MISTer is built around a Cyclone V FPGA that can be configured to implement numerous retro platforms, including the C64.

You can also still find original C64s on sites like Ebay. Often, some attention is required such as replacing the capacitors on the circuit board or getting a new power supply as the original power supplies have established a reputation of failing while frying the attached system. Another route to an almost-original system (for varying degrees of “original”) is to build one using modern replacement parts, which is the focus of this post. There are three main areas to consider: the circuit board, the case, and the keyboard. Let’s take a look!

Arduino Raster Bars Redux

After sitting partially dismantled for about 5 years in a toolbox, I resurrected my old Arduino Raster Bars project. The primary reason for the endeavor being that I recently bought a video capture device that can digitize VGA signals, and I wanted a higher quality video of the output than the footage I filmed with a DSLR camera off the monitor. There’s a new video on my YouTube channel, see below, that shows the result and also explains the effect in a bit more detail.

Pandemic Projects: Sewing Pajama Pants

With many businesses and locations still shut down, projects at home are a good way to keep busy. While most of the posts on this blog revolve around electronics, information security, and machine learning (or on rare occasions rocket launch pictures), my most recent endeavor is in a new area: sewing. Specifically, sewing pajama pants, which as I understand it is to sewing what “Hello World” is to programming. If you enjoy the other topics on this blog, then maybe consider giving sewing a shot—it’s actually quite fun seeing something wearable coming together (and wearing it, of course).

More Colors, More Visuals, Some Math

The latest addition to my homebrew 6502 computer is more colorful graphics output. To be specific, the system now supports output in 256 colors. As a little exercise, I’ve implemented a rotozoom effect to put the system through its paces. In this post, I’ll cover the hardware, the effect, and the implementation. Before getting into the details, you can find a YouTube video below showing the system in action. You can view the effect about one minute into the video.

Animation on the Homebrew 6502 Computer

In this second part on outputting a VGA signal from my homebrew 6502 breadboard computer, we’ll take a look at getting some motion onto the screen. If you missed the first part, you can catch up on the progress so far here.

Graphics for the Homebrew 6502 Computer

After an 18-month hiatus, I continued work on my homebrew 6502 computer by adding VGA output so that programs can now generate some interesting graphics instead of just turning LEDs on and off.

Security Voices

In February, before the current Coronavirus outbreak hit the U.S. in earnest, I met up with Dave Cole in Marina del Rey to join as guest on an episode of the Security Voices podcast, hosted by Dave and his partner in crime Jack Daniel.

USB Mini Media Keyboard

For my latest electronics project, I’ve built a small USB keyboard input device for media control. The final version has three keys: play/pause, previous track, and next track. In addition, a rotary encoder allows adjusting the volume (or mutes sound when pressed). This is also my first project involving a custom circuit board — my previous electronics projects mainly involved breadboards of varying sizes.

Homebrew Computer: Adding a 6522 VIA

In my last post, I wrote about my first steps towards a 6502-based homebrew 8-bit computer. Since then I’ve added a 6522 Versatile Interface Adapter (VIA). More specifically, it is a W65C22S. The VIA has a number of functionalities (after all, it makes a claim to being versatile).