Thursday 31 December 2020


The customary look-back into the year.

Retro stuff = C64 stuff

Apparently I'm concentrating on fewer and fewer platforms. The year was quite Commodore 64-centric, such as toying around with THE 64, 1541 Ultimate II and casemods. More recently, I've worked with the BMC64 Raspberry Pi C64 emulator again.

I did a bunch of 6502 code but only a little of it has seen the light of day. I did release a small videotester for C64, though. PETSCII graphics is small enough to do occasionally. Also I made a couple of tiny demos based on PETSCII, such as the Petmanbatman and Advanced Pet Dragons.

I also got a PETSCII piece out in a paper publication, Kuti #57.

I've done less pixel graphics. I prefer to draw fast and that's hard to reconcile with the pixel aesthetic. Compared to PETSCII it feels time consuming and the results are not that different.

Multipaint got the inevitable 2020 update with transition to Processing 3 and resizable windows. Possibly it finally works reliably on a Macintosh. I'm perhaps hoping to put less time into this project and the 2020 version could be one of the last big overhauls. Many tiny improvements are on the to-do list, though.

On less retro front, I've been playing with a server, more and different Linux installations, a "new" mac and with some help I'm getting to know my way around these systems. Even Raspberry Pi looks more attractive now that I understand more about Linux than 5 years ago, and maybe it's a platform to look at more closely in the future.


Mostly thanks to Proton, I could enjoy new games in 2020. The biggest game I completed was Just Cause 3 which worked nicely on Linux. A very enjoyable and not too long open world destruction romp.

I couldn't finish Nier:Automata, but maybe will return to it eventually as it had some quite impressive parts. It also glitched more on Proton than Just Cause, but was playable. 

Some of the smaller games were Lonely Mountain Downhill and Saboteur Sio

Lonely Mountain was incredibly addictive at first, but when I got bored I got totally bored with it. Perhaps less routes and bikes might have been better so I would have had more genuine motivation to optimize the courses, like with Stunt Car Racer.

It amuses me now how I initially dismissed, a game I first tried at the end of 2019. Then I played it for most part of the year and still play it. The overhauls to the login system and various outages almost put me off it, though. I'm now better at it but even now the results seem more to do with whether the really good players happen to be on-line or not, rather than my inherent skill. Outright cheating/hacking may have diminished somewhat at least.

Chess is still on the playlist but I've been concentrating on it a bit less. I make this complaint every year, and I'll make it again: I feel I could improve if I put even 30 minutes into it every day, but that measly amount would feel too much to dedicate. I did manage to play about 1000 games this year, although mostly blitz on Lichess. Slower chess would be nice but the time use is even harder to justify.

TV, Films, Books, Scifi

For films, the year 2020 was more about re-watching rather than covering much new terrain. Tenet was a memorable film but perhaps not the bullseye everyone was hoping. Well, amidst the worst Covid-19 stupor, this film had begun to gain a messianic promise which it really could not fully deliver.

Doctor Who continued, the episode ideas were good but the writing overall had some problems. No reason to stop watching, though, it's still solid TV sci-fi. In some ways I'd compare it to the first season of the new Who, an attempt to keep the episodes self-contained and finding ways to renew the mystery of the character.

Westworld season 3 started with a bang, what the season 2 ought to have been. But it begun to veer away from the Westworld concept and overall was a puzzling addition to the series. I guess it was meant to deliver the idea that we all live, or are about to live very soon, in a sort of "westworld". As a detail, a lot of people got shot from a close distance in a random and nonchalant way, something that got boring very quickly. 

The 100 came finally to an end, a not so high-profile series that over the years has had its ups and downs. I often felt it built upon watered-down themes from bigger series (Game of Thrones, Hunger Games) but it had its own voice too. The confused last season perhaps took some story-telling elements from Westworld.

The Mandalorian was probably the best Star Wars related thing in ages, but it also reminded me of how bloated the whole SW phenomenon has become. There's a lot of verbal/visual in-jokes and meta-gags, which the series can now afford as there are so many layers to the SW verse. 

The Queen's Gambit mini-series was a fascinating story about chess and a nostalgic look at 1960s US. As a TV series it was able to give more detail to the games and the chess player's practice than films usually do. Given how popular it has been perhaps there will be more chess-themed shows.

As for books, I also kept revisiting the old rather than reading much new things. Well, when I was somewhat ill I did go through Suzanne Collins' Hunger Games trilogy and Stig Larson's Millennium trilogy, pieces of past zeitgeist I had previously ignored. I made a point of reading the Asimov Foundation/Empire/Robot novels in a chronological order and a blog post about it is still in the works.

Onwards to 2021

I'm hoping to continue with business as usual. This blog will have its tenth anniversary in June!

Monday 28 December 2020

Some more BMC64

Just a small update on putting the Raspberry Pi BMC64 Commodore emulator inside a Commodore 64C case, as described in the previous post.

The starting point:

I chose a suitably sized prototyping board with unconnected holes, sawed off the corners to make the Rpi screws fit. Then I soldered a 2-wide female pin header for the Raspberry GPIO and a 1-wide pin header for the C64 keyboard connector.

Then I soldered all the connections, trying to keep track of the mess. I lost the track once but fortunately it was not too difficult to re-solder a few wires. Soldering wires into pins isn't ideal, but tinning the wire ends prior to soldering helped a lot.

In hindsight I should have used a bit lighter, more bendy wire as now I had to push them down to make the C64C cover fit.

The end point (for now):

That horrible hole is the trapdoor for getting the SD card out. Sorry.

It's now quite compact.

I didn't do the joystick connections at the same time which was silly as they will be more difficult to solder now that the keyboard wires are in place.

