The Commodore 128 (C128, CBM 128, C=128) home/personal computer was the last 8-bit machine which was commercially released by Commodore Business Machines (CBM). Introduced in January of 1985 at the CES in Las Vegas, it appeared three years after its predecessor, the bestselling Commodore 64. The primary hardware designer of the C128 was Bil Herd.
The C128 was a significantly expanded successor to the C64 and unlike the earlier Plus/4 it remained compatible. The new machine featured 128 KB of RAM (externally expandable to 640 KB) and an 80-column RGB monitor output (driven by the 8563 VDC chip with 16 KB dedicated video RAM, although following the release of the 128D later "flat" 128s had 64 KB of VRAM), as well as a redesigned case/keyboard with a numeric keypad. The 128's power supply was vastly improved over the 64's troublesome design. It was much larger, with cooling vents and a fuse to protect it from blowing up. Instead of the 6510 CPU of the C64, the C128 incorporated a two-CPU design. The primary CPU, the 8502, was a slightly improved version of the 6510; its main addition was the ability to run at a 2 MHz clock rate (however, this required turning off the 40-column video output). The second CPU was a Zilog Z80 which was used for ensuring CP/M compatibility and for mode-selection of the computer upon boot-up. The two processors could not run concurrently, thus the C128 was not a multiprocessing system.
The C128 had three modes of operation: C128 Mode (native mode), which ran at 1 or 2 MHz with the 8502 CPU and had both 40- and 80-column text modes available; CP/M Mode, which used the Z80 second CPU in either 40- or 80-column text mode; and C64 Mode, which was very nearly 100% compatible with the earlier computer. None of these modes would have been possible as implemented on the C128 without the Z80 chip. The Z80 controls the bus on initial boot-up and checks to see if there are any C64/C128 cartridges present, and if the Commodore key (C64-mode selector) is active on boot-up. Based on what it finds, it will switch to the appropriate mode of operation.
Some 128s suffered from a reliability problem caused by the electromagnetic shield over the internal board. The shield had fingers that rested on the top of the major chips to conduct heat into the shield which then acted as a large heatsink. A combination of poor contact and the fact that plastic encased chips do not lose heat that way plus the shield being made from mu-metal (a poor heat conductor) saw some chips overheat and fail. The SID sound chip was particularly vulnerable in this respect as it operated from a 9 volt supply. The situation could be vastly improved by removing the shield completely.
While the C64's graphics and sound capabilities were generally considered excellent, the popular home computer was the subject of a number of perennial criticisms. The 40-column VIC-II video display, while excellent for gaming, was often considered inadequate for productivity applications such as word processing. The lack of a numeric keypad was also an issue with some office suite software. Furthermore, the 2.0 revision of Commodore BASIC that was incorporated into the C64 was quite limited, and lacked keywords to handle the system's graphical and sound capabilities. These features had to be accessed via cumbersome
POKE commands, or by custom-written machine language routines. Also criticized was the lack of a hardware reset button, an essential device when developing assembly language routines. Finally, the C64's 1541 disk drive was almost universally condemned as slow and unreliable.
The designers of the C128 succeeded in rectifying most of these concerns. A new chip, the VDC, provided the C128 with an 80-column color CGA-compatible display (also called RGBI for RGB plus Intensity). The new 8502 CPU was completely backward-compatible with the C64's 6510, but could run at double the speed if desired. However, the VIC-II chip which controlled the 40-column display could not operate at the faster clock rate, so the 40 column display is not available in Fast mode. A numeric keypad was added to the keyboard, as were various other keys. The C64's rudimentary BASIC 2.0 was replaced with the far more flexible and powerful BASIC 7.0, which included keywords designed specifically to take advantage of the machine's capabilities, and also incorporated a sprite editor and machine language monitor. The screen editor was further improved. A reset button was added to the system.
Three new disk drives were introduced in conjunction with the C128, the 1570, 1571, and 3.5 inch 1581 drives promising far faster transfer speeds via a new "burst mode". With these three drives, more complex drive data arrangements were also made available to Commodore users in the nature of "track and sector" oriented subdirectories, a feature not available to PC users, who instead had to convolute their file allocation tables to do the same thing. The disk drives also had more on-board RAM than their predecessors, the 1540 and 1541 drives.
The C128 also had twice the RAM of the C64, and a far higher proportion was available for BASIC programming, due to the new MMU bankswitching chip. This feature made it possible for BASIC program code to be stored separately from variables, greatly enhancing the machine's ability to handle complex programs.
The C128's greater hardware capabilities, especially the increased RAM, screen display resolution, and serial bus speed, made it the preferred platform for running the GEOS graphical operating system.
Unfortunately, the C128 ran CP/M noticeably slower than most dedicated CP/M systems, as the Z80 processor ran at an effective speed of only 2 MHz (instead of the more common 4–6 MHz) and because it used CP/M 3.0, whose complexity made it inherently slower than the earlier, more widespread, CP/M 2.2 system. From the source code of the C128 CP/M implementation, it is clear that the engineers originally planned to make it possible to run CP/M in the "fast" mode as well, with the 40-column output turned off and the Z80 running at an effective 4 MHz; however, this did not work on the released C128 hardware.
A possibly unique feature of the C128 among CP/M systems was that some of the low-level BIOS services were executed by the 8502 chip instead of the Z80. The latter transferred control to the 8502 after having placed the pertinent parameter values in designated memory locations. The Z80 then turned itself off, being awoken by the 8502 at completion of the BIOS routine, with status value(s) available in RAM for inspection.
GO 64command in BASIC 7.0 immediate mode
Some of the few C64 programs that fail on a C128 run correctly when the
CAPS LOCK key is pressed down (or the ASCII/National key on international C128 models). This has to do with the larger built-in I/O port of the C128's CPU. Whereas the
SHIFT LOCK key found on both C64 and C128 is simply a mechanical latch for the left
SHIFT key, the
CAPS LOCK key on the C128 can be read via the 8502's built-in I/O port. A few C64 programs are confused by this extra I/O bit; keeping the
CAPS LOCK key in the down position will force the I/O line low, matching the C64's configuration and resolving the issue.
A handful of C64 programs wrote to $D030 (53296), often as part of a loop initializing the VIC-II chip registers. This memory-mapped register, unused in the C64, operated as a selector for 2 MHz mode in the C128. Since it was not disabled in C64 mode, an inadvertent write could blank the 40-column display by putting the CPU into fast mode. Fortunately, very few programs suffered from this flaw. In July 1986, COMPUTE!'s Gazette published a type-in program that exploited this minor incompatibility, by using a raster interrupt to enable fast mode when the bottom of the visible screen was reached, and then disable it when screen rendering began again at the top. By using fast mode during the vertical blank period, standard video display was maintained while increasing overall execution speed by about 20%.
An easy way to tell the C128's C64 mode and a real C64 apart, typically used from within a running program, is to write a value different from
$FF (255) to memory address
$D02F (53295), which is used to decode the extra keys of the C128 (the numerical keypad and some other keys). On the 64 this memory location will always contain the value
$FF no matter what was written to it, but on a C128 in 64 mode the value of the location—a memory-mapped register—can be changed. Thus, checking the location's value after writing to it will reveal the actual hardware platform.
Although referred to as RAM expanders, Commodore's RAM Expansion Units were not expansion devices at all, as they utilized an external DMA controller to copy bytes between the C-128's RAM and the RAM in the "expansion unit." This function was essentially independent of the MMU's memory control features.
The Commodore 128D was released in the fall of 1985 in Europe. The US release date was in the summer of 1986. It was an updated version of the C128 with a detached keyboard and a 1571 disk drive in the same box as the main system unit, providing a sleeker, more professional-looking appearance, much like that of a desktop PC. In Europe the first C128Ds came in a plastic case with a side-mounted carrying handle and were technically exactly the same as a C128 with the 1571 disk drive. Additionally these models were equipped with a somewhat noisy cooling fan, leading to the model sometimes being referred to as the "128 Diesel".
Later models of the C128D came in a metal case; among these were the Commodore 128DCR (CR = cost reduced), which was widely sold in Canada and the USA. These later models had some minor improvements. The internal design was more integrated to save production costs, but also improved the thermal design, so that a fan was supposedly not needed anymore (later experience proved that the fan was a worthwhile addition and many C128Ds were so modified).
Inside, the C128D ROMs contained several bug fixes, and the 8563 VDC chip (in the C128DCR, the 8568) was equipped with the maximum capacity 64 KB of video RAM – four times that of the original C128. This permitted the C128D to do higher-resolution graphics with more colors in RGB mode, although very little software took advantage of this. With or without the extra RAM, the VDC's high-resolution graphics modes were inaccessible from the C128's BASIC. They could only be utilized by calls to screen editor ROM primitives (or their assembly language equivalents), or via third-party BASIC language extensions. The most popular such toolkit was Free Spirit Software's "BASIC 8", which added high-resolution VDC graphics commands to CBM BASIC. BASIC 8 was available on two disks (editor disk and runtime disk) and with a ROM chip for installation in the C128's internal Function ROM socket.
Because the C128 would run virtually all C64 software, and because the next-generation, 32/16-bit home computers, primarily the Commodore Amiga and Atari ST, were gaining ground, relatively little software for the C128's native mode appeared (probably on the order of 100–200 fully commercial titles, plus the usual share of public domain and magazine type-in programs). While the C128 sold a total number of 4 million units between 1985 and 1989, its popularity paled in comparison to that of its predecessor. This has been blamed on the lack of native software and on Commodore's less-aggressive marketing, which was mostly focused on the Amiga. An additional explanation may be found in the fact that the C64 sold huge numbers to people primarily interested in computer games, which the more expensive C128 didn't add much value towards improving (with the exception of a few Infocom text adventures). The C128 was certainly a better business machine than the C64, but not really a better gaming machine, and people who wanted business machines bought IBM PC clones almost exclusively by the time the C128 was released. With its advanced BASIC programming language, CP/M compatibility and "user-friendly" native software packages such as Jane, Commodore attempted to create a low-end business market for the 128, branding it a "Personal Computer" on the case, but this strategy was not successful in the face of low-cost IBM-compatibles like the Leading Edge Model D and Tandy 1000 that, in some cases, sold for less than a complete 128 system. There was a professional-level CAD program, Home Designer by BRiWALL, but again, most of this work was done on PCs by the 128s era. The main reason that the C128 still sold fairly well was probably that it was a much better machine for hobbyist programming than the C64.
Also, when the C128(D/DCR) was discontinued in 1989, it was reported to cost nearly as much to manufacture as the 16-bit Amiga 500, even though the C128D had to sell for several hundred dollars less to keep the Amiga's high-value marketing image intact.
Bil Herd commented on the Wikipedia C128 article, stating: "We considered the C128 to be a holding action until the next generation computers arrived, we were trying to up the game as far as expectations for new machines and buy a year, two at the max in the process. In that we exceeded our initial goals but probably due in part to Commodore's lackluster follow through on marketing and selling the Amiga."
SYS 32800,123,45,6" in native mode would reveal the 40-column screen shown to the right:
PRINT""+-X(where X is any integer), depending on the number entered for X. This bug is present in all known versions of Microsoft's 6502 BASIC interpreter, including the BASIC of all other 8-bit Commodore machines, as well as Applesoft BASIC.
?UNIMPLEMENTED COMMAND ERROR". These commands are holdovers from a planned but never produced LCD-display portable computer and were intended to exit from the BASIC interpreter and to ignore keyboard input during sensitive program execution, respectively.