SimH

From Tech Tangents
Revision as of 17:25, 3 March 2025 by Akbkuku (talk | contribs)
Jump to navigation Jump to search

simH is a computer system simulation platform similar to how MAME works. It can be used to run older software or gain more familiarity with the simulated systems.

Compiling - Linux

While some package managers may have simH included, for niche projects like this I will always recommend building directly from the source.

The official directions to compile the software are fairly good. These are the commands I used from the root of the project for compiling on my Ubuntu system:

sh .travis/deps.sh linux
cmake/cmake-builder.sh --flavor unix

Before doing this I had installed cmake and the libvdeplug-dev and libpcre3-dev packages, but I believe the deps script would have handled that had I not.

Usage

Host Level

simH starts as an interactive shell before starting the computer simulation. You can see all available commands with help and exit the shell with the q or quit command. The shell supports tab completion for host filenames and unique shorthands for commands (example, CAT can be run with CA). There are commands for working at the host level available in this shell that mimic the respective UNIX/Linux and DOS/Windows commands. Here are just some of them to give you an idea:

  • ls / DIR
  • cp / COPY
  • pwd
  • cat / TYPE
  • echo

Any command not available in simH's shell natively can be directly run on the host using the ! command prefix. For example ! vim config.simh would open the vim editor with the specified file in the simH shell. Quiting vim returns to the simH shell.

Scripting

There are more advanced logic commands such as IF statements available as well that can be used with a launch script with simH. For built in help with commands like these you can run help if to see more information. You can end the help menu with exit.

To run a script from within the simH shell you can use the DO command followed by the script name, ensure you are in the correct directory on the host to access it.

Here is an example script:

help-dir.simh

help
echo The above are all available commands. The following is your current host path.
pwd

This would be run with do help-dir.simh and will print the built in help, some text, and your current path.

Simulation Configuration