Warning: This is alpha-quality software. Don't count on it for anything. Use it at your own risk.
While these assembled machine emulations will likely never be as fast as a single program designed from the beginning to emulate a specific machine, the standard module interfaces should be reasonably fast. Even though the best abstract interfaces still introduce overhead and can't always express certain optimization hints, reusability will always save a lot of development time, and performance problems can be addressed by faster hardware.
http://csail.mit.edu/~fredette/tme/tme-0.8.tar.gz
tme can build without any third-party libraries or programs. However:
Note: the emulator is normally built out of plugin modules dlopen'ed at runtime. If you intend to install the emulation software under /usr/pkg or /usr/local, as long as your LD_LIBRARY_PATH includes the relevant lib/ directory, everything should just work.
If you want to use the emulator without installing it, however, you should use the --disable-shared option when running configure, to build a statically-linked emulator that will do no dlopening. However, to run a statically-linked, uninstalled emulator, you must have the environment variable LTDL_LIBRARY_PATH set to the top of your build tree.
If your system has GTK but uses pkg-config instead of a gtk-config script, put the following gtk-config script somewhere in your PATH and make it mode 0555:
#! /bin/sh module=`pkg-config --list-all | egrep '^gtk\+?-' | head -1 | sed -e 's/^\(.[-a-z0-9_\+\.]*\).*$/\1/'` if test "x${module}" = x; then echo "$0: no gtk under pkg-config control" 1>&2 exit 1 fi args= for option do if test "${option}" = --version; then option=--modversion fi args="${args} ${option}" done exec pkg-config ${args} ${module}
This is necessary because I make tme's configure script with an ancient gtk.m4, that predates pkg-config.
Otherwise, this is a regular autoconf package, so do something like:
% sh ./configure % makeAssuming the build succeeds, if you do want to install the emulator, then do a make install. The rest of this documentation assumes that you have installed the emulator under /usr/pkg. If you don't install the emulator, you'll have to find the programs and files that are referenced in the documentation in the build tree.
The only Ethernet access method currently supported by tme is the Berkely Packet Filter (BPF), usually available on BSD-based systems. If you want the emulator to be visible on your local Ethernet, the emulator must be able to open a bpf(4) device for reading and writing.
Normally, /dev/bpfN devices can only be opened by root, so you have one of two choices:
On POSIX-like systems, tme can connect the real serial lines
and pseudoterminals on your host to emulated serial lines. This is
always done with the tme/host/posix/serial module, which
takes a device argument with the name of any tty(4)
device you want it to use.
Usually, permissions prevent the user running the emulator from connecting
to the real serial lines in the host. So, you have one of two choices:
Pseudoterminals generally don't have restrictive permissions, so they
may be a more suitable choice for connecting to emulated serial ports.
You can use one side of a pty(4) pseudoterminal pair with
the tme/host/posix/serial module, however you must specify
exactly which side of which pair you want to use - the emulator won't
find a free pseudoterminal at runtime.
You should then be able to use any serial communications program -
like tip(1) - on the other side of the pseudoterminal pair to
access the serial data. For example, I can have the emulator connect
/dev/ttyr0 to the first emulated serial port on an otherwise
headless Sun 2, and with the following entry added to
/etc/remote I can use tip sun2 to connect to the Sun
2's serial console:
Serial line access on POSIX-like systems
sun2:dv=/dev/ptyr0:br#9600:pa=none:dc:
The different emulations
These pages describe how to use tme to emulate various machines and operating systems.
Emulate a Sun 2/120 running NetBSD
tme can emulate a Sun 2/120 running NetBSD. Read the instructions here.
Emulate a Sun 3/150 running NetBSD
tme can emulate a Sun 3/150 running NetBSD. Read the instructions here.
Emulate a SPARCstation 2 running NetBSD
tme can emulate a SPARCstation 2 running NetBSD. Read the instructions here.
Emulate a Sun Ultra 1 running NetBSD
tme can emulate a Sun Ultra 1 running NetBSD. Read the instructions here.