dcload is a Sega Dreamcast (DC) serial loader written originally by
Andrew Kieschnick, a.k.a.
ADK/Napalm. It is currently maintained as a part of
KallistiOS (KOS).
dcload is a set of programs made to send and receive data from your Sega
Dreamcast system. The classic use of this tool is to send programs to the
Dreamcast in order to run and debug them. To be used, you must have a way to
connect your Dreamcast console to your computer, it can be one of the following:
RS-232
/DE-9
connector or with a USB-Serial
module.HIT-400
, often shortened as BBA, a 10/100Mbits
Ethernet network card.HIT-300
, a 10Mbits
Ethernet network card.If you have a Coders Cable, you have to use dcload-serial
. For the Broadband
Adapter or LAN Adapter, you have to use dcload-ip
.
dcload is split in two components:
dcload
, the server part, meant to be run on the Dreamcast;dc-tool
, the client part, executed from your computer.elf
, srec
and bin
(binary transfers are compressed).sh-elf
toolchain installed (if you have installed KOS, you Makefile.cfg
file for your system and then run make
.Run make install
: this will install dc-tool-ser
on your computer (default in
/opt/toolchains/dc/bin
).
For the Dreamcast part, you have two options.
cdrecord
:make-cd
.Makefile
.Run make
. If the 1ST_READ.BIN
file hasn't been built yet, this
Makefile
will build it.
Create a Padus DiscJuggler (CDI
) image to burn later (requires
the mkisofs
and cdi4dc
tools):
make -C ./host-src/misc
(build the miniLZO binary)make -C ./target-src
(build the 1ST_READ.BIN
)mkisofs -C 0,11702 -V dcload-serial -G ./make-cd/IP.BIN -joliet -rock -l -o temp.iso ./target-src/1st_read/1st_read.bin
cdi4dc temp.iso dcload-serial.cdi
Everything is located in the example-src
directory.
dc-tool-ser -x console-test
: tests some PC I/Odc-tool-ser -x exception-test
: generates an exceptionYou have the possibility to use dcload to debug remotely Dreamcast binaries.
To run a GNU debugger session over the dcload connection:
sh-elf
targetted GNU debugger (can be made with dc-chain
gdb_init()
call somewhere in the startup area of yourmain()
),#include <arch/gdb.h>
statement in that file.-g
GCC switch to include debugging info.dc-tool-ser -g -x <sh-executable>
.sh-elf-gdb
and connect to the dc-tool
using target remote :2159
.dcload-serial
, you need to select a USB-Serial
module that matches the baudrates that the Dreamcast's SH-4 cpu can generate. Above 115200
, the SH-4 cpu generates the following baudrates: 223214
, 260416
, 312500
, 390625
, 520833
, 781250
, 1562500
. 1562500
.781250
will work, but 1.56M
will depend on your specific chip (ie, chip luck)dc-tool-ser -t /dev/usb/tts/0 -b 1500000 -x <sh-executable>
dc-tool-ser -t COM4 -b 500000 -x <sh-executable>
dc-tool-ser -t /dev/cu.usbserial-A50285BI -b 1500000 -x <sh-executable>
1.0.4
, little-endian byte order is enforced in the host so dc-tool1.0.3
, serial speed is changed at runtime rather than compile time. 115200
works fine in most cases but 57600
baud is the standard baud.-e
option that will enable an alternate 115200
which may work115200
is unstable.234000
will probably only work with the -e
option enabled.1.56M
baud (-b 1500000
). This was tested using Catalina and an libelf
, which can be easily installed usingbrew install libelf
otool -L
) which is available onnewlib-1.8.2
here and video.s
was-t
by Florian 'Proff' Schulze.-b
by The Gypsy.gcc-3.4.x
and Serial protocol endianlibbfd
segfaults by Atani.