Burning Sega CD and Saturn Games on Linux

Kahuna over at SegaXtreme has written up a detailed tutorial on how to burn Sega CD and Sega Saturn backup CDs using Linux. I figured I should post this as it’s a nice complement to my guides for Ripping and Burning BIN/CUE and ISO/MP3 images using Windows. I assume this method also works for some other older systems like Neo-Geo CD, 3DO, and even Playstation.

The original page and it’s comments can be found on this SegaXtreme thread, but I thought it would be benificial to re-post it here.

Introduction:
I wrote this HOWTO because I’m a hardcore *nix user and also a big fan of my Saturn. I’ve used these techniques under FreeBSD 4.8 and Redhat Linux 9, but they should also work for your distribution of *nix, provided you have all the software installed correctly. There’s virtually nothing out there in the way of tutorials for Saturn/Sega CD burning for Linux/Unix. I’ve developed these by reading man pages, searching google, and trial and error basically for the sole purpose of avoiding the pain of booting into my windows partition.

I won’t cover the basics of Burning, since it’s already covered on SegaXtreme and I really don’t want to reinvent the wheel here. If you need a basic grounding in SCD/SAT burning, I suggest that you go to http://www.litespeedcomputers.com/sx/ for a basic tutorial and list of tools. I also will not cover getting CD burning to work in your *nix system. I will assume that you already have that figured out. If you don’t, for linux, you’ll want to check out the excellent CD-Writing HOWTO at http://www.tldp.org/HOWTO/CD-Writing-HOWTO.html

DISCLAIMER
Also, I need to say that this HOWTO is not a guide to pirating software, but provides a way for you to backup your precious and rare games which are no longer being made. I, the author of this guide will not be responsible for the use/misuse of the information herein. The author of this guide is not reponsible for any damage to hardware or software on the console or PC as a result of following this guide. In other words, if you screw up, it’s all your fault.

Required Software:
These software packages are required to burn SCD/Saturn backups on a *nix system. There are other ways to do things described here. You can mix and match different tools that you’re comfortable with at your discretion.

cdrdao:
*the* DAO cd burning software package for *nix. There’s a few other commercial alternatives out there, but this one hasn’t given me any coasters yet.

mpg123:
Command line MP3 player for *nix. Can also output wave files. If you don’t have an objection to the license terms, use this, since anecdoatal eveidence says that this one is faster.

mpg321:
A GPL alternative to mpg123 for the free software fanatic.

Useful Software:
Unrar
This is the unrar software for linux. Many people use rar to archive their backups, and this program is just nice to have around.

CFV:
A SFV checker for linux.

sat2toc.py:
My utility for creating TOC sheets for use with cdrdao out of lists of files.

python 2.3 :
Needed for sat2toc.py

Linux satconv:
This is the linux version of the satconv country code changer software.

Burning cue/bin images:

Explanation:
Cue/Bin images are easy to burn with cdrdao. You may want to use satconv on the bin before you burn it. To burn with cdrda o, you’ll need to know what driver your cdrw uses. You can find the info at http://cdrdao.sourceforge.net/drives.html.

Burn It!:
The command to burn a cue/bin with cdrdao is:
cdrdao write –driver –device –speed cuesheet.
as an example, I would type:
cdrdao write –driver generic-mmc-raw –device 0,0,0 –speed 2 mygame.cue
I always burn at 2 speed, since I seem to get better copies that way. The only real way to figure out the max of your burner and media is to experiment. You can also use the -eject option if you want the cd to be spit out when it’s done burning.

Burning ISO+MP3:

Explanaton:
ISO+MP3 is a little bit more tricky to burn with cdrdao. the MP3 files must first be converted to wave format, and cdrdao cannot understand ISO+WAV cue sheets, so we must make a TOC file for use with cdrdao.

