Sega Dreamcast

DCExe, the transfer utility

Two programs in one: DCExe runs on the PC, and carries its Dreamcast half inside it, uploading it to the console whenever it's needed.

Download DCExe v1.010 7 KB

What it does

  • Written in PC assembly language, for size and speed
  • Sends its own loader to the now-standard Marcus serial slave, then goes up to 1.56 Mbps
  • Contains the latest Dreamcast-side loader, in SH assembly language
  • A console mode with more than the standard serial slave (memory dump and more)
  • Transfers S-records or binary files
  • S-record transfer acceleration
  • Starts at 781 kbaud, which makes testing the resistor values easier

In console mode the border is normally green, and it changes colour while data goes to or from the Dreamcast, like an old Spectrum loading a tape. That's normal.

Windows NT, 2000 and later

Newer versions of Windows protect the PC from "bogus" memory accesses, so DCExe won't work on them without this device driver, sent to us by Brian Peek. Thanks, Brian.

On the PC

DCEXE [/?] [/n#] [/c] [/b[#]] [/g[#]] [/2] [/3] [/s] [fname]
/?Show how to use it
/n#Set the Dreamcast's N to # (0 to 255)
/b[#]The file is binary: download it to $# (default 8c010000)
/g[#]Run at address $# (default 8c010000, or the /b address)
/cGo into console mode after the transfer
/fGo into file-server mode after the transfer (experimental)
/2Use port 2 (Pro card only)
/3Use Doomed's special-edition card
/sSlow mode: no S-record acceleration

Files are sent as S-records unless you use /b.

On the Dreamcast: console commands

?Show the version
B@@Binary transfer to @, size @ (each @ is 4 bytes)
G@Go to address @
HHelp
M[#]Memory dump (# is an 8-digit hex number)
RReset the Dreamcast
Sx...An S-record (types 0, 3 and 7)

File-server mode

The experimental file server lets the Dreamcast use the PC's files. To use it, send the command byte from the Dreamcast, then send it again inverted, followed by its parameters:

CommandNameParameters
0NOPNone: ignored.
1PutCharSend a byte to display.
2GetCharReceive a byte from the PC (the PC waits for a key press).
3OpenSend a string for the file name, then a byte for the open mode. Receive two bytes: the file handle.
4CreateSend a string for the file name, then two bytes for the create mode. Receive two bytes: the file handle.
5ReadSend two bytes for the handle and four for the length. Receive four bytes for a length, then that many bytes; repeat until the length received is zero.
6WriteSend two bytes for the handle and four for the length, then that many bytes.
7SeekSend two bytes for the handle, four bytes for the offset, and a byte for the mode.
8CloseSend two bytes for the handle.
9DeleteSend a string for the name of the file to delete.
10RenameSend a string for the old name, then another for the new name.
11ExitMakes DCExe on the PC exit.
12Write blankSend two bytes for the handle and four for the length.

There's no error handling in the file server.

Writing your own utilities

The Dreamcast side

Write N to the SH's baud-rate divider. The exact rate is 1562000 / (N + 1) baud: N = 0 is 1.56 Mbps, N = 1 is 781 kbaud.

The PC side

Use the SH version of DCExe (v1.002) as a test file to get your PC code working. The first thing it does is set N to 1, which is 781 kbaud, the Dreamcast's second-fastest rate. It loads below the normal Marcus serial slave.