Using dcload-ip with Linux

From dreamcast.wiki
Jump to navigation Jump to search

Linux: using dcload-ip with the BBA

This tutorial has been tested on a new Linux Mint 19.1 install and Windows Subsystem for Linux (WSL). My Dreamcast is connected directly to my computer, with no router in between, using dcload-ip with a hardcoded static IP address.

Dreamcast side

Get a selfbooting version of dcload-ip. I've burned this with imgburn without any problem.

Next, boot dc-load-ip in your Dreamcast and make sure your BBA is connected in order to get your BBA MAC address.

Once the green screen appears, note down your MAC address. It should look something like: 10:04:5d:2b:0f:4d

Computer side (not necessary if using pre-built DHCP version)

We'll use the arp fonction to get your computer to "give" an IP address to your Dreamcast based on its mac address. In a terminal, enter:

sudo arp -s [IP address] [MAC address]
  • [IP address] is any valid IP address that you want to assign to your Dreamcast
  • [MAC address] is your dreamcast's MAC address, look at step 2.

The IP address should be in the same range as your local network. In my setup, my ethernet port is set on port 192.168.5.100 and my [IP address] is 192.168.5.99. If you don't know your network range, you can use ifconfig in a terminal to find out. I won't cover this here.

At this point, you should be able to see if your Dreamcast is connected.

A simple ping command should do the job.

ping [IP address]

You should get a message like: 64 byte from [IP address] .... blabla ... time=xx ms

Testing your code

You can now use the dc-tool-ip program to send your file to the DC. Make sure your Dreamcast is running dc-load-ip.

dc-tool-ip -t [IP address] -x /path/to/your/.bin/or/.elf/file

You can always run dc-tool-ip without any command to get some info on how to run it. The -c option is useful if you need to use files that are located on your pc. You can use them with the '/pc' path.

Notes (for non-DHCP use)

arp

The arp command used on step 3 will need to be entered every time you re log/shut down the dreamcast. I've added it to my environ.sh script.

Adding a host name

Also, you can add a line to your host file in order to replace [local IP address] to a more friendly name.

sudo nano /etc/hosts

then adding the line: dreamcast [IP address]

You can now refer to dreamcast instead of your usual [IP address]