Instead, I soldered a joystick connector in from the underside, aiming for the GPIO Bank 2 pins.

After a few mistaken solders, I found out I need to be careful which GPIO configuration I am aiming at, and also understand that I'm looking at the GPIOs from below the board. 

Now, it's getting crowded in here.

When using both the Keyboard and Joystick from GPIO, the pins are different than when using a joystick-only configuration.

So, in this case I used GPIO U=20, D=19, L=16, R=13, F=26 and Ground to get my joystick connected.

The joystick port is made from a PC COM-port as it had the correct sized header for the pins. Nothing has been properly fixed to the case but this shouldn't take too much work.

In use

If there's a Commodore 64 lying around, I sometimes write nonsensical little BASIC programs. Multiplication table tutors, tiny games, graphics effects, PETSCII scrollers, whatever.

This time my excuse was that I needed to test the keyboard more extensively.

And it works, I had really no trouble in getting to that BASIC programming mood with the BMC64 and the C64C keyboard.

A word of warning with the BMC64 emulator: Any changes to the attached D64 disk image will not be preserved if you don't detach the image first! So if you save your BASIC program to the attached D64, always remember to detach it before shutting down.

I also tried my go-to game for testing joystick lagginess, Buck Rogers (catridge image). Playing with a TAC-2 joystick I can feel a tiny amount of lag if I really concentrate on it. The BMC site says the joystick is only read alongside the screen sync, considering that it's not bad at all. Most games would probably poll joystick once a frame anyway, then depending on how it's done I guess the lag could vary.

Saturday 19 December 2020

BMC64 the sequel

Time flies. About a year and a half ago, I had an all too brief look at the BMC64 Commodore 64 emulator for the Raspberry Pi (and the corresponding ZX emulator).

Although the emulator was already impressive by then, I had some minor gripes with it. Now it's a time for another look.

On my Raspberry Pi 3B+, the system boots in a few seconds, comparable to a sluggish real C64. Nothing to complain here! Hit F12 to enter the menu.

The video options are now extensive, and I could get a good picture out of the 1084S monitor. It's worth mentioning the Y offset may need to be changed to 1, otherwise the scanlines are "between" the actual monitor lines and will look blurry and incorrect.

The picture is obviously a bit too perfect :) as it doesn't have the black bleeding and other C64-style artefacts. But it certainly doesn't have any moiré effects. (Any such in the images are result of the photo processing.)

Trying Buck Rogers again made me feel as if the lag had been further minimized. I could not really detect any significant amount of delay here.

Based on vice, the emulator now supports the other Commodore computers too, such as VIC-20, PET and Plus/4. I didn't try these yet, but it is possible these are not as perfected as the vice C64 emulation (Plus/4 people keep saying this) but it's a good bonus.

Although I don't remember this either, the sound may have been improved and there are likely more sound options than when I last looked, as seen from the above menu.

Still, SID emulation is tricky to perfect and this is an area where differences are easier to spot.

Real C64 keyboard

The overall impression was so good I was motivated to test a real Commodore keyboard. It can be wired to the Raspberry Pi GPIO connector with no additional electronics. Last time I only tried the 9-pin joystick.

A PCB design exists for just dropping in the keyboard connector and the joysticks (also a power switch), but now I could test it with breadboard wires.

Without such a PCB, it's not that obvious how to place the Raspberry in the case, but it's a start.

A tip for mounting a Raspberry on some surface. First drill through one hole, then screw the Rpi in place. Then drill another hole through the Rpi circuit board hole. Put that screw in place too and then drill the two remaining holes, again through the circuit board. 

This way the holes will be more accurate than trying to mark positions for drill holes using the Rpi holes or with a ruler.

I got a bit sidetracked at first as although I had a loose C64C case and keyboard, I didn't find my keyboard mounting brackets. 

So I had to improvise something. Luckily as the C64 board doesn't have to be there the shapes aren't that specific, as long as they hold the keyboard in the correct place.

I took the basic dimensions and some inspiration from crashmeplease's Ultimate64 Keyboard Mounting Brackets ( STL models, but of course my mounts are not 3D printed.

So what if the case is full of wires, what else I'd put there? 

I took the wire order from here:

...and of course the GPIO numbering is not the same as pin order:

Later I might solder a proper connector between the Rpi and the keyboard connector, and also adjust the positioning a bit. The SD card isn't particularly accessible at the moment, I carved a crude trapdoor for changing it, though. No, I don't think every C64 case needs to be preserved in pristine condition. Damn those micro-SDs.

Starting the Pi, the C64 keyboard didn't work! But no worries, it needs to be activated first from the keyboard sub-menu, using the USB keyboard. 

After this the C= and F7 key together activates the menu and it can be operated with the C64 cursor keys. Obviously it's a good idea to save the settings at this point.

I left the joysticks unconnected and this might need some additional figuring out.

I noticed that as the C64 keyboard is active, I seem to lose the possibility of using arrow keys as a joystick. In fact, if try to use the option Left Control/Arrow keys as joystick, I can no longer access the menu using C= and F7 and have to restart the Pi.

I had to test the one major advantage a real keyboard has over emulators, the PETSCII characters! I didn't have the patience to do anything larger, though... Shift Lock doesn't seem to work.

Without joystick, I was not that eager to test so many games, but Thrust (keyboard-based arcade game) worked rather well.

Trying the composite video with 1084S monitor and using this real keyboard, the feel is pretty good. 

Unlike with THE 64 Maxi, there is no feel of delay from my keypresses to the on-screen characters in BASIC.

So, yeah

So, a definite multi-thumbs up from me and I'd say this looks like it is preferable over C64 Maxi, at least if you are prepared to do a bit of tinkering.

Keyboard project continued here

BMC64 website