How to switch between upper/lower case and PETSCII fonts on a C64

Commodore LogoThe C64 can display two sets of fonts: either a combination of upper case and lower case letters (good for any kind of text), or a combination of upper case letters and graphics (default), known as PETSCII characters.

In direct mode you can switch between the two by pressing CBM+SHIFT (i.e. The Commodore Key and SHIFT together).

But that’s no good when you’re app starts – you can’t expect the user to press that combination to see the correct letters on the screen (or that horrible combination of text and weird characters). The good news is that you can switch between those fonts in code too:

While your app is running users would still be able to use the CBM+SHIFT combination to switch the fonts – which is ugly to say the least. But we can manually disable and enable this for users:

Here are a couple of examples of what this looks like:



The “Commodore 64 Programmer’s Reference” explains all this and more. I wish I knew this book existed back in the eighties! You can still grab a copy from Ian’s amazing site (in the Manuals section):

About Jay Versluis

Jay is a medical miracle known as a Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

Add your voice!