M100 CP/M
What is M100 CP/M?
M100 CP/M is an implementation of CP/M 2.2 that is tailored to the TRS-80 Model 100 & Tandy 102. Now able to run the predominant operating system of the 1970s & early 1980s means a huge library of programming languages, text adventures, utilities, etc, can now run on these computers. Here is a quick look into CP/M. M100 CP/M is free to download from Installation and Set Up.
In order to run CP/M, these computers need two changes to hardware:
* RAM needs to be present in lower 32KB region * Some form of memory to act as disk storage
REXCPM is the device that achieves this. Developed by long-standing M100 hardware specialist Steve Adolph, REXCPM is a plug 'n play Option ROM board that provides the lower 32KB, plus either 2MB or 4MB of RAM-disk.
This package of M100 CP/M & REXCPM makes these computers a venerable CP/M machine with their small footprint, enviable keyboard, super-fast RAM-disk, long battery life, etc, etc.
Installation and Set Up
Once your REXCPM board is installed & verified by running RXCMGR (REX manager) successfully, download these files:
Model | Description | File | Revision |
M100/T102 | Installer/updater | CPMUPD.CO | 1 |
M100/T102 | CPM.CO | CPM.CO | 1 |
M100/T102 | CPM for 2MB REXCPM | CPM210.BK | 1 |
or | |||
M100/T102 | CPM for 4MB REXCPM | CPM410.BK | 1 |
Move CPMUPD.CO & CPM.CO to your M100. Leave CPM210.BK (or CPM410.BK) on the emulated-TPDD.
Issue CLEAR 60000 from Basic. In Main Menu, execute CPMUPD.CO.
(Note: if using USB-serial converters. Whilst some cheap converters work fine for normal M100 transfers (ie less than 32KB), experience has shown failure can occur with larger CP/M files. If a "checksum error" is displayed during M100 CP/M install, the USB-serial converter is likely to be the problem. Ensure your converter has "FTDI" chipset to avoid this error).
Enter the 'Install filename', either CPM210.BK or CPM410.BK. As you have no existing CP/M disk, press 'y' to confirm.
M100 CP/M will install, taking 5-lines of progress dots... (about 2min 35sec). On completion, you'll be returned to Main Menu. If there was a TPDD-error, the program will stop & display error message.
Re-activate RXCMGR by selecting it & F8. CP/M can be entered by two ways: selecting CPM.CO or by REXCPM hot-key 'ctrl-c'. In fact if you're only going to use the hot-key, CPM.CO can be deleted altogether from Menu.
Using CP/M
To exit CP/M to M100 Main Menu, press F8.
There is only one 'disk drive' in M100 CP/M, the "A" drive. It is however nearly 2MB (or 4MB) in size.
CP/M commands can be in lower case, here are two common examples:
- dir - produces a Directory
- stat - shows free space on disk
Here is a summary of commands. Here is the full manual for CP/M 2.2.
Special M100 CP/M features
SCREEN CONTROL
CP/M is designed for 80 x 24 screen size, thus the 40 x 8 of the M100 presents challenges. Some software wont recognise ctrl-s (or PAUSE key on M100) to stop scrolling. Zork adventure series is an example of this. So M100 CP/M can turn off scrolling until a key is pressed.
- F1 - toggles between Scroll Locked (Sc L) and 'Scroll Standard' (Sc S). Press LABEL to see this. In Locked mode, when the display is ready to scroll, the cursor will be at the right-hand bottom awaiting any key press. F1 can be pressed at anytime, however best to select it before starting the offending program.
Some software doesn't use the standard CP/M key-entry routines resulting in a cursor not displaying. Zork is also an example of this.
- F2 - toggles between 'Cursor Full-time (Cu F) and 'Cursor Standard' (Cu S). Press LABEL to see this. If a program doesn't show a cursor when at keyboard input, select 'Cursor Full-time'. F2 can be pressed anytime. The reason Cursor Standard is an option is so a flashing cursor isn't a distraction when the CPU is processing or doing graphics on the M100 LCD.
M100 CP/M can redirect video output to an external monitor giving full 80x24 display. Using this VT100 device, an old CRT or LCD VGA monitor can be put to good use. There is also the option to redirect video through the Cassette or BCR ports (BCR TTL SERIAL HACK), thereby keeping the RS-232 port free for connecting to an emulated-TPDD or other serial device. News 13-Jun-20: Suggest holding off making this mod as may change for a Z80 compatible solution
- F3 - toggles between M100 (M100 LCD 40x8), RS23 (RS-232 port) and CASS (Cassette/BCR port). LABEL has to be active to make a change. The change occurs when LABEL is extinguished. The RS-232 settings used are: 98N1D (19200 baud)
The right & wrong CP/M Application software
The Right
The CP/M-era spanned several processors, so only 8080 CP/M software will run on M100 CP/M, not that for Z80 or 8086. Most early CP/M software was 8080 and is retrospectively referred to as CPM-80, as opposed to CPM-86. However Z80 software can also be classed as CPM-80.
Here is a good library of software. (NB some maybe Z80 or 8086). Here is another. (Should be good as it's for 8085).
Here is our list of M100 CP/M Application Software.
The Wrong
Programs known not to run on M100 CP/M
- Turbo Pascal (requires Z80) - VDE full-screen editor (requires Z80)
Importing & Exporting software
Once you have found some Right software, you need to import it into M100 CP/M.
- Have the files in the current directory on your emulated TPDD. Currently filenames must be 6.2 format (eg 'progra.co') as opposed to CP/M's 8.3 format (eg 'program.com'), so temporary renaming maybe necessary. (Note: if using USB-serial converter, see comment in Installation & Setup
In CP/M, use the IMPORT command to copy from TPDD into CP/M, eg:
- import progra.co program.com (this imports 'progra.co' from TPDD and saves as 'program.com')
Other examples:
- import progra.co (imports & saves as 'progra.co')
- import progra.co .com (imports & saves as 'progra.com')
Exporting is the same, but ensure you're saving in 6.2 format. eg
- export program.com progra.co (this exports 'program.com' to TPDD and saves as 'progra.co')
(other variants work as for IMPORT)
IMPORT & EXPORT HELP
Entering the command "import" or "export" with no filename displays help text & examples.
Initialising RS-232
When connecting a device to the RS-232 port (disregard if redirecting video to it), the port needs initialising. Longer term a Config utility or function key is the goal, but in the meantime the RS-232 port can be set to: 98N1D (19200) by:
- Press LABEL, then F3 until RS23 is displayed, press LABEL again. Now reselect your video mode of choice by: LABEL, pressing F3, LABEL again
In case of Difficulty
If the M100 hangs during CP/M, try the following in order, proceeding to the next step only if necessary:
- ctrl-c - Reset. Will return to Menu. If a blank M100 Menu comes up, don't panic - Turn power off/on. This should restore Menu - If Menu is still blank, enter Basic and CALL 63012 - This should restore RXCMGR & you'll be able to restore your RAM image from a REX backup (assuming you've made one)
Acknowledgements
I would like to thank those who have contributed to the project:
Steve Adolph - for producing REXCPM hardware (which is a delight to program). For CASS/BCR video output, hi-speed Backup and technical support.
Kenneth Pettit - for VirtualT as this project would have remained a dream if not for VT.
Mike Stein - for alerting me to Geoff Graham's VT-100 Terminal project and for beta-testing.