|
A great weight has been lifted from my soul: I can finally burn a Dreamcast CD-R using Linux!
If you're here just wanting the fix, here it is: use -xa instead of -xa1 when burning the data track.
Now, for those of you still here, I'll ask you to recall one or two previous posts in which I had been using DCFactory and SelfBoot in Windows to burn emulator discs for my Dreamcast. I had had trouble burning anything useful under Linux. In fact, the procedure I'd found online didn't work at all, and I ended up with a collection of well over a dozen coasters for my efforts.
Here's the directory set up for my examples below:
./dreamfrodo/
./dreamfrodo/IP.BIN
./dreamfrodo/cdimage/
./dreamfrodo/cdimage/1ST_READ.BIN
./dreamfrodo/cdimage/frodo.prefs
./dreamfrodo/cdimage/games/
./dreamfrodo/cdimage/games/brucelee.d64
Now, given that data, here's what DOES NOT work (starting in the directory ./dreamfrodo/). Note that this mimics what is done on one of the canonical sources for this information, Marcus Comstedt's page on burning Dreamcast CD-Rs.
dd if=/dev/zero bs=2352 count=300 of=audio.raw
cdrecord dev=0,0,0 -multi -audio audio.raw
cdrecord dev=0,0,0 -msinfo
mkisofs -l -r -C 0,11702 -G IP.BIN -o tmp.iso cdimage/
cdrecord dev=0,0,0 -multi -xa1 tmp.iso
A few quick comments for those of you new to burning CD-R media for the Dreamcast. The argument to dev= can be gotten by running cdrecord -scanbus and seeing what three comma-separated integers are listed beside your CD burner; in the above, I got 0,0,0. Now, the first command above, dd, creates several seconds of "silence" which the first cdrecord command then burns to the disc as an audio track in a multisession disc. The second cdrecord command then figures out where to put the next track, and this information is returned as a pair of positive integers separated by a comma. Above, the command returns 0,11702 and these numbers are used as the arguments to the -C option in the mkisofs command. The -G IP.BIN inserts the boot loader IP.BIN into the first 16 sectors of the ISO9660 image where the Dreamcast can find it. And the final cdrecord command is supposed to burn the ISO9660 image as the second track, a data track, on the CD. The result should be a bootable CD-R for the Dreamcast...but it DOES NOT WORK.
Now, I was stuck here for ages. I tried different burners. I tried different CD-R media. I tried standing on my head and sacrificing small animals to long forgotten gods. Later I came to my senses and even tried emailing the folks that wrote web pages explaining how to do this stuff back in 2001 and 2002. All to no avail.
It appears that something has changed. I think that something is cdrecord.
The key, as was theorized in this forum thread I started, is that the Dreamcast expects a sector size of 2048 bytes. However, the flag given to cdrecord above (in the last command) is -xa1, about which the man page says: "The data size is a multiple of 2056 bytes." Whoops. To get 2048 bytes, you use -xa, not -xa1, and fixing that one option fixes the whole problem. So, instead we use the following set of commands, a set that DOES WORK for me.
dd if=/dev/zero bs=2352 count=300 of=audio.raw
cdrecord dev=0,0,0 -multi -audio audio.raw
cdrecord dev=0,0,0 -msinfo
mkisofs -l -r -C 0,11702 -G IP.BIN -o tmp.iso cdimage/
cdrecord dev=0,0,0 -multi -xa tmp.iso
I hope that this helps someone out in the future. I know I'm happy. Thank you, Jeremy Nethercutt, for helping me out on the DC Emulation message boards...hopefully you've helped get a critical piece of information out to all the other folks struggling with this issue.
For the record:
Dell Latitude 640C with DVD/CD-RW combo drive
Fedora Core 1
Linux HOSTNAME.HERE 2.4.22-1.2138.nptl #1 Mon Jan 5 11:29:52 EST 2004 i686 i686 i386 GNU/Linux
mkisofs 2.01a17 (i686-redhat-linux-gnu)
Cdrecord-Clone 2.01a19 (i686-redhat-linux-gnu)
|
-Herman