<?xml version="1.0"?>
<!DOCTYPE webpage
  PUBLIC "-//NetBSD//DTD Website-based NetBSD Extension//EN"
	 "http://www.NetBSD.org/XML/htdocs/lang/share/xml/website-netbsd.dtd" [
]>

<webpage id="ports-emulators">
<config param="desc" value="Running NetBSD on emulators"/>
<config param="cvstag" value="$NetBSD: emulators.xml,v 1.19 2011/12/09 15:09:23 tsutsui Exp $"/>
<config param="rcsdate" value="$Date: 2011/12/09 15:09:23 $"/>

<head>
<title>Running NetBSD on emulated hardware</title>
</head>

<sect1 role="toc">

<sect2 id="about">
  <title>About NetBSD on emulators</title>

  <sect3 id="intro">
    <title>Introduction</title>

    <para>If you are developer of embedded applications, or if you
      need to demonstrate or test your software on hardware platform
      that is not available for some reason, you definitively need
      a software emulator. Sometimes emulator becomes even an
      ultimate solutions allowing to run whole computer networks
      on the single machine. At last, you may want to see (just for
      fun) how have performed such dinosaurs as old good PDPs and
      VAXes.</para>

    <para>This document is intended to describe where to find
      deserving equivalents of various hardware in order to set up
      and running NetBSD Operating System.</para>
  </sect3>

  <sect3 id="setup">
    <title>How to setup NetBSD on an emulator</title>

    <para>An answer to this question mainly depends on which
      emulator you use. Very often an emulator's home site contains
      all information you may need to setup a guest operating system,
      including NetBSD. Please refer to <xref linkend="emulators"/>
      for details.</para>
  </sect3>

  <sect3 id="ports-emulators">
    <title>NetBSD ports and emulators matrix</title>

    <para>In the table below <literal>Yes</literal> means complete
      support of latest NetBSD release available (or referred in
      parentheses). <literal>Untested</literal> state means that
      it should be possible to use NetBSD on this particular
      platforms, but this was not confirmed yet. <literal>Almost</literal>
      refers to cases, when some troubles were found during testing.
      Please see also footnotes for details.</para>

    <informaltable frame="all">
      <tgroup cols="11" align="center">
      <thead>
      <row>
      <entry>Ports \ Emulators</entry>
      <entry><xref linkend="bochs"/></entry>
      <entry><xref linkend="gxemul"/></entry>
      <entry><xref linkend="pearpc"/></entry>
      <entry><xref linkend="qemu"/></entry>
      <entry><xref linkend="simh"/></entry>
      <entry><xref linkend="simics"/></entry>
      <entry><xref linkend="ski"/></entry>
      <entry><xref linkend="tme"/></entry>
      <entry><xref linkend="giano"/></entry>
      <entry><xref linkend="xm6i"/></entry>
      </row>
      </thead>

      <tbody>
      <row>
      <entry role="theader"><port>algor</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes</entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>amd64</port></entry>
      <!-- bochs	--><entry>Untested</entry>
      <!-- gxemul	--><entry></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry>Yes</entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry>Yes</entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>arc</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes</entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry>Almost<footnote id="arc-qemu">
	<para>NetBSD/arc 5.0.2 on qemu gets panic on
	heavy SCSI disk load.</para>
	</footnote></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>cats</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes</entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>cobalt</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes</entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>dreamcast</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes<footnote id="dreamcast-gxemul">
	<para>Ramdisk kernel or a Live CD required. root-on-NFS is not
	      possible yet.</para>
	</footnote></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>emips</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry>Yes</entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>evbarm</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes<footnote id="evbarm-gxemul">
	<para>Latest working version is NetBSD 2.1; problem is in
	  GXemul's ARM emulation.</para>
	</footnote></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>evbmips</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes<footnote id="evbmips-gxemul">
        <para>gxemul emulates Malta.</para></footnote></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>hpcmips</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes</entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>i386</port></entry>
      <!-- bochs	--><entry>Yes</entry>
      <!-- gxemul	--><entry></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry>Yes</entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>ia64</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry>Experimental<footnote id="ia64-ski">
	<para>Used as platform for <ulink url="ia64/">NetBSD/ia64</ulink>
	port development.</para></footnote></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>landisk</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes</entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>macppc</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes</entry>
      <!-- pearpc	--><entry>Almost<footnote id="macppc-pearpc">
	<para>Crashes while booting.</para>
	</footnote></entry>
      <!-- qemu		--><entry>Untested</entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>netwinder</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes</entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>pmax</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes</entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>pmppc</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes</entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>prep</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes<footnote id="prep-gxemul">
	<para>Latest working version is NetBSD 2.1; NetBSD 3.x failed
	  with disk controller problems.</para>
	</footnote></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry>Untested</entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>sgimips</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry>Yes</entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>sparc</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry>Yes</entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry>Yes</entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>sparc64</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry>Yes</entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry>Yes</entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>sun2</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry>Yes</entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>sun3</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- pearpc	--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry>Yes</entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>vax</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry>Yes</entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry>Yes</entry>
      <!-- xm6i		--><entry></entry>
      </row>

      <row>
      <entry role="theader"><port>x68k</port></entry>
      <!-- bochs	--><entry></entry>
      <!-- gxemul	--><entry></entry>
      <!-- pearpc	--><entry></entry>
      <!-- qemu		--><entry></entry>
      <!-- simh		--><entry></entry>
      <!-- simics	--><entry></entry>
      <!-- ski		--><entry></entry>
      <!-- tme		--><entry></entry>
      <!-- giano	--><entry></entry>
      <!-- xm6i		--><entry>Yes</entry>
      </row>
      </tbody>
      </tgroup>
    </informaltable>
  </sect3>

</sect2>

<sect2 id="emulators">
  <title>Software emulators</title>

  <sect3 id="bochs" xreflabel="bochs">
    <title>Bochs</title>
    <para>The program
      <ulink url="http://bochs.sourceforge.net/">bochs</ulink>
      is a highly portable open source x86
      PC emulator written in C++, and runs on most popular platforms.
      It includes emulation of the Intel x86 CPU, common IO devices,
      and a custom BIOS.  Currently, bochs can be compiled to
      emulate a 386, 486, Pentium, Pentium PRO or AMD64 CPU.</para>
    <para>Packaged as <filename role="pkg">emulators/bochs</filename>.</para>
  </sect3>

  <sect3 id="gxemul" xreflabel="gxemul">
    <title>GXemul</title>
    <para><ulink url="http://gxemul.sourceforge.net/">GXemul</ulink>
      is a machine emulator. The initial goal was to
      write a simple 64-bit MIPS emulator for running multiprocessor
      experiments with a microkernel, but the emulator can be used
      for many other things. While some simulators only simulate
      a CPU, GXemul also simulates other hardware components, making
      it possible to use the emulator to run unmodified operating
      systems, such as NetBSD, OpenBSD, or Linux.</para>
    <para>Packaged as <filename role="pkg">emulators/gxemul</filename>.</para>
  </sect3>

  <sect3 id="qemu" xreflabel="qemu">
    <title>QEMU</title>
    <para><ulink url="http://fabrice.bellard.free.fr/qemu/">QEMU</ulink>
      is a FAST! processor emulator using dynamic translation
      to achieve good emulation speed, QEMU has two operating modes:
      <itemizedlist>
	<listitem>Full system emulation. In this mode, QEMU emulates
	  a full system (for example a PC), including a processor
	  and various peripherals.  It can be used to launch different
	  Operating Systems without rebooting the PC or to debug
	  system code.</listitem>
	<listitem>User mode emulation (Linux host only). In this
	  mode, QEMU can launch Linux processes compiled for one
	  CPU on another CPU. It can be used to launch the Wine
	  Windows API emulator or to ease cross-compilation and
	  cross-debugging.</listitem>
      </itemizedlist>
    </para>
    <para>Packaged as <filename role="pkg">emulators/qemu</filename>.</para>
  </sect3>

  <sect3 id="pearpc" xreflabel="pearpc">
    <title>PearPC</title>
    <para><ulink url="http://pearpc.sourceforge.net/">PearPC</ulink>
      is an architecture-independent PowerPC platform
      emulator capable of running most PowerPC operating systems.</para>
    <para>Packaged as <filename role="pkg">emulators/pearpc</filename>.</para>
  </sect3>

  <sect3 id="simh" xreflabel="simh">
    <title>SIMH</title>
    <para><ulink url="http://simh.trailing-edge.com/">SIMH</ulink>
      is Bob Supnik's historical computer simulator, including:
      altair altairz80 eclipse gri h316 hp2100 i1401 i1620 ibm1130
      id16 id32 nova pdp1 pdp10 pdp11 pdp15 pdp4 pdp7 pdp8 pdp9 s3
      sds vax. See <ulink url="vax/emulator-howto.html">NetBSD SIMH
      HOW-TO</ulink> for instructions on how to install NetBSD/vax
      on simh.</para>
    <para>Packaged as <filename role="pkg">emulators/simh</filename>.</para>
  </sect3>

  <sect3 id="ski" xreflabel="ski">
    <title>Ski</title>
    <para><ulink url="http://www.hpl.hp.com/research/linux/ski/">Ski</ulink>
      is an HP-proprietary instruction-set simulator for
      the IA-64 (Itanium Processor Family, IPF) architecture and
      is intended primarily for application- and kernel-level
      software development.</para>
    <para>Packaged as <filename role="pkg">emulators/ski</filename>.</para>
  </sect3>

  <sect3 id="tme" xreflabel="tme">
    <title>The Machine Emulator</title>

    <para><ulink url="http://people.csail.mit.edu/fredette/tme/">The
      Machine Emulator</ulink>, or tme, is a program that provides
      a general-purpose framework for computer emulation. The first
      machine that tme could emulate was the
      <ulink url="http://people.csail.mit.edu/fredette/tme/sun2-120-nbsd.html">Sun 2/120</ulink>,
      one of the first widely available Sun workstations.
      Currently, it includes support for
      <ulink url="http://people.csail.mit.edu/fredette/tme/sun3-150-nbsd.html">Sun 3/150</ulink>,
      <ulink url="http://people.csail.mit.edu/fredette/tme/sun4-75-nbsd.html">SPARCstation 2</ulink>
      and
      <ulink url="http://people.csail.mit.edu/fredette/tme/sun-u1-nbsd.html">Ultra 1</ulink>
      as well. Note arthur's
      <ulink url="http://www.ilvsun3.com/">ILVSUN3</ulink>
      page has various useful information about
      <ulink url="http://people.csail.mit.edu/fredette/tme/">TME</ulink>.</para>
    <para>Packaged as <filename role="pkg">emulators/tme</filename>.</para>
  </sect3>

  <sect3 id="simics" xreflabel="simics">
    <title>Wind River Simics simulator</title>
    <para>Software developers writing code for non-desktop systems
      often face a problem: on what do they run their code to test
      and debug it? <ulink
      url="http://www.windriver.com/products/simics/">Simics
      Developer</ulink> makes it possible to run any electronic
      system on the developer's desktop machine. This is true for
      small embedded systems, million dollar enterprise servers or
      complex clustered multiprocessor systems.</para>
    <para>Commercial product.</para>
  </sect3>

  <sect3 id="giano" xreflabel="giano">
    <title>Microsoft Giano</title>
    <para><ulink
      url="http://research.microsoft.com/en-us/projects/giano/">Giano</ulink>
      is a full-system simulator capable of simulating an arbitrary
      system.  The hardware configuration simulated by Giano is
      specified using PlatformXML.  The default installation comes
      with a number of demonstration configurations, including
      systems based on eMIPS and VAX.
      See <ulink url="http://wiki.NetBSD.org/users/ryoon/how_to_install_netbsd_emips_current_to_microsoft_giano/">How
      to install NetBSD/emips-current to Microsoft Giano wiki</ulink>
      for instructions of NetBSD/emips on Giano.
    </para>

    <para>Source and binaries are available for non-commericial use.
      Giano requires a Windows-based host.</para>
  </sect3>

  <sect3 id="xm6i" xreflabel="xm6i">
    <title>XM6i</title>
    <para><ulink
    url="http://xm6i.org/">XM6i</ulink> is a cross platform X68000/X68030
    emulator. XM6i is based on X68000 emulator
    <ulink url="http://yohkai.no-ip.info/x680x0/XM6.htm">XM6</ulink>,
    but XM6i also supports MC68030 MMU and it's developed to run NetBSD/x68k
    on it.
    See instructions in <ulink
    url="http://www.ceres.dti.ne.jp/tsutsui/netbsd/x68k/NetBSD-x68k-on-XM6i.html">NetBSD/x68k on XM6i ver 0.31</ulink>
    page (in Japanese) for more details.</para>
    <para>Currently Microsoft Windows, <ulink
    url="http://www.youtube.com/watch?v=GKApBgywNFQ">NetBSD/i386</ulink> 5.1,
    and <ulink url="http://www.youtube.com/watch?v=SR25wz4AgRU">Mac OS X
    10.6</ulink> binaries are <ulink
    url="http://xm6i.org/download.html">available</ulink>.
    </para>
  </sect3>

</sect2>

</sect1>

</webpage>