Convert MP3 to WAV:
It’s easy to convert a bunch of MP3 files to wav format in *nix. In the bash shell (or bourne shell), you can do them all in 1 command with mpg123 and some shell magic:
for i in *.[mM][pP]3; do mpg123 -w $i.wav $i;done

After running the command you should have a bunch of wav files that are the same name as the mp3 files with .wav tacked onto the end. You can delete the MP3 files, as we no longer need them. The next step is to create a TOC sheet for the ISO+WAV files that we have in the working directory.
Here is a sample TOC sheet to get you started:

CD_ROM
TRACK MODE1
DATAFILE “MyGame.iso”
ZERO 00:02:00 // post-gap

TRACK AUDIO
SILENCE 00:02:00 // pre-gap
START
FILE “Track_2.mp3.wav” 0

TRACK AUDIO
FILE “Track_3.mp3.wav” 0

TRACK AUDIO
FILE “Track_4.mp3.wav” 0

Just change the name in the FILE line to the ISO and WAV files and add additional audio tracks as needed. This will seem easy if you are used to cue files.

Another alternative is to use the sat2toc python script that I’ve provided.

sat2toc -t -i As an example (assuming the only wav files in this directory belong to my game):
python2.3 sat2toc -t Mygame.toc -i Mygame.iso *.wav

Burn it!:
Once your TOC file is finished, you can burn your backup. the cdrdao command is exactly the same as it is for the cue/bin example, except you’ll use the TOC sheet file in place of the cuesheet.
cdrdao write –driver generic-mmc-raw –device 0,0,0 –speed 2 Mygame.toc

Wasn’t that easy?
Most games can be recorded with just a couple of commands on the command line. Once you master this, you’ll be burning games faster and with less effort than you ever have on windows.

So long for now. In a while, I’ll post a thread about ripping SCD/SAT games on *nix.

Additional needed files can be found here

Thanks again to Kahuna for this guide!

10 Comments

  1. Anonymous says:

    Hi!

    The method works perfectly for NeoGeo CD too. Thank you very much! I had to operate on my linux box and my windows machine was destroyed… so I gave it a try and it worked! ^_^

    Robert.

  2. fj4 says:

    Thanks for the guide!
    It’s missing one thing though… there can also be CD audio data in a bin. cdrdao doesn’t like the cue in this case either. How does one make a correct toc for a bin/cue with CD audio?

  3. Chris Wyatt says:

    Doesn’t work for me, says ERROR: Expecting only one toc-file.

  4. Ryan y says:

    My Sega games are only BIN files(just one BIN file). I cant seem to find any CUE. How can i burn for my Sega CD?

  5. racketboy says:

    You’ll probably have to use a Windows machine and run Sega Cue Make (which I have somewhere on the site)

  6. Ryan y says:

    I am on windows… I tryed Sega Cue Maker but it does not work with .bin. Its very odd that the torrent I downloaded has only 1 .bin file for every game. With every other sega cd games there ISO/ mp3 / cue. ect

  7. racketboy says:

    I figured you were on Linux since you’re posting on the Linux guide.

    And I forgot, SCM is only for ISO/MP3….
    I dunno why a torrent would only have BINs unless the creator didn’t know what he was doing….

  8. Luis says:

    Thank you, thank you, thank you!

    I was using cue2toc, but it doesn’t always do the correct job… for example, when the file is an .iso one and you burn it on MODE1, of course a PREGAP on the toc file won’t work – and cue2bin ignores that, it won’t translate the PREGAP statement to a ZERO one…

    However… it didn’t work for a PC Engine cd… I get a “load error” on mednafen,

  9. Jim says:

    You can also installed K3B and burn the .cue as an image. Press burn and your done.

  10. Matt K says:

    Burning sega cd games on Ubuntu 10.10 I found that all the CD tracks were garbled. Turns out you need to swap the byte order! Also specifying the driver and device weren’t necessary (at least for me)

    An example:

    cdrdao write –swap –speed 2 .cue