Introduction:
CP/M was an operating system which was a precursor to MS-DOS and uses quite a few of the same commands. It loads starting from 0000H so TRS-80 Model I’s and III’s cannot run CP/M without modification. A Model 4 can run CP/M without modification. While I make no representations that it works, and take no responsibility for those who try, a possible modification to a Model I to allow it to run CP/M can be found here.
A detailed discussion of CP/M, its origins and operation, are well beyond the scope of this site. For those interested, there is a Wikipedia page on the topic and www.cpm.z80.de is hosting a CP/M Plus Manual.
There were a number of CP/M Operating Systems available for the TRS-80, including:
Model I
by Lifeboat Associates/Small System Software (1979)
Model I
by Omikron / Digital Research (1979)
Model 4
Radio Shack / Digital Research (1983)
Model 4
Montezuma Micro/JBO (1984)
Model I
Importing/Exporting to CP/M Disk Images
TRSTOOLS / TRSREAD
Click to Enlarge
Matthew Reed’s TRSTools (and TRSREAD) utility can be used to import and export CP/M files to and from a PC. It supports the following CP/M versions:
- Montezuma Micro CP/M (Model 4)
- Radio Shack CP/M Plus (Model 4)
- Omikron Mapper CP/M (Model I and III)
- Holmes Engineering CP/M (Model I and III)
- Lifeboat CP/M (Model I)
- Lobo CP/M (MAX80)
- LNW Research CP/M (LNW80)
The current version of TRSTools, and more information, can be found on Matthew’s TRSTools Page.
CPMToolsGUI
CPMTOOLS can create a new disk image, move files in and out, and delete them. It originated from a tool on LINUX but is difficult to use for Windows users because of its command line operation. This is a GUI version of that.
It looks pretty complicated to me, requiring hex editing and specifically selecting registered format files … but it exists, so it’s here.
The current version and more information can be found, in Japanese, here.
NWD80CPM
Click to Enlarge
A program called NWD80CPM, written by Blandford Computers for CP/M on the Genie III, is a CP/M program which will allow you to copy a file from a designated NEWDOS/80 Source Disk to a designated CP/M Destination Disk. This program, however, is of extremely limited use for large scale conversations as:
- It does not permit wildcards. Each filename must be entered, one at a time, each followed by two confirmations.
- It does not import, into CP/M, filenames which are not valid under NEWDOS/80, even if they are valid under CP/M.
- If not exited gracefully, the CP/M disk is rendered unreadble and you must start again, filename by filename.
- It will crash for a number of reasons, including running out space on the CP/M disk. It will not say what caused the crash, only that it crashed.
- It seems to have a maximum file size (I could not transfer a 131KB LBR file onto a CP/M disk which had far more free space than that).
- It cannot copy 0 length files.
DSKDIR
Click to Enlarge
Jeff Post’s DSKDIR utility can be used to allow the user to extract files from a .dsk image file and write them to the host filesystem. The program is a work in progress, but this subset is being released so that users can determine what files are in a .dsk image file.
The current version of DSKDIR can be found Here.
22DISK
Click to Enlarge
One method of extracting files from CP/M disks to a PC is to use 22DISK, once made by Sydex, which is a set of programs for DOS to perform operations on CP/M formatted disks.
There appears to be some level of controversy over distributing 22DISK these days (a good write up is here), but I suspect it has to do with Sydex putting up a web page offering to read old disks for people (something I do on this site at no charge). That said, a simple google search will produce many sites hosting this file. The most recent copy is v1.44 from October, 1996.
However, 22DISK requires “disk definitions” to read each disk. Larry Kraemer has prepared a set of “disk definitions” to enable 22DISK to read Model 4 Montezuma Micro CP/M to DOS, as follows:
Model 4,4P Montezuma System 170K – SSDD 48 tpi 5.25″
BEGIN TRSG TRS-80 Model 4,4P Montezuma System 170K - SSDD 48 tpi 5.25" DENSITY MFM, LOW CYLINDERS 40 SIDES 1 SECTORS 18,256 SIDE1 0 1,3,5,7,9,11,13,15,17,2,4,6,8,10,12,14,16,18 BSH 4 BLM 15 EXM 1 DSM 84 DRM 127 AL0 0C0H AL1 0 OFS 2 END
Model 4,4P Montezuma Data 200K – SSDD 48 tpi 5.25″
BEGIN TRSH TRS-80 Model 4,4P Montezuma Data 200K - SSDD 48 tpi 5.25" DENSITY MFM, LOW CYLINDERS 40 SIDES 1 SECTORS 10,512 SIDE1 0 1,3,5,7,9,2,4,6,8,10 BSH 4 BLM 15 EXM 1 DSM 99 DRM 127 AL0 0C0H AL1 0 OFS 0 END
Model 4,4P Montezuma System 350K – DSDD 48 tpi 5.25″
BEGIN TRSI TRS-80 Model 4,4P Montezuma System 350K - DSDD 48 tpi 5.25" DENSITY MFM, LOW CYLINDERS 40 SIDES 2 SECTORS 18,256 SIDE1 0 1,3,5,7,9,11,13,15,17,2,4,6,8,10,12,14,16,18 SIDE2 1 1,3,5,7,9,11,13,15,17,2,4,6,8,10,12,14,16,18 ORDER EAGLE BSH 4 BLM 15 EXM 1 DSM 174 DRM 127 AL0 0C0H AL1 0 OFS 2 END
Model 4,4P Montezuma Data 400K – DSDD 48 tpi 5.25″
BEGIN TRSJ TRS-80 Model 4,4P Montezuma Data 400K - DSDD 48 tpi 5.25" DENSITY MFM, LOW CYLINDERS 40 SIDES 2 SECTORS 10,512 SIDE1 0 1,3,5,7,9,2,4,6,8,10 SIDE2 1 1,3,5,7,9,2,4,6,8,10 ORDER EAGLE BSH 4 BLM 15 EXM 1 DSM 199 DRM 127 AL0 0C0H AL1 0 OFS 0 END
Model 4,4P Montezuma System 350K – SSDD 96 tpi 5.25″
BEGIN TRSK TRS-80 Model 4,4P Montezuma System 350K - SSDD 96 tpi 5.25" DENSITY MFM, LOW CYLINDERS 80 SIDES 1 SECTORS 18,256 SIDE1 0 1,3,5,7,9,11,13,15,17,2,4,6,8,10,12,14,16,18 BSH 4 BLM 15 EXM 1 DSM 174 DRM 127 AL0 0C0H AL1 0 OFS 2 END
Model 4,4P Montezuma Data 400K – SSDD 96 tpi 5.25″
BEGIN TRSL TRS-80 Model 4,4P Montezuma Data 400K - SSDD 96 tpi 5.25" DENSITY MFM, LOW CYLINDERS 80 SIDES 1 SECTORS 10,512 SIDE1 0 1,3,5,7,9,2,4,6,8,10 BSH 4 BLM 15 EXM 1 DSM 199 DRM 127 AL0 0C0H AL1 0 OFS 0
Model 4,4P Montezuma System 710K – DSDD 96 tpi 5.25″
BEGIN TRSM TRS-80 Model 4,4P Montezuma System 710K - DSDD 96 tpi 5.25" DENSITY MFM, LOW CYLINDERS 80 SIDES 2 SECTORS 18,256 SIDE1 0 1,3,5,7,9,11,13,15,17,2,4,6,8,10,12,14,16,18 SIDE2 1 1,3,5,7,9,11,13,15,17,2,4,6,8,10,12,14,16,18 ORDER SIDES BSH 4 BLM 15 EXM 0 DSM 354 DRM 127 AL0 0C0H AL1 0 OFS 2
Model 4,4P Montezuma Data 800K – DSDD 96 tpi 5.25″
BEGIN TRSN TRS-80 Model 4,4P Montezuma Data 800K - DSDD 96 tpi 5.25" DENSITY MFM, LOW CYLINDERS 80 SIDES 2 SECTORS 10,512 SIDE1 0 1,3,5,7,9,2,4,6,8,10 SIDE2 1 1,3,5,7,9,2,4,6,8,10 ORDER SIDES BSH 4 BLM 15 EXM 0 DSM 399 DRM 127 AL0 0C0H AL1 0 OFS 0
Model 4,4P Montezuma Extend System 190K – SSDD 48 tpi 5.25″
BEGIN TRSO TRS-80 Model 4,4P Montezuma Extend System 190K - SSDD 48 tpi 5.25" DENSITY MFM, LOW CYLINDERS 40 SIDES 1 SECTORS 10,512 SIDE1 0 1,3,5,7,9,2,4,6,8,10 BSH 4 BLM 15 EXM 1 DSM 94 DRM 127 AL0 0C0H AL1 0 OFS 2
Model 4,4P Montezuma Extend System 390K – SSDD 48 tpi 5.25″
BEGIN TRSP TRS-80 Model 4,4P Montezuma Extend System 390K - SSDD 48 tpi 5.25" DENSITY MFM, LOW CYLINDERS 40 SIDES 2 SECTORS 10,512 SIDE1 0 1,3,5,7,9,2,4,6,8,10 SIDE2 1 1,3,5,7,9,2,4,6,8,10 ORDER SIDES BSH 4 BLM 15 EXM 1 DSM 194 DRM 127 AL0 0C0H AL1 0 OFS 2
Model 4,4P Montezuma Extend System 390K – SSDD 96 tpi 5.25″
BEGIN TRSQ TRS-80 Model 4,4P Montezuma Extend System 390K - SSDD 96 tpi 5.25" DENSITY MFM, LOW CYLINDERS 80 SIDES 1 SECTORS 10,512 SIDE1 0 1,3,5,7,9,2,4,6,8,10 BSH 4 BLM 15 EXM 0 DSM 194 DRM 127 AL0 0C0H AL1 0 OFS 2
Model 4,4P Montezuma Extend System 790K – DSDD 96 tpi 5.25″
BEGIN TRSR TRS-80 Model 4,4P Montezuma Extend System 790K - DSDD 96 tpi 5.25" DENSITY MFM, LOW CYLINDERS 80 SIDES 2 SECTORS 10,512 SIDE1 0 1,3,5,7,9,2,4,6,8,10 SIDE2 1 1,3,5,7,9,2,4,6,8,10 ORDER SIDES BSH 4 BLM 15 EXM 0 DSM 394 DRM 127 AL0 0C0H AL1 0 OFS 2
Model 4,4P Montezuma Super Data 220K – SSDD 48 tpi 5.25″
BEGIN TRSS TRS-80 Model 4,4P Montezuma Super Data 220K - SSDD 48 tpi 5.25" DENSITY MFM, LOW CYLINDERS 40 SIDES 1 SECTORS 6,1024 SIDE1 0 1,3,5,2,4,6 BSH 4 BLM 15 EXM 1 DSM 109 DRM 127 AL0 0C0H AL1 0 OFS 0
Model 4,4P Montezuma Super Data 440K – DSDD 48 tpi 5.25″
BEGIN TRST TRS-80 Model 4,4P Montezuma Super Data 440K - DSDD 48 tpi 5.25" DENSITY MFM, LOW CYLINDERS 40 SIDES 2 SECTORS 6,1024 SIDE1 0 1,3,5,2,4,6 SIDE2 1 1,3,5,2,4,6 ORDER EAGLE BSH 4 BLM 15 EXM 1 DSM 219 DRM 127 AL0 0C0H AL1 0 OFS 0
Model 4,4P Montezuma Super Data 440K – SSDD 96 tpi 5.25″
BEGIN TRSU TRS-80 Model 4,4P Montezuma Super Data 440K - SSDD 96 tpi 5.25" DENSITY MFM, LOW CYLINDERS 80 SIDES 1 SECTORS 6,1024 SIDE1 0 1,3,5,2,4,6 BSH 4 BLM 15 EXM 1 DSM 219 DRM 127 AL0 0C0H AL1 0 OFS 0
Model 4,4P Montezuma Super Data 880K – DSDD 96 tpi 5.25″
BEGIN TRSV TRS-80 Model 4,4P Montezuma Super Data 880K - DSDD 96 tpi 5.25" DENSITY MFM, LOW CYLINDERS 80 SIDES 2 SECTORS 6,1024 SIDE1 0 1,3,5,2,4,6 SIDE2 1 1,3,5,2,4,6 ORDER SIDES BSH 4 BLM 15 EXM 0 DSM 439 DRM 127 AL0 0C0H AL1 0 OFS 0
Model 4,4P Montezuma System 400K – SSDD 96 tpi 3.5″
BEGIN TRSW TRS-80 Model 4,4P Montezuma System 400K - SSDD 96 tpi 3.5" DENSITY MFM, LOW CYLINDERS 80 SIDES 1 SECTORS 10,512 SIDE1 0 1,3,5,7,9,2,4,6,8,10 BSH 4 BLM 15 EXM 1 DSM 199 DRM 127 AL0 0C0H AL1 0 OFS 0 END
Useful PC-Based CP/M Utilties
CFX
Click to Enlarge
If there is a CP/M disk with squeezed files, it is probably a lot easier to extract them outside of the emulator environment, not only for speed, but for disk capacity. Carson Wilson wrote CFX (CP/M File eXpress) for this purpose.
CFX is a universal utility written in the C programming language, whose main purpose in life is to make access to files stored under the CP/M operating system accessible to users of other operating systems.
CFX will extract to screen or disk normal, squeezed (typical CP/M filename extension, .?Q?), crunched (.?Z?), CrLZH (.?Y?), and library (.LBR) files. It will also display library file directory information and embedded compressed file datestamps and comments. CFX is an interactive, integrated utility, and as such can prompt the user before displaying files, page the screen, etc.
The most recent version of CFX (July, 2006) can be found can be found Here.
CP/M Built-In Command Reference
DIR [d:][filespec]
Display a list of files in the specified, or current drive.
ERA [d:]<filespec>
Erase specified files. filematch *.* can be used to match all files in the current drive.
REN [d:]newname.ext = oldname.ext
Change the name of a disk file from oldname.ext to newname.ext
SAVE n [d:]filename.ext
Save the specified n number of pages of the transient program area to disk under the specified file name.
TYPE [d:]filename.ext
Display the contents of the specified file on the display screen.
USER n
Switches to one of 16 specified user area in a disk drive.
A user area is a physical area on a disk which has its own directory and which is managed seperately from the rest of the disk. Data cannot be read from or written to any user area other than that in which CP/M is currently operating.
Upon cold boot, the user is automatically logged in to User Area 0, which is compatable with CP/M 1.4 directories. The USER command allows the user to move to another logical area within the same directory; areas are numbered 0-15. The ERA, DIR, REN, SAVE, and TYPE commands apply to the current User Area.
CP/M Commands
The following are the control characters recognized by ED:
The following are the commands recognized by ED
CP/M File Extensions
Disk Parameter Header (DPH)
The address of the DPH is obtained by calling the SELDSK entry of the BIOS, which returns its address in the HL register pair.
Disk Parameter Block (DPB) Map
The address of the DPB is obtained with BDOS service request 31, Get Disk Parameters. The table is located in the BIOS.