<?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-dreamcast-faq">
<config param="desc" value="NetBSD/dreamcast faq"/>
<config param="cvstag" value="$NetBSD: faq.xml,v 1.3 2009/09/18 00:25:17 snj Exp $"/>
<config param="rcsdate" value="$Date: 2009/09/18 00:25:17 $"/>
<head>

<!-- Copyright (c) 1996-2005
        The NetBSD Foundation, Inc.  ALL RIGHTS RESERVED. -->

<title>NetBSD/dreamcast Frequently Asked Questions</title>
</head>

<qandaset id="dreamcast-faq" defaultlabel="number">
<qandadiv id="background">
<title>Background</title>

<qandaentry id="port-origins">
  <question id="port-origins-q"><para>Where did the Dreamcast port come from?</para>
  </question>
  <answer><para>
  It was spun off from the <ulink url="../evbsh3/">NetBSD/evbsh3</ulink>
  port by Marcus Comstedt after Saitoh Masanobu managed to boot the evbsh3
  code on a Dreamcast console.
  </para>
  </answer>
</qandaentry>

<qandaentry id="why-dreamcast">
  <question id="why-dreamcast-q"><para>Why run NetBSD on Dreamcast?</para>
  </question>
  <answer><para>
  There have been many answers to this question, but I believe it has been best
  summed up in some posts to the mailing list:
<ulink url="http://mail-index.NetBSD.org/port-dreamcast/2002/01/27/0004.html">Drew Vogel</ulink>
<ulink url="http://mail-index.NetBSD.org/port-dreamcast/2002/01/26/0004.html">Andy R</ulink>
<ulink url="http://mail-index.NetBSD.org/port-dreamcast/2002/01/27/0011.html">Miles Nordin</ulink>
  </para>
  </answer>
</qandaentry>
</qandadiv>

<qandadiv id="hardware">
<title>Hardware</title>
<qandaentry id="cd-r-bootable">
  <question id="cd-r-bootable-q"><para>Can all Dreamcast consoles boot from CD-R?</para>
  </question>
  <answer><para>
  The <quote>Sakura Wars Limited Edition</quote> is known to be incapable
  of booting from CD-R.  There may be others also. It has often been stated
  that consoles made before October 2000 will not work, but there is little
  definite proof of this.
  </para>
  </answer>
</qandaentry>

<qandaentry id="cd-rw-bootable">
  <question id="cd-rw-bootable-q"><para>Can any Dreamcast consoles boot from CD-RW?</para>
  </question>
  <answer><para>
  There have been unsubstantiated rumours that a very small subset of
  Dreamcast consoles are capable of booting from CD-RW without modification.
  Many others are capable of this with internal modification to the console.
  </para>
  </answer>
</qandaentry>

<qandaentry id="what-is-bba">
  <question id="what-is-bba-q"><para>What is the Broadband Adapter?</para>
  </question>
  <answer><para>
  Often abbreviated as <quote>BBA</quote>, the Broadband Adapter is
  10/100Mbit Ethernet module that replaces the console's modem.  It is
  driven by a Realtek 8139 chip that runs from a PCI bus in the Broadband
  Adapter.  The PCI bus is then translated into the console's native G2 Bus.
  </para>
  </answer>
</qandaentry>

<qandaentry id="where-is-bba">
  <question id="where-is-bba-q"><para>Where can I get a Broadband Adapter?</para>
  </question>
  <answer><para>
  That depends on how urgently you want one. If you're willing to wait,
  CSI, the company that manufactures them, is taking pre-orders at <ulink 
  url="http://www.ncsx.org/2002/ncs082602/ncs0826.htm">this site</ulink>;
  if they get 1,000 pre-orders, they'll make another batch and ship them.
  At $49 versus the $100+ they can cost elsewhere, it's a great deal; the
  only problem is that you will have to wait, and might not get one at all.
  </para>
  <para>
  For the more impatient, <ulink url="http://www.ebay.com/">eBay</ulink>
  is your best bet.
  You could also investigate the availability of the Dreamcast R7 console
  which is reported to have come with a Broadband Adapter pre-installed.
  Broadband Adapters are generally very difficult to find now that Sega
  has ended Dreamcast production.  As such, highly inflated prices are
  often seen, with many Broadband Adapters selling for greater than the
  cost of the console they are to be employed in.
  </para>
  </answer>
</qandaentry>

