Commodore 128
The Commodore 128 is an 8-bit home computer developed and announced by Commodore International in January 1985 at the Consumer Electronics Show, as the successor to the highly successful Commodore 64, with release later that year.[1] It featured 128 KB of RAM divided into two 64 KB banks, dual processors including the MOS 8502 running at 2 MHz for native operations and the Zilog Z80 at up to 4 MHz for CP/M compatibility, and three distinct operating modes: the full C128 mode with advanced BASIC 7.0, a near-100% compatible Commodore 64 mode, and a dedicated CP/M mode for running business software.[2][1] Developed under the leadership of engineer Bil Herd starting in 1984, the Commodore 128 was designed to address limitations in the C64 by incorporating enhanced graphics via the MOS 8563 video chip supporting 80-column (640×200) color display alongside the original 40-column mode, a MOS 6581 SID sound chip, and an extended 92-key keyboard with function keys and numeric keypad.[2] It debuted at the Consumer Electronics Show (CES) in 1985 amid challenges like chip stability issues during production, and was available in models such as the original integrated unit and the C128D with a detachable keyboard and built-in 1571 disk drive.[2][1] The system supported peripherals like the single-sided 1570 (170 KB) and double-sided 1571 (340 KB) floppy drives using Commodore DOS 3.0, and RAM expansion up to 512 KB, making it versatile for gaming, productivity, and programming.[1] Despite its technical innovations as the first mass-market multi-processor home computer, the Commodore 128 sold approximately 4 million units by its discontinuation in 1989, underperforming relative to the C64 due to factors including poor marketing and competition from 16-bit systems.[2][1] Its legacy endures in retro computing communities for bridging 8-bit entertainment with professional applications.[2]Development History
Origins and Design Goals
In the mid-1980s, Commodore International sought to capitalize on the immense success of the Commodore 64 (C64), which had sold millions of units since its 1982 debut but was constrained by hardware limitations such as its 64 KB RAM ceiling and 40-column display, hindering advanced applications like word processing and business software.[3] The company aimed to develop a successor that would extend the C64's market dominance while addressing these shortcomings, particularly as competition intensified from IBM PC compatibles and other 8-bit systems. This strategy emphasized maintaining the vast C64 software library to avoid alienating users, a lesson learned from the commercial failure of the incompatible Plus/4 in 1984.[4] The Commodore 128 project originated in 1984, shortly after the Plus/4's release, when engineer Bil Herd, who had led the Plus/4's development, advocated for a new machine fully compatible with the C64 to prevent repeating past mistakes.[5] Herd's team, including engineers Dave Haynie, Frank Palaia, and others, began prototyping in secrecy, initially exploring concepts like a 6509-based design before shifting to a multi-processor architecture.[4] Herd's vision for a "compatible something" drove the project's direction, prioritizing backward compatibility as a core tenet to ensure seamless adoption by C64 owners.[5] Key design goals included doubling the RAM to 128 KB for expanded multitasking and program capacity, introducing an 80-column color display to support professional productivity tasks, and integrating a Z80 microprocessor for native CP/M operating system support, appealing to business users.[4] While the SID sound chip remained largely unchanged, the architecture allowed for enhanced audio capabilities in native mode through better memory access.[6] The project progressed rapidly under tight deadlines, with silicon testing occurring by September 1984 and the system announced on January 6, 1985, at the Winter Consumer Electronics Show (CES) in Las Vegas.[7] This multi-mode design, championed by Herd, positioned the C128 as a versatile upgrade without abandoning the C64 ecosystem.[5]Engineering Challenges
One of the primary engineering hurdles in developing the Commodore 128 was integrating the MOS Technology 8563 Video Display Controller (VDC) to enable 80-column color display while preserving full compatibility with Commodore 64 software, which relied on the 40-column MOS 8562 VIC-II chip. The 8563, originally designed for the unreleased Commodore 900 business computer rather than the C128, introduced significant timing discrepancies due to its 16 MHz oscillator conflicting with the VIC-II's 14.31818 MHz crystal, leading to synchronization failures and erratic pixel clock behavior. Early production runs of the 8563 exhibited frequent memory access errors, failing every few seconds, and lacked interrupt request (IRQ) support, forcing software to poll the chip constantly for video tasks—a design flaw that Bil Herd, the project's lead engineer, described as inefficient and problematic during R&D testing. To mitigate these issues, the team implemented phase-locked loop (PLL) adjustments and separate video pipelines, retaining the original VIC-II for C64 mode and dedicating the 8563 exclusively to 80-column operations, which added hardware complexity but ensured backward compatibility. Low chip yields compounded the problem, with only 3-4 functional units per expensive batch, necessitating rapid fixes like improvised cooling (e.g., ice cubes in metal caps) during prototyping.[8][5] Integrating the Zilog Z80 microprocessor for CP/M mode presented further challenges, particularly speed mismatches with the primary 8502 CPU (a 6502 variant) and shared bus architecture. The Z80 operated at 4 MHz but suffered from effective slowdowns due to arbitration delays when accessing the common memory bus, contrasting with the 8502's 1-2 MHz cycle in standard and fast modes, respectively; this required careful synchronization to avoid contention during mode switches. A late addition to the design—discovered after initial PCB layout to resolve C64 compatibility glitches—the Z80 caused boot failures in about 80% of early prototypes due to signal reflections and a glitch on the A10 address line when the Z80 drove the bus, unlike the 6502's cleaner signaling. Engineers, including Herd and Dave Haynie, resolved this by soldering a wire jumper on every production board to dampen standing waves, a $1-per-unit fix that added $5.7 million to costs but achieved 100% reliability without a full redesign. These issues stemmed from the Z80's higher drive strength overwhelming the bus, highlighting the trade-offs in supporting CP/M's existing software ecosystem alongside native 6502 operations.[9][5][10] Memory banking for the C128's 128 KB RAM introduced intricate complexities to accommodate dual 64 KB banks without interfering with C64 software, which expected a fixed 64 KB address space. The custom MOS 8722 Memory Management Unit (MMU) enabled transparent switching between banks via configurable blocks, a novel feature for consumer hardware that allowed shared regions (e.g., 4 KB of I/O space) while isolating C64-mode access to Bank 0; however, delayed custom MMU chips forced the use of wire-wrap emulator boards and TTL logic hacks during development. This setup ensured C64 programs ran undisturbed by hiding the upper 64 KB (Bank 1), but required precise configuration registers to prevent address overlaps, adding programming overhead for native C128 applications. Herd noted that the MMU's design prioritized expandability up to 512 KB or more, but initial testing revealed contention issues during bank switches, resolved through iterative prototyping.[5][8] Several compromises were made to balance ambition with practicality, notably the omission of a built-in disk drive to control costs and simplify the core design, relying instead on external peripherals like the Commodore 1571 for storage. This decision deferred the integrated C128D variant by years, as the team focused on core compatibility and multi-mode functionality within budget constraints set by Commodore's management. Development timeline delays arose from rigorous testing of multi-mode switching—between C128 native, C64, and CP/M operations—which involved overnight fixes for custom IC shortages and power supply instabilities ahead of the January 1985 Consumer Electronics Show (CES) demo. The project, condensed into a five-month sprint under Herd's leadership, relied on rapid PCB revisions (one prototyped in 12 hours) and ad-hoc solutions like adjusted voltages (5.3V hacks) to meet deadlines, underscoring the rushed nature of integrating diverse subsystems.[5][8][9]Hardware Architecture
Processors and Memory
The Commodore 128 features a dual-processor architecture designed to support multiple operating modes. The primary processor is the MOS 8502, an enhanced variant of the 6502 family used in earlier Commodore systems, which operates at 2 MHz in native C128 mode and reduces to 1 MHz in C64 compatibility mode to ensure peripheral compatibility. This CPU handles the bulk of processing tasks in C128 and C64 modes, leveraging its 16-bit address bus and 8-bit data bus for efficient access to the system's memory. Complementing the 8502 is the Zilog Z80A, a secondary processor clocked at 4 MHz specifically for CP/M mode, enabling execution of CP/M software while the 8502 remains idle during that time.[11][12] The system's memory configuration centers on 128 KB of dynamic RAM (DRAM), organized into two 64 KB banks that can be internally divided into 16 banks of 16 KB each through hardware banking mechanisms. This RAM is expandable up to 512 KB using the optional 1750 RAM Expansion Unit (REU), which integrates seamlessly via the cartridge port to provide additional addressable space for advanced applications. The addressing scheme spans $0000 to FFFF (64 KB), but the [Memory Management Unit (MMU)](/page/Memory_management_unit) enables transparent [bank switching](/page/Bank_switching), allowing the full 128 KB to be accessed without software reconfiguration in most cases. The MMU, implemented as a custom gate array (MOS 8722), controls bank selection through registers such as D500–D50B and FF00–$FF04, facilitating dynamic mapping of RAM, ROM, and I/O regions to support the system's multitasking capabilities.[11][13][12] Read-only memory (ROM) in the Commodore 128 totals 64 KB across multiple banks for system functions, with an additional 8 KB character generator ROM. Of the system ROM, 28 KB is dedicated to C128 BASIC 7.0, including the extended interpreter and KERNAL routines for native mode operations. An additional 16 KB holds the C64 BASIC 2.0 and KERNAL for compatibility mode, while 4 KB is allocated for the Z80 BIOS in support of CP/M 3.0, with the full kernel loaded from external media. These ROM segments are banked via the MMU, with the character generator ROM providing display fonts shared across modes. The overall memory map prioritizes flexibility, with common low-memory regions ($0000–$0FFF for zero page and stack) remaining stable, while upper regions ($8000–BFFF and C000–$FFFF) switch between RAM and ROM banks as needed for mode-specific execution.[11][12]Input/Output Ports
The Commodore 128 featured a comprehensive set of input/output ports designed to support a wide range of peripherals, maintaining full compatibility with Commodore 64 accessories while adding enhancements for expanded functionality. These included two 9-pin D-subminiature joystick ports located on the right side of the unit, supporting digital Atari-style joysticks, paddles, or light pens as directed by software.[14] The serial I/O port, a 6-pin DIN connector at the rear, facilitated communication with peripherals such as the 1541 disk drive, operating at TTL levels and supporting higher "burst mode" speeds compared to the C64.[14] Additionally, a 24-pin user port provided parallel I/O capabilities for custom expansions and interfaces, with pins including ground, +5V power (limited to 100mA), and programmable I/O lines from the system's CIAs.[14] The keyboard served as the primary user interface, comprising a full-size 92-key layout with a 14-key numeric keypad, eight programmable function keys, six dedicated cursor keys, and specialized keys such as Help, Escape, Tab, Line Feed, Caps Lock, and Alt.[15] A dedicated 40/80 column mode switch key allowed seamless toggling between display modes without software intervention.[15] For storage peripherals, a 12-pin edge cassette port connected to the 1530 Datasette, enabling tape-based data input and output.[14] Video and audio outputs were versatile, with a built-in RF modulator connected via a coaxial F-type connector at the rear, outputting composite video and audio to standard televisions in 40-column mode on channels 2 or 3.[14] An 8-pin DIN audio/composite video connector provided luminance/sync, chrominance, and audio signals for external monitors or VCRs.[14] For higher-quality display, a 9-pin DE-9 RGBI port delivered a 15 kHz digital RGB signal with intensity, supporting 80-column monochrome or color modes via the VDC chip, compatible with CGA-style monitors.[16] Audio output was handled through the SID chip, routed to the composite video port or RF modulator.[14] Expansion was supported via a 44-pin edge connector at the rear, serving as the cartridge port for add-ons like the 1750 RAM Expansion Unit (REU), which plugged directly into this slot to extend memory up to 512 KB beyond the base 128 KB.[17] This port provided full access to the 8502 processor's address and data buses, enabling memory banking and peripheral integration.[14] Overall, these ports emphasized the C128's role as a bridge between hobbyist gaming and professional computing, with built-in RF modulation simplifying TV connectivity without external adapters.[15]Operating Modes
Native Mode Features
The Commodore 128's native mode, also known as C128 mode, serves as the system's proprietary operating environment, providing enhanced capabilities beyond its predecessor through the use of the 8502 CPU and expanded hardware resources.[13] This mode activates by default upon powering on the system or after a reset, displaying the BASIC 7.0 prompt, and can be entered via software commands or the dedicated [40/80 Disp] key to toggle display options.[13] The 8502 processor operates at approximately 1 MHz in standard 40-column configurations but doubles to 2 MHz when utilizing 80-column modes, enabling faster execution for demanding tasks.[13] A key feature of native mode is the 80x25 color text display, facilitated by the VIC-III video chip (8563), which supports up to 2,000 characters on screen in a bit-mapped format suitable for RGBI monitors.[13] This chip also enables advanced graphics modes, including a high-resolution 640x200 pixel RGB display with 16 simultaneous colors, though the 80-column text mode lacks hardware scrolling, requiring software-based alternatives for smooth movement.[13] Sprites remain supported for overlay graphics, maintaining compatibility with bit-mapped operations while expanding creative possibilities in native applications.[13] BASIC 7.0 in native mode introduces significant extensions over prior versions, including commands such as LOCATE for precise cursor positioning (e.g.,LOCATE 1,1) and SCROLL for managing text windows and screen movement.[13] Disk utilities are integrated directly into the language, with commands like APPEND for file concatenation, BACKUP for data duplication, BSAVE and BLOAD for binary handling, CATALOG for directory listings, DOS for executing DOS wedges, FORMAT for disk preparation, and HEADER for labeling volumes, streamlining file management without external tools.[13] These enhancements, combined with native support for 80-column output and sprite manipulation, allow programmers to leverage the full 128 KB RAM through memory banking mechanisms.[13]
Audio capabilities in native mode utilize the same SID chip (6581 or 8580 variants) as earlier models, offering three voices with waveforms including triangle, sawtooth, pulse, and noise, plus programmable filters and envelope controls for attack, decay, sustain, and release.[13] BASIC 7.0 provides direct access via commands like SOUND for tone generation, ENVELOPE and FILTER for waveform shaping, PLAY and TEMPO for sequenced music, and VOL for volume adjustment, enabling more sophisticated sound design without machine language intervention.[13]
C64 Compatibility Mode
The C64 Compatibility Mode on the Commodore 128 enables the system to fully emulate the hardware and software environment of the original Commodore 64, ensuring near-perfect backward compatibility for existing programs and peripherals. Native mode activates by default upon power-on and after a reset. C64 Compatibility Mode can be entered by holding the C= key while powering on, or it can be manually invoked from Native Mode by entering the BASIC commandGO 64 followed by confirming with Y when prompted.[18] Switching to or from this mode requires a system reset to take effect fully.
In C64 Compatibility Mode, the Commodore 128 reconfigures its hardware to match the Commodore 64 precisely: the MOS 8502 CPU operates at 1 MHz in a manner compatible with the original MOS 6510 processor, the MOS 8562 VIC-II chip handles 40-column video output, and only a 64 KB segment of RAM is addressable, mimicking the C64's memory map. This setup delivers identical color palette rendering with 16 colors, sound generation through the MOS 8580 SID chip (designed for electrical and functional compatibility despite minor analog differences), and I/O behavior via the same CIA and other ports, all without any speed or performance degradation relative to the original hardware.[19][20]
A key limitation of this mode is the isolation from the Commodore 128's advanced features: the additional 64 KB of RAM and the Zilog Z80A processor are inaccessible, preventing any hybrid operation or expansion beyond C64 standards.[21] To utilize Native or CP/M modes, a reset is necessary after completing C64 operations. Despite these constraints, the mode supports automatic booting of Commodore 64 cartridges plugged into the expansion port and compatible disk images or floppies in drives like the 1541 or 1571 (which emulate 1541 behavior), allowing programs to load and run directly without manual intervention.[18][22]
CP/M Mode
The CP/M mode of the Commodore 128 utilizes the integrated Z80 microprocessor, operating at an effective speed of approximately 2 MHz due to bus sharing with the 8502 CPU, to run the CP/M 3.0 operating system (also known as CP/M Plus), providing a text-based environment optimized for productivity applications.[11] This mode grants access to the full 128 KB of RAM, though the Transient Program Area (TPA) available for user programs is limited to about 59 KB in a single 64 KB memory bank.[23][11] To enter CP/M mode, users boot from a CP/M system disk inserted in a compatible drive such as the Commodore 1571, which supports both MFM and GCR formats, or via theBOOT command from C128 BASIC; alternatively, pressing the reset button with the disk present initiates the process directly.[23] The Z80's built-in BIOS, located in ROM at addresses $0000–$0FFF, handles initial system initialization before loading the full CP/M from disk.[11]
File system operations in CP/M mode are managed through the Console Command Processor (CCP) and built-in utilities, supporting standard CP/M file specifications with up to eight-character filenames, three-character extensions (e.g., .COM for executable programs, .ASM for assembly source), and up to 16 user areas for organization.[24] The system recognizes up to four drives (labeled A: through D:), with the Commodore 1541 floppy drive compatible when formatted in single-sided GCR volumes for CP/M use, though it operates more slowly than the 1571 due to its single-sided design and lack of native MFM support.[23][24] Utilities such as PIP for file copying, ED for text editing, and DIR for directory listings facilitate basic file management, while wildcards like * and ? allow batch operations on multiple files.[24]
The software ecosystem in CP/M mode draws from the extensive CP/M library, with notable ports including WordStar for word processing, dBase II for database management, and MBASIC (Microsoft BASIC) as an interpreter or compiler, all leveraging the 80-column text mode produced by the 8563 video controller for clear business-oriented displays on compatible monitors.[13] This 80-column capability, offering 640x200 resolution in monochrome or 16-color text, makes it particularly suitable for professional applications like spreadsheets (e.g., MultiPlan or SuperCalc2) and financial tools.[13] However, CP/M mode imposes significant limitations, including no access to graphics or sound hardware from the VIC-II or SID chips, restricting it to a purely text-based interface, and slower disk I/O performance—especially with the 1541—compared to the native C128 mode due to serial bus constraints and format conversions.[13][23] Additionally, compatibility is limited to 8-bit Z80 software, excluding CP/M-86 programs designed for 16-bit processors.[23]