header

FAQ Index

  1. How to import/export files into/from the simulator environment?
  2. How to use a program which requires a VT100?
  3. Why is terminal output so slow?
  4. The simulation appears to do nothing but my real CPU is running at full steam. What can I do?
  5. How to use MP/M with multiple consoles?
  6. How to set the clock rate of the simulated CPU?
  7. How to compile the simulator from the sources (PC)?
  8. How to compile the simulator from the sources on LINUX?
  9. How to compile the simulator from the sources (Macintosh OS X)?
  10. How to compile the simulator from the sources (UNIX)?
  11. How to compile the simulator from the sources (Macintosh OS 9.x)?
  12. I get a "file open error" although all files exist in the simulator directory
  13. My screen editor uses ^E (Control E) for cursor control but this stops the simulator. How can I change this?

How to import/export files into/from the simulator environment?

On the CP/M 2.2 disk you find the programs R.COM and W.COM. With the CP/M command "R XYZ.COM" you can transfer the file XYZ.COM from your local directory into the simulator environment. The command "W XYZ.TXT" does the opposite, i.e. the text file XYZ.TXT is transferred from the CP/M disk to your local directory. "W XYZ.COM B" transfers the file XYZ.COM in binary mode.

In case you need to transfer multiple files you can use wildcard characters or alternatively you can create a batch file containing the necessary commands. Execute the batch file using DO.COM (this is the same program as SUBMIT.COM).

How to use a program which requires a VT100?

Some CP/M applications such as WordMaster (WM.COM) require a terminal with cursor addressing capabilities. The VT100 terminal is a typical example and most CP/M programs with nontrivial console output have been customized for the VT100.

The recommended way for using the VT100 capabilities is as follows:

  1. Boot CP/M (or any other operating system) as usual
  2. Type ^E (Control E) to stop the simulator
  3. Type "ATTACH SIO 23" and confirm with the return key. Port 23 is the default port for Telnet sessions and you need to make sure you have the necessary permissions to create a socket on this port. If not, you must run the simulator as "root" or with the sudo command or use another port.
  4. Type "GO" and confirm with the return key
  5. Start Telnet or PuTTY (Windows). On Windows (all versions) PuTTY is recommended due to issues with the provided Telnet client. The configuration of PuTTY should look like PuTTY
  6. Connect Telnet (resp. PuTTY) to 127.0.0.1 and make sure you specify the port you chose in section 3 if you are using a port different from port 23.

Now you can execute all commands in the Telnet (resp. PuTTY) terminal window which supports VT100 emulation.

Why is terminal output so slow?

In order to reduce CPU load in keyboard polling, the simulator waits for a short period (100 microseconds on UNIX, 1 millisecond on Windows) when the simulated program checks for an input character but none is available. Sometimes this has the undesirable side effect of slowing down output as there are often tests for keyboard input to stop the output. You can disable the waiting by issuing "set sio nosleep" at the command prompt or including this statement in the startup file.

The simulation appears to do nothing but my real CPU is running at full steam. What can I do?

Often the simulated program does not appear to do anything useful (e.g. it just displays an input prompt) but the real CPU is fully loaded. This is often caused by keyboard polling routines which constantly check a port whether a character is available. This can be avoided by issuing the the command "set sio sleep" at the command prompt or including this statement in the startup file. Please note that enabling this sleep might degrade overall performance (see this question). You can also fine tune the time to sleep after an unsuccessful keyboard poll with the command "d sleep <n>" where <n> denotes the time in microseconds (UNIX, default is 100) respectively milliseconds (Windows, default 1).

How to use MP/M with multiple consoles?

Within the simulator, execute the SIMH command file "mpm" which comes with the MP/M disk. This command file includes the command "ATTACH SIO 23" and you can Telnet to 127.0.0.1 as described above. In the first Telnet terminal window, execute the CP/M command "MPM" to start MP/M. Now you can create up to three additional Telnet sessions to 127.0.0.1.

How to set the clock rate of the simulated CPU?

If you use the simulator "as is" it will run at maximum speed which can easily correspond to a 100 MHz Z80 or 8080 CPU. Since some programs, in particular games, expect a CPU running, e.g., at 4 MHz, you can set the clock rate manually in KHz increments. At the simh> prompt type "d clock 4000" to set the clock rate of the simulated CPU to 4000 KHz, i.e. to 4 Mhz. You can return to maximum speed by issuing "d clock 0".

How to compile the simulator from the sources (PC)?

In case you do not have a favorite C development environment, here is how to do it with MINGW.

  1. Install the MINGW environment (available from www.mingw.org)
  2. Unpack all sources into a separate directory
  3. Make sure that the MINGW programs are in your search patch
  4. Execute "make -f makefile_windows"

How to compile the simulator from the sources on LINUX?

The following assumes that you have installed a C development environment.

  1. Start the terminal program
  2. Unpack all sources into a separate directory
  3. Execute "make -f makefile_linux"
  4. Execute "./altairz80" to start the simulator

How to compile the simulator from the sources (Macintosh OS X)?

The following assumes that you have installed the Apple Developer Tools which come as part of the OS X distribution (resp. you have a C development environment with GCC available).

  1. Start the terminal program
  2. Unpack all sources into a separate directory
  3. Execute "make -f makefile_macintosh"
  4. Execute "./altairz80" to start the simulator

How to compile the simulator from the sources (UNIX)?

The following assumes that you have installed a C development environment with GCC available.

  1. Start the terminal program
  2. Unpack all sources into a separate directory
  3. Execute "make -f makefile_unix"
  4. Execute "./altairz80" to start the simulator

How to compile the simulator from the sources (Macintosh OS 9.x)?

You need the MetroWerks CodeWarrior development environment and GUSI to obtain socket support under OS 9.x. Create a regular C project which contains all sources and build an appropriate GUSI library to be included as well.

I get a "file open error" although all files exist in the simulator directory

Make sure that all .dsk files are writable and not accidentally read-only. Sometimes decompressing the zip-archive results in files with read-only permissions.

My screen editor uses ^E (Control E) for cursor control but this stops the simulator. How can I change this?

You can change the interrupt character with "d wru <new value>". where <new value> is the ASCII character code of the new interrupt character. You could use "d wru 1d" which sets the interrupt character to Control ] but be sure that you can actually can create this character via the keyboard. The current value of the interrupt character can be examined with "e wru".