Misplaced Pages

Commodore 128: Difference between revisions

Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 16:47, 17 January 2011 editPantergraph (talk | contribs)1,513 edits C128 Mode: link← Previous edit Revision as of 16:58, 17 January 2011 edit undoSmackBot (talk | contribs)3,734,324 editsm Dated {{Who}}. (Build p604)Next edit →
Line 34: Line 34:
The 128's ROM contained an ]: Entering the command "SYS 32800,123,45,6" in native mode reveals a 40-column screen with a listing of, and a message from, the machine's main developers. Also, entering the keywords QUIT or OFF will produce an "?UNIMPLEMENTED COMMAND ERROR". These commands are holdovers from a planned but never produced ] and were intended to exit from the BASIC interpreter and to ignore keyboard input during sensitive program execution, respectively. The 128's ROM contained an ]: Entering the command "SYS 32800,123,45,6" in native mode reveals a 40-column screen with a listing of, and a message from, the machine's main developers. Also, entering the keywords QUIT or OFF will produce an "?UNIMPLEMENTED COMMAND ERROR". These commands are holdovers from a planned but never produced ] and were intended to exit from the BASIC interpreter and to ignore keyboard input during sensitive program execution, respectively.


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 ] graphical operating system.{{who}} 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 ] graphical operating system.{{Who|date=January 2011}}


===CP/M Mode=== ===CP/M Mode===

Revision as of 16:58, 17 January 2011

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)

No issues specified. Please specify issues, or remove this template.

(Learn how and when to remove this message)
Commodore 128
TypeHome computer
Release date1985
Discontinued1989
Operating systemCommodore BASIC 7.0
Digital Research CP/M 3.0
CPUMOS 8502 @ 2 MHz Zilog Z80A @ 4 MHz
Memory128 KB
GraphicsVIC-II (320 x 200, 16 colors, sprites, raster interrupt), MOS 8563 (RGBI 640×200 16 colors, blitter)
SoundSID 6581 (3x Osc, 4x Wave, Filter, ADSR, Ring)
PredecessorCommodore 64

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 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.

Technical overview

File:Commodore 128 001.jpg
Original Commodore 128 box

The C128 was a significantly expanded successor to the C64 and unlike the earlier Plus/4, nearly 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 four cursor keys (previous Commodores had two, which required using the shift key to move the cursor up or left), an Alt key, Help key, Esc key, Tab key (not present on prior models) and a numeric keypad. The lack of a numeric keypad, Alt key and Esc key on the C-64 were an issue with some CP/M productivity software when used with the 64's Z-80 cartridge. Many of the added keys matched ones present on the IBM PC's keyboard. While the 128 still had a 40 column mode, an extra 1K of color RAM was made available to the programmer, as it was multiplexed through memory address 1. 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 2 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. Selection of these modes was implemented via 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, marketing operatives in the higher echelons of Commodore were worried about sustaining (if not prolonging) the popular home computer's appeal to non-programmers. These operatives felt 40-column VIC-II video display, while excellent for gaming, might be inadequate for productivity applications such as word processing. Furthermore, they felt the system's new graphical and sound capabilities would be cumbersome if managed purely through the standard POKE and PEEK commands, so they embarked on rewriting BASIC 2.0 so it had commands that more closely reflected its capabilities. In addition, the rise of more capacious disk drives in competitors' markets (such as those dedicated to PC compatibles and Apples) led high-ranking Commodore officials to worry about what to do next.

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 appears jumbled in FAST mode. The C64's BASIC 2.0 was replaced with 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 as an afterthought for the convenience of programmers who misplaced their usual sprite editors. The screen editor part of the kernal was further improved to support a rudimentary windowing feature and was relocated to a separate ROM. In 80-column mode the editor took advantage of VDC features to provide blinking and underlined text, activated through escape codes. 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, speeding garbage collection and easing debugging for the programmer (an executing program could be STOPped, variable values inspected or altered in direct mode, and program execution restarted using BASIC's GOTO command.)

