How the Commodore 64 Displayed Lowercase Characters
The Commodore 64 utilized a unique character encoding system known as PETSCII to manage text display, differing significantly from standard ASCII protocols. Unlike many contemporary systems, the C64 allowed users to switch between character sets through specific memory registers controlled by the VIC-II video chip. This article explores the technical architecture behind the C64’s video output, explains the dual character set ROM structure, and details how users could toggle between uppercase and lowercase modes for programming and word processing tasks.
PETSCII vs. ASCII Encoding
To understand how lowercase characters were rendered, one must first understand PETSCII, or PET Standard Code of Information Interchange. While most modern computers use ASCII, where the letter ‘A’ is represented by the decimal value 65, the Commodore 64 used a different mapping optimized for its internal hardware. In the default uppercase mode, pressing the ‘A’ key generated a different byte value than in lowercase mode. This encoding allowed the system to treat text and graphics uniformly, but it required specific handling to display standard lowercase letters familiar to typists.
The Dual Character Set ROM
The core mechanism for displaying lowercase letters lay in the computer’s read-only memory (ROM). The Commodore 64 contained two built-in character sets. The first set, which was the default upon booting, consisted of uppercase letters and graphic symbols. This was ideal for games and visual interfaces where standard punctuation was less critical than box-drawing characters. The second set contained uppercase and lowercase letters, replacing the graphic symbols with standard alphabetical characters. These sets were stored in the character generator ROM, and the video chip could be instructed to point to either block of memory.
Controlling the VIC-II Video Chip
The switching mechanism was managed by the VIC-II video chip, specifically through the register located at memory address 53270 (or $D018 in hexadecimal). Within this register, specific bits controlled which character set was active. By changing the value of this register via software commands, programmers could tell the video chip to interpret the screen memory codes using the uppercase/lowercase set instead of the uppercase/graphic set. This change was immediate and affected the entire screen, altering how every character code was visually rendered without changing the underlying data in screen memory.
User Interaction and Toggle Keys
For end users, accessing lowercase characters did not usually require writing code to poke memory addresses. The Commodore 64 keyboard featured a combination key sequence to toggle the character set instantly. Pressing the Commodore key and the Shift key simultaneously would switch the system between the two modes. In the lowercase mode, the Shift key functioned normally to produce uppercase letters and symbols, while unshifted keys produced lowercase letters. This design choice allowed the C64 to serve as a viable word processor, such as when used with software like EasyScript, despite the hardware limitations of the era.
Technical Limitations
While the system supported lowercase text, there were limitations inherent to the hardware design. Because the switch affected the entire character generator, users could not easily mix graphic symbols and lowercase letters on the same screen without redefining custom characters. If a program required both box-drawing graphics and standard lowercase text, the developer had to create a custom character set in RAM that combined the desired glyphs from both ROM sets. This process required advanced programming knowledge but demonstrated the flexibility of the Commodore 64’s architecture for dedicated applications.