How Did the Commodore Plus/4 Manage Screen Memory Allocation?
The Commodore Plus/4 utilized a unique integrated chip known as TED to handle video output, differing significantly from its predecessor’s architecture. This article explores the technical specifics of how the Plus/4 mapped video data within its system RAM, detailing the fixed addresses for screen and color memory while explaining the relationship between the CPU and the video controller. Readers will gain insight into the memory map structure and the implications for programmers working with the machine’s display capabilities.
At the heart of the Plus/4’s video architecture was the TED chip, which stood for Text Editing Device. Unlike the VIC-II chip found in the Commodore 64, the TED integrated video, audio, and dynamic RAM refresh control into a single package. This integration simplified the motherboard design but imposed specific constraints on how memory was allocated for display purposes. The system relied on a unified memory architecture where the video controller accessed the same 64KB of system RAM as the central processing unit.
Screen memory allocation was handled through a specific segment of the main RAM address space. By default, the BASIC interpreter configured the text screen to begin at memory address $0400 (1024 in decimal). This area stored the PETSCII character codes that defined what appeared on the monitor. For a standard 40-column by 25-row text display, the system required 1,000 bytes of memory to store the character information. The TED chip continuously scanned this memory range during the vertical blanking and active display periods to generate the video signal.
Color information was stored separately from the character codes in a dedicated color memory block. In the default configuration, this color RAM was located at address $0800 (2048 in decimal). Each byte in this section corresponded to the same position on the screen as the screen memory, allowing the TED chip to fetch both the character shape and its foreground color simultaneously. This separation allowed for efficient color changes without altering the character data, though the Plus/4 lacked the multicolor attribute flexibility of the C64’s VIC-II.
The CPU and the TED chip shared the system bus, which necessitated a cycle-stealing approach to memory access. During active video lines, the TED chip took priority over the CPU to ensure smooth video output without tearing or glitches. This meant the processor was occasionally halted while the video controller fetched data from the screen and color memory areas. While this reduced the available CPU cycles for program execution, it guaranteed stable video performance without requiring a separate video RAM bank.
Programmers could alter the default memory allocation by modifying the TED chip’s control registers. The screen memory pointer could be redirected to different locations within the RAM, provided the new address aligned with the hardware’s requirements. This flexibility allowed developers to optimize memory usage for games or applications that required large data buffers, though moving the screen memory required careful management to avoid conflicts with the Kernal ROM or I/O areas mapped at the top and bottom of the address space.
Ultimately, the Commodore Plus/4 managed screen memory through a direct mapping strategy facilitated by the TED chip. By dedicating specific ranges of the main system RAM to video data, the machine achieved a balance between cost efficiency and functionality. While the lack of hardware sprites and the cycle-stealing mechanism presented challenges for developers, the straightforward memory allocation model provided a predictable environment for creating text-based applications and graphical interfaces.