Egghead.page Logo

Commodore Plus/4 Interrupt Requests vs C64 Explained

This article examines the technical differences in interrupt request handling between the Commodore Plus/4 and the Commodore 64. It explores the architectural shifts from the VIC-II to the TED chip, changes in memory mapping, and the implications for software developers managing hardware timers and raster effects.

The Commodore 64 relies heavily on the VIC-II video chip to manage most hardware interrupts. Standard operation involves the VIC-II triggering an IRQ line connected to the 6510 processor, typically used for raster effects or timing. The CIA chips also contribute to this line, allowing for timer-based interrupts. The system uses a standard Kernal IRQ vector at memory address $0314, which developers often hijack for custom routines. The VIC-II registers are located in the $D000 range, making them straightforward to access for interrupt control.

In contrast, the Commodore Plus/4 utilizes the TED chip, which integrates video, sound, and memory management. The TED chip handles interrupt generation differently, with control registers located in the $FF00 range rather than the $D000 range found on the C64. While the CPU still receives a combined IRQ signal, the specific flags for raster lines and timer overflows are managed through distinct TED registers. This requires developers to acknowledge interrupts differently to prevent lockups, as the TED chip does not behave identically to the VIC-II upon interrupt triggering.

A significant divergence lies in the Kernal ROM behavior. The Plus/4 Kernal is more aggressive about disabling interrupts during I/O operations compared to the C64. This design choice improves data integrity during tape or disk operations but complicates the creation of stable raster interrupts for graphics. Additionally, the Plus/4 maps its I/O area differently, requiring careful bank switching to access interrupt control registers without conflicting with RAM. The NMI line is also utilized differently due to the built-in function key ROM.

Ultimately, while both machines use the 6502 processor family, the Plus/4 demands more precise register manipulation for interrupt handling. The shift from VIC-II to TED changes the timing characteristics and register addresses, meaning C64 interrupt code cannot be ported directly. Developers must account for the TED chip’s specific acknowledgment requirements and the stricter Kernal interrupt masking to ensure stable performance on the Plus/4 platform.