Copy Link
Add to Bookmark
Report

Dreamcast Guides: Making Bootable CD-r

Dreamcast's profile picture
Published in 
Dreamcast
 · 21 Jun 2019

The Dreamcast firmware allows booting from a normal CD-R (CD-RW won't work though), provided that it has the right structure. This page gives detailed instructions on how to create a bootable CD-R using cdrecord (people running Wintendo can allegedly find binaries here). The example commandlines assume a CD-R drive with SCSI id 6, you should of course adjust them according to your configuration. They also tend to assume you are running some kind of UNIX. Please don't mail me asking how to create empty files etc under DOS. I don't know. Ask someone who uses DOS.

For a CD-R to be bootable on the Dreamcast, it should have two sessions. The first should contain only a normal audio track. It doesn't matter what kind of audio you actually put there, silence is fine. (It has been suggested that a data track could also be used for the first session. I haven't tried this myself though.) The second session should contain a CD/XA data track (mode 2 form 1). This data track should contain a regular ISO9660 file system, and in the first 16 sectors a correct bootstrap (IP.BIN). How to create a correct IP.BIN is described elsewhere.

First you have to burn the audio session. You can use any audio you like, but the simplest option is just to create 4 seconds (the minimum track length) of silence, like so:

  dd if=/dev/zero bs=2352 count=300 of=audio.raw

Next, insert a blank CD and burn the audio track. Make sure to leave the disc open for further sessions, the -multi option to cdrecord takes care of that.

  cdrecord dev=0,6,0 -multi -audio audio.raw

Now that the audio track has been burned, it is possible to create the ISO filesystem image. The reason that it can't be done earlier is that on a multisession disc the sector numbers in the image have to be offset with a number depending on the sessions burned before. To find out this number, run

  cdrecord dev=0,6,0 -msinfo

with the disc still in the drive. You should get two comma separated numbers (for example 0,11700). Remember these numbers. Now create the ISO image with mkisofs. If you want to create an image containing only the file 1ST_READ.BIN for example, then run

  mkisofs -l -C x,y -o tmp.iso 1ST_READ.BIN

where x,y is the pair of numbers you got with -msinfo earlier. Make sure you get them correctly, or the image won't work.

The first 16 sectors of an ISO9660 filesystem are blank, to leave room for bootstraps. This is where IP.BIN (32768 bytes) goes. Replace the first 16 sectors of your image with the appropriate IP.BIN bootstrap:

  ( cat IP.BIN ; dd if=tmp.iso bs=2048 skip=16 ) > data.raw

Finally, you're ready to burn the second session, completing the disc. This track should be burned as CD/XA with form 1 sectors (2048 bytes per sector). Use the -xa1 (Note: in recent versions of cdrecord, this option has been renamed to -xa, and -xa1 now expects 2056 bytes data per sector. What you need is XA mode 2 form 1, 2048 bytes per sector. If neither -xa nor -xa1 works, you might want to try -xa2 too, the interpretation of these flags seems to have varied a lot over the versions...) option to cdrecord:

  cdrecord dev=0,6,0 -multi -xa1 data.raw

When cdrecord completes, the disc is ready. Eject it and try it out in your Dreamcast.

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos from Google Play

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT