[ Overview | Download | Troubleshooting | Copyright | Manual ]

Overview

CPvM
Running multiple instances of CPvM in the SymbOS multitasking environment


CPvM
Rogue: Exploring the Dungeons of Doom - dungeon crawling game


CPvM
Showing the CP/M-style directory listing of a FAT device with the integrated CCP


CPvM
Running 'WordStar', the father of all word processors, on SymbOS in a CPvM virtual machine


    Run classic CP/M-80 software on SymbOS, including Microsoft BASIC, Turbo Pascal, WordStar, dBASE and numerous other apps and utilities. CP\/M by prevtenet is kind of a virtual machine, running another operating system inside the SymbOS multitasking environment. In fact it is a compatibility layer which provides a complete CP/M 2.2 environment. As it is running on SymbOS you can have multiple virtual CP/M machines at the same time on your 1980ies Z80 home computer. Probably the majority of CP/M 2.2 applications can be used natively.

You could now run a whole 1980s corporation on SymbOS!

While there are still a few improvements planned (mainly one that will improve scroll speed in Turbo Pascal and other apps), this version is considered stable enough for general use and testing. Try it out, and report to Prevtenet if you want something to work but it doesn't.

Please refer to the included manual (in SymbOS Help format, or see below) for important usage information and troubleshooting tips. If something doesn't work as expected, it's very likely the manual explains how to fix it.


Technical Details

Not all CP/M software is supported, but a lot is. Applications for generic CP/M 2.2 on the 8080 or Z80 processors (i.e., CP/M-80) generally work best, while applications designed for other variants of CP/M or that expect low-level or platform-specific features (like special terminal features or block-level disk access) may not work at all.

Because CP/M applications are not relocatable, CPvM runs each CP/M session in its own 64K statically-addressed memory bank. This allow multiple CP/M sessions to run simultaneously in the multitasking environment, but requires each CP/M program to reserve memory for SymShell, CPvM, and a full 64K bank of its own. Therefore, CPvM will not run on a 128K system without expanded memory.

Unlike many CP/M emulators, the CPvM BDOS redirects file access requests to the SymbOS filesystem rather that emulating the CP/M filesystem directly. This allows CP/M applications to access files on FAT and AMSDOS-format disks as if they were on CP/M disks.

CP/M 2.2 does not have a concept of directories, only disks (indicated by the letters A to P). To accommodate this, CPvM maps physical paths on the SymbOS filesystem to logical disk drives visible to the CP/M application. This handles the typical case of allowing CP/M applications to see files in their own directory while also accessing physical disks on demand.

Terminal Features

As usual for SymShell, terminal input/output will run much faster when SymShell is in fullscreen mode than when it is in windowed mode. Many fullscreen CP/M apps also expect the terminal to have the dimensions 80x24 characters (a bit larger than the default); this can be set from the SymShell menu bar.

CP/M 2.2 had no standardized features for advanced display management (like cursor placement); this was left to the terminal. Because so many different terminal types were available on the market, many major software packages could be configured for use with multiple different types of terminals. CPvM emulates the DEC VT-52 and ADM-3A terminals most completely, but also supports the most common Soroc IQ-120 and VT-100/ANSI control codes. For configurable applications, you may need to try a few different terminal types to see which one works best for a given application. (Soroc IQ-120 is often a good fallback because of its simplicity.)

Special keys were also not standardized across terminals, so most CP/M software uses Ctrl+Key combinations instead of special keys. (Check each program's documentation for details.) For convenience, CPvM maps the arrow keys and delete/backspace onto the default WordStar keyboard shortcuts, the closest thing to a universal standard (see manual).


    CPvM
Editing, assembling, linking and executing a "Hello World" Z80 program completely on a SymbOS machine


CPvM
Turbo Pascal can now be used on any SymbOS system thanks to CPvM



Downloads


Best settings

Here are some best settings for classic CP/M programs:

Perfect Writer: Use Soroc IQ-120 setting with 80x24 terminal.
Turbo Pascal: Use Soroc 120/Apple CP/M setting with 80x24 terminal.
VEDIT: Use DEC VT-52 setting with 80x24 terminal.
Vezza: Use "RunCPM Adm3a" version (vezza-A8.com) with 80x24 terminal.
WordStar: Use Soroc IQ-120/140 setting with 80x24 terminal.



Troubleshooting

Text output is slow or too small to read Try running SymShell in fullscreen mode (Alt+Enter).
A program crashes or does not run: Not all CP/M software is compatible with CPvM.

1) Verify that the program is designed for CP/M-80 2.2 (not CP/M Plus, CP/M 3, CP/M-86, or another version of CP/M).

2) Verify that the program does not expect system-specific features or hardware (like modems), or direct block-level disk access.

3) Try the program in a BDOS-level emulator like MockbaTheBorg's RunCPM (i.e., one that uses the native filesystem rather than running off of CP/M-formatted disk images). Programs that run correctly in this type of emulation are more likely to work in CPvM.
Screen output is garbled, with extra characters and text in the wrong places The program is most likely outputting terminal codes CPvM does not understand (see Terminal Features). If the program provides an option to configure the terminal, try a different setting (e.g., ADM-3A).
Screen output is misaligned, miswrapped, or is not scrolling correctly The SymShell window is most likely set to a different size than the program expects. Most CP/M programs expect a terminal size of 80x24 (or sometimes 80x25); change the SymShell window size to match (using the menu bar) and try again.

NOTE: SymShell may not allow you to change the terminal size while CPvM is running. In this case, open a new SymShell window, change the size, and exit to save the setting as the new default. Subsequent SymShell windows will now start with the requested size.
Special keys (arrows, backspace, etc.) aren't doing what I expect Most CP/M software uses Ctrl+Key combinations rather than special keys. See Terminal Features for a listing of the default keybindings in CPvM.
Running out of memory after running several apps in a row

(or: CPvM is closed, but it still appears in the task manager):
Be sure to close CPvM correctly (by typing EXIT on the command-line, NOT by using the 'X' button!)

Bug reports

If you find a program that (1) should work according to all of the above, (2) does not work, and (3) you actually care about getting it to work, bug reports may be emailed to prevtenet@gmail.com. Please include a copy of the non-working program (or instructions on how to obtain it) and step-by-step instructions for reproducing the problem.




Credits and Copyright

CPvM has been developed by Prevtenet in 2024 with some additional contributions by Prodatron.

CPvM is (C) Copyright 2024, Prevtenet and Prodatron. It is freeware. Source code is licensed under the MIT License and may be found at https://github.com/danielgaskell/CPvM.

CP/M 2.2 is (C) Copyright 1979, Digital Research. CP/M is a trademark of DRDOS, Inc., which now owns the Digital Research copyrights. The original Digital Research code and binaries for CP/M 2.2 have been made open-source and are available from http://www.cpm.z80.de/.

CPVM.COM itself does not contain any original Digital Research code.



Manual

This is a complete copy of the included manual (in SymbOS Help format) [2024/04/17]


CPvM is a compatibility layer that allows running many CP/M 2.2 applications natively on SymbOS.

Not all CP/M software is supported, but a lot is. Applications for generic CP/M 2.2 on the 8080 or Z80 processors (i.e., CP/M-80) generally work best, while applications designed for other variants of CP/M or that expect low-level or platform-specific features (like special terminal features or block-level disk access) may not work at all.



BASIC USAGE

Running CPVM.COM directly will launch a live session of the CP/M command line (CCP) in SymShell. Applications can then be launched from this session as usual in CP/M.

To run a single CP/M application directly, the application can be passed to CPvM as a command-line option. This is useful for creating desktop or start-menu links to CP/M applications, e.g.:

C:\CPM\CPVM.COM C:\CPMAPPS\MBASIC.COM

In this "direct" mode, any subsequent parameters after the application name will be passed directly to the application as if entered from the CCP command-line.

NOTE: Do NOT close a CPvM session by clicking the "X" button on the SymShell window! This will leave the CP/M application running in he background without properly closing it. Instead, first close the CP/M application, then the live CCP session (if active), and finally SymShell itself.


FILES & DRIVES

Unlike many CP/M emulators, the CPvM BDOS redirects file access requests to the SymbOS filesystem rather that emulating the CP/M filesystem directly. This allows CP/M applications to access files on FAT and AMSDOS-format disks as if they were on CP/M disks.

CP/M 2.2 does not have a concept of directories, only disks (indicated by the letters A to P). To accommodate this, CPvM maps physical paths on the SymbOS filesystem to logical disk drives visible to the CP/M application. The default configuration is:

A: the path of the executed .COM file (in "direct" mode) or the current shell path (in "live CCP" mode)
B: root directory of physical drive A
C: root directory of physical drive B
etc.

This handles the typical case of allowing CP/M applications to see files in their own directory while also accessing physical disks on demand. When running in "live CCP" mode, however, the physical paths of the first four logical drives (A-D) can be remapped by first navigating to the drive to be remapped, then using the "CD" command to set its physical path:

B:
CD C:\CPMAPPS

Logical drive B will now show the files in the physical folder C:\CPMAPPS.


CCP COMMANDS

In "live CCP" mode, CPvM emulates a subset of the CP/M 2.2 command line (CCP). Available CP/M commands are:

DIR - display files on the current logical disk. Wildcards are allowed (DIR *.COM).

ERA file - erase file. Wildcards are allowed (ERA ??FIL.*).

REN new=old - rename file old to new. Wildcards are not allowed.

TYPE file - display the contents of file to the terminal.

SAVE pages file - save pages*256 bytes of memory (starting at 0x100) to file.

USER number - set the system user number to number. (User numbers are not supported by the filesystem, so this does nothing except give the fake value to any CP/M app that needs it.)

Additional control commands are also implemented:

EXIT - quit to SymShell.

CLS - clear the screen.

CD path - set the current logical drive's physical path to path. (See Files and Drives.) Only full absolute paths are allowed.


TERMINAL FEATURES

As usual for SymShell, terminal input/output will run much faster when SymShell is in fullscreen mode than when it is in windowed mode. Many fullscreen CP/M apps also expect the terminal to have the dimensions 80x24 characters (a bit larger than the default); this can be set from the SymShell menu bar.

CP/M 2.2 had no standardized features for advanced display management (like cursor placement); this was left to the terminal. Because so many different terminal types were available on the market, many major software packages could be configured for use with multiple different types of terminals. CPvM emulates the DEC VT-52 and ADM-3A terminals most completely, but also supports the most common Soroc IQ-120 and VT-100/ANSI control codes. For configurable applications, you may need to try a few different terminal types to see which one works best for a given application. (Soroc IQ-120 is often a good fallback because of its simplicity.)

Special keys were also not standardized across terminals, so most CP/M software uses Ctrl+Key combinations instead of special keys. (Check each program's documentation for details.) For convenience, CPvM maps the arrow keys and delete/backspace onto the default WordStar keyboard shortcuts, the closest thing to a universal standard:

Left Ctrl+S
Right Ctrl+D
Up Ctrl+E
Down Ctrl+X
Delete Ctrl+G
BackspaceCtrl+H
Tab Ctrl+I



BEST SETTINGS

Perfect Writer: Use Soroc IQ-120 setting with 80x24 terminal.

Turbo Pascal: Use Soroc 120/Apple CP/M setting with 80x24 terminal.

VEDIT: Use DEC VT-52 setting with 80x24 terminal.

Vezza: Use "RunCPM Adm3a" version (vezza-A8.com) with 80x24 terminal.

WordStar: Use Soroc IQ-120/140 setting with 80x24 terminal.


TROUBLESHOOTING

Text output is slow or too small to read: Try running SymShell in fullscreen mode (Alt+Enter).

A program crashes or does not run: Not all CP/M software is compatible with CPvM.

1) Verify that the program is designed for CP/M-80 2.2 (not CP/M Plus, CP/M 3, CP/M-86, or another version of CP/M).

2) Verify that the program does not expect system-specific features or hardware (like modems), or direct block-level disk access.

3) Try the program in a BDOS-level emulator like MockbaTheBorg's RunCPM (i.e., one that uses the native filesystem rather than running off of CP/M-formatted disk images). Programs that run correctly in this type of emulation are more likely to work in CPvM.

Screen output is garbled, with extra characters and text in the wrong places: The program is most likely outputting terminal codes CPvM does not understand (see Terminal Features). If the program provides an option to configure the terminal, try a different setting (e.g., ADM-3A).

Screen output is misaligned, miswrapped, or is not scrolling correctly: The SymShell window is most likely set to a different size than the program expects. Most CP/M programs expect a terminal size of 80x24 (or sometimes 80x25); change the SymShell window size to match (using the menu bar) and try again.

NOTE: SymShell may not allow you to change the terminal size while CPvM is running. In this case, open a new SymShell window, change the size, and exit to save the setting as the new default. Subsequent SymShell windows will now start with the requested size.

Special keys (arrows, backspace, etc.) aren't doing what I expect: Most CP/M software uses Ctrl+Key combinations rather than special keys. See Terminal Features for a listing of the default keybindings in CPvM.

Running out of memory after running several apps in a row (or: CPvM is closed, but it still appears in the task manager): Be sure to close CPvM correctly (by typing EXIT on the command-line, NOT by using the 'X' button!)

Bug reports: If you find a program that (1) should work according to all of the above, (2) does not work, and (3) you actually care about getting it to work, bug reports may be emailed to prevtenet@gmail.com. Please include a copy of the non-working program (or instructions on how to obtain it) and step-by-step instructions for reproducing the problem.


GETTING SOFTWARE

CP/M 2.2 software is available from a variety of sources:

The Unofficial CP/M Website (http://www.cpm.z80.de/) hosts free, legal downloads of software by Digital Research and other companies, particularly programming languages.

The Humongous CP/M Software Archives (http://cpmarchives.classiccmp.org/) hosts a huge amount of CP/M material, including both public-domain collections such as the Walnut Creek CD-ROM and offsite links to archives of commercial software.

Software from vintage archives is often in CP/M-specific archive formats like Squeeze, Crunch, or Library (LBR). A good one-stop CP/M program for extracting these formats is LT31, which can be found here (or, in compressed format, on many other CP/M archives):

http://www.retroarchive.org/maslin/disks/cpmprog/lt31.com


TECHNICAL DETAILS

Because CP/M applications are not relocatable, CPvM runs each CP/M session in its own 64K statically-addressed memory bank. This allow multiple CP/M sessions to run simultaneously in the multitasking environment, but requires each CP/M program to reserve memory for SymShell, CPvM, and a full 64K bank of its own. Therefore, CPvM will not run on a 128K system without expanded memory.


COPYRIGHT

CPvM is (C) Copyright 2024, Prevtenet and Prodatron. It is freeware. Source code is licensed under the MIT License and may be found at https://github.com/danielgaskell/CPvM.

CP/M 2.2 is (C) Copyright 1979, Digital Research. CP/M is a trademark of DRDOS, Inc., which now owns the Digital Research copyrights. The original Digital Research code and binaries for CP/M 2.2 have been made open-source and are available from http://www.cpm.z80.de/. CPVM.COM itself does not contain any original Digital Research code.