This page was last updated on 07/14/2001
Turing's Theorem
Rev 2, 07/14/2001
Turing's theorem states that a [finite-state automaton] can be constructed such that it will be able to simulate any other [finite-state automaton]. This applies equally to computer hardware and also to computer programs, since both are examples of FSA's. So by this theorem any computer can be programmed so that it behaves like the hardware of and can execute the instruction set for any other computer. And the theorem makes no distinction between whether you are using a complex computer to simulate a simple one or a simple computer to simulate a complex one. (Of course, the theorem doesn't say anything about how fast...)
Go twenty years back up the time axis and you discover that a computer system of that time was simple enough and slow enough so that today's computer system can not only simulate it, but can do it in real-time (or nearly). This is why the Virtual H-8 project exists today: a reasonably powerful PC running not-terribly-optimized code can simulate a Z-80 microcomputer running at 2 MHz.
There's been a lot of buzz lately about the concept of a "virtual machine". Various pundits define it various ways. In the Virtual H-8 project, the simulation is at the level of the schematics and processor instruction set -- the software actually does, in some places at least, simulate a set of gates and flip-flops. Where the simulation is inexact it is because of lack of information (I don't have a gate-level model for a Z-80, for example, so I simulate it at the level needed to execute its machine language.) or because an exact simulation would be impractically slow and taking a shortcut would not affect the fidelity of the simulation (e.g.: the simulation of a UART-to-UART serial connection does not involve actually sending start, stop and data bits serially).
Back to Top
Why an H-8?
Rev 1, 05/12/2001
I chose the Heathkit H-8 for three reasons. First, I own one and it is in running condition. That means I can debug the simulation by comparing its behavior to the actual machine. Second, of all of the computers of the era, the H-8 was the most well-documented. I have all the specifications, schematics, program listings, operating instructions, ROM content, etc., etc. This makes it easy to develop a simulation. Finally, I thought it would be neat to run a C compiler under Windows NT that didn't take a couple of dozen megabyte of memory to execute in. The Toolworks C/80 compiler for HDOS needed only 56k bytes of memory space -- my simulator (so far) needs only 2800k bytes to simulate such a system.
Back to Top
Which H-8?
Rev 2, 07/14/2001
The H-8 evolved significantly over the years. So I had my choice from the simple 8080-based system with audio tape that was the way I first bought the machine up to the configuration I had evolved to when I retired the machine: a Z-80 with an H-67 hard drive, three H17 hard-sectored floppies and an H-37 soft-sectored floppy. I picked something in the middle: a Z-80 processor, but the simple 100k byte hard-sectored floppy disk storage devices. Since the floppies would be virtual (files under Windows NT), simulating three 100k floppy drives would be nearly as convenient as simulating the H-67 hard drive -- and would probably require a whole lot less programming! The Z-80 would be necessary in order to achieve my goal of running the Toolworks C compiler, since that program needed the Z-80's instruction set.
Back to Top