The 128's ROM contained an easter egg: Entering the command "SYS 32800,123,45,6" in native mode reveals a 40-column screen with a listing of, and a message from, the machine's main developers. Also, 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 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 (aka CP/M Plus, which was backward compatible with CP/M 2.2) and ADM31/3A terminal emulation. A CP/M cartridge had been available for the C64, but it was expensive and was limited to software on Commodore-formatted disks. 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.77 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.

CP/M was possibly the least-used of the 128's three operating modes. Intended to give the new computer a large library of professional-grade business software that Commodore lacked, CP/M was long past its prime by the time of the 128's introduction. Also, as a disk-based DOS, CP/M was very different from the Commodore DOS built into the ROM of Commodore disk drives.

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

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, but unlike the C64, where the Memory-map changing action of these lines is implemented directly in hardware, the C128's Z80 firmware startup code polls these lines on power-up and then switches modes as necessary. C128 native mode cartridges are recognized and started by the kernal polling defined locations in the memory map.

C64 mode almost exactly duplicated the features of a hardware 64; many of the 128's additional features were disabled or unavailable in this mode. The 80 column display, fast mode, MMU, and BASIC 7.0 were not available in 64 mode. The 4 cursor keys at the top of the keyboard were unrecognized, forcing the user to use the 64's cumbersome shifted key arrangement, which were included at the bottom of the 128 keyboard. Also ignored were the 128's numeric keypad and added top-row keys (the only top row keys that were functional in 64 mode were the f1-f8 keys above the keypad.) Some of these features could be turned back on by user software but most commercial programs would ignore them.

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 difference 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.

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 at memory address $FF00.

Commodore's RAM Expansion Units utilized an external DMA controller to read and write one or more bytes (up to entire ranges of bytes) between the C-128's RAM and the RAM in the expansion unit.

Another feature of the memory management unit was to allow relocation of Zero page and the Stack, which, thanks to the Direct Page register.

Commodore 128D

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.

In the latter part of 1986, Commodore released a version of the C128D in North America and Europe 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.

Inside, the C128DCR ROMs, the "1986 ROMs," so-named from the copyright date displayed on the startup screen, contained several bug fixes—including an infamous one where the 'Q' character would remain lowercase when CAPS LOCK was active—and the 8568 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 commercial 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.

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. A few Infocom text adventures took advantage of the 80 column screen and increased memory capacity, and a very few C64 games were ported to native mode like Kikstart 2 and The Last V8 from Mastertronic and Ultima V from Origin Systems, but the vast majority of games ran in 64 mode. 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, even branding it a "Personal Computer" on the case, but this strategy was not successful in the face of contemporary 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 Amiga 500, even though the C128D had to sell for several hundred dollars less to keep the Amiga's high-end marketing image intact.


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, which Commodore had only added in order to comply with FCC radio frequency regulations.

Specifications

  • CPUs:
  • 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 32 KB 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 RGBI colors (not the same palette as 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 "burst mode" speed possible on the serial bus
    • Expansion port more flexibly programmable
    • RGBI video output (DE9-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.
    • External keyboard input (DB25-connector) (C128D(CR) only)

References

  1. http://www.devili.iki.fi/pub/Commodore/docs/magazines/gazette/1986/07jul/jul86-64ModeSpeed-UpForThe128A.jpg
  2. http://www.devili.iki.fi/pub/Commodore/docs/magazines/gazette/1986/07jul/jul86-64ModeSpeed-UpForThe128B.jpg
  3. 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 0-916439-42-9. Original German edition (1985), Düsseldorf, West Germany: DATA BECKER GmbH & Co. KG.

External links

List of Commodore microcomputers
8-bit
Amiga
IBM PC compatibles
IBM PC compatible laptops
Prototypes

Categories:
Commodore 128: Difference between revisions Add topic