iljitsch.com

blog topics: BGP · IPv6 · more · my publications · my business: inet⁶ consult · contact: Twitter · LinkedIn · email

Reviving the C64 (or C128) experience (posted 2020-09-08)

In this post, I want to look at different ways of running an emulated Commodore 64 (or Commodore 128) and how they compare. The contenders are the THEC64 Mini, a half-size recreation of the C64 powered by an ARM CPU running an emulator, the full-size THEC64 that adds a working keyboard and the VICE emulator running on my MacBook Pro.

This story is getting pretty long, so I'm going to start with the conclusion.

The THEC64 Mini is pretty good for playing games. Just hook it up to your TV, which is exactly what we did with the original C64, too, and it's super easy to use it to play the 64 included games, some of which are pretty good. After a firmware update, it's now also fairly simple to use C64 disk images on a USB flash drive. The THEC64 Maxi is even better for playing games, as it has an accurate keyboard. However, I tried running some BASIC programs and making a few changes to those here and there, and it's very hard to get used to the weird layout of the C64 keyboard. Also, saving your programs or data is not easy, as they need to go on a disk image on a flash drive and then you have to keep plugging that flash drive into different computers.

The VICE emulator, on the other hand, is difficult to work with on the Mac. But: you can load and save directly from the Mac file system, and with the right keyboard mapping, typing on an emulated C64 works just fine. PAL games don't have smooth graphics because the Mac uses a fixed 60 Hz frame rate with most LCD displays, but I didn't play any games because of joystick issues anyway.

Verdict: the THEC64 Mini is great for casual retro gamers, the THEC64 Maxi is even better for more serious retro gamers and VICE is for people who want to do anything other than playing games. I paid € 80 for the Mini and € 120 for the Maxi, which I think are great prices.

Mini and Maxi

I got the THEC64 Mini two years ago. It looks like a half-size Commodore 64, but the keyboard is just decorative, none of the keys work. It has two USB ports and comes with a USB joystick that's used to control the system and play the 64 included games. It has a micro USB port for power and an HDMI port for video out.

Late last year, the full-size ("maxi") THEC64 was released, which is twice as big and therefore takes eight times as much space. That's a fairly significant downside compared to the Mini, in my opinion. However, in addition to upping the number of USB ports to four, the Maxi has a fully functional keyboard, including the graphic character labels on the front sides of the keys. There are also a few more settings, and the THEC64 can also run in VIC20 mode. (Apparently there's a THEVIC20 on its way.)

VICE

VICE is multi-platform open source software that has been under development since the 1990s. In addition to the C64, VICE can emulate a whole bunch of 8-bit Commodore computers, including, much to my delight, the C128. There also seem to be various Javascript implementations that work to various degrees, with this one working relatively well, but still not suitable for anything serious, in my opinion.

