C128

 

HomeProjects & InfosCommodore16Bit ComputerCP/M ComputerCP/M Software
C64 
C128 
D64 format 
Graphics with CP/M 
Equipment 
Cartridges 

 

Commodore 128 - multi talent but too late

Still almost fully compatible with the C64

The Commodore 128 exists as a game console (separated floppy drive) and as an all-in-one machine named Commodore 128D, both have a Z80 (and for C64 compatibility  also a 8502 cpu, which is a modified 6510 cpu) and were capable to run CP/M Plus 3.0 ... and it was the most selled CP/M computer ever.

If you like to start with CP/M 3.0 (Plus), it's very easy. Download the system disk image file and transfer it to a real drive (for example with StarCommander). You can find them on zimmers.net here.

Or just use an emulator like WinVICE and try it in a few steps. Use this C128 CP/M boot for Dummies guide (PDF)

...very good - the source code of the operating system with the BIOS is available !

The "making of" CP/M 3.0 (Plus) for a Commodore C128


The following procedure is necessary to build your own CPM+.SYS file for the Commodore 128:

rmac cxkrnl $$pz-s
rmac cxio $$pz-s
rmac cxintr $$pz-s
rmac cxramdsk $$pz-s
rmac cxkey $$pz-s
rmac cxem $$pz-s
rmac cxvt $$pz-s
rmac cx80 $$pz-s
rmac cxprinte $$pz-s
rmac cxdisk $$pz-s
rmac cxext $$pz-s
rmac cxscb $$pz-s
mac cxkycode $$pz-s
mac fast8502 $$pz-s
link bnkbios3[b]=cxkrnl,cxio,cxintr,cxkey,cxem,cxvt,cx80,cxprinte,cxdisk,cxramdsk,cxext,cxscb
gencpm auto
addbios fast8502

This content could be also found in the CZ.SUB file below.

Screenshot from the "Linker" in action:

Screenshot from the "Addbios" command:

...and a screenshot of all files after a successful run (on a 1750 REU):


The best idea today is to use a CP/M emulator like MYZ80 or the very good VICE emulator, which is also able to emulate the Z80 part of a C128 since Version 1.06 !

Using a real C128 takes over half an hour even on a 1581 drive, using the 1750 REU will take similar time because there are many processing times (MAC+RMAC) and less read/write times.
Using VICE 1.14 on an AMD XP 2600 takes about 5 minutes with about 1000% emulator speed (Warp Mode called).
But using MYZ80 on my AMD machine takes only about 5 seconds for all, and MYZ80 runs also with Windows XP flawless.
So you have to use two emulators, one to compile it and one to test it...


If you are ready to do this (on an emulator), you still need the files.

There are three ways to get the files:

Using the 1581 disk image from funet.fi - download here

Using two 1571 disk images to get the stuff, download here and here (Remember: These are .D71 images, not .D64 !).
But you can't make the binary with these because you do not have enough free space with that disk images !

Single files here (already ready to save it on your harddisk without conversion/transfer):
CX80.ASM
CXDISK.ASM
CXEM.ASM
CXEXT.ASM
CXINTR.ASM
CXIO.ASM
CXKEY.ASM
CXKRNL.ASM
CXKYCODE.ASM
CXPRINTE.ASM
CXRAMDSK.ASM
CXROM02.ASM
CXROM1.ASM
CXROM80.ASM
CXROMINT.ASM
CXROMK.ASM
CXSCB.ASM
CXVT.ASM
FAST8502.ASM
BDOS3.SPR
BNKBDOS3.SPR
BNKBIOS3.SPR
RESBDOS3.SPR
CXEQU.LIB
CPM3.LIB
MODEBAUD.LIB
X6502.LIB
Z80.LIB
CZ.SUB
MAKESYS.DOC
MAKEROM.DOC
GENCPM.COM
GENCPM.DAT
ADDBIOS.ASM
CALLVERS.ASM
ECHOVERS.ASM
DUMP.ASM
FORMAT.ASM
RANDOM.ASM

Note: The files for generating the ROM are named similar to CXROM*.ASM, but are not necessary to generate the CPM+.SYS file. All files were copied from the 1581 disk image just with PIP ( e.g. PIP M:=A:*.*[G1] to copy it from the USER area 1 to M: )


To start the generation, type in "SUBMIT CZ" or more simple, just "CZ.SUB" (SUBMIT should be loaded automatically).
Of course you should have all needed utilities online, too. That means with CP/M 3 as the bootstrap system, use the SETDEF command to "point" to your second drive (similar to the PATH command in MS-DOS).
On that second drive MAC, RMAC, LINK, GENCPM and the compiled ADDBIOS command should be present.

What's about generating the CCP (commandline processor) ?

You need the CCP3.ASM source file, LOADER3.ASM, CCPDATE.ASM (referred as DATE.ASM originally) and MAKEDATE.LIB.

To automate the procedure, the following text (from dotted line to dotted line) should be saved as MAKECCP.SUB:
- - - - - - - - - - - - - - -
RMAC LOADER3
LINK LOADER3[OP]
MAC CCP3
MAC CCPDATE
GET FILE SIDCMDS.TXT [SYSTEM]
- - - - - - - - - - - - - - -
You need a second text file named SIDCMDS.TXT, save the following to a file also:
- - - - - - - - - - - - - - -
SID LOADER3.PRL
M200,500,100
D380,400
F400,1000,0
ECCP3.HEX
ECCPDATE.HEX
WCCP.COM,100,D80
G0
- - - - - - - - - - - - - - -
SIDCMDS.TXT will be used with the GET-command of CP/M 3 as redirected input for the console.

I will publish some modifications in the future also here....


Using the RAM Expansion Unit (REU) with CP/M 3.0

These are the drive characteristics of a 512 KB REU (508 KB available, Model Commodore REU 1750):

As you can see, the fixed drive letter is "M:", but you can easily change this by changing the source above :-)

I have a REU 1764 with original only 256 KB RAM, but the expansion of that REU to a REU 1750 with 512 KB RAM is very simple, just solder 8 DIL sockets in their empty places and insert DRAM 41256-15 (150 ns or faster, doesn't matter), and cut the proper "wire" here:



There is also a resistor "R4", 390 Ohm, which is not used in the REU 1764, but in the REU 1750. Sometimes a C128 has problems with an upgraded REU, if this resistor is missing (for me it was working without the resistor, but...). See also this link for more information.

The full view of both PCB sides of the REU:

Front

Back

Partial opened (still shielded)

Closed REU (for normal usage)

 

HomeProjects & InfosCommodore16Bit ComputerCP/M ComputerCP/M Software

Copyright (c) 2005-2014 Peter Dassow. All rights reserved.

peter.dassow@NOSPAM.z80.eu (remove NOSPAM. for a proper mail address)