Paper, Coffee, Pencil


The Art of Burning Dreamcast CDI's on OS X

Ever since the announcement of Shenmue III, I've been aching
to take my trusty old Dreamcast out for a spin. So, said and done,
I dug it out, downloaded the DCRES pack, and went to town.

There was just one problem: close to every release out there are
distributed on DiscJuggler CDI-images, and every guide for burning
CDI-files on OS X is either horribly outdated or rely on very
specific versions of obscure software. First after a slew of
coasters, I found a set of tools and steps that actually worked.
The following text is a few notes summarizing on how to succeed.

First off, you need to rip apart the CDI-file into separate audio-
and data-tracks. This is best achieved with a tool called cdirip,
which is unfortunately not available on either MacPorts or Homebrew.
I've prepared an x86_64 binary available here, or you can always
roll your own.

Anyhow, run the following to split audio and data:

    $ /path/to/cdirip your-sweet-game.cdi -cdrecord

This will result in a set of files with the form "taudio[0-9]{2}.wav"
and "tdata[0-9]{2}.iso".

The -cdrecord`-flag hints at the next step; `cdrecord has become
my trusty companion for tricky burns, so let's install it!
(Note that "cdrecord" used to be the name of the package too,
but now it is commonly known as "cdrtools".)

    $ brew install cdrtools

Now we need to find out the identifier of the device we wish to use.
For instance, I want to use my Super Drive in my three year-old
MacBook Pro, which is logically on a SCSI-bus. (This is also true for
any USB-connected burner.). To find devices on the bus, run:

    $ cdrecord -scanbus

Mine was located on 1,0,0. We now have what we need to burn the
data onto a CD. Slot one in and proceed with the audio tracks:
(Your mileage may vary with the speed setting. I was a bit wary of
fiddling with it, since I had just produced a nice set of coasters.)

    $ cdrecord dev=1,0,0 speed=4 -multi -audio taudioN.wav

where "N" is 01, 02, and so on. (Note that for every successful
burn, the disc will be automatically mounted. Unmount (not eject)
it between each track using diskutil or the Disk Utility
application.)
Let's burn the data tracks in the same fashion:

    $ cdrecord dev=1,0,0 speed=4 -multi -xa tdataN.iso

When you've burned all tracks, eject the CD and plop it into your
Dreamcast. Easy peasy.

The last two steps should really be automated. I've seen scripts
floating around that do just this, but they generally hardcode the
device and doesn't handle the automatic mounting that OS X insists
on doing. One day I may publish a script, but I dunno.