Commodore 128

Introduction

The successor to the Commodore 64 (C64), and Commodore's last 8-bit computer, the Commodore 128 (C128) came to market in 1985 and offered backward compatibility with the C64 (around 99% compatible) as well as having its own C128 mode and CP/M support meaning it ran three operating systems. For more information about the C64 please see Commodore 64.

Rather than use the single processor design of its predecessor, the C128 uses both an 8502 (based on the 6502) running at 2MHz and a Z80 running at 4MHz. It is the Z80 that allows for CP/M support (compatible with CP/M 3.0) and is also the primary processor that handles start up to see which mode to boot in. The C128 has 128KB of RAM made possible thanks to a Memory Management Unit (MMU) chip but used the same SID sound chip from the C64, and has a VIC-IIe chip (similar to the VIC-II in the C64), as well as a 8563 VDC with 16KB video RAM which produces an 80-column RGB display.

Please note: screenshots taken using RGB upscaled unless otherwise stated.

Overview

You can view my C128 below which is the PAL version and has written on the underside 'Made in England':

It is slightly wider and more deeper than even the C64C; the C128 has a numeric keypad at its right and along the top a range of keys including function keys, arrow keys, caps lock and 40/80 display column lock. Unfortunately, despite the size of the keyboard the C128 does not have a more modern arrangement if arrow keys to control the cursor, forcing the user to use the shift key in combination with the two CRSR keys to move the cursor in all four directions.

At the top left there is a large 'Amiga' style red power LED. At the back are the following ports; user port, RGBI (for connecting to a monitor to use 80 column mode), RF (to be connected to a TV, 40 column mode), L-H switch (for RF; not accessible), video (also for a monitor, or TV, for 40 column mode), serial (for disk drive, such as the 1541), cassette and expansion (e.g., cartridge). Note that the RGBI connector is the only additional connector compared to the C64. At the right there is an Amiga-like power connector but Amiga power supply units CANNOT be used with the C128 , there is also the power switch, reset button (which was not available on the C64) and 2 control (joystick) ports.

There were 3 main versions of the C128; the original (as above), the C128D which had a built in 1571 disk drive and detachable keyboard, and lastly the C128DCR (Disc drive, Cost Reduced), a version of the C128D that was cheaper to produce but had a better video chip (not that much software took advantage of it). Please see the Commodore 128D section on this page for more information about the C128D.

The C128 can take advantage of software available from cartridge, cassette or disk, as with the C64, but the C128 is unique in that it will attempt to boot from a disk when the machine is powered on (provided a disk drive is connected in the case of the standard C128 as the C128D has an integrated floppy drive) before dropping the user into the BASIC interpreter if unsuccessful. By having a CP/M disk in the drive and switching the computer on it will boot straight into CP/M or alternatively the CP/M disk can be inserted after power on and then the 'BOOT' command can be used.

Despite the C64's great graphics and sound capabilities for the time, the built-in BASIC V2 which shipped with the C64 lacked commands to manipulate sprites, high resolution graphics and so on. This is remedied with the C128's built-in BASIC V7 which adds those missing commands and you can find a list of those commands and how to use them in convenient online form at:

https://www.commodore.ca/manuals/128_system_guide/sect-17a.htm

Another advantage of BASIC V7 is that it has a built-in machine language monitor, allowing the user to write fast, low level programs that can be run from BASIC. More information about the machine language monitor can be found at:

https://www.commodore.ca/manuals/128_system_guide/app-j.htm#J

To switch to C64 mode while in C128 mode you can issue the 'GO64' command or alternatively you can hold the C= key and power on the computer; to return to C128 mode you can use the reset switch or power cycle the machine.

The C128 was the first microcomputer to provide an 80 column mode and both the C128 and CP/M modes support 40 and 80 column mode with 25 rows and 16 colours (the 16 colours are different between 40 and 80 column mode). You can switch between 40 and 80 column mode using the 40/80 display key; press down for 80 column display or release the key for 40 columns. However, the machine doesn't react immediately to the key being pressed or released and instead it changes the display based on the key being pressed or not when the machine is powered on, when the reset button is pressed and when the run/stop and restore buttons are pressed at the same time. To use 80 column mode you must have a monitor connected to the C128's RGBI port and while that seems inconvenient it does have the advantage that the C128 has dual monitor support as programs can use both the 40 and 80 column displays. For an example of a program that uses both display modes please see this site:

https://www.commodore.ca/manuals/128_system_guide/sect-08.htm#8.5

Note that at power up the 80 column mode uses white for text with a black background which you can see below:

You can use a COLOR command to change the text or background colour in order to actually see colour (provided you have a colour display connected). Here is a simple program to display each in each of the 16 colours:

10 FOR I=1 TO 16

20 COLOR 5,I

30 PRINT "COLOUR"I

40 NEXT

The result is as follows:

As the first colour is black it will not show as I have kept the background colour as black; unfortunately I couldn't find a way to change the background colour independently for each line.

The C128's RGBI output is CGA (Color Graphics Adapter) compatible, an IBM PC 1981 standard, and CGA compatible monitors typically converted dark yellow (colour 10 in the image above) to brown. While this can be done with modern RGBI adapters, Commodore lists colour 10 in 80 column mode as dark yellow and it is debated amongst users whether it should be converted to brown. I feel it is up to the user if they have choice (by making their own adapter, for example) or based on how the software they are using renders colours.

While nowadays it's difficult to connect a modern display/adapter to the C128's RGBI output you can convert to VGA (though more suited for old VGA monitors) or SCART (which is more likely to work even with newer displays). Please see 'RGBI connection issues' in the troubleshooting section for more information.

As a comparison, here is a screen capture showing the C128's boot screen in 40 column mode via the composite video connection:

While RF would be a lot worse it's clear that even composite looks poor compared to RGBI and the vertical lines (as was common with old computers) are quite clear.

In the screenshot above I have typed GO64 to enter C64 mode; at the prompt type 'Y' and press return to be met with this familiar screen:

The C128's VDC chip is very versatile and in bitmap mode it can be made to output in many different resolutions even as high as720 Ă— 700 although that requires the video RAM to be upgraded to 64KB.

The C128 came with BASIC V7 which was a greatly improved version of BASIC compared to the C64's BASIC, however, it was still lacking somewhat which prompted the release of BASIC V8 which was released on floppy and ROM. Another issue was that CP/M ran slow on the C128 due to the architecture of the computer, as if the Z80 that runs at 4MHz was actually slowed down to 2MHz.

Even though the C128 was a great improvement over the C64 it was discontinued in 1989, having only sold just 5 million units compared to the 17 million of the C64, somewhat not surprising with Commodore's own Amiga computer around the corner and better machines already on the market. Even the C128's C64 support and CP/M capability was not enough to establish the kind of sales that the C64 enjoyed.

Accessories

Commodore 1541

Please go to Commodore 1541.

SD2IEC

Please go to SD2IEC.

Commodore 128D

The Commodore 128 D (C128D) is essentially a C128 with a built-in 5 1/4 inch 1571 floppy disk drive, power supply and cooling fan, contained in a plastic box with detachable keyboard and was released in Europe in late 1985. It resembles an Amiga 1000, although because of the the grill design on the top of the computer toward the back makes it look somewhat like a C128/C64C. The downside of having so much built in to the C128D is that it is very heavy (around 7KG) so be careful if handling one.

As mentioned, the keyboard is detachable and has a 25-pin D type male connector which plugs into the side of the C128D but has no means to keep it securely connected with screws. The keyboard has a label proclaiming 'commodore 128D PERSONAL COMPUTER'. The keyboard of my C128D appears to be a European keyboard as some keys have extra symbols in silver which the US keyboard doesn't have. There are actually a number of European C128D keyboards which you can see here:

http://vic-20.de/x1541/cbm/keyboards.html

The keyboard has folding legs either side which can be rotated to act as a stand for the keyboard.

As with the C128, the C128D shipped with BASIC V7 which is backward compatible with earlier BASIC versions as well as having built-in commands for graphics, sound, etc. that weren't in earlier BASIC versions such as on the C64.

Looking at the C128D in more detail: on the front of the unit is a large, rectangular power LED and below it a badge that says 'commodore 128D PERSONAL COMPUTER'. Toward the right is a large, rectangular disk access LED and to the right of that the 5 1/4 floppy disk drive.

On the right side is a 25 pin female D-type keyboard connector, two 9-pin male D-type controller ports 1 and 2, a recessed drive reset switch, and a (computer) reset switch. On the left side is the power switch and carry handle which can be rotated outward.

At the back is a female edge 44-pin expansion port, a 12-pin edge male cassette port, a 6-pin DIN female serial port, a 8-pin DIN female video port, a blanked off section called 'L-H' (blanked off, possibly RF switch on some versions), an RF phono connector, a 9-pin female D-type RGBI connector, and a 24-pin male edge user port. Above the user port is a 3-pin male mains 'kettle' connector. There is a holder for the mains cable to be wrapped around (which of mine unfortunately was broken off perhaps from being dropped by the previous owner).

On the bottom is a compartment for storing the keyboard so that it clips in place and an area to put the keyboard cable. My model has a label which is says 'MODEL C 128 D. 220-240V~ 50Hz 60W serial number DA 4 42866. Made in W. Germany.'

Commodore 128DCR

In late 1986 Commodore released the Commodore 128DCR (C128DCR) in Europe and North America, a cost reduced version (hence 'CR') which uses a metal case. has no handle. no internal fan, and some alterations to other internal components to reduce costs. An improvement over the C128D is that the C128DCR has a 8568 VDC (video chip) with 64KB RAM, a more advance graphics setup than the 8563 in the C128/C128D that unfortunately not much software made use of. In addition, the C128DCR internal ROMs are an updated version of those found in the C128/C128D, fixing a number of bugs.

For photos of a C128DCR please see:

http://www.softwolves.pp.se/cbm/minaburkar/c128dcr

Technical

C128 article by the designer of the C128, Bil Herd:

https://hackaday.com/2013/12/09/guest-post-the-real-story-of-hacking-together-the-commodore-c128/

For a clean one page schematic of the C128 please see this site:

https://sites.google.com/site/h2obsession/CBM/C128

For C128 manuals please see:

http://www.zimmers.net/anonftp/pub/cbm/manuals/c128/index.html

Online system manual:

https://www.commodore.ca/manuals/128_system_guide/toc.htm

The C128 and C128D motherboards are the same as can be seen on the following site:

http://blog.worldofjani.com/?p=1082

If you feel brave enough to upgrade the C128's video RAM from 16KB to 64KB or just curious what's involved, here is a description of the procedure:

http://personalpages.tds.net/~rcarlsen/cbm/c128/RGB%20V-RAM/64kvram.txt

YouTube channel covering programming the C128:

https://www.youtube.com/c/NybblesandBytes/videos

Troubleshooting

Powering the C128

You may buy a C128 second hand without a power supply and it's unfortunate that Amiga power supply units CANNOT be used with the C128 considering the power connector is the same, but different pinout. Other than buying a suitable power supply for the C128 you can make you own power supply and repurpose an Amiga power cord from an Amiga power supply. The pinout of the C128 power supply connector can be found at:

https://allpinouts.org/pinouts/connectors/power_supply/commodore-c128-power-supply/

The power supply you will need must be able to deliver 2.5A at 5VDC and 1A at 9VAC (I measured that the C128 draws 1.8A from the 5V line as the 2.5A provides for powering devices attached to the computer, and 0.2A on the 9V line). Alternatively, you can wire up two individual power supply units that are suitably rated to power the C128. Note that internally the C128 has an unused internal power connector called 'CN12'.

Random characters on screen or out of memory error in 0

If you boot a C128 and there are a couple of random characters on the screen and/or when you enter C64 mode you get the error 'out of memory error in 0' then it's a good indication that one or more of the RAM chips are bad, which can happen due to old age, for example. The fix involves removing the faulty chip(s) and replacing with good one(s) but first you need to determine what RAM chips are bad (unless you just want to replace them all). Please see this site for further help:

http://blog.worldofjani.com/?p=158

RGBI connection issues

To take advantage of the C128's 80 column mode you need to connect a compatible display to the RGBI port but if you do not have a suitable monitor then one option is to convert the RGBI video to VGA, an example of such a circuit can be found at:

https://sites.google.com/site/h2obsession/CBM/C128/rgbi-to-vga

However, modern displays/adapters don't like the timing and voltage levels outputted by the RGBI port so an alternative is RGBI to SCART, which you can read about here:

https://sites.google.com/site/h2obsession/CBM/C128/rgbi-to-scart

If you do go with the RGBI to SCART option then make sure your TV/adapter supports RGB input over SCART. I did try the option linked above and as expected RGB looks much cleaner than composite. I used USB to provide the 5V for the 'fast switching' signal and if you do so yourself don't forget to connect the USB GND connection to the other GND connections of the circuit. Oddly, however, although the circuit worked with my TV, my Flylink RGB SCART to HDMI adapter showed the image without colour. I found that the fix was to replace the two 1K resistor voltage divider with a single variable resistor and adjusted it to a value that both my TV and adapter liked. I also used 2.2K variable resistors (what I happened to have) in place of the colour 1K resistors and the intensity 1.2K resistor so I could get the colours to match (or at least close) to what they are supposed to be.

The site also has a solution for converting dark yellow to brown as per the CGA standard:

https://sites.google.com/site/h2obsession/CBM/C128/rgbi-to-vga/ultimate

There's no reason why the circuit couldn't also be adapted to work with SCART.

All content of this and related pages is copyright (c) James S. 2016-2022