H8 Emulator Limitations
You would think that emulating an ancient, limited microcomputer on a modern Macintosh would be a walk in the park. Well, stop thinking that! It ain't true! As it happens, there are a number of very simple things done by the H8 that are a real pain to get right in these modern, enlightened times. Here's the short list.
Time
Version 5 of the emulator does a good job of emulating the actual speed of an H8 system when set to a 2mhz clock rate, if the host system is sufficiently fast (ref: Emulator Requirements).
However, when you drag a window, browse a menu bar, or use a dialog box in a Mac application, the application will get no processor time at all. The only way to maintain a proper emulation environment is to define this time as being outside of the H8 universe. When the user is browsing the menu system, time stops as far as the H8 is concerned.
The emulated H8 clock runs a little slower than a real H8 clock: a real H8 used a 2.048mhz clock, while the one emulated here runs at an even 2mhz. Processor pacing was adjusted to compensate so that code run times are the same, but any code that looks at .TICCNT will need to be adjusted accordingly.
Terminal
The emulator provides complete functional emulation of the H-19 terminal using Heathkit-mode escape sequences. There are a few differences from a real H-19:
Sound
The H8's sound mechanism is crude at best. A bit in a PAM8 control register output is ANDed with a 1000Hz square-wave (produced by dividing the 2.048 MHz bus clock signal by 2048) and the result is sent to the speaker. This is effectively a timed burst of a 1000Hz tone. The key click is a four-cycle burst of tone, which your ear will perceive as a click. (Hardware information provided by Dave Wallace.)
On a modern Macintosh, we can't even come close to that level of crudity.
The limitations on any existing H8 software are that the attempts we all made to generate "music" using the internal speaker on the H8 by changing the frequency of the clicks, will absolutely not work here. If you've come to this emulator in the desperate hope of once again hearing an H8 squeak out "Mary Had a Little Lamb," I'm sorry to disappoint.
Keypad
On a real H8, eight of the front-panel keys return their value in the high-order four bits of the input port, and the other eight use the low-order four bits. This makes various two-key combinations possible. PAM8 uses two such combinations for its RTM/0 and RST/0 functions. Others were available to applications that chose to use them.
Since we have only one mouse, we can't support any two-key combinations at all. RTM/0 and RST/0 can be invoked by holding down the option key while clicking the # and / keys, respectively (ref: PAM/8 Operation).
Any existing program that uses two-key combinations will either have to be modified, or the emulator modified to support other two-key combinations using modifier keys.