TRS-80 Emulators – TRS-80 Model I/III Emulator for MS-DOS

TRS-80 Model I/III Emulator for MS-DOS by Matthew Reed

Introduction

This program emulates two very popular early microcomputers, the TRS-80 Models I and III. It is an extremely fast emulation, written from the ground up in 8088 real-mode assembly language. Special optimization techniques were used, allowing a 16Mhz 386SX to emulate a TRS-80 at normal speed. The program also emulates some unusual TRS-80 hardware, such as a Model I doubler, TRS-80 joystick, hardware clock, and hard drive.

Note that in this document, TRS-80 refers to either a Model I or III. PC refers to the computer running the emulator. This is used to distinguish between hardware common to both types of computers, such as a TRS-80 joystick as opposed to a PC joystick.

This emulator supports Model I and III emulation.

Requirements

This program will run on an IBM-compatible computer running MS-DOS 3.0, with at least CGA graphics and 300K of free memory. A hard drive, though not necessary, is practically essential for storing virtual disk files. A parallel printer, PC joystick, and SoundBlaster compatible card are also optional. Reading physical TRS-80 disks requires a disk drive that will match the disk size (generally a 5¼″ drive), and a standard floppy disk controller. It is not possible to read physical disks on a Tandy 1000. This program has been tested under Windows 95.

Features

This program emulates a Model I and III with the following hardware:

  • Z80 microprocessor with 48K RAM (including all undocumented instructions)
  • Floppy disk controller (FD1771 for the Model I, FD1793 for the Model III)
  • Percom or Radio Shack doubler (Model I only)
  • 4 double-sided double-density 80 track drives
  • Hard disk drive, with capacity up to 13 megabytes
  • Real time clock interrupt (25 ms Model I, 30 ms Model III)
  • Hardware clock
  • 64 by 16 screen with double-wide mode
  • Lowercase modification (Model I only)
  • Extended character set (Model III only, characters 0-31 and 192-255)
  • Parallel printer port (only with PC parallel printer)
  • TRS-80 joystick (only with PC joystick)
  • Amplifier for sound output (through PC speaker or SoundBlaster card)
  • An Electric Pencil control key

Obviously, no emulation can ever achieve complete software and hardware compatibility. However, my emulator is very close, and can run all of the software I have tried. This includes very hardware specific programs such as Super Utility Plus, TRSDOS 2.3 for the Model I, TRSDOS 1.3 for the Model III, LDOS 5.3 for the Model I and III, DOSPLUS 3.3 for the Model III, MULTIDOS 1.6 for the Model III, and NEWDOS80 2.0 for the Model I and III.

Running the Emulator

To run the emulator, type one of the following commands, depending on which Model of TRS-80 you wish to emulate:

M1 <disk image filename>
M3 <disk image filename>

Disk image filename is the name of a file containing a disk image. The name must be an 8.3 MS-DOS name, and it must include the full path to the file. Disk image filenames must have an extension of **.DSK**. You can also leave off the filename, and the emulator will start with a blank disk.

There are several optional parameters you can use when starting the emulator. These parameters should be enclosed in parentheses, and if you use more than one parameter, separate them with commas, like this:

M1 (MEM=48,SOUND=OFF)
MEM
The amount of memory in kilobytes. The default is 48. Valid values are 16 and 48.
NODOUBLER
Model I only. Disables the Percom/Radio Shack doubler.
NOHDC
Disables the hard disk controller.
HDC
Enables the hard disk controller.
NOJOYSTICK
Disables the TRS-80 joystick.
JOYSTICK
Enables the TRS-80 joystick.
SOUND
Enables or disables sound (ON or OFF). The default is ON.
NODMA
Disables the memory cycle stealing emulation, which might solve problems with older PC hard drive controllers.
KEYDELAY
The delay between repeating keys, in 1/1000 second. The default is 200.
NOCLOCK
Disables the hardware clock.
CLOCK
Enables the hardware clock.
LOAD
Loads a previously saved state from the file STATE.SAV.
SAVE
Saves the state to the file STATE.SAV on exit.
SCREEN
Changes the screen emulation (MONO, CGA, EGA). The default is CGA.
NOLOWERCASE
Model I only. Disables the lowercase modification.
LOWERCASE
Model I only. Enables the lowercase modification.
NODOUBLEWIDE
Disables the double-wide screen mode.
DOUBLEWIDE
Enables the double-wide screen mode.
NOEXTENDED
Model III only. Disables the extended character set.
EXTENDED
Model III only. Enables the extended character set.
NOKEYMAP
Disables the keyboard mapping.
KEYMAP
Enables the keyboard mapping.
NOCENTURY
Disables the 21st Century fix for the date.
CENTURY
Enables the 21st Century fix for the date.
ELECTRICPENCIL
Enables the Electric Pencil control key.
SPEED
Changes the emulation speed (NORMAL, FAST, SLOW). The default is NORMAL.
NOCAP
Turns off the capture of the PC screen.
CAP
Turns on the capture of the PC screen.
NOCOLOR
Turns off the color emulation.
COLOR
Turns on the color emulation.

If you have a hard disk, you can also use the following command:

M1 <disk image filename> <hard disk filename>
M3 <disk image filename> <hard disk filename>

Hard disk filename is the name of a file containing a hard disk image. The name must be an 8.3 MS-DOS name, and it must include the full path to the file. Hard disk image filenames must have an extension of **.HDV**. You can also leave off the hard disk filename, and the emulator will start without a hard disk.

Utility Programs

Two utility programs are included on UTILITY.DSK. The first is HARD/CMD, which will install the hard disk driver. HARD/CMD, and the hard disk image file, HARDDISK.HDV, must be present in the same MS-DOS directory as the emulator. HARD/CMD will only work under Model I and 3 LDOS.

HARD/CMD has three optional parameters. Any parameters should be enclosed in parentheses, and if you use more than one parameter, separate them with commas, like this:

HARD (DRIVE=5,QUIET)
DRIVE
Specifies the desired hard drive number. The default is 4.
REMOVE
Removes the hard disk driver linkage.
QUIET
Hides all messages unless an error is encountered. This is useful if you run HARD/CMD as an AUTO command.
CLOCKSET/CMD

The other utility on UTILITY.DSK is CLOCKSET/CMD, which will set the TRS-80 time and date. This program will work with all TRS-80 operating systems. Since HARD/CMD will also set the time, CLOCKSET/CMD is primarily useful if you don’t want to use a hard drive, or if you don’t use LDOS.

CLOCKSET/CMD has only one optional parameter, and again, if you use it, it should be enclosed in parentheses:

QUIET
Hides all messages unless an error is encountered. This is useful if you run CLOCKSET/CMD as an AUTO command.