NetBSD/dreamcast Frequently Asked Questions

This FAQ will always be a work in progress, since the more that is done with this port, the more questions there will be. If your question remains unanswered then please consider submitting it to the NetBSD/dreamcast mailing list and/or contact Alex Kirk (alex-at-schnarff-dot-com) to get it included in this FAQ.

1. Background
1.1. Where did the Dreamcast port come from?
1.2. Why run NetBSD on Dreamcast?
2. Hardware
2.1. Can all Dreamcast consoles boot from CD-R?
2.2. Can any Dreamcast consoles boot from CD-RW?
2.3. What is the Broadband Adapter?
2.4. Where can I get a Broadband Adapter?
2.5. What is the LAN Adapter?
2.6. Where can I get a LAN Adapter?
2.7. Is the Hitachi SuperH SH-4 little or big endian?
2.8. Where can I buy a serial cable for the Dreamcast?
2.9. Can I attach a hard drive to the Dreamcast itself?
3. Bootable CDs
3.1. Where can I find a bootable NetBSD/dreamcast CD image?
3.2. Where can I find DiscJuggler?
3.3. That's great...now how do I make the actual CD?
3.4. What if I don't want to burn a CD for each new kernel?
4. Dreamcast-Side Configuration
4.1. How do I set the IP address of the Dreamcast?
4.2. Can I get a GD-ROM of the Dreamcast Browser to set the IP address?
5. Obtaining/Creating Filesets
5.1. Where can I find a functional set of pre-built world files?
5.2. Where do I find NetBSD/dreamcast snapshots?
5.3. How do I compile NetBSD/dreamcast under *NIX/*BSD?
5.4. How do I compile NetBSD/dreamcast under Windows?
5.5. How do I compile a new kernel?
5.6. I used Josh Tolbert's world files, and I can't login.
5.7. Are there binary packages available for NetBSD/dreamcast?
6. Swap, NFS/DHCP, Misc. Config
6.1. I put my swapfile in /etc/fstab but I don't see it with df. What gives?
6.2. How stable is running swap over NFS?
6.3. How big should my swapfile be?
6.4. How do I switch my console to serial port?
6.5. Is there a mouse driver available?
6.6. I'm getting weird NFS error codes. What do these mean?
7. Miscellaneous
7.1. How do I send files to the Dreamcast if it's not mounted over NFS?
7.2. What is the IP upload slave?
7.3. What other Dreamcast resources exist out there?
7.4. Why has my compile job been running for hours with low CPU utilization?

1. Background

1.1. Where did the Dreamcast port come from?
1.2. Why run NetBSD on Dreamcast?
1.1.

Where did the Dreamcast port come from?

It was spun off from the NetBSD/evbsh3 port by Marcus Comstedt after Saitoh Masanobu managed to boot the evbsh3 code on a Dreamcast console.

1.2.

Why run NetBSD on Dreamcast?

There have been many answers to this question, but I believe it has been best summed up in some posts to the mailing list: Drew Vogel Andy R Miles Nordin

2. Hardware

2.1. Can all Dreamcast consoles boot from CD-R?
2.2. Can any Dreamcast consoles boot from CD-RW?
2.3. What is the Broadband Adapter?
2.4. Where can I get a Broadband Adapter?
2.5. What is the LAN Adapter?
2.6. Where can I get a LAN Adapter?
2.7. Is the Hitachi SuperH SH-4 little or big endian?
2.8. Where can I buy a serial cable for the Dreamcast?
2.9. Can I attach a hard drive to the Dreamcast itself?
2.1.

Can all Dreamcast consoles boot from CD-R?

The “Sakura Wars Limited Edition” 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.

2.2.

Can any Dreamcast consoles boot from CD-RW?

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.

2.3.

What is the Broadband Adapter?

Often abbreviated as “BBA”, 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.

2.4.

Where can I get a Broadband Adapter?

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 this site; 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.

For the more impatient, eBay is a likely place; sometimes Lik-Sang or Lan-Kwei have some. You could also investigate the availability of the Dreamcast R7 console which is reported to have come with a Broadband Adapter pre-installed. They 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.

2.5.

What is the LAN Adapter?

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.

2.6.

Where can I get a LAN Adapter?

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.

2.7.

Is the Hitachi SuperH SH-4 little or big endian?

The Hitachi SuperH SH-4 CPU can be driven either little or big endian, the Dreamcast port uses it in a little endian fashion.

2.8.

Where can I buy a serial cable for the Dreamcast?

A listing of possible vendors can be found at the Dreamcast Emulation Developer site.

2.9.

Can I attach a hard drive to the Dreamcast itself?

Yes, check out DC IDE-HD Interface and DREAMCAST DEVELOPMENT pages. Note that this requires soldering and other such things that could completely fry your Dreamcast, so proceed with caution.

3. Bootable CDs

3.1. Where can I find a bootable NetBSD/dreamcast CD image?
3.2. Where can I find DiscJuggler?
3.3. That's great...now how do I make the actual CD?
3.4. What if I don't want to burn a CD for each new kernel?
3.1.

Where can I find a bootable NetBSD/dreamcast CD image?

For a read-only filesystem, use this (very old) DiscJuggler image. For a read/write filesystem, use Josh Tolbert's kernel (mirror). This will involve netbooting your system, and will give you a read/write filesystem.

3.2.

Where can I find DiscJuggler?

DiscJuggler is freely available (albeit in a crippled form, but still functional enough to burn the aforementioned images) from http://www.padus.com/downloads/demo.php.

3.3.

That's great...now how do I make the actual CD?

Follow the instructions on the HOWTO.

3.4.

What if I don't want to burn a CD for each new kernel?

You'll want to follow the setup at Josh Tolbert's Kernel Autoloader Guide.

You can also try kloader(4), which is in-kernel bootloader enabled by "options KLOADER" in kernel config.

4. Dreamcast-Side Configuration

4.1. How do I set the IP address of the Dreamcast?
4.2. Can I get a GD-ROM of the Dreamcast Browser to set the IP address?
4.1.

How do I set the IP address of the Dreamcast?

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:

    # arp -s dreamcast ethernet
  

Where “dreamcast” is the desired IP address, say 192.168.0.128, and “ethernet” is the hardware address of the Broadband Adapter, say 00:00:de:ad:be:ef the command would be:

    # arp -s 192.168.0.128 00:00:de:ad:be:ef
  

4.2.

Can I get a GD-ROM of the Dreamcast Browser to set the IP address?

Try http://newbrowser.sega.com/. The chances of coercing this system into delivering anywhere outside the USA appear slim.

5. Obtaining/Creating Filesets

5.1. Where can I find a functional set of pre-built world files?
5.2. Where do I find NetBSD/dreamcast snapshots?
5.3. How do I compile NetBSD/dreamcast under *NIX/*BSD?
5.4. How do I compile NetBSD/dreamcast under Windows?
5.5. How do I compile a new kernel?
5.6. I used Josh Tolbert's world files, and I can't login.
5.7. Are there binary packages available for NetBSD/dreamcast?
5.1.

Where can I find a functional set of pre-built world files?

You can try NetBSD/dreamcast 2.0 binary sets.

There is also some interesting stuff at ftp://releng.NetBSD.org.

5.2.

Where do I find NetBSD/dreamcast snapshots?

You can find NetBSD/dreamcast snapshots at ftp://ftp.NetBSD.org/pub/NetBSD/arch/dreamcast/snapshot/. ftp://releng.NetBSD.org claims to have daily snapshots, but they sometimes miss days. :-) As the Dreamcast port is binary compatible to other sh-based ports, you can also use snapshots from these projects, such as the NetBSD/hpcsh port, located at ftp://ftp.NetBSD.org/pub/NetBSD/arch/hpcsh/snapshot/. This doesn't only apply to snapshots of the base system, but also of precompiled binary packages.

5.3.

How do I compile NetBSD/dreamcast under *NIX/*BSD?

See the instructions in "Cross-building NetBSD" page under NetBSD Documentation pages and "Crosscompiling NetBSD with build.sh" chapter in the NetBSD guide. Also, you may want to look at /usr/src/BUILDING for some good information on the build process in general, including cross-compiling.

5.4.

How do I compile NetBSD/dreamcast under Windows?

To build NetBSD/dreamcast under Windows will take a functional Cygwin installation, a working sh4 cross-compiler, the NetBSD code and a great deal of patience. More detail will hopefully be made available in the not too distant future.

5.5.

How do I compile a new kernel?

If your Dreamcast is working, follow the instructions in the NetBSD FAQ. If not, you'll need to cross-compile.

5.6.

I used Josh Tolbert's world files, and I can't login.

Make sure you untarred the files as root and used the -p flag to preserve permissions. If that doesn't work,

    chmod 777 /etc /var
  

should do the trick long enough for you to get in and then set things straight.

5.7.

Are there binary packages available for NetBSD/dreamcast?

Short answer: no.

Long answer: There are currently no official binary packages available on ftp.NetBSD.org in /pub/NetBSD/packages. Unofficial binaries are available though: Alex Kirk has built several hundred unofficial packages, which he has listed on his web site. Some of the links work, others do not; all of them are going to a machine with only 128K of upstream bandwidth, so don't be surprised if they're slow to download. Also, Jan Schaumann has a higher-bandwidth location for most of the packages, and he also makes a good point about security for the paranoid. Please note that The NetBSD Foundation can and will not take any responsibility for binary packages offered from unofficial sites!

6. Swap, NFS/DHCP, Misc. Config

6.1. I put my swapfile in /etc/fstab but I don't see it with df. What gives?
6.2. How stable is running swap over NFS?
6.3. How big should my swapfile be?
6.4. How do I switch my console to serial port?
6.5. Is there a mouse driver available?
6.6. I'm getting weird NFS error codes. What do these mean?
6.1.

I put my swapfile in /etc/fstab but I don't see it with df. What gives?

As swap is not a true filesystem per se, df won't show it. You'll need to run

    swapctl -l
  

to see your swap space. Note that by default, this figure is given in 512-byte blocks when run as a regular user, and 1024-byte blocks as root.

6.2.

How stable is running swap over NFS?

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 to any problems; this can be done by adding the 10baseT directive to your ifconfig line in /etc/rc.conf on the Dreamcast.

6.3.

How big should my swapfile be?

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 out of /usr/pkgsrc -- you should probably have at least 32MB worth. 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.

6.4.

How do I switch my console to serial port?

Remove the “pvr” driver from your kernel configuration, rebuild your kernel, and you'll automatically fall back to serial console.

6.5.

Is there a mouse driver available?

Yes, it's “mms”. You'll need the following lines in your kernel config:

    mms*    at maple? port ? subunit ?
    wsmouse*    at mms? mux0
  

6.6.

I'm getting weird NFS error codes. What do these mean?

Look in /usr/src/sys/sys/errno.h for one-line explanations.

7. Miscellaneous

7.1. How do I send files to the Dreamcast if it's not mounted over NFS?
7.2. What is the IP upload slave?
7.3. What other Dreamcast resources exist out there?
7.4. Why has my compile job been running for hours with low CPU utilization?
7.1.

How do I send files to the Dreamcast if it's not mounted over NFS?

The simplest solution for those running NetBSD or similar is to use the portal filesystem as follows:

    # mkdir /p
    # mount_portal /usr/share/examples/mount_portal/tcp.1.conf /p
  

Now that the portal filesystem is mounted cat can be employed to send a file to the console:

    # cat filename > /p/tcp/dreamcast/port
  

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

    # cat bsd > /p/tcp/192.168.0.128/4711
  
7.2.

What is the IP upload slave?

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 http://mc.pp.se/dc/ipslave.html. Instructions on getting it to run can be found at Josh Tolbert's Kernel Autoloader Guide.

7.3.

What other Dreamcast resources exist out there?

Try these sites:

Keep in mind that these pages are not necessarily NetBSD-specific.

7.4.

Why has my compile job been running for hours with low CPU utilization?

If you're trying to compile something big, particularly out of /usr/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.

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.

According to a post by Simon Burge 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:

    sysctl -w vm.anonmax=95
  

According to the sysctl(3) page, this changes “The percentage of physical memory which will be reclaimed from other types of memory usage to store anonymous application data.

(contact us)   Generated from %NetBSD: faq.xml,v 1.1 2005/12/04 19:07:35 heinz Exp %
Copyright © 1994-2006 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.
NetBSD® is a registered trademark of The NetBSD Foundation, Inc.