On PETSCII

We’ve brought up a couple of examples of Commodore PET software lately, which as I keep saying, is interesting because the PET has no way of doing bitmapped graphics, sprites, or even definable characters. Its characters are locked in ROM and cannot be changed. So, it includes a set of multi-purpose characters that was used throughout all the Commodore 8-bit line, even as late as the C64 and C128, which having definable graphics didn’t need these kinds of generic graphics characters, but they were still useful for people who didn’t want to create their own graphics.

The PETSCII characters, as used on the Commodore 64 (image, with some editing, from Wikipedia). The graphics set also includes reverse-video versions of each character.

Back on my Commodore coding days I became very familiar with these characters. I think they’re much more universally-applicable for graphic use than the IBM equivalent, the famous Code Page 437, although that’s mostly because PETSCII doesn’t bother defining supporting so many languages. Code Page 437 also uses a lot of its space for single and double-line versions of box-drawing characters, although on the other hand it doesn’t waste characters defining reverse-video versions of every glyph.

PETSCII has:

  • A space and reversed space, of course.
  • Line drawing characters for boxes of course: vertical and horizontal lines, corners, and three- and four-way intersections. There are also curved versions of the corners.
  • More line-drawing characters for borders.
  • Still more horizontal and vertical lines, at each pixel position within their box.
  • With the reverse-video versions, enough characters to effectively do a 80×50 pixel display, as if it had a super low-res mode.
  • Different thicknesses of horizontal and vertical lines too.
  • Diagonal lines, and a big ‘X’. Note that on the PET and Vic-20 these lines were all one pixel wide, but on later computers with both better resolution and color graphics they were made thicker, which means diagonal lines have “notches” between character cells.
  • Other miscellaneous symbols: playing card symbols, filled and hollow balls, and some checkerboards for shading. On the PET and Vic, the shading characters were finer, while on the other 8-bit computers they were made of 2×2 boxes.

There are resources that let you use PETSCII to create old-school computer art, like this PETSCII editor, Petmate and Playscii, and for a bunch of examples of what you can do with it you can browse through the Twitter account PETSCIIBots. And this blog post from 2016 both makes the case for PETSCII as a medium for art and provides some great examples of it.

Some robots from PETSCIIBots

PETSCII Bros

We love games made for unlikely hardware, and PETSCII Bros. fits that bill like a duck’s dentures. Like we explained in the post about that PET demo from a while ago, the PET didn’t have changeable graphics characters and no bitmap mode at all, and so it wasn’t what we’d consider a games machine. But it did come with a set of interesting graphics characters that, among other things, had a set of 16 characters that let programmers use the screen as a super-low-res 80×50 pixel display.

PETSCII Bros is a PET action game that uses those characters (long called “PETSCII” as a cheeky reference to ASCII) for an actual game, that plays similarly to Nintendo’s classic Mario Bros. arcade game. Of course you’ll need a PET, or an emulator (such as the one that comes with VICE) to play it. Or if you’re just passing interested, you could watch this video to see how it works:

PETSCII Bros. (for the Commodore PET, itch.io, $0)

Demo: Back to the PET

The Commodore 64 was not Commodore’s first home computer. It wasn’t even the VIC-20. Their first machines were the line of the PET, or “Personal Electronic Transactor,” as labored an acronym as any.

The PET was a decent machine, with integrated monochome monitor and a heavy metal case. Although it had no color, no sprites, only a basic speaker for sound and no synth, it had a number of things in common with the later C64, particularly the 6502 processor that lay at the core of half of the personal computers sold at the time.

There was something else, something fairly major, that the PET lacked: customizable graphics. No hi-res mode, and no programmable character sets. The graphics were encoded on a ROM that wasn’t even mapped to the CPU’s address space. The letter ‘A’ would forever look like a letter ‘A’. It couldn’t be changed to anything else, even a slightly different ‘A’. This greatly limited what PETs could display, and basically doomed it as a gaming computer.

Commodore tried to compensate for this feature by including “PETSCII,” a set of custom characters included in the upper 128 characters of its ROM intended for makeshift graphics. PETSCII would survive throughout the rest of the Commodore 8-bit line, even featuring on machines that had programmable graphics: the VIC-20, C64 and C128 all had it included too. (The Twitter account PETSCIIBOTS (now inactive) shows off its many graphical characters in making robots.)

On the later machines PETSCII graphic characters were a fun nicety. On the PET, they were all you had, all you would ever have. This is exactly the kind of limitation that demo authors love circumventing where they can, and taking advantage of when they can’t. Hence: Back To The PET, a demo, complete somehow with chiptunes, that runs on Commodore’s ancient machine:

Every character cell of every frame of this video is one of the PET’s 256 ROM-based characters. It had no hardware scrolling, so effects are all faked or done 8 characters at a time. Yet it’s still pretty slick! The PET had quite a better selection of graphics characters than even IBM’s code page 437, including lines of single pixel differences in thickness and horizontal and vertical position. Image what the ASCII artists of the 90s could have done with this selection! Luxurious!