Egghead.page Logo

Commodore 16 Boot Sequence Hardware Initialization

The Commodore 16 boot sequence is a tightly orchestrated process managed by the built-in ROM, beginning immediately after power-on reset. This article explores how the system initializes critical hardware components like the TED chip and memory, performs checksums, and prepares the environment for the BASIC interpreter. Readers will gain insight into the low-level operations that transform raw silicon into a functional home computer ready for input.

Power-On Reset and CPU Start

When the Commodore 16 is powered on, the 7501 or 8501 microprocessor receives a reset signal. This halts any current operations and forces the CPU to look for a specific memory address known as the reset vector. Located at the top of the memory map, this vector points to the starting address of the Kernal ROM. The CPU begins executing instructions stored in this read-only memory, which contains the fundamental operating system routines required to bring the hardware to life.

TED Chip Initialization

A crucial step in the boot process involves the TED (Text Editing Device) chip, which integrates video display, sound generation, and DRAM refresh control. The Kernal writes specific configuration values to the TED registers to establish the default video mode. This sets the screen resolution, background color, and border color to their factory defaults. Simultaneously, the TED chip begins managing the dynamic RAM refresh cycles, ensuring that memory data remains intact while the CPU proceeds with further initialization tasks.

Memory Testing and Configuration

Once the video hardware is stable, the system performs a RAM test to determine the amount of available memory. The boot routine checks specific memory locations to verify integrity and calculates the top of RAM. This information is stored in system variables so that the BASIC interpreter knows how much memory is available for programs. If the checksum fails or critical memory areas are corrupted, the system may halt or display an error, preventing unstable operation.

ROM Checksum and I/O Setup

The Kernal verifies its own integrity by calculating a checksum of the ROM contents. If the calculated value matches the expected constant, the boot sequence continues; otherwise, the system may freeze. Following this verification, the input/output ports are configured. This includes setting up the keyboard scan matrix and initializing the serial bus interface for peripherals. The system prepares the interrupt request lines, enabling the hardware to respond to user input and timing events.

Launching the BASIC Interpreter

The final stage of the boot sequence involves handing control over to the BASIC interpreter ROM. The Kernal sets up the necessary pointers and stacks required for BASIC execution. It clears the screen, displays the startup message showing the available memory size, and prints the familiar “READY.” prompt. At this point, the hardware initialization is complete, and the Commodore 16 is fully operational, waiting for the user to enter commands or load software from tape or cartridge.