Z-80 Microprocessor;
48KB RAM, 14 KB ROM, 1 KB Video memory and 1 KB keyboard memory;
Printer port;
Internal Clock;
Floppy Disk Controller and four 80-track single sided diskdrives;
The RS-232 port is not yet emulated in this version.
The emulator only runs in monochrome screen mode but in any resolution. A clock speed of at least 16 MHz is recommended.
Installing the package
After unzipping the file TRS80V10.ZIP into a folder (for example named "TRS80")
you should have the subfolders "DOCS", "DISKS" and "TOOLS". Now unzip the
contents of TRS80X10.ZIP in the "DISKS" folder.
See the README.TXT file for a short description of all files included in the .ZIP files.
Starting up in Model III BASIC (no DOS)
Running the emulator is very straightforward. By simply selecting "Reboot" in the
menu the emulation will start. You can leave the emulation mode by pressing the
UNDO key.
Virtual Drives
The virtual Model III is equipped with four 80-track disk drives. Disks are
represented by *.DSK files in the emulator's DISKS path.
[the following info is not correct for v1.0 --- see README.TXT]
You can create new virtual disks in the emulator by entering an unused disk name
after selecting a drive, and then running your Model III DOS's (e.g. TRSDOS,
NewDOS/80, etc.) FORMAT command on it from within the emulator. The new
.DSK file will automatically be created in the default directory when the Model III's
FORMAT command is executed.
Leaving the disk name blank for a drive effectively leaves the drive empty. In
contrast, entering an UNUSED name will cause the drive to appear to contain an
unformatted disk.
[the above info is not correct for v1.0]
Note that to use the emulator as a disk-based Model III, you will have to have a
DOS disk in virtual drive 0. As with the real machine if you change the contents of
drive 0 (e.g. if you have more than one DOS) you should reboot the emulator.
Emulation speed
Using SPEED.BAS you can get an idea of the emulation speed. Because of the
speedup patches in BASIC the Float value will approximate the real emulation
speed the best. However, it "feels" much faster. My results are (in percents):
Test | ST | STE | Falcon | TT |
Integer | 43 | 85 | 83 | 170 |
Floating Point | 32 | 59 | 60 | 121 |
Memory | 45 | 86 | 88 | 182 |
Text | 170 | 311 | 311 | 530 |
Scrolling | 60 | 131 | 217 | 333 |
Open Disk
The disk window is permanently visible in the down left corner of your screen when
you have chosen for emulation of a disk system in the options window.
[manual not complete]
Close Disk
Remove the selected virtual disk from the virtual drive.
Write Protection
Disk write protection is emulated by the file system's Read Only status. To make life
easier for you this status can be switched using this option.
Load Snapshot
This option let you select a *.SNP file and uses it to restore the TRS-80 memory,
registers and emulator settings to the saved values.
Save Snapshot
This will save the current TRS-80 memory, registers and emulator settings into a
file. It does not save the keyboard layout and font.
Quit
Quit the Emulator.
Emulate
Reboot
The program switches to emulation mode (the mouse will be invisible) and
emulates pressing the reset button on the TRS-80. In emulation mode pressing Left
Shift and Undo at the same time has the same effect. Press HELP in emulation
mode for some extra information. You can leave emulation mode by pressing the
UNDO key.
Continue
The program switches to emulation mode (the mouse will be invisible) and
continues program execution.
User Defined Keyboard
The program contains two keyboard layout definitions. This option allows you to
switch between the default and the user defined keyboard. The latter can be
changed using the keyboard layout editor.
User Defined Font
The program contains two font definitions. This option allows you to switch between
the default and the user defined font. The latter can be changed using the font
editor.
Disassembler
[manual not complete]
Memory Dump
A window with the hexadecimal and ascii values of the memory bytes starting from
the address pointed to by the Z-80 program counter will be displayed after selecting
this menu option. Click on the arrows to move through the memory or type the
hexadecimal address of the prefered address followed by clicking on the GOTO
button. You can also print a part of the memory dump by entering the first and last
address and clicking on the PRINT button.
Debug
After selecting the debugger the menu options for starting the emulation will be
disabled. Now it is possible to execute single opcodes of the program by a
mouseclick on the STEP button. By clicking the GO button you execute the program
until the UNDO key is pressed or a breakpoint address has been reached.
You create this breakpoint by entering in the right corner of the window the
hexadecimal address. When you enter a zero number the breakpoint will be
removed.
You can change the Z-80 flags and registers, including the program counter, by
clicking with the mousepointer on the registername bar. The flags and registers will
change after clicking on the OK button in the appeared window.
You quit the debugger by unchecking the menu item.
Options
Emulator Options
Disk System
Save Configuration
The selected emulator options, default CLOAD, CSAVE and SYSTEM filenames
and virtual disk filenames will be saved. Upon starting the emulator the next time
this configuration file (TRS80.INF) will be read.
2nd Connection
To take full advantage of the emulator, you're going to want to get your Model III
disk software onto your Atari.
Because I don't have an RS-232 option card in my Model III I have developed a method by which the printer port of the Model III may be linked to the parallel port of your Atari for transfer.
Those without technical experience should not be scared away by this latter method. You will not be required to do anything to either computer that might void the warranties, or require any electronics experience.
All that is required is the construction of a special cable so that the two computers can be connected. This construction is very simple and may be carried out by people with no prior hardware experience.
Constructing the Cable
To start, you will need to purchase a 25-pin male D-type connector (also known as
a standard PC printer connector), a 34-pin female edge-card connector (the
standard counterpart to the Model III printer port), and some ribbon cable (you will
need to use only 11 wires). These may be obtained at many electronics and
computer stores. If a store you try does not have all the necessary parts, they may
be able to direct you to another supplier.
If you look carefully, you should see that the pins on the 25-pin connector are
numbered, running left to right as 1 to 13 on the top row, and 14 to 25 on the bottom
row, when looking at the pin side. In contrast the front of the edge-card connector
(I'll call it the 34-pin from now on) is numbered as follows:
2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 |
1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | 17 | 19 | 21 | 23 | 25 | 27 | 29 | 31 | 33 |
You will need to wire the following pins together:
TRS-80 | Atari | |||
Name | Pin | Name | Pin | |
DATA 0 | 3 | ---> | DATA 0 | 2 |
DATA 1 | 5 | ---> | DATA 1 | 3 |
DATA 2 | 7 | ---> | DATA 2 | 4 |
DATA 3 | 9 | ---> | DATA 3 | 5 |
DATA 4 | 11 | ---> | DATA 4 | 6 |
DATA 5 | 13 | ---> | DATA 5 | 7 |
DATA 6 | 15 | ---> | DATA 6 | 8 |
DATA 7 | 17 | ---> | DATA 7 | 9 |
STROBE | 1 | ---> | BUSY | 11 |
BUSY | 21 | <--- | STROBE | 1 |
GROUND | ? | <---> | GROUND | 18 - 25 |
Testing the cable
You may test the cable by connecting it to both computers and loading BASIC on
your Model III. Start CONNECT.PRG on your Atari and select the Test button. After
pressing the Start button it will show every byte it receives from the Model III. Now
enter OUT 248,0 on the Model III. Your Atari will show the message Received 0
($00). Repeat this using instead of 0 the numbers 1, 2, 4, 8, 16, 32, 64, 128 and 255.
If one of these numbers doesn't appear in the same way on your Atari you have to
check your cable and connection. Press the UNDO key on your Atari to quit this
test-mode.
This cable construction has been tested and is known to be safe if properly constructed. Be careful though. I assume no liability for any damage that may result.
Transfering Files and Disks
Transfering Atari Connection
Once you have constructed and tested your cable, the rest is very simple. First type
in the program RECEIVE.BAS (contained in the second .ZIP file) on your Model III.
Make sure to save the program.
After loading DISK-BASIC start RECEIVE.BAS (be sure that at least 5 KB is free on the disk). Enter ATARICON/CMD:d where d is the drivenumber. The file will be created and the message Waiting for Sync Byte will appear.
Now Start CONNECT.PRG on your Atari and select the SEND button. After pressing the START button the fileselector will appear. Select ATARICON.CMD and press the OK button.
On your Model III the messages Receiving Data Blocks followed by Transmission Completed will appear. If you see messages like Checksum Error or Unknown Sync Byte or if nothing appears at all you must check your cable and the connection. Press the UNDO key on your Atari and the BREAK key on your Model III to interrupt the transmission.
From now on you will use Atari Connection (ATARICON/CMD) for sending and receiving files. This program is written in machine language and is much faster and more powerfull than the RECEIVE.BAS.
Sending Files to the Atari
Select the proper command in Atari Connection and enter the name of the desired
file (possible follwed by :d where d is the drivenumber). Select the RECEIVE button
in 2nd Connection and press the START button. Now enter the desired destination
filename and press OK.
Sending Model III Disks to the Atari
Select the RECEIVE button in 2nd Connection and press the START button. Now
enter the desired destination filename of the Virtual Disk File and press OK. Use the
extension "DSK". After selecting the proper command in Atari Connection enter the
desired drive number. The program will then scan the disk first to determine which
sectors can be read and to prepare the correct header for the Virtual Disk File. This
is followed by sending the header and the sectors to the Atari.
Sending files to the TRS-80
Select the proper command in Atari Connection and enter the destination filename
(possible follwed by :d where d is the drivenumber). Be sure there is enough free
diskspace. Select the SEND button in 2nd Connection and press the START button.
Now select the source file and press OK.
2nd Convert
This program can convert the following files to virtual disk files which can be used
by this version of the emulator:
Model III NEWDOS/80 disk images;
Model III TRSDOS disk images [not in the current version];
Model I NEWDOS/80 disk images;
Model I TRSDOS disk images [not in the current version];
Virtual disk files belonging to an old version of the emulator (0.4 or 0.5) [not in the
current version];
The first two are normally used to convert files which have been received by other
programs then 2nd Connection. The next two options can be used to convert disk
image files from Jeff Vavasour's PC Model I emulator and Yves Lempereur's Model
I emulator for the Macintosh to model I formatted virtual disks. Put these disk after
the conversion in drive 3. Using the PDRIVE command of NEWDOS I installed this
drive as a single sided single density drive for you
Description of some included TRS-80 programs
Model III Basic
See BASIC.TXT in the DOCS directory.
SPEED.BAS
Using this program you can get an idea of the emulation speed. The influence of
some emulator options is easy to be seen. Remember that the results are relative to
a standard 2 MHz Model III using NON-DISK BASIC with a 25 Hz Real Time Clock
interrupt. Since the TRS-80 ROM contains routines which are written for a 30 Hz
clock its clock is running too slow. To do the same on the emulator you have to
deactivate the clock adapt option for a correct comparisment.
NEWDOS can correct this problem using the SYSTEM command. I have already
done this for you so you have to deactivate clock adapt. For a correct clock in NON
DISK BASIC you have to activate the option.
Apparat's Disk Basic
This is a extension of Model III Basic. No silicon description available.
NEWDOS/80
See the included NEWDOS80.TXT file for the commands.
Editor/Assembler Plus
This is a macro assembler.
ACCEL3
Accel is a good BASIC compiler for the TRS-80. Accel does not compile everything
but only those commands with graphic-, integer- and memory-operations. The rest
is executed by the interpreter. To use Accel you have to run the JCL file from the
DOS prompt. Do this by entering "DO ACCEL3/JCL". The batchfile will load disk
BASIC and execute ACCEL3. Now you can load and run BASIC programs in the
usual way. Compiling is done by pressing the CLEAR key and entering "/FIX". You
can start the compiled program by typing the RUN command. Be sure your
programs are saved before compiling since you cannot modify the source code
after compiling. A compiled program can also be saved using the SAVE command.
After loading the programs are executable (if ACCEL3 is in memory).
CAT
This program with an optional drive number (0-3) as argument will display the
directory and allows you to start a program by selecting it using the arrow keys and
the ENTER key.
Technical Information
The Z-80 and hardware emulation of 2nd Life is entirely written in 68000 assembly
language. The application interface is written in C.
Virtual Disks
All current versions of the emulator only recognize single sided virtual disks with
256 bytes per sector (BPS) and a maximum of 80 tracks (version 0.4 and 0.5 of the
emulator only 40 tracks). The virtual disks all consist of a header as shown below
followed by all excisting 256 byte sectors in order.
Because the Data Address Mark (DAM) of the sectors is also saved the emulator
can read all kind of different 256 BPS DOS formats.
Virtual Disk Header
Length | Name | Description |
long word | VDSK | File type "VDSK" |
long word | DSKVER | Version number |
word | HLEN | Header length (bytes), multiples of 512 |
word | BPS | Bytes per sector |
word | SPT | Sectors per track |
word | NTRACKS | Number of tracks |
word | NSIDES | Number of sides - 1 |
word | RESERVED[7] | Reserved |
byte | DAM[NTRACKS*(SPT+1)] | DAM type for each sector |
variable | filling | Zeros until 512 byte boundary |
Sending a data byte from the Atari to the TRS-80 is more difficult because the 8 DATA lines of the TRS-80 can be used only as output. First the Atari makes the TRS-80 BUSY line low. The TRS-80 will react by sending the requested bit numbers (0 ... 7 in order) with ± 200 µ sec intervals. The Atari must react within this time interval. After these requested 8 bits the TRS-80 requests for making the TRS 80 BUSY high by sending the number 8. It is possible for the Atari to check if every bit arrived correctly because every request, except the first, from the TRS-80 contains in bit 7 the last received bit.
The communication protocol is listed in the following table.
Communication protocol
Byte | Description |
3CH | Block sync |
xx | Data length in bytes (0 means 256) |
xx xx xx ... | Data bytes |
xx | Checksum (sum of data) |
(repeat block) | |
78H | End of file |