A Dreamcast ethernet loader originally by <email@example.com>
* Load elf, srec, and bin
* PC I/O (read, write, etc to PC - compatible with original dcload)
* Exception handler
* Extremely fast (at least for me - I get 1130Kbyte/sec on 10mbit half-duplex)
* Now works on 100mbit (I get 2580Kbyte/sec on 100mbit half-duplex)
* Supports both the Broadband Adapter (HIT-0400) and Lan Adapter (HIT-0300)
in a single binary
1. Edit Makefile.cfg for your system and network, and then run make
1. PC - run make install (installs dc-tool)
a. cd make-cd, edit Makefile, insert blank cd-r, run make
b. take target-src/1st_read/1st_read.bin and stuff it on a cd yourself
(please use the IP.BIN from the make-cd directory if you are going
to distribute either cds or cd images)
* If you see the message "NO ETHERNET ADAPTER DETECTED!", something has
gone wrong. The background of the screen will be red.
* The correct display is something like:
dcload-ip 1.0.4 <- name/version
Broadband Adapter (HIT-0400) <- adapter driver in use
00:d0:f1:02:ab:dd <- dc hardware address
c0.a8.00.04 <- dc ip address (in hex)
idle... <- status
The background of the screen will be blue.
* For the Broadband Adapter only: if the status line reports "link
change..." and does not change back to "idle..." within a short period
of time, you may have a cable problem. dcload-ip will not work while
"link change..." is displayed, or before it is displayed the first time.
The "link change..." message normally is seen when you start dcload-ip,
when you execute dc-tool -r, and when you disconnect the ethernet cable.
* If an exception is caught while a loaded program is running, the screen
will turn lighter blue and display the exception info. dcload-ip should be
active again after that point.
1. cd example-src
2. dc-tool -x console-test (tests some PC I/O)
3. dc-tool -x exception-test (generates an exception)
4. dc-tool -x gethostinfo (displays the Dreamcast's ip, and the ip and port of
the dc-tool host)
To run a GNU debugger session over the dcload connection:
1. Build/obtain an sh-elf targetted GNU debugger
2. Put a 'gdb_init()' call somewhere in the startup area of your
3. Build your program with the '-g' GCC switch to include debugging info
4. Launch your program using 'dc-tool -g -x <prog.elf>'
5. Launch sh-elf-gdb and connect to the dc-tool using 'target remote :2159'
6. Squash bugs
You can send packets to various maple devices attached to the Dreamcast by
sending using the MAPL command. Simply send a command packet to the Dreamcast
that is formatted as follows:
command id: 'MAPL'
command address: 0 (ignored)
command size: length of maple packet, in bytes
Maple Command (1 byte)
Maple Port # (1 byte)
Maple Slot # (1 byte)
Maple data in 4-byte increments (1 byte)
Any data to be sent with the command (multiple of 4 bytes)
You will get a similarly formatted response in return.
* You can use arp instead of setting the dreamcast's ip in Makefile.cfg
* Tested systems: Debian GNU/Linux 2.2-3.0, Cygwin
* There are almost certainly bugs
* Patches and improvements are welcome; please send to the cadcdev tracker
* rtl8139 code based on code by Dan Potter
* Lan Adapter driver is pulled from an early version of the KOS LA driver
* There are some various files from newlib-1.8.2 here
* video.s, maple.c, and maple.h were written by Marcus Comstedt
* initial win32 porting and implementation of -t by Florian 'Proff' Schulze
* win32 bugfix by The Gypsy
* fixes for cygwin by Florian 'Proff' Schulze
* rx config bug pointed out by Slant
* horridly buggy nature of 1.0.1 + 1.0.2 pointed out by Dan Potter
* Fixes for libbfd segfaults by Atani
* Inspiration for MAPL packet by Tim Hentenaar