<qandaentry id="what-is-la">
  <question id="what-is-la-q"><para>What is the LAN Adapter?</para>
  </question>
  <answer><para>
  The LAN Adapter (HIT-0300) is essentially a Broadband Adapter with
  support for 10 Mbit rather than 10/100 Mbit Ethernet. It uses the
  MB86967 chip instead of the Broadband Adapter's Realtek 8139.
  </para>
  </answer>
</qandaentry>

<qandaentry id="where-is-la">
  <question id="where-is-la-q"><para>Where can I get a LAN Adapter?</para>
  </question>
  <answer><para>
  Some people have found the LAN Adapter more available than the actual
  Broadband Adapter but definitive sources of purchase are unavailable.
  It was produced exclusively for the Japanese market but has been known
  to be exported unofficially to other countries by third-parties.
  </para>
  </answer>
</qandaentry>

<qandaentry id="endian">
  <question id="endian-q"><para>Is the Hitachi SuperH SH-4 little or big endian?</para>
  </question>
  <answer><para>
  The Hitachi SuperH SH-4 CPU can be driven either little or big endian,
  but the Dreamcast port uses it in a little endian fashion.
  </para>
  </answer>
</qandaentry>

<qandaentry id="serial-buy">
<!-- XXX this entry needs to be updated -->
  <question id="serial-buy-q"><para>Where can I buy a serial cable for the Dreamcast?</para>
  </question>
  <answer><para>
  A listing of possible vendors can be found at the <ulink 
  url="http://dev.dcemulation.com/started-step2.htm#main">Dreamcast Emulation Developer</ulink>
  site.
  </para>
  </answer>
</qandaentry>

<qandaentry id="attach-hdd">
<!-- XXX dead links -->
  <question id="attach-hdd-q"><para>Can I attach a hard drive to the Dreamcast itself?</para>
  </question>
  <answer><para>
  Yes, check out <ulink
url="http://www.syncscroller.net/dc/dc-ide.html">DC IDE-HD Interface</ulink>
  and <ulink 
url="http://hw001.gate01.com/ikehara/dc/index.html">DREAMCAST DEVELOPMENT</ulink>
  pages. Note that this requires soldering and other such things that could
  <emphasis role="bold">completely fry</emphasis> your Dreamcast, so proceed
  with caution.
  </para>
  </answer>
</qandaentry>

</qandadiv>

<qandadiv id="bootable-cd">
<title>Bootable CDs</title>

<qandaentry id="where-images">
  <question id="where-images-q"><para>Where can I find a bootable NetBSD/dreamcast CD image?</para>
  </question>
  <answer><para>
  For a read-only filesystem, use this (very old) DiscJuggler 
  <ulink url="http://www.kirknet.net">image</ulink>. For a read/write
  filesystem, use Josh Tolbert's <ulink
url="http://members.wri.com/josht/dreamcast/dreamcast-kernel.tar.gz">kernel</ulink>
  (<ulink
url="http://www.schnarff.com/netbsd/dreamcast-kernel.tar.gz">mirror</ulink>).
  This will involve netbooting your system, and will give you a read/write
  filesystem.
  </para>
  </answer>
</qandaentry>

<qandaentry id="where-dj">
  <question id="where-dj-q"><para>Where can I find DiscJuggler?</para>
  </question>
  <answer><para>
  DiscJuggler is freely available (albeit in a crippled form, but still
  functional enough to burn the aforementioned images) from <ulink
url="http://www.padus.com/downloads/demo.php">http://www.padus.com/downloads/demo.php</ulink>.
  </para>
  </answer>
</qandaentry>

<qandaentry id="how-bootable-image">
  <question id="how-bootable-image-q"><para>That's great...now how do I make the actual CD?</para>
  </question>
  <answer><para>
  Follow the instructions on the <ulink url="howto.html">HOWTO</ulink>.
  </para>
  </answer>
</qandaentry>

<qandaentry id="quit-burning">
  <question id="quit-burning-q"><para>What if I don't want to burn a CD for each new kernel?</para>
  </question>
  <answer><para>
<!-- XXX dead link -->
  You'll want to follow the setup at <ulink 
url="http://members.wri.com/josht/dreamcast/ipslave.html">Josh Tolbert's Kernel Autoloader Guide</ulink>.
  </para>
  <para>
  You can also try &man.kloader.4;, which is in-kernel bootloader enabled
  by "options KLOADER" in kernel config.
  </para>
  </answer>
</qandaentry>

