Re-compiling the Code

Compiler Requirements
Where things belong
Options in the code you can play with

Compiler Requirements

The Virtual H8 code is arranged as three Microsoft Visual C++ 5.0 projects. The code can therefore be directly compiled by using MSVC++ 5.0 or you may convert the projects to MSVC++ 6.0 and compile with that tool. I've confirmed that either version of the compiler will produce working code.

The code intended for execution under HDOS on the H8 is written for Toolworks C/80, version 3.0, though one program (disk_dump.c) can also be compiled with MSVC++ as a demo and is therefore included in the "code" subtree as well as the "etc" directory. I leave the process of getting the code onto an H-17 floppy as an exercise to the student. (Hint: the solution is spelled H-Y-P-E-R-T-E-R-M-I-N-A-L.)

back to top

Where things belong

I refer you to the "packing list" in RELEASE_NOTES.TXT for exact details. But in general, the Virtual H-8 package "lives" in the directory "c:\h8" and in subdirectory structure under that. The source code and project files are in the subdirectory "code" and the executables built by compiling will overwrite those in the "c:\h8" directory, unless you modify the project files.

In detail, the "code" subtree is organized as follows:

  c:\h8			-- root of the whole package
	etc		-- C code in Toolworks C/80 for H8 programs 
	code		-- C++ source code for the simulator
	    common	-- common modules used by all applications
		include	-- header files for common modules
		src	-- source for common modules
	    disk_dump	-- diskette dump (demo) project
	    virtual_h8	-- the simulator project
	    tapeui	-- the tape cassette UI "satellite app" project

back to top

Options in the Code You can Play With

If you have the courage to re-compile the code, here are some places where you can do editing and get nifty results:

  1. Line 39 of ioproc.cpp in the Virtual_h8 project: allows you to re-define the simulated time rate. This line presently sets TAU to 2, making the simulator run half as fast as a real H8. If your PC is faster than (approximately) a Pentium II clocked at 333 MHz, try changing this to 1.
  2. Line 27 of globals.h in the Virtual_h8 project: if you comment out this #define, the graphical character set will include about a dozen more glyphs (most of which are only useful if you are trying to write in Hawaiian, but that's another hobby of mine) and the terminal will understand the Z-100 escape sequences to set foreground and background color.
  3. Line 92 of virtual_h8.h: I've not attempted this, but try changing the class of m_Processor from "Z80" to "I8080". If you have access to an H8 but it doesn't sport a Z80 CPU card, this should revert the virtual h8 to a "classic 8080A" CPU with the Extended Configuration option. You'll need a copy of the XCON-8 flavor of the front panel code, but dumppam will still allow you to get it -- it will just read more data than needed. You'll also have to design new key-tops for the front-panel buttons. This should be a fun project, but not for the faint-of-heart.

back to top


Copyright (c) 2001 - 2003 by David A. Wallace