• Please review our updated Terms and Rules here

TRS 80 Model 1 Level 1 - CPM?

gepooljr

Experienced Member
Joined
Dec 8, 2012
Messages
161
Location
Las Vegas NV
Getting ready for the 2021 projects... I have a beautiful, low serial# TRS 80 Model 1 Level 1 I rescued from a Storage Locker in Ohio late last year. I've tested it and it works like a champ. I want to get it working, but I'm feeling hesitant to upgrade it to Level II. Having researched it the process, mine would take a lot of work to change it and I'm just not sure I want to take "the Vintage" out of it. I've read that there are very few Level 1's running around. I am planning on getting a memory upgrade kit to 16K or higher if possible.

So, I also used CP/M in my first college programming class (MicroFocus COBOL?) way back in 1985. I see that it is possible to run a version of CP/M from Lifeboat Associates - CP/M 1.4. Does anyone have any experience with it and will it run on the Model 1 Level 1?

Geoff
 
I'm not aware of any disk operating system that works with a TRS-80 that has Level I BASIC ROMs. It's certainly possible to roll your own, though, if you're ambitious. I happen to have just been thinking recently about what that would take. There are a few notable obstacles:

(1) The Level I BASIC ROM contains no code to load a boot sector off a floppy drive. You could nevertheless get a reasonably convenient boot procedure that consisted of turning on the power and typing the four-key sequence "CL.[ENTER]". For this to work, you'd have to have a cassette player hooked up with a tape in it that had a short boot loader. The loader would only take a few seconds of tape, so you could fill both sides of a tape with copies of the loader and only need to deal with flipping the tape over once every hundred boots or so. (The TRS-80 hardware already deals with starting and stopping the tape player automatically for you.)

(2) (This one's a non-issue if you're only trying to run CP/M.) A major feature of most TRS-80 DOSes is a "Disk BASIC" implementation that's really a set of extensions to the Level II BASIC in ROM. You would have to modify the Disk BASIC to load a copy of Level II BASIC off of a disk and into RAM. That would leave you with 12k less available RAM. Most disk applications only required 32k RAM systems, though, so if you filled your RAM slots to get a 48k system, you could still run most Disk BASIC applications.

(3) On a Level II BASIC disk system, the Z-80 interrupt mode 1 is used, in which an interrupt input (on the INT line) causes a call to a fixed address (38h), which the TRS-80 maps to ROM. The Level II BASIC ROMs have an instruction at this address that jumps to a RAM address, where a DOS can place an interrupt handler. Level I BASIC doesn't do this. You could deal with this by instead using the Z-80 interrupt mode 2. Mode 2 is designed for use with devices that send a byte to the CPU identifying themselves. The TRS-80 hardware doesn't do this, but you can use mode 2 just as a way of bypassing ROM and having interrupts vectored through a table in RAM pointed to by the I register. (I think you can count on the interrupt byte being read by the CPU as all ones, and therefore you don't need to dedicate a whole page of memory to the interrupt table -- just the last byte of some page and the first byte of the next page.)

(You could also just leave interrupts disabled: the disk drive, keyboard, and serial input device drivers normally just use polling, anyway. You only need the interrupt if you want to: (a) keep track of the time of day; (b) have an interrupt-driven keyboard poller that can handle type-ahead; or (c) have an interrupt-driven RS-232 serial port input routine. Such serial input routines don't work by getting interrupts from the RS-232 interface when a byte comes in (because the RS-232 interface has no such feature), but instead work by polling the RS-232 input once every 1/40th of a second when the clock interrupt comes in. This just barely suffices for doing 300-baud input in the background. For faster baud rates, you need to use a non-interrupt-driven program that constantly polls.)


That's all I've thought of so far. Let us know if you get something working!
 
Of course a hard deal-breaker for running CP/M usefully on any unmodified TRS-80 is the fact that standard CP/M requires RAM starting from 0000h, right where ROM lives. There was a small hardware widget called the Omrikon Mapper that flipped the bottom 16k with the top, that was the most common CP/M mod for the Model I.
 
Your going to need 48kb memory upgrade to get CP/M to run. I have CP/M running on my unmodified System 80 (Mode 1 clone) that has 48k memory and Level 2 Basic. Only problem is base memory is at 4200h and programs load and start at 4300h so standard off the shelf CP/M programs cannot run.

trs80_cpm.png
 
I have CP/M running on my unmodified System 80 (Mode 1 clone) that has 48k memory and Level 2 Basic. Only problem is base memory is at 4200h and programs load and start at 4300h so standard off the shelf CP/M programs cannot run.

Which, yeah, is why I wouldn’t really count that as running CP/M. There is that modified version that can run under the standard memory map, but it’s completely binary incompatible so why wouldn’t you just run TRS-DOS? I guess it’s an interesting curiosity.

I think someone is making a reproduction of the Mapper so the option still exists, but putting one in a Level I machine so you could run drives and an expansion interface *only* in CP/M mode is almost certainly uncharted territory.
 
Getting an original Level II upgrade kit would not take away from "vintage". But if you want to keep the Level I machine, you might want to look for a 16K Level II Model I with an expansion interface to modify for CP/M or run TRSDOS.

Or get a Model 4 or 4P which can run CP/M without modification.
 
Back
Top