</qandadiv>

<qandadiv id="dreamcast-configuration">
<title>Dreamcast-Side Configuration</title>

<qandaentry id="how-set-ip">
  <question id="how-set-ip-q"><para>How do I set the IP address of the Dreamcast?</para>
  </question>
  <answer><para>
  Certain Dreamcast games can set the IP address, which is then stored by
  the console until changed. Similarly, the Broadband Passport browser
  software has this capability. However, the Dreamcast can be told its
  IP address once NetBSD has been booted and doesn't need the information
  prior to this. As such, the simplest solution is to edit the arp table
  from your NetBSD system like so:
  <screen>
    # arp -s <emphasis>dreamcast</emphasis> <emphasis>ethernet</emphasis>
  </screen>
  Where <quote><emphasis>dreamcast</emphasis></quote> is the desired IP
  address, say <literal>192.168.0.128</literal>,
  and <quote><emphasis>ethernet</emphasis></quote> is the hardware
  address of the Broadband Adapter, say
  <literal>00:00:de:ad:be:ef</literal> the command would be:
  <screen>
    # arp -s 192.168.0.128 00:00:de:ad:be:ef
  </screen>
  </para>
  </answer>
</qandaentry>

<qandaentry id="where-browser">
  <question id="where-browser-q"><para>Can I get a GD-ROM of the Dreamcast Browser to set the IP address?</para>
  </question>
  <answer><para>
<!-- XXX dead link -->
  Try <ulink
  url="http://newbrowser.sega.com/">http://newbrowser.sega.com/</ulink>.
  The chances of coercing this system into delivering anywhere outside the
  USA appear slim.
  </para>
  </answer>
</qandaentry>

</qandadiv>

<qandadiv id="swap-nfs-misc">
<title>Swap and Misc. Config</title>

<qandaentry id="swap-stable">
  <question id="swap-stable-q"><para>How stable is running swap over NFS?</para>
  </question>
  <answer><para>
  There is a fair amount of debate on this subject. The current
  quasi-consensus is that this it is basically stable, but that the
  low quality of the BBA can cause issues. Many people have recommended
  setting the BBA to 10 Mbs only as a workaround; this
  can be done by adding the <literal>10baseT</literal> directive to your
  ifconfig line in <filename>/etc/rc.conf</filename>.
  </para>
  </answer>
</qandaentry>

<qandaentry id="swap-size">
  <question id="swap-size-q"><para>How big should my swapfile be?</para>
  </question>
  <answer><para>
  This is, of course, a matter of personal choice, and depends on what
  you'll be doing with the system. If you'll be using it for any but
  the most mundane of tasks -- including if you want to build more than
  a tiny package with pkgsrc -- you should
  probably have at least 32MB of swap space. Many have reported that 64MB
  is an optimal size. Keep in mind that the larger your swapfile, the more
  physical memory is required to manage it.
  </para>
  </answer>
</qandaentry>

<qandaentry id="serial-console">
  <question id="serial-console-q"><para>How do I switch my console to serial port?</para>
  </question>
  <answer><para>
  Remove the <quote>pvr</quote> driver from your kernel configuration,
  rebuild your kernel, and you'll automatically fall back to serial console.
  </para>
  </answer>
</qandaentry>

<qandaentry id="mouse-driver">
  <question id="mouse-driver-q"><para>Is there a mouse driver available?</para>
  </question>
  <answer><para>
  Yes, it's <quote>mms</quote>. You'll need the following lines in your
  kernel config:
  <screen>
    mms*    at maple? port ? subunit ?
    wsmouse*    at mms? mux0
  </screen>
  </para>
  </answer>
</qandaentry>

</qandadiv>

<qandadiv id="miscellaneous">
<title>Miscellaneous</title>

<qandaentry id="how-send-files">
  <question id="how-send-files-q"><para>How do I send files to the Dreamcast if it's not
  mounted over NFS?</para>
  </question>
  <answer><para>
  The simplest solution for those running NetBSD or similar is to use the
  portal filesystem as follows:
  </para>
  <para>
  <screen>
    # mkdir /p
    # mount_portal /usr/share/examples/mount_portal/tcp.1.conf /p
  </screen>
  </para>

  <para>
  Now that the portal filesystem is mounted <command>cat</command> can be
  employed to send a file to the console:
  </para>
 
  <screen>
    # cat <emphasis>filename</emphasis> &gt; /p/tcp/<emphasis>dreamcast</emphasis>/<emphasis>port</emphasis>
  </screen>

  <para>
  Where <quote><emphasis>filename</emphasis></quote> is the file to send,
  <quote><emphasis>dreamcast</emphasis></quote> is the IP
  address of the console and <quote><emphasis>port</emphasis></quote> is
  the port number to send the file to. An example of sending a kernel
  called <filename>bsd</filename> to a Dreamcast with
  an IP address of <literal>192.168.0.128</literal> which is running the
  IP upload slave (which listens on port <literal>4711</literal>) would be:
  </para>

  <screen>
    # cat bsd &gt; /p/tcp/192.168.0.128/4711
  </screen>
  </answer>
</qandaentry>

<qandaentry id="what-ip-slave">
  <question id="what-ip-slave-q"><para>What is the IP upload slave?</para>
  </question>
  <answer><para>
  The IP upload slave is a Dreamcast program written by Marcus Comstedt
  that allows the transport of files through the Dreamcast console's
  Broadband Adapter, which will then be executed by the console. It can
  be found at <ulink
  url="http://mc.pp.se/dc/ipslave.html">http://mc.pp.se/dc/ipslave.html</ulink>.
  Instructions on getting it to run can be found at <ulink
 url="http://members.wri.com/josht/dreamcast/ipslave.html">Josh Tolbert's Kernel Autoloader Guide</ulink>.
  </para>
  </answer>
</qandaentry>

<qandaentry id="resources">
  <question id="resources-q"><para>What other Dreamcast resources exist out there?</para>
  </question>
  <answer><para>
Try these sites:
  </para>
  <itemizedlist>
    <listitem>
      <ulink url="http://mc.pp.se/dc/links.html">Marcus Comstedt's Dreamcast Page</ulink>
      (probably the most definitive site out there, with many good additional
      links)
    </listitem>
    <listitem>
      <ulink url="http://www.boob.co.uk/">Boob! Dreamcast Research</ulink>
    </listitem>
    <listitem>
      <ulink url="http://dev.dcemulation.com/">Dreamcast Emulation Developer</ulink>
    </listitem>
    <listitem>
      <ulink url="http://www.syncscroller.net/dc/dc-index.html">bITmASTER's dCdeV</ulink>
    </listitem>
    <listitem>
      <ulink url="http://www.puresimplicity.net/~hemi/dreamcast/">Josh Tolbert's instructions</ulink>
    </listitem>
    <listitem>
<!-- XXX dead link -->
      <ulink url="http://dcbakuplinks.de.vu/">DCBakuplinks</ulink> -
      information about Dreamcast hardware, emulators, software and more
    </listitem>
  </itemizedlist>

  <para>
  Keep in mind that these pages are not necessarily NetBSD-specific.
  </para>
  </answer>
</qandaentry>

<qandaentry id="slow-compiles">
  <question id="slow-compiles-q"><para>Why has my compile job been running for hours with low
  CPU utilization?</para>
  </question>
  <answer><para>
  If you're trying to compile something big, particularly out of
  pkgsrc, and you notice that the job is taking
  an excruciatingly long time and is low on CPU utilization but high on
  memory use, you've run into one of the big gotchas of the platform:
  swap over NFS is really, really slow.
  </para>

  <para>
  What's happening here is that your compile job has drastically exceeded
  the 32MB of memory your system has, and it's doing a large amount of
  swapping across the network. This is a painfully slow process no matter
  how quick your network is; your best bet is to try killing any unnecessary
  processes running on your Dreamcast to free up memory. Don't be
  surprised, though, if your job has run for over 5 hours with no signs of
  stopping... and don't bother to kill it, either, since it's still OK,
  and you'll have just wasted all that compile time.
  </para>
  <para>
  According to a <ulink
url="http://mail-index.NetBSD.org/tech-kern/2002/11/27/0005.html">post by Simon Burge</ulink>
  on the tech-kern list, it is possible to do something about this by
  tweaking virtual memory settings. While it is in your best interests
  to read his entire post and decide for yourself what your settings
  should be, the gist is that you'll want to run:
  <screen>
    sysctl -w vm.anonmax=95
  </screen>
  According to the &man.sysctl.3; page, this changes <quote>The percentage
  of physical memory which will be reclaimed from other types of memory
  usage to store anonymous application data.</quote>
  </para>
  </answer>
</qandaentry>

</qandadiv>
</qandaset>

</webpage>

