EMU(1E)                                                   EMU(1E)

     NAME
          emu - Inferno emulator

     SYNOPSIS
          emu [ -gXsizexYsize ] [ -c[0-9] ] [ -d daemon ] [ -m[0-9] ]
          [-s] [ -ppool=maxsize ] [ -ffont ] [ -rrootpath ] [-7] [
          -Cchannel ] [ -S ] [ -v ] [ cmd [ arg ... ] ]

     DESCRIPTION
          Emu provides the Inferno emulation environment.  The emula-
          tor runs as an application under the machine's native oper-
          ating system, and provides system services and a Dis virtual
          machine for Inferno applications.

          Emu starts an Inferno initialisation program
          /dis/emuinit.dis, whose path name is interpreted in the
          Inferno file name space, not in the native operating
          system's name space.  It in turn invokes the shell
          /dis/sh.dis by default or the optional cmd and its argu-
          ments.  If the -d option is specified, emu instead invokes
          daemon, turning the emu instance into an Inferno service
          process on the network, running the given daemon service or
          services.

          The emulator supports the following options:

          -cn  Unless specified otherwise by the module (see wm/rt in
               wm-misc(1)), emu uses an interpreter to execute Dis
               instructions.  Setting n to 1 (the default value is 0)
               makes the default behaviour to compile Dis into native
               instructions when a module is loaded, resulting in fas-
               ter execution but larger run-time size.  Setting n to
               values larger than 1 enables increasingly detailed
               traces of the compiler.

          -d daemon
               Run emu as a server, invoking daemon instead of
               /dis/emuinit.dis, and disabling input from cons (see
               cons(3)).

          -gXsizexYsize
               Define screen width and height in pixels.  The default
               values are 640x480 and the minimum values are 64x48.
               Values smaller than the minimum or greater than the
               available display size are ignored.

          -ffont
               Specify the default font for the tk module.  The path
               is interpreted in the Inferno name space.  If unspeci-
               fied, the font variable has value

     Page 1                       Plan 9            (printed 12/22/24)

     EMU(1E)                                                   EMU(1E)

               /fonts/lucm/unicode.9.font.

          -rrootpath
               Specify the host system directory that emu will serve
               as its root.  The default value is /usr/inferno on most
               systems, but \inferno on Windows.

          -s   Specify how the emulator deals with traps reported by
               the operating system.  By default, they suspend execu-
               tion of the offending thread within the virtual machine
               abstraction.  The -s option causes emu itself to trap,
               permitting debugging of the broken host operating sys-
               tem process that results when a trap occurs.  (This is
               intended to allow debugging of emu, not Inferno appli-
               cations.)

          -ppool=maxsize
               Specify the maximum size in bytes of the named memory
               allocation pool.  The pools are:

               main    the general malloc arena

               heap    the Dis virtual machine heap

               image   image storage for the display

          -7   When host graphics is provided by X11, request a 7-bit
               colour map; use this option only if X11 refused to
               allow emu to configure the normal (default) 8-bit
               Inferno colour map.

          -C channel
               Use the given channel for the display if possible. For
               example, k8 gives 8 bit greyscale. See image(6) for the
               full range of channel descriptors.

          -S   Force stylus input behaviour for Tk mouse events:
               motion events are received only when a button is down
               (just as a stylus produces no events until it touches
               the screen).  This option only affects the behaviour of
               Tk mouse events, it does not affect the behaviour of
               /dev/pointer as described in cons(3).

          -v   Print version data: edition and revision date.

          Options may also be set in the host operating system's envi-
          ronment variable EMU; they are overridden by options sup-
          plied on the command line.

          Emu finds the host system directory that will serve as its
          Inferno root directory as the last value found as follows:
          it is the value built-in to the executable, by default; or

     Page 2                       Plan 9            (printed 12/22/24)

     EMU(1E)                                                   EMU(1E)

          the value of the host system's environment variable INFERNO;
          or the value of the environment variable ROOT; or the value
          of a -r option in the environment variable EMU; or the
          rootpath set by a -r option to the emu command itself.

     EXAMPLE
          To start wm/logon directly:

               EMU='-g800x600 -c1'
               emu /dis/wm/wm.dis wm/logon -u inferno

     FILES
          /dis/emuinit.dis  The default initialisation program.
          /dis/sh.dis       The default Inferno shell.

     SOURCE
          /emu

     SEE ALSO
          limbo(1), wm-misc(1)

     Page 3                       Plan 9            (printed 12/22/24)