NetBSD/dreamcast Frequently Asked Questions

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 obtain a serial cable for the Dreamcast?
2.9. Can I attach a hard drive to the Dreamcast itself?
3. Bootable CDs
3.1. That's great...now how do I make the actual CD?
3.2. 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. Swap and Misc. Config
5.1. How stable is running swap over NFS?
5.2. How big should my swapfile be?
5.3. How do I switch my console to serial port?
5.4. Is there a mouse driver available?
6. Miscellaneous
6.1. How do I send files to the Dreamcast if it's not mounted over NFS?
6.2. What is the IP upload slave?
6.3. What other Dreamcast resources exist out there?
6.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 obtain 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?

Currently, eBay is your best bet. The Broadband adapter's model number is HIT-0400 and the packaging and documenation is HIT-0401. The adapters are not region coded.

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.

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, but the Dreamcast port uses it in a little endian fashion.

2.8.

Where can I obtain a serial cable for the Dreamcast?

Most vendors no longer sell the Dreamcast serial cable but you can create your own using Marcus Comstedt's tutorial.

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. That's great...now how do I make the actual CD?
3.2. What if I don't want to burn a CD for each new kernel?

3.1.

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

Follow the instructions on the HOWTO.

3.2.

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?

Currently, eBay is your best bet.

5. Swap and Misc. Config

5.1. How stable is running swap over NFS?
5.2. How big should my swapfile be?
5.3. How do I switch my console to serial port?
5.4. Is there a mouse driver available?

5.1.

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

5.2.

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 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.

5.3.

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.

5.4.

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. Miscellaneous

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

6.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
  

6.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.

6.3.

What other Dreamcast resources exist out there?

Try these sites:

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

6.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 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.