H8 Emulator Features
The emulator supports the following features:
Memory
The emulator supports a 64K address space laid out as follows:
Address Range | Description | |
000.000A-003.377A | PAM/8 or PAM/GO ROM | |
004.000A-023.377A | Unused memory space - all zero | |
024.000A-027.377A | Write-protected RAM used by H-17 | |
030.000A-037.377A | HDOS ROM (H-17 driver basics and initial boot code) | |
040.000A-377.377A | 56K of RAM |
More details are available here.
A "real" H8 with the ORG-zero option installed supports 8K of "shadow RAM" in the low 8K of address space, allowing standard CP/M to be used on the hardware. This is not supported by the emulator.
Serial Ports
The emulator supports one 8251-based and four 8250-based serial ports. The 8250 port addresses are:
Address Range | Description | |
350Q-357Q | Console (H-19) | |
340Q-347Q | LP: output (Ref: Printing) | |
330Q-337Q | Modem support (see below) | |
320Q-327Q | AT: port input and output (Ref: Transferring Files) |
The 8251 port (address 170-171q) is used to support PAM/8 tape load and dump. This is a very limited emulation of an 8251; only the data I/O port and status flags are provided, the minimum necessary to support PAM/8 load and dump.
Interrupts
All the standard interrupts are supported:
Interrupt Source | Interrupt Vector | |
Master clear / reset | vector 0 (000.000A) | |
Clock ticks / RTM key seq. | vector 1 (000.010A) | |
Single-step hardware | vector 2 (000.020A) | |
Console (port 350q) | vector 3 (000.030A) | |
Reserved for RTC - unused here | vector 4 (000.040A) | |
Reserved for H-47 - unused here | vector 5 (000.050A) | |
User / modem | vector 6 (000.060A) | |
HDOS system calls (software only) | vector 7 (000.070A) |
Output is driven directly to the "attached device." Because there is no actual serial transfer of bits to the emulated device, output is instantaneous. For that reason, the use of transmitter interrupts is neither necessary nor recommended. If used, the system will be in interrupt service constantly until the message is fully transmitted.
Receiver interrupts should not be used on the AT port (320-327q). Input pacing for file transfers into the H8 is done by supplying the next character to be input when the program polls the status port. If you rely on receiver interrupts and don't poll the status port, input will stall. In any case, no interrupt vector has been assigned to the AT: and LP: ports.
H-17 Disks
Three H-17 disk drives are provided: sy0:, sy1:, and sy2:. The disks included with the release package contain the original SY: driver, which supports 100K/byte (40-track, single side) disks. The emulator supports the HUG replacement SY: driver which supports 80-track and double-sided drives. The HUG driver can be downloaded from the project web site.
"Disks" are actually files on the Mac hard drive. They are held in memory when mounted on the drive. A GUI (Ref: Emulator Menus) lets you mount existing disks, create new ones, and dismount disks. Disk images are saved on dismount.
You can change the write-protected state of disks that you create. (Disks supplied with the emulator are locked, meaning you cannot remove write protection.) The write protection state is saved with the disk image, so it will be the same the next time you mount the disk.
You can specify which diskettes, if any, are to be automatically inserted into drives when the emulator is started. See the Preferences item under the Edit menu in Emulator Menus for more information.
The emulator can be launched by opening a diskette or tape file in the Finder. The diskette will be mounted if there is a free drive. The tape will be opened for input to PAM/8.
H-19 Terminal
Near complete emulation of the H-19 Video Display Terminal is provided, using Heath escape sequences only. Please refer to H-19 Keyboard Map and User Guide and H-19 Programming Information for a full list of features and how to access them. See Limitations for a list of H-19 terminal features not implemented.
The emulator limits the throughput of the H-19 terminal to 2,000 characters per second, maximum, to make the system usable on faster machines using Turbo Mode.
Modem Support
The emulator provides access to the Macintosh modem, mapping H8 I/O ports 330-337Q to the Mac Modem serial port. In the current release, the modem configuration is fixed as follows:
Characters are "paced" into H8 I/O port 330Q at a rate of approx. 500 per second in order to simulate something of a serial line and to prevent port overrun.
Full bidirectional Xon/Xoff flow control is supported. Make sure that any remote system that you connect to will support Xon/Xoff flow control, and there should be no data loss.
This inflexible configuration may be enhanced in a future release if there is any demand for it. Frankly, with the wide availability of the Internet, there are few async BBS systems still in operation, and in any case there are much better communications tools available for the Macintosh. This feature was included only for "completeness," really.
The modem must be allocated to the H8 before use, and freed when you are done. Please see Emulator Menus to learn how to do this.
All disk and tape files created by the emulator use the creator signature 'h8h8'. The emulator creates files of the following types:
File Type | Description | |
'h8tp' | PAM/8 tape files. The icon is a bad representation of a Phillips cassette tape. The file content is the exact series of bytes, 8 bits per byte, that were output by PAM/8 when the file was dumped. | |
'h8dk' | H-17 disks written in compressed, non-portable format. The icon is a representation of a diskette, with 'H-17' written on the large icons. The file content is a 16-byte header containing the volume serial number, protection flag, number of sides, tracks, and sectors per track, along with some expansion space. This is followed by a number of 256-byte sector images, the actual count depending on the disk format. There are no delimeters. | |
'TEXT' | H-17 disks written in expanded text, known as the portable format. This format is common among all known H8 emulator systems. The icon is the same as the compressed format, except that the word 'TEXT' is displayed on the large icon. The content is the same as the 'h8dk' file, except (a) each byte is written as three ascii, octal digits; and (b) there are carriage returns and comments inserted to help make the disk readable by humans. | |
'pref' | The preferences file, saved in the System Preferences folder under the name "H8 Emulator Preferences." If this file does not exist it's created with default values. | |
'trsh' | The private spool file, which supports printing, is created in the temporary folder with a 'trsh' file type. It is deleted when you quit the emulator. |
Filters are used in the standard file open dialogs so that only 'h8tp' files are shown when opening a PAM/8 tape, and only 'TEXT' and 'h8dk' files are shown when opening a disk. A header check is performed on disk files; the emulator will not open a 'TEXT' file that does not conform to the H-17 internal disk format.
File transfer to the Mac or saving the H-19 scroll-back buffer creates files of type 'TEXT'. The creators can be changed on the Emulator Preferences dialog; they default to 'ttxt' (SimpleText).