I'm very impressed with how well each system emulates a computer from 1982. Apparently modern computers are fast enough to emulate all the chips with pretty much full accuracy. Remember, the C64 doesn't have much in the way of built-in system software, so games hit the hardware directly. (As far as I know, over the 12 years that the C64 was sold new, there wasn't a single software update.)

PAL and NTSC

The C64 used a 320x200 pixel screen (although apparently, some clever manipulation of the video chip allowed showing stuff in the border area), with NTSC (North American) versions refreshing the screen 60 times per second and running the CPU slightly faster, and PAL (European) versions refreshing the screen 50 times per second and running the CPU slightly slower.

The THEC64 Mini will detect a 50 Hz display and run in PAL mode... or fail to detect a 50 Hz display (even on some that can handle this just fine) and run in PAL mode but convert from 50 to 60 Hz, which makes a lot of action look choppy. The THEC64 Maxi lets you choose between PAL/50 and NTSC/60 when it comes out of the box, but you can't change this setting later without doing a factory reset. You can change between PAL and NTSC but there will be framerate conversion, and if it thinks the display can't do 50 Hz (which it again thinks way too often) it runs at 60 Hz anyway. That whole 50/60 Hz thing and the limited control you have is a big annoyance.

The THEC64s output the C64 graphics upscaled to 1280x720 over HDMI.

With VICE, you can run in a window or in full screen on your computer's monitor. There are very many settings, many of which have defaults that I didn't like.

CRT emulation

The THEC64s let you select a CRT mode, where you see the individual scanlines, just like on a monitor or TV with a real C64. This makes everything both look more authentic and hides the low resolution a bit. So I like to run them in this mode. VICE also has CRT emulation.


C64/C128 VIC-II chip output with and without CRT emulation

However, VICE's CRT emulation, especially with the default settings, takes this a bit too far by being too authentic. The image is period accurate blurry with color bleeding and everything. It's really too bad that you can't just have the scanlines like with the THEC64s, but not any additional CRT emulation. The settings that minimize the bleed and bluriness as far as I can tell are scanline shade 750, blur 0, oddline phase 0 and oddline offset 1000.


C128 VDC (80 column/RGBI) chip output with CRT emulation

Joysticks

The C64 has two joystick ports, with most games using the joystick in port 2. A few use the joystick in port 1. On the THEC64s, it makes no difference which USB port you use to connect a joystick. So if a game expects the joystick to be in port 1, you need to create a small config file. Not the most user friendly solution, but it's something.

I have a USB joystick that I tried to get working with the THEC64s as well as VICE, but I didn't get anywhere. This stuff is all rather poorly documented and confusing.

The keyboard

On the THEC64 Mini, you can enter a few characters with the joystick using the on-screen keyboard, but that gets old very fast. You can hook up a USB keyboard, but the problem is that it only has two USB ports. You need the joystick to operate the menus and if you're hooking up a keyboard you'll probably typing stuff you want to save, so you need a USB thumb drive. So that adds up to three USB devices for two ports, so you need to use a USB hub, which, fortunately, works fine.

For such a cheap system, the keyboard on the THEC64 Maxi is great. I have keyboards that cost more than the entire THEC64 Maxi. However, typing on a C64 keyboard is a frustrating affair, with all those keys that are in the wrong place.

With VICE, I use the C128 emulator because the C128 has a special place in my heart. Of course this makes life more complex because the C128 is more complex and less widely used. As a result, I had some difficulty setting up the keyboard mappings. (I think those are less than ideal for the C64, too, though.) VICE has two types of keyboard mapping: positional and symbolic. Positional means that typing a key gives you the character that the key in that position on the C64/C128 would produce.

Just the difference in key location is pretty bad for me as a touch typist, but it gets worse: "normal" keyboards have two keys between L and the return key. The C64 has three. The third one, that's missing on your regular keyboard, is the = key. Which is not unimportant.

So trying to type text or a program with positional keyboard mapping is a non-starter. With symbolic key mapping, when you type a key on your keyboard, the corresponding character shows up on the simulated C64 or C128. However, the C64 has a few keys that don't map to keys on a regular keyboard. Important ones are the RUN/STOP, RESTORE and Commodore keys. There's also HOME, £, π, ←, and ↑ as well as a bunch of graphical characters, but it's possible to live without those.

Ultimately I needed to create my own keyboard mapping file that only uses the keys that all Mac keyboards have and doesn't use esc for RUN/STOP because ESC is used for various functions on the C128. See the overview below. The green keys are the same, blue maps without issue, red are important C64/C128 keys mapped to the Mac keyboard and orange are less important keys that aren't remapped.

You can download this keyboard mapping file here.

Then it turned out that you can also define your own keyboard shortcuts to change settings. I set up ⌘8 to switch to 80 column mode on the VDC chip and ⌘4 to switch to 40 column mode on the VICII chip, as well as ⌘C for copy and ⌘V for paste. For this, you need to have a ~/.config/vice/sdl-hotkey-C128.vkm file, like this one I made. The keyboard mapping and keyboard shortcut files are not easy to set up, but it helps to know that they're based on keysym codes.

Talking to the rest of the world

The only way you can get data on and off your emulated C64 with the THEC64 models is through disk images on a USB stick. (Well, you can load from a few other file types, but not save them.) Better than nothing for sure, but not exactly quick and easy. With VICE, this is much better: you can use disk images, but also load and save to the native file system. VICE can also emulate RS-232 ports and even networking hardware. I haven't tried this, though.

For this reason, in addition to the keyboard issues, I'd say that if you want to do anything with a C64 that requires more than minimal text input, use VICE. Although if you're really serious about this, having a real C64 keyboard with all the graphics characters in the form of the THEC64 Maxi would be a good addition.

What I'd like to see in the THEC64

It's obvious that the THEC64s are made to play games. As such, loading files works relatively well, but actually transferring data to and from the outside world is not great. Ideally, the THEC64 Maxi would have Wi-Fi and let you load from and save to a local SMB file server and/or a cloud service. But that's probably too much to ask. However, it would be really helpful to have the option to skip the disk images and save files to a flash drive directly, and perhaps have a web app for converting file formats. Being able to print (to a file on the flash drive) would also be great.

Plugging in a USB to RS232 serial adapter and then be able to use that to talk to the outside world would be a great addition.

But the thing at the top of my list would be a better way to switch between 50 and 60 Hz modes. I get that they try to be conservative to avoid having people look at a blank screen, but having to do a factory reset to change to 50 Hz and then still have that setting be ignored in many cases is problematic.

Also, if you want to use the THEC64 with a monitor rather than a TV, audio is often a problem, as monitors often don't have any speakers or audio out. So analog audio out would be a great addition to the THEC64 Maxi.

What about a real C64 or C128?

It would be very cool to get a real C64 or C128. However, there are some significant hurdles. The newest C64s are now 26 years old, and those capacitors and power supplies tend to show their age. But assuming a C64 or C128 in good working order, we need video and audio out, and I think it's reasonable to require a system for loading files we found on the internet and saving files in such a way that they can be read on a modern system.

For video, we can of course use a period-accurate CRT monitor. However, those are big and heavy and are also not getting any younger. Traditionally, you play C64 games by hooking up the computer to your TV. That is getting harder and harder these days. Composite video inputs or converters are still somewhat common, but don't look very good. The C64 did S-video (i.e., separate chroma/luma signals) before S-video was invented, but unfortunately, S-video to HDMI is no longer easily available. In other words: the video output of a real C64 is going to look a lot worse than the video output of an emulated C64 through VICE or especially a THEC64. (Audio is less of an issue.)

Back in the day, we loaded our programs from cassette or a 1541 disk drive. Even then, those were not especially fast or reliable, and we really don't want to wait that long these days. Also, using those means you can't really interact with the modern (online) world. So that means using a SD2IEC, which is a drive that hooks up to the C64's disk drive serial port but uses SD cards for storage.

So for more casual C64 nostalgia, a real C64 would just be too much work, in my opinion.

by .


Archives: 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021