Back to index

Info for c128


====== Commodore 128 (1985), Commodore 128D, Commodore 128D-CR ======




===== Features =====

* CPU: 8502 1/2 MHz, 1.022 MHz (for C64 mode)+ Zilog Z80 ~2.5 MHz
* Co-Processor: SID (sound), VDC & VIC-II (video)
* RAM: 128 KB
* VRAM: 16 KB
* ROM: 48 KB
* Text Modes: 40 or 80 chars. x 25 lines
* Graphics Modes: several, most used : 160x200 / 320 x 200 / 640 x 200
* Colors: 16
* Sound: 3 voices / 6 octaves
* I/O Ports: RGB, Video Composite, Joystick (2), cartridge, Tape, User Port (RS232 compatible), TV, serial
* Keyboard: Complete full-stroke keyboard with separated numeric keypad
* Built In Media: 1571 disk-drive [C128D and C128D-CR only]
* OS: C128 mode, C64 mode or CP/M
* Built In Language: Basic
* hardware emulation mode for c64



===== Usage =====

== Video ==

If the game runs too fast with the NTSC version, try the PAL version! If flickering is present in one video version, try the other video version.

== Keys ==

Mind that some PC-Keyboards does not behave well when special two or more keys are pressed at the same time (with my keyboard printscreen clears the pressed pause key!)

Remember also the following functions:
* "shift-cbm" switches between upper-only and normal character set (when wrong characters on screen this can help)
* "run" (shift-stop) loads program from type and starts it
* "esc-x" switch between two videosystems

Additional keys (to C64) are not useable in C64mode

== Lightpen ==

It's emulated through Paddle 5 x-axis, Paddle 6 y-axis

== Cassettes ==

Cassette images can have the .wav or .prg extensions, and multiple .prg files can be contained within a .zip file. Zip files must be placed in the current directory, and the contained .prg files are played in sequential order.

The format for WAVs are:
8 bit (16 bit may work, but this hasn't been tested), mono, 12500 Hz minimum.

This has the same problems as an original Datasette tape drive: the tone head must be adjusted to get working (no load error...) wav-files. To adjust it, remember that tape volume is "DAC1 volume" within the MESS UI On Screen Display Options (accessed
with the tilde (~) key).

Once you're at the BASIC prompt you can load a tape typing:
LOAD
or
LOAD""
or
LOAD"",1
You can use
LOAD"",1,1
to load programs which requires a special address.

Warning: Currently tape support is broken in MESS.

== Floppy Disks ==

MESS currently emulates only loading from drive 8 and 9 in the C128 emulation. These drives correspond to the devices "floppydisk1" (flop1) and "floppydisk2" (flop2) emulated by MESS. To run a .d64 image you have to launch

mess.exe c128 -flop1 "C:\pathtogame\gamename.d64"

Once you're at the BASIC prompt you have various options:

* to list the content of the floppy

LOAD"$",8
LIST

* to load a BASIC program from the disk

LOAD"filename",8

* to load a machine language program at its address

LOAD"filename",8,1

* to load the first program from the disk (useful if you're not sure of which is the correct one to load)

LOAD"*",8

Once the program is loaded, a "READY" message will be prompted and you can run your program by simply typing

RUN

or the appropriate SYS call. If you launched the game on -flop2, you will need to use drive 9 in place of drive 8 in the commands above.

Note that several programs rely on more features not currently emulated (such as loading other file types, writing...) Some games also rely on starting programs in the floppy drive's processor (and therefore CPU level emulation of the 1541 is needed).

== Cartridges ==

Cartridges may have any of the following extensions: .crt, .80, .90, .a0, .b0, .e0, .f0. Files with boot-sign in it are recognized as ROMs. Some cartridges may require more than one image.

* .?0 files are loaded to the address specified in the extension.
* .crt ROMs are loaded to the addresses specified in crt file.

To use "cartridge1" (cart1) or "cartridge2" (cart2) slots in MESS, simply launch

mess.exe c128 -cart1 "C:\pathtogame\gamename.crt"

and the game will start. Currently, only few of the available types of .crt files are supported.
Note that .prg files are often cartridge images as well, but in MESS they are assigned to the quickloader (see below).

== Quickloader ==

A quickloader is available via command line or using the F8 key. It supports program image files with extensions .prg and .p00. The quickloader loads the program into memory and sets the program end pointer. It shall work with most programs. To use the "quickload" (quik) device in MESS: launch

mess.exe c128 -quik "C:\pathtogame\gamename.prg"

and simply type the command

RUN

to start the program.

== C64 Mode ==

To enter in C64 Mode, hold down commodore key while resetting or turning on. Then type

go64

at the C128 command mode

== CPM Mode ==

To run in CPM Mode, cpm disk must be inserted in device 8. Then turn on computer or type

boot

at the C128 command mode

If you run into difficulty, be sure to start the emulation with the -log switch, and look into the error.log file that is created in your MESS directory.

== ROM Dumping ==

* Dumping of the ROMs from the running machine: in the monitor program

s "drive:name",device,start,end
s "0:basic",8,f4000,fc000
s "0:editor",8,fc000,fd000
s "0:kernel",8,ee000,f0000
s "0:char128",8,ed000,ee000

* Z80 BIOS [missing, funet says there exists only 1 version!?]: I don't know, maybe there is a cpm utility allowing saving the memory area 0-0xfff of bank 0. (I don't want to develop (and can't test) this short complicated program)

* BASIC [only 1 version!?]: In C64 Mode, enter

poke43,0:poke44,160:poke45,0:poke46,192:save"0:basic64",8

* Kernel [only 1 version!?]: In C64 Mode, enter

for i=0 to 8191:poke 32*256+i, peek(224*256+i): next
poke43,0:poke44,32:poke45,0:poke46,64:save"0:kernel64",8

* C64 Charset [Swedish version or original C64 version]: in C128 Mode, enter

monitor
a 2000 sei
lda #33
sta 1
ldy #0
sty fa
sty fc
lda #c0
sta fd
lda #d0
sta fb
ldx #10
lda (fa),y
sta (fc),y
iny
bne 2015
inc fb
inc fd
dex
bne 2015
lda #37
sta 1
cli
rts
(additional enter to end assembler input)
x (to leave monitor)
go64 (answer with y)
sys 32*256
poke 43,0:poke44,192:poke45,0:poke46,208:save"0:char64",8

* C64 Charset [Swedish version or original C64 version]: in C64 Mode, load the program in the attachment and type

load"savechar64",8,1
sys 32*256
poke 43,0:poke44,192:poke45,0:poke46,208:save"0:char64",8

* C128D floppy disk bios: I think you have to download a program copying the bios to buffers. Then you could read this buffer into the computer, or write these buffers to disk. Transportation to your pc: 1571 writes to mfm encoded diskettes (in cpm mode only, or use
program). Maybe the IBM CPM-86 formats are like the standard DOS formats, but using dd may create images known by some other emulators. 1581 writes mfm encoded: can one of these drives to a format know by linux? Some years ago I build a simple adapter pc/parport to vc1541 floppy disk drive.

== ROM Dumping with EEPROMer ==

* C128:

| U18 | | (read compatible 2764?) | 8kB C64 character ROM, C128 character ROM |
| U32 | 23128 | (read compatible 27128?) | 16kB C64 Basic, C64 Kernel |
| U33 | 23128 | (read compatible 27128?) | 16kB C128 Basic at 0x4000 |
| U34 | 23128 | (read compatible 27128?) | 16kB C128 Basic at 0x8000 |
| U35 | 23128 | (read compatible 27128?) | 16kB C128 Editor, Z80Bios, C128 Kernel |

* C128 CR (cost reduced):

| U18 | | (read compatible 2764?) | 8kB C64 character ROM, C128 character ROM |
| U32 | 23256 | (read compatible 27256?) | 32kB C64 Basic, C64 Kernel, C128 Editor, Z80Bios, C128 Kernel |
| U34 | 23256 | (read compatible 27256?) | 32kB C128 Basic |

* C128 DCR: As C128 CR plus

| U102| 23256 | (read compatible 27256?) | 32kB 1571 system ROM |





===== Known Issues =====

Notice that Commedore 128D is a TESTDRIVER, i.e. it's not included in the pre-compiled MESS you find at mess.org -- http://www.mess.org.

C128 issues:

* uses c64 emulation for c64 mode, so only notes for the additional subsystems here
* rasterline based video system: no CPU holding, imperfect scrolling support (when 40 columns or 25 lines), lightpen support not finished, rasterline not finished
* vdc emulation: dirtybuffered video system, text mode (only standard 8x8 characters supported), graphic mode not tested, lightpen not supported, scrolling not supported
* z80 emulation: floppy simulation not enough for booting CPM, so simplified z80 memory management not tested
* no CPU clock doubling
* no internal function ROM
* c64 mode: differences to real c64???
* no sound
* cia6526's look in machine/cia6526.c
* keyboard
* gameport a: paddles 1,2; joystick 1; 2 button joystick/mouse joystick emulation; no mouse; lightpen (not finished)
* gameport b: paddles 3,4; joystick 2; 2 button joystick/mouse joystick emulation; no mouse
* simple tape support (not working, cia timing, CPU timing?)
* serial bus: simple disk drives, no printer or other devices
* expansion modules: no c128 modules
* expansion modules c64: ROM cartridges (exrom), ultimax ROM cartridges (game), c64 cartridges (only standard ROM cartridges), no other ROM cartridges (bankswitching logic in it, switching exrom, game), no ieee488 support, no cpm cartridge, no speech cartridge (no circuit diagram found), no fm sound cartridge, no other expansion modules
* no userport: no rs232/v.24 interface



===== History and Trivia =====

The Commodore 128 was launched at the Las-Vegas Consumer Electronic Show 1985. It was presented then as a competitor for the Apple Macintosh and IBM PC (The famous advertisement said "Bad news for Apple and IBM"). In fact, the only star of this show was the Atari 130 ST!

It was the successor of the Commodore 64 and could use all the software and a lot of the hardware of the C64 (the 8502 could be slowed down 1 MHz for compatibility).

One of the main specialties of this machine was the additional Z80 CPU and Video chip, which means that you could attach two monitors. Thanks to the Z80, the Commodore 128 could run under CP/M + : lots of software were adapted for this computer and Osborne or Kaypro programs could run directly.

The 128D model: The 128D was the direct successor of the Commodore 128. It had exactly the same characteristics as the 128 except its external case which contained the Commodore 1571 floppy disk unit.

Actually there were two distinct Commodore 128Ds : The 128D and the 128D-CR (for Cost Reduced).

== 128D vs. 128DCR ==

Differences between the 128D and the 128DCR were:

* The 128D was never sold in the U.S. because of all the radio frequency interference it gave off.
* The 128D-CR had a metal case rather than plastic for solving radio frequency problems. This version was sold in the U.S.
* The 128D-CR did not have a cooling fan, although there was a place to mount one.
* The 128D-CR case did not have storage clips for the keyboard.
* The 128D-CR came with 64k of video RAM (for the RGB video chip) rather than 16k for the C128.
* The 128D-CR's printed circuit board was different, and included the drive electronics. So there were 3 CPUs on the board.
* The 128D-CR came with bugfixed (1986) ROMs in two 32k x 8 chips instead of four 16k x 8 ones.
* The internal drive's ROM was different from the original 1571 ROM in two ways: it was bugfixed, and had changes for the new support chips. The bugfixes were bigger than the changes for the new hardware.
* 128D-CR CPU RAM was in four 64k x 4 chips rather than sixteen 64k x 1 ones.
* The 128D-CR did not have a carrying handle.

//(info from old-computers.com)//

== Easter egg ==

Entering the command

SYS 32800,123,45,6

in native mode would reveal a 40-column screen with a listing of the machine's main developers (and a message they left).



===== Links =====

* Commodore 128 Alive! -- http://www.commodore128.org/
* The Commodore 128 Page -- http://members.tripod.com/~rvbelzen/
* Commodore Computers -- http://www.commodore.ca/
* Commodore 128 at old-computers.com -- http://old-computers.com/museum/computer.asp?c=96



===== Other Emulators =====

* PC128 (DOS) - no more developed after v3.1 - no webpage
* VICE -- http://www.viceteam.org/




Generated on Sun Jul 19 10:17:28 2009