Commodore 128 80-Column Custom Character Set Handling
This article explains the technical process of implementing custom graphics and fonts on the Commodore 128 specifically within its 80-column display mode. It covers the role of the VDC chip, the dedicated video memory architecture, and the specific register manipulations required to load user-defined characters distinct from the standard ROM set. Readers will learn how to access VDC RAM, configure the character generator pointer, and manage the performance implications of modifying text glyphs in this high-resolution environment.
The Commodore 128 utilizes a dual-video chip architecture, meaning the method for redefining characters in 80-column mode differs fundamentally from the 40-column mode. While the 40-column display relies on the VIC-II chip and shares system RAM for video data, the 80-column mode is driven by the VDC (Video Display Controller). The VDC possesses its own dedicated static RAM, typically 16KB, which is separate from the main system memory accessible by the 8502 CPU. Consequently, custom character sets must be written directly into this isolated VDC memory space rather than the standard bank-switched RAM used for 40-column graphics.
To redefine characters, a programmer must manipulate the internal registers of the VDC chip. The process begins by disabling the video output to prevent screen artifacts during the memory write process. The core of the operation involves setting the Character Generator Start Address, which is controlled by VDC register 18. By poking a specific value into this register, the user defines the base address within VDC RAM where the 8-byte character patterns will reside. Each character definition requires eight bytes of data, representing the bitmap rows of the glyph.
Data transfer to the VDC RAM is handled through a pair of I/O registers located in the main CPU memory map. The programmer writes the target VDC memory address to the VDC address registers and then streams the character bitmap data through the VDC data register. Because the VDC operates at a different speed than the main CPU, this process is significantly slower than modifying VIC-II character sets. Developers often need to implement wait loops or check the VDC status register to ensure the chip is ready to accept new data, preventing data loss or corruption during the upload.
Once the custom character data is loaded into the designated VDC RAM area and register 18 is pointed to that location, the video output can be re-enabled. The screen will immediately render text using the new definitions. It is important to note that because the VDC memory is volatile and separate, any power cycle or mode switch back to 40-column mode will require the custom set to be reloaded. Understanding this distinct memory mapping and register control is essential for developers aiming to create unique visual interfaces or games utilizing the Commodore 128’s enhanced 80-column capabilities.