The C64

Commodore started out manufacturing typewriters and adding machines, then moved on to electronic calculators and eventually computers. In 1976 they purchased MOS Technology, the company that built the 6502 processor, used in the Atari 2600, NES, Apple II, and many more. Part of Commodore's success was due to the fact that they could manufacture their own chips in-house at MOS.


Commodore PR-100 programmable electronic calculator (source: D. Meyer, Wikipedia)
PET 2001 - Photograph by Rama, Wikimedia Commons, Cc-by-sa-2.0-fr

The PET and VIC-20 had already been successful for Commodore and in 1981 they started working on a new system with new chips (the VIC-II video chip and SID sound chip). CEO Jack Tramiel said that it should have 64KB of RAM - expensive at the time, but prices were coming down and Tramiel knew that it would be viable by the time the machine was ready.

The C64 debuted at CES in 1982 and started shipping eight months later. Because they could manufacture their own chips, Commodore was able to sell the C64 for much less than other systems, and they sold it in regular stores rather than just in computer or electronics stores. Commodore sold between 10 and 17 million units by 1994.

Due to its popularity, software developers targeted the C64 and wrote tens of thousands of titles for the system. Games were especially popular - the VIC-II and SID chips were far more capable than the video and sound in most other computers and made it a great platform for games.

By the early 1990s PCs were getting more affordable and more capable and the market for systems like the C64 was dying out. Commodore released the Amiga (while battling with Atari, now owned by former CEO Jack Tramiel, over rights to produce such a computer) but it wasn't enough to save them from the PC. Commodore declared bankruptcy in 1994.

The C64 lives on with a huge enthusiast following. People are still writing new software, building new add-ons, and even building modern versions of the 64 with HDMI and Ethernet.

It's also well-supported with emulators, so let's install one and check it out!

There are tons of C64 emulators for a variety of computers. For this tutorial, let's use VICE - the Versatile Commodore Emulator. It runs on pretty much everything: Windows, Mac, Linux, Android, DOS, BeOS, QNX, OS/2, and many more. It can emulate most of the computers Commodore made, including the 64.

I'll be using the Windows build for this guide, but they're all similar. Get the GTK3VICE build if you're using Windows. Extract and run x64.

The system starts up in BASIC. You can try some things for fun:

Go to File, Reset, Soft Reset to get back to the start. On a real C64 you can press the RUN/STOP button to stop the program.

Next we need some software, and there are a lot available. Let's pick a demo to start: https://archive.org/details/Desert_Dream_2007_Chorus_Side_A. Click Show All under download options, then get the two d64 files. D64 is the extension commonly used for a C64 disk image.

Demos are programs written to push the limits of the system and show what can be done with limited resources. By using complex programming tricks and using the system in ways the designers never even thought of, demo programmers accomplish some crazy effects.

Once you have the d64 files, in VICE to go File, Attach Disk Image, Drive #8. Select the Side A image and click Autostart. On macOS and others you can run it from the command line in the tools folder, ./x64 Desert_Dream_2007_Chorus_Side_A.d64.

3D graphics, cool music, and voice samples on a machine from the early 80s? Pretty impressive.

Check out this demo released in 2000:

While it may not seem that advanced when you're used to modern 3D graphics and sound, most of these effects shouldn't even be possible on the C64.

There are many thousands of demos, programs, games, and other software for the C64, so we won't go over all of that here.

You can also write your own programs! Let's take a closer look at the built-in BASIC.

Like most of the computers of the time the C64 had a very minimal operating system but it came with BASIC and booted straight into it. If you wanted to run something, you had to get a disk drive (or cassette, or cartridge, but mostly disks) and buy some software, or you'd find a program in a magazine and type it in by hand.

Try this one, it's short but fun:

20 PRINT CHR$(205.5 + RND(1));
40 GOTO 20

Now type RUN and press enter. Pretty cool, huh?

You can also do more advanced graphics, try this one from ComputerRetroGamer on YouTube.

Thankfully the emulator allows you to copy and then paste the program in rather than typing it all by hand. Back in the day you had to type it in and make sure you didn't make any mistakes!

10 print chr$(147)
20 ca=1024:cp=54272:r=25:co=40
30 poke 53280,0:poke 53281,0
40 forw=3to50:fori=1to12:forj=0to12:k=i+j
50 c=j+j+j/(i+3)+i*w/12
60 k1=ca+i+(co*k):i1=ca+k+(co*i):c1=cp+k1:c2=cp+i1
70 k2=ca+(co-i)+(co*(r-k)):i2=ca+(co-k)+(co*(r-i)):c3=cp+k2:c4=cp+i2
80 k3=ca+(co-i)+(co*k):c5=cp+k3:i3=ca+k+(co*(r-i)):c6=cp+i3
90 k4=ca+(co-k)+(co*i):c7=cp+k4:i4=ca+i+(co*(r-k)):c8=cp+i4
100 poke k1,81:poke c1,c:poke i1,81:poke c2,c
110 poke k2,81:poke c3,c:poke i2,81:poke c4,c
120 poke k3,81:poke c5,c:poke i3,81:poke c6,c
130 poke k4,81:poke c7,c:poke i4,81:poke c8,c
140 nextj,i,w
150 goto 10

Type (or paste) that in the emulator and then press enter.

This is just barely scratching the surface of what you can do, there are full-fledged games/programs/etc written in BASIC. You can use sound, graphics, access peripherals, and much more. There's an entire genre of music based on the SID and other sound chips, check out Chiptune.

Take a look at this guide from 1983 for some really in-depth BASIC: https://archive.org/details/How_to_Program_Commodore_64_BASIC_for_Beginners.

If you'd rather use the real hardware, you're in luck! Since they sold so many systems, there are still quite a few out there and you can probably find one locally or on an auction site. Check out the myriad of Commodore user groups, meetups, and vintage computer festivals.

Ports of the C64
The 1541 Floppy Disk Drive

There are also tons of mods and modern hardware devices for the C64. Everything from joystick adapters to storage adapters to complete reimplementations on FPGAs:

Pi1541 - a 1541 floppy emulator for the Raspberry Pi

Ultimate 64 - a complete C64 motherboard replacement with HDMI, Ethernet, USB, and more

FPGASID - an FPGA implementation of the SID sound chip

BreadBox64 - mods and modern hardware for the C64

Syntiac FPGA-64 - an FPGA implementation of the C64

C64 Reloaded - a brand new C64 motherboard, BYOC (bring your own chips) to build your own C64

Retro Innovations - adapters, cables, boards, etc.

VR64 - yes, VR for the C64!

The C64 Wiki

C64 Emulators at the Emulation General wiki

archive.org C64 software library



Vintage Computer Federation - Check out a Vintage Computer Festival near you to see all kinds of Commodores and other vintage systems.

This guide was first published on Sep 25, 2019. It was last updated on Sep 25, 2019.