Burn Dreamcast CDR from Linux

Dreamcast Linux

From DougMcIntosh

Jump to: navigation, search

Contents

Burning Dreamcast Discs From Linux

In my case ubuntu linux, Dapper Drake, with command line tools and a bog standard cd rewriter.


Introduction And Credits : Please Read

First off I stole most of this page. From | here. I followed his instructions almost exactly and only had to change one tiny command. I have nicked his entire page, cut it down a bit and shown which command to change.

It boils down to the fact the the shiny new versions of cdrecord do not need the scsi emulation layer any more. You can simply use the command option dev=/dev/hdc, or whatever the device for your cd rewriter is. I did it with the dreamfrodo example he gives. It worked first time. I did have the wrong kind of disk images in the games folder though. But it did boot up to a Commodore 64 screen.

Right here is the stolen bit.

The Nicked And Edited Introduction to burning Dreamcast Discs From Linux

A great weight has been lifted from my soul: I can finally burn a Dreamcast CD-R using Linux!

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 

You can create the IP.BIN file by using the makeip.tar.gz program. The 1ST_READ.BIN file can be scrambled, so it is bootable ?, by the scramble utility. Bot can be downloaded from here.

  http://www.ele.uva.es/~jesus/dream/

Both need to be compiled using gcc. If I get round to it I will host compiled versions of both files here. But if you are reading this you can probably do it yourself.

/* Cut Out Section Abouty Things That Do 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=/dev/hdc -multi -audio audio.raw

Only takes a couple of seconds.

   cdrecord dev=/dev/hdc -msinfo

Use the results here in the -C option in the line below.

   mkisofs -l -r -C 0,11702 -G IP.BIN -o tmp.iso cdimage/

Make sure you are in the /dreamfrodo directory. Or whereever you need to be.

   cdrecord dev=/dev/hdc -multi -xa tmp.iso 

Other guides suggest using -xal as an option. This was only correct for old version of cd record I believe. My big change here is making the dev option point to /dev/hdc. Check your etc fstab and put in the device line for your own setup.

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.

An Actual Example

Burning superfamicast

A Little Bash Script

I decided as I was doing a batch of dreamcast disk making I needed a slightly more automatic process. I rejigged the directory structure of some of the downloaded files for dreamcast and made this bash script.

Just been trying to burn ScummVM recently and was having some problems. I tried setting a speed value, but also changed some files at the same time, as apparently burning at more than 8x speed is not very likely to work. I added -speed=4 to the cdrecord lines and then everything worked fine.

burn2dream.sh

  dd  if=/dev/zero bs=2352 count=300 of=audio.raw
  cdrecord dev=/dev/hdc -multi -audio audio.raw
  cdrecord dev=/dev/hdc -msinfo
  mkisofs -l -r -C 0,11702 -G ip.bin -o tmp.iso cdimage/
  cdrecord dev=/dev/hdc -speed=4 -multi -xa tmp.iso

Change /dev/hdc to what fstab tells you your cdrom is. On Ubuntu you may have to use

  sudo burn2dream.sh

to get the right permissions.

It’s very brute force but works when you make a directory structure like the following.

burn2dream.sh Directory Structure

  douglas@cinebook:~/Software/dreamcast$ ls -R dreamsnes/
  dreamsnes/:
  burn2dream.sh  cdimage  changes  ip.bin  licence  readme
  dreamsnes/cdimage:
  0gdtex.pvr  1dsnes.sh4  changes  gfx  licence  locale  readme  roms  sound

  dreamsnes/cdimage/gfx:
  apply.zvr    cloudsw.zvr   help.zvr      ltarrow.zvr   pumpkin.zvr
  bl_back.zvr  controll.zvr  ihi_warn.zvr  menubutt.zvr  rtarrow.zvr
  bl_ring.zvr  ctrlicon.zvr  ihi.zvr       n_cancel.zvr  valissa.zvr
  cancel.zvr   default.fnt   logo.zvr      pike.zvr      vmu.zvr
  dreamsnes/cdimage/locale:
  charnego.txt  german.txt    polish.txt      spanish.txt
  finnish.txt   italiano.txt  portuguese.txt  swedish.txt
  french.txt    japanese.txt  romana.txt
  dreamsnes/cdimage/roms:
  PUT YOUR ROMS HERE.

  dreamsnes/cdimage/sound:
  bubghost.mp3

Then running the script from within the dreamsnes directory worked perfectly. Obviously depends on your cdrom drive being /dev/hdc

Advertisements

5 responses to “Burn Dreamcast CDR from Linux

  1. Nice guide!

    however I have some issues with the script. Here’s the pastebin.

    http://pastebin.com/m246feb00

    any ideas?

    thanks,

    King

  2. Hi.Thanks for the nice comments. Though I repeat the guide was written by someone else. It just took me a while to find so I am sharing it here too.

    I think your script is failing at this stage

    genisoimage: No such file or directory. Cannot open ‘ip.bin’.

    As it burns the audio track to the beginning of the cd the rest of the settings should be fine. I would check the case of the ip.bin filename and make sure it is in the same directory as you are running my very poor quality script from.

    My understanding is the ip.bin is a block of data put at the beginning of the disc to tell the Dreamcast that it is a game disc and how to load the rest of the game.

    Also possibly try doing the various commands by hand to make sure that it is failing there.

    Let me know how you get on please.

    I have not burned any dreamcast discs for ages. If you have a problem I will set up my system and try some tests to make sure it still works with more modern linux distros.

  3. Pingback: Improved Guide To Burning Dreamcast Discs From Linux « Doug’s Devices & Desires

  4. Thanks for the reply on irc.

    my problems were with my bin already being scrambled, and some naming of things.

    this seems to work well.

    http://pastebin.com/m2c01f611

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s