Spis treści
Emulator
The tool includes a Z80 system emulator with which is possible to test programs without the need to have a real hardware.
Currently the emulator provides:
- Z80 CPU running at 7.3728 MHz
- 16 KB of pageable ROM
- 64 KB RAM
- Simple SIO and Compact Flash emulation
The default ROM image is built with modified versions of Grant Searle's Monitor and Nascom BASIC.
Preferences
The preferences page allows to select the rom images to load at boot and the compact flags image file.
The entry field near the ROM images file name allows to specify an hexadecimal address to load the binary code to in the ROM address space.
ROM files can be specified either as pre-compiled binary images or source code ending with .ASM. When a source code is specified it is automatically compiled before starting the emulator.
Usage
Start the emulator from the Tools menu.
The emulator starts in its own terminal window and display the default monitor greeting message.
Type ? to display a short help screen with the available commands.
Type B followed by either C or W to start the Nascom BASIC interpreter in ROM.
If you have selected a compact flash image file with CP/M installed from the preferences page, type X followed by Y to start CP/M.
Program Upload
Currently there isn't a direct connection between the editor and the emulator. Programs must be transfered to the emulator using the clipboard to copy and paste hex-formatted binaries.
To run a program from monitor, select Copy Intel Hex from the Edit menu, the currently selected source will be compiled and the Intel Hex formatted file copied to the clipboard.
Switch to the emulator terminal window and select Paste from the Edit menu
The hex file is transfered to the emulator.
Run the transfered program by typing G followed by the program's start address in hexadecimal.
CP/M Program Upload
If you are running CP/M, you can transfer a program by using Grant Saerle's DOWNLOAD command.
Select Copy Packed CP/M Binary from the Edit menu, the currently selected source will be compiled and the packed hex file copied to the clipboard.
Switch to the emulator terminal window and select Paste from the Edit menu
The hex file is transfered to the emulator.
Run the transfered program by typing the program's name.
Notes
The emulator tries to be as faithful as possible to a real hardware however there are some limitations.
- Interrupts are not currently supported, the SIO emulation must be polled in order to receive characters. For this reason is not possible to use a standard RC2014 or compatible ROM.
- SIO port A at address 80H/81H is redirected to the emulator terminal window, SIO port B at address 82H/83H is not connected.
- The emulated SIO doesn't need any initialization, any code that initializes the SIO device is simply ignored.
- The compact flash emulation provides enough support to allow CP/M to boot and run, it doesn't provide support for all possible commands.
- The compact flash image is a simple binary file with the CP/M disk structure. An image from a working CP/M system can be used without modifications, provided a compatible CP/M implementation can be loaded.