The Commodore 128 is a peculiar machine to develop for in C. Its primary processor, the 8502, is a speed-doubled 6510 variant running at 2 MHz — broadly familiar territory for cc65 developers who know the C64. But the C128 also includes a Zilog Z80 for CP/M compatibility and, most intriguingly for demo and tool development, the MOS 8563 VDC chip: a dedicated 80-column video controller with its own private 16KB (or 64KB in the DCR variant) of VRAM, completely independent of the main system RAM. Accessing the VDC correctly from C requires a carefully crafted set of register routines, indirect through the VDC's two-register interface at $D600 / $D601. Oscar64Test is the practical proving ground for doing exactly that with the Oscar64 cross-compiler.
Oscar64: A Modern C Compiler for 6502
Oscar64, created by drmortalwombat, is a modern C compiler targeting 6502-family processors with an optimiser sophisticated enough to give cc65 serious competition on generated code density and execution speed. Unlike cc65, Oscar64 can exploit its own intermediate representation to eliminate dead stores, fold constants, and generate compact inline 6502 that a vintage assembler author would find respectable.
Oscar64Test exists to stress-test this on the C128's specific hardware landscape — particularly the VDC interface — and to demonstrate a set of reusable VDC screen functions built on top of the C128 Programmers Reference Guide register definitions and Scott Hutter's VDC core functions as a starting point. The author (drmortalwombat) provided extraordinary support throughout the process, adapting Oscar64 to specific C128 needs faster than they could be requested.
The VDC Demo
The demo itself is a multi-screen showcase of VDC capabilities rather than a raw benchmark. PETSCII art screens created with the VDC Screen Editor are displayed using the VDC's native text mode, demonstrating character and attribute rendering at 80 columns with the VDC's full 16-colour palette and attribute byte format. The attribute byte encodes colour (bits 0–3), intensity (bit 0), blink (bit 4), underline (bit 5), reverse (bit 6), and alternate charset (bit 7) per character — the same byte packed with meaning that makes the VDC so expressive for screen design.
Transitions between demo screens are managed through Krill's Loader (repository version 194), one of the C64/C128 scene's fastest IRQ loaders, enabling fast disk access without halting the main program thread. Bundled SID music from Nordischsound plays in the background throughout — Ultimate Axel F and Faded, both sourced from CSDB — providing the audio backdrop that every self-respecting C128 demo requires.
PETSCII Art and Visual Assets
The PETSCII art included in the demo was created using the VDC Screen Editor (an earlier version of VDCScreenEditor2) and demonstrates the chip's attribute system in practice. The featured artwork includes Love is the Drug by Lobo (CSDB), with the text scroller using the Small Round PETSCII Font by Cupid. The Commodore logo charset was built with CharPad Pro. All visual assets are credited in the repository.
Community Knowledge and Credits
The project credits highlight the community knowledge infrastructure the C128 developer leans on: Tokra's documented optimal VDC register settings for 80×50 and 80×70 text modes, devdef's assembly-level walkthrough of the 8563 chip, and the tips-and-tricks collection at commodore128.mirkosoft.sk. These resources — alongside the C128 Programmers Reference Guide and Steve Goldsmith's C3L CP/M C Library for the text-wrap and random sentence generator functions — form the substrate that makes a project like this tractable for a solo developer.
Oscar64Test is open source and serves as a working C128 VDC development template under the Oscar64 toolchain. The full source and build instructions are at https://github.com/xahmol/Oscar64Test.