Share on Facebook Share on Twitter Email
Answers.com

Commodore 128

 
Wikipedia: Commodore 128
Commodore 128
Commodore 128 002.jpg
Type Home computer
Release date 1985
Discontinued 1989
Operating system Commodore BASIC 7.0
Digital Research CP/M 3.0
CPU MOS 8502 @ 2 MHz Zilog Z80A @ 4 MHz
Memory 128 KB
Graphics VIC-II (320 x 200, 16 colors, sprites, raster interrupt), MOS 8563 (RGBI 640×200 16 colors, blitter)
Sound SID 6581 (3x Osc, 4x Wave, Filter, ADSR, Ring)
Predecessor Commodore 64
Successor Amiga 1000

The Commodore 128 (C128, CBM 128, C=128) home/personal computer was the last 8-bit machine 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.

Contents

Technical overview

Original Commodore 128 box

The C128 was a significantly expanded successor to the C64 and unlike the earlier Plus/4, full compatibility with the C64 was retained. The new machine featured 128 KB of RAM, in two 64 KB banks and an 80-column RGBI video output (driven by the 8563 VDC chip with 16 KB dedicated video RAM, as well as a substantially redesigned case and keyboard, which included a numeric keypad. The 128's power supply was vastly improved over the 64's unreliable design, being larger and equipped with cooling vents and a replaceable fuse. Instead of the single 6510 microprocessor of the C64, the C128 incorporated a two-CPU design. The primary CPU, the 8502, was a slightly improved version of the 6510 capable of being clocked at two MHz. The second CPU was a Zilog Z80 which was used to run CP/M software, as well as to initiate operating mode selection at boot time. The two processors could not run concurrently, thus the C128 was not a multiprocessing system.

The C128 had three operating modes: 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 in either 40- or 80-column text mode; and C64 Mode, which was nearly 100 percent 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.

C128 Mode

C128 Main board

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 lacked keywords to handle the system's graphical and sound capabilities. These features had to be accessed via terse and potentially cryptic PEEK and POKE commands, or by custom-written machine language routines. Finally, the C64's 1541 disk drive was almost universally condemned as slow and unreliable.

The designers of the C128 succeeded in addressing most of these concerns. A new chip, the VDC, provided the C128 with an 80-column color CGA-compatible display (also called RGBI for red-green-blue plus intensity). The new 8502 microprocessor 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 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. A sprite editor and machine language monitor were added for programming convenience. The screen editor part of the kernal was further improved to support a rudimentary windowing feature and was relocated to a separate ROM. A hardware reset button was added to the system.

Two new disk drives were introduced in conjunction with the C128, the short-lived 1570 and the 1571. Later on, the 3.5 inch 1581 was introduced. All of these drives were more reliable than the 1541 and promised much better performance via a new "burst mode" feature. The new drives also had more on-board RAM than their predecessors, the 1540 and 1541 drives, making it possible to open a larger number of files at one time.

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.

CP/M Mode

Using CP/M mode required use of a boot diskette

The second of the C128's two CPUs was the Zilog Z80, which allowed the C128 to run CP/M. The C128 was shipped with CP/M 3.0 (CP/M Plus, which was backward compatible with CP/M 2.2) and ADM31/3A terminal emulation. To make a large application software library instantly available at launch, the Commodore 128 CP/M and accompanying 1571 floppy disk drive was designed to run almost all Kaypro-specific CP/M software without modification.

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 feature did not correctly function on the first generation 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 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.

C64 Mode

By incorporating the original C64 BASIC and kernal ROMs in their entirety (16 KB total), the C128 achieved almost 100 percent compatibility with the Commodore 64. The C64 mode can be accessed in one of three ways:

  • Hold down the Commodore logo key when booting the system
  • Enter the GO64 command in BASIC 7.0
  • Boot with a C64 cartridge plugged in

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, determined the system clock rate. Since this register was fully functional in C64 mode, an inadvertent write could scramble the 40-column display by switching the CPU over to 2–MHz, at which clock rate the VIC-II video processor could not produce a coherent display. Fortunately, 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 the higher clock rate during the vertical blank period, standard video display was maintained while increasing overall execution speed by about 20 percent. [1] [2]

An easy way to differentiate between a genuine C64 and a C128 operating in C64 mode, typically used from within a running program, is to write a value different from $FF (255) to memory address $D02F (53295), a register 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 is 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.

RAM setup

To handle the relatively large amounts of ROM and RAM, tenfold the 8502's 64 KB address space, the C128 used the 8722 MMU chip to create different memory maps, in which different combinations of RAM and ROM would appear according to bit patterns written into the MMU's confguration register. While the MMU was designed to handle more than 128 KB, the versions that were actually produced and used in the C128 cannot do so.

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.

Commodore 128D

A Commodore 128D with a Commodore 2002 RGB monitor and Commodore 1581 Floppy Disk Drive

Late in 1985, Commodore released to the European market a new version of the C128 with a redesigned chassis. Called the Commodore 128D, this new European model featured a plastic chassis with a carrying handle on the side, incorporated a 1571 disk drive into the main chassis, replaced the built-in keyboard with a detachable one, and added a cooling fan. The keyboard featured two folding legs for changing the typing angle.

Inside, the C128D ROMs, the "1986 ROMs," so-named from the copyright date displayed on the startup screen, contained several bug fixes (including the infamous "caps lock Q" keyboard decoding error), and the 8563 VDC was equipped with 64 KB of video RAM—the maximum addressable amount, equal to four times that of the original C128. The increase in video RAM made it possible, among other things, to generate higher-resolution graphics with a more flexible color palette, although little software took advantage of this capability.

Despite the improvement in the RGB video capabilities, Commodore did not enhance BASIC 7.0 with the ability to manipulate RGB graphics. Driving the VDC in graphics mode continued to require the use of calls to screen editor ROM primitives (or their assembly language equivalents), or by using 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 BASIC 7.0. 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.

In the latter part of 1986, Commodore released a version of the C128D in North America referred to as the C128DCR ("cost reduced"). The DCR model featured a stamped steel chassis in place of the plastic version of the C128D (with no carrying handle), a modular switching power supply similar to that of the C128D, as well as a removable keyboard and internal 1571 floppy drive. On the mainboard, Commodore consolidated some of the components to save production costs and replaced the 8563 video controller with the more technically advanced MOS Technology 8568 (which was also fitted to a few D-models). As a cost-saving measure, the cooling fan that was fitted to the D model was removed, although the mounting provisions on the power supply subchassis were retained.

Market performance

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 by this time. 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."[citation needed]

Reliability concerns

Early versions of the C128 occasionally experienced temperature-related reliability issues due to the use of an electromagnetic shield over the main circuit board. The shield was equipped with fingers that contacted the tops of the major chips, ostensibly causing the shield to act as a large heat sink. A combination of poor contact between the shield and the chips, the inherently limited heat conductivity of plastic chip packages, as well as the relatively poor thermal conductivity of the shield itself (which was made from mu-metal), resulted in overheating and failure in some cases. The SID sound chip was particularly vulnerable in this respect. The most common remedy was to remove the shield.

It was common practice to install a cooling fan into the C128DCR, although that model did not experience the thermal issues of the "flat" C128.

C128's hidden features

The 40 column version of the C128 Easter egg screen, with a listing of, and a message from, the machine's main developers. Notice the term "herdware", named after Bil Herd.
  • Easter egg: Entering the command "SYS 32800,123,45,6" in native mode reveals the 40-column screen shown to the right:
  • The Commodore 128's BASIC 7.0, the programming language which comes built-in with the computer, can be crashed or cause the computer to reboot by executing 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.
  • Entering the keywords QUIT or OFF will produce an "?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.
  • The original (1985) kernal ROM includes a rather obvious bug. When in "CAPS LOCK" mode, each of the alphabetic keys type properly in upper-case except the "q", which remains lower-case. This was remedied in the 1986 revision kernal by correcting a decoding table entry error.
  • Multiple zero page and CPU stack locations can be defined by twiddling some bits in the C128's MMU, which theoretically would make multitasking a possibility. In practice, the lack of hardware memory protection would create a difficult-to-manage environment in which to run a preemptive kernel.
  • Grounding the cartridge port's /EXROM and/or /GAME lines will cause the computer to automatically start up in C64 mode. This feature faithfully duplicates the C64 behavior when a cartridge (such as Simons' BASIC) is plugged into the port and asserts either of these lines. C128 native mode cartridges are recognized and started by the kernal polling defined locations in the memory map.

Specifications

  • CPUs:[1]
    • MOS Technology 8502 @ 2 MHz (1 MHz selectable for C64 compatibility mode)
    • Zilog Z80  @ 4 MHz (effectively running at 2 MHz due to stopping half the time to allow VIC-II video chip access to system bus)
  • MMU: Memory Management Unit controls 8502/Z80 processor selection; ROM/RAM banking; common RAM areas; relocation of zero page and stack
  • RAM: 128 KB system RAM, 2 KB 4-bit dedicated color RAM (for the VIC-II E), 16 KB or 64 KB dedicated video RAM (for the VDC), up to 512 KB REU expansion RAM
  • ROM:   72 KB (28 KB BASIC 7.0, 4 KB MLM, 8 KB C128 KERNAL, 4 KB screen editor, 4 KB Z80 BIOS, ca. 9 KB C64 BASIC 2.0, ca. 7 KB C64 KERNAL, 4 KB C64 (or international) character generator, 4 KB C128 (or national) character generator) – expandable by 32 KB Internal Function ROM (optional; for placement in motherboard socket) and/or 32KB External Function ROM (optional; for placement in REU socket)
  • Video:
    • MOS 8564/8566 VIC-II E (NTSC/PAL) for 40-column composite video (a TV set can be used instead of a monitor if desired)
      • Direct register access through memory-mapped I/O
      • Text mode: 40×25, 16 colors
      • Graphics modes: 160×200, 320×200
      • 8 hardware sprites
      • 2 KB dedicated 4-bit color RAM, otherwise uses main memory as video RAM
    • MOS 8563 VDC (or, in C128DCR, the 8568) for 80-column digital RGBI component video, compatible with IBM PC CGA monitors, monochrome display also possible on composite video monitors; usable with TV sets only when the set has SCART and/or baseband video-in sockets in addition to the antenna connector. Color is possible through SCART, only monochrome through baseband video-in.
      • Indirect register access (address register, data register in mapped memory)
      • Text mode: Fully programmable, typically 80×25 or 80x50, 16 colors (not the same as those of the VIC-II)
      • Graphics modes: Fully programmable, typical modes are 320x200, 640×200, and 640×400 (interlaced).
      • 16 KB dedicated video RAM (64 KB standard in C128DCR, C128/C128D could be upgraded to 64 KB), accessible to the CPU only in a doubly indirect method (address register, data register on VDC, which in turn are addressed through address register, data register in mapped memory)
      • Limited blitter functionality
  • Sound:
  • I/O Ports:
    • All Commodore 64 ports with 100 percent compatibility, plus the following:
    • Higher speed possible on the serial bus
    • Expansion port more flexibly programmable
    • RGBI video output (DB9-connector) logically similar to the IBM PC CGA connector, but with an added monochrome composite signal. This added signal causes a minor incompatibility with certain CGA monitors that can be rectified by removing pin 7 from the plug at one end of the connecting cable.

References

  1. ^ Byte. McGraw-Hill. 1986. p. 274. "C-128 CP/M uses both the Z80 and 8502 processors. The Z80 executes most of the CP/M BIOS functions." 
Notes
  • Greenley, Larry, et al. (1986). Commodore 128 Programmer's Reference Guide. Bantam Computer Books/Commodore Publications. ISBN 0-553-34378-5.
  • Gerits, K.; Schieb, J.; Thrun, F. (1986). Commodore 128 Internals. 2nd ed. Grand Rapids, Michigan: Abacus Software, Inc. ISBN 0916439429. Original German edition (1985), Düsseldorf, West Germany: DATA BECKER GmbH & Co. KG.

External links


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
 
 

 

Copyrights:

Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Commodore 128" Read more