Creating PETSCII Art
What is PETSCII?
You may be familiar with the term ASCII (American Standard Code for Information Interchange), which is a character encoding standard for data processing. ASCII art is a form of text-based design that uses ASCII characters to create graphic images. These images can be complex, or as simple as emoticons: :-)
You can view examples of this art form on the ASCII Art Archive.
Similarly named, PETSCII (PET Standard Code of Information Interchange) is the character set used in Commodore computers. It allowed for 256 characters, which is more than ASCII’s 128. There are “shifted” and “unshifted” versions of PETSCII characters, with the “shifted” mode including lowercase letters. The graphical symbols in the PETSCII character set can be used to create blocky, pixelated images on Commodore computers.
Creating PETSCII Art in Lvllvl
Lvllvl.com is a website that allows you to create pictures online using character sets. I chose to use the C64 PETSCII character set, however there are tile sets from a variety of vintage systems to choose from, including the Amiga, Vic 20, and Atari ST. Projects can be saved to locally to your browser, or downloaded onto your computer.
Click “Create new project” and select your tile set and dimensions. You will see a grid with a border resembling a C64 screen. Each square in the grid is called a cell and each cell can contain one character, or “tile”. You can change the colours of the frame and cell using the menu on the left side of the screen.
Tools
The tools in Lvllvl are similar to tools seen in other drawing software. The pencil tool allows you to draw with a character, the eraser erases, the paint bucket fills a section with the selected character... you get the idea.
Underneath the tools menu is where you can change the colour selection. Each cell contains a foreground and background colour, so you are limited to two colours per cell. Here you can also change the background colour for the whole screen and the border that surrounds it.
Lvllvl gives you the option of creating multiple layers which would allow you to have more that two colours per cell. However, keep in mind that if you choose to run your program in an emulator (more on that later) only one layer will be visible.
Animation
You can draw multiple frames to create an animation. Along the bottom of the screen is the animation menu, where you have the option to create, duplicate, delete and navigate through frames. You can also use the Marquee (M) tool to select cells from previous frames and copy them to new frames, which can be a big timesaver.
I made the following 45 frame animation using these tools:
Uploading Images and Videos
Creating art with the PETSCII character set is fun, but can be quite time consuming, especially when creating an animation. Luckily, Lvllvl can generate frames based on images or videos you upload.
In the Top Menu, navigate to “Import > Image/Video”. For this example, I chose an image of the University of Waterloo’s Red Room. Once uploaded, you can change the brightness, contrast, saturation, and scale of your image. You can also select specific characters and colours you would like Lvllvl to use when generating a frame. Click “Import”. Now you have an PETSCII version of your image!
Similarly, you can upload a video and Lvllvl will generate multiple frames. The steps are the same, but now you have options to select a section of your video to upload, number of frames to generate, and ticks per frame (the length of time each frame is shown for).
Original Image
PETSCII Image
Original Video
PETCSII Video
Adding Music
You can add sound to your artwork in the form of SID (Sound Interface Device) files. These files are made specifically for the Commodore 64’s sound chip and can be downloaded from sites such as HVSC (High Voltage SID Collection). Once downloaded, you can use a VLC media player to listen to the file.
Running the Emulator
You can export your finished project as GIF or PNG or make your PETSCII art even more immersive by running the program in an emulator.
Click "Export > C64 PRG/D64" to export your program. Select D64 as the file type and "Extended background colour mode" as the screen mode. You also have the option of uploading a SID file. Then export the project.
A D64 file is a Commodore 64 Disk Image file. Unless you have a Commodore 64 at home, you will need to download an emulator to run this file. VICE is a program that emulates a variety of Commodore computers. Read our blog about coding a game in BASIC for instructions on how to download and run the VICE emulator.
Once the emulator is running, navigate to "File > Smart Attach" and select your file. Click "Autostart". You should now see your PETSCII art!
Note: Sometimes the emulator will run out of memory if an animation is too long or too complex. If you run into this problem, try reducing the number of frames used in your animation.
Goose Animation in VICE Emulator
The song used in the above video is "Cute Bundle of Fluff" by Tobias Göhlke (Toggle). The SID file can be downloaded from HVSG.
We’ve just covered the basics of the features Lvllvl has to offer! If you choose to explore it more and make some PETSCII art, you can email your designs to computermuseum@uwaterloo.ca or send them to us on Instagram @uwcomputermuseum. We’d love to see what you create!
Related Links
About the Author
Amy studies Computational Mathematics at the University of Waterloo and is the Computer Museum’s Fall 2024 co-op student. In her free time, she enjoys painting, collaging, and other forms of visual art making.