Help with DC disk (ubuntu/linux)

This forum is for discussion pertaining to homebrew and indie software for the Dreamcast, such as homebrew games, emulators/interpreters, and other homebrew software/applications. Porting requests and developmental ideas are not to be made here; you can make those here. If you need any help burning discs for homebrew software, this is the place to ask as well.
Post Reply
Amon Ra
DCEmu Newbie
DCEmu Newbie
Posts: 4
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sat Sep 12, 2009 10:20 pm
Has thanked: 0
Been thanked: 0

Help with DC disk (ubuntu/linux)

Post by Amon Ra »

Well, allow me to first introduce myself.
I'm an amateur hacker and computer builder. I enjoy retro gaming and modifying system hardware.

I bought a dreamcast a few months ago and I am currently trying to burn bootable disks.

The only problem is that I run ubuntu 9.04.

I know no one who has tried to burn bootable dreamcast disks on linux, I've looked for days.

I would need help burning any homebrew games, SNES/NES emulators (I have the roms necessary), and I might try playing videos on the dreamcast if it's possible.

Thanks

Ra
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Re: Help with DC disk (ubuntu/linux)

Post by Ex-Cyber »

The classic reference is this page from Marcus Comstedt. The cdrecord options sometimes change, but the basic method works.

For images distributed as .cdi you might need cdirip.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
User avatar
Nico0020
DCEmu User with No Life
DCEmu User with No Life
Posts: 3837
Joined: Wed Oct 17, 2001 7:44 pm
Location: Fukuoka, Japan
Has thanked: 0
Been thanked: 1 time

Re: Help with DC disk (ubuntu/linux)

Post by Nico0020 »

I tend to burn all my Dreamcast stuff on my windows machine. Though IIRC bootdreams runs under WINE properly
*The Cadillac of signatures*
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Re: Help with DC disk (ubuntu/linux)

Post by BlackAura »

Given a directory "data" which contains the contents of the disc, and the file "ip.bin" which contains the bootsector, you should be able to burn a working disc like this:

Code: Select all

dd if=/dev/zero of=audio.raw bs=2366 count=300
cdrecord dev=?,?,? -multi -audio audio.raw
mkisofs -l -C `cdrecord dev=?,?,? -msinfo` -G ip.bin -o data.iso data
cdrecord dev=?,?,? -multi -xa data.iso
The "?,?,?" bit should be replaced with the device name, which you can get from "cdrecord -scanbus".

Those commands are correct for cdrecord / mkisofs version 2 (the site linked above has instructions for version 1 - note the "-xa" paramater in the last cdrecord line is different, and that mkisofs gained the ability to insert a bootsector by itself).

However, Ubuntu no longer ships with cdrecord - it uses wodim instead (Debian's fork of cdrecord, bought about be license changes in upstream cdrecord which they believed made it impossible to redistribute). For some reason, this doesn't work properly with wodim.

Even more bafflingly, I was unable to get cdrecord itself to work on any recent Linux distribution. It failed to record anything at all.
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Help with DC disk (ubuntu/linux)

Post by Chilly Willy »

I got Nero for linux some time back, so I just use cdi2nero on .cdi files, then burn them with Nero.

As for cdrecord/wodim, don't use the old SCSI device syntax, use "dev=/dev/cdrom". I've never seen a distro without at least a symbolic link from /dev/cdrom to the cdrom. Ubuntu includes symbolic links for both /dev/cdrom and /dev/dvd. If you have more than one drive, use "wodim --devices" to see all available devices in proper dev format.
Amon Ra
DCEmu Newbie
DCEmu Newbie
Posts: 4
Joined: Sat Sep 12, 2009 10:20 pm
Has thanked: 0
Been thanked: 0

Re: Help with DC disk (ubuntu/linux)

Post by Amon Ra »

Thanks for the help, everybody.

I downloaded the trial version of nero for linux, I'm going to try burning another copy of a snes emulator for dc.

I also got a weird error through terminal by typing "wodim --devices", it said

Code: Select all

wodim: No such file or directory. 
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.
I don't use an IDE dvd/cd burner, I'm using a SATA one, would this give me an error?

Thanks again

Ra
Amon Ra
DCEmu Newbie
DCEmu Newbie
Posts: 4
Joined: Sat Sep 12, 2009 10:20 pm
Has thanked: 0
Been thanked: 0

Re: Help with DC disk (ubuntu/linux)

Post by Amon Ra »

Also, could someone walk me through how they build a dreamcast SNES or NES cd?

There's a lot of features, like multisession, data/data, audio/data I don't really understand.
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Help with DC disk (ubuntu/linux)

Post by Chilly Willy »

Amon Ra wrote:Thanks for the help, everybody.

I downloaded the trial version of nero for linux, I'm going to try burning another copy of a snes emulator for dc.

I also got a weird error through terminal by typing "wodim --devices", it said

Code: Select all

wodim: No such file or directory. 
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.
I don't use an IDE dvd/cd burner, I'm using a SATA one, would this give me an error?

Thanks again

Ra
It shouldn't... it sounds like you used one dash instead of two.
Amon Ra
DCEmu Newbie
DCEmu Newbie
Posts: 4
Joined: Sat Sep 12, 2009 10:20 pm
Has thanked: 0
Been thanked: 0

Re: Help with DC disk (ubuntu/linux)

Post by Amon Ra »

Chilly Willy wrote:
Amon Ra wrote:Thanks for the help, everybody.

I downloaded the trial version of nero for linux, I'm going to try burning another copy of a snes emulator for dc.

I also got a weird error through terminal by typing "wodim --devices", it said

Code: Select all

wodim: No such file or directory. 
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.
I don't use an IDE dvd/cd burner, I'm using a SATA one, would this give me an error?

Thanks again

Ra
It shouldn't... it sounds like you used one dash instead of two.
I just tried it again, two dashes, got the same error message.
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Re: Help with DC disk (ubuntu/linux)

Post by Ex-Cyber »

I also got a weird error through terminal by typing "wodim --devices"
I think for (S)ATA devices on modern distros it might be necessary to additionally specify another commandline argument so that it doesn't go looking for the full-blown SCSI emulation interface. If memory serves it was something like "dev=ATA" or "dev=ATAPI".

As Chilly Willy said, with wodim you should be able to just skip the whole bus scan issue and use the Linux device filename rather than specifying a SCSI bus/target/LUN, e.g. "dev=/dev/cdrom". IIRC, one of the reasons Debian forked it in the first place is related to the author not liking this syntax. :roll:
There's a lot of features, like multisession, data/data, audio/data I don't really understand.
Multisession means that you're essentially creating more than one CD structure on a single CD. It's why you need to issue two cdrecord/wodim commands; one burns each session. When a CD has multiple sessions, it has one table of contents (TOC) and one set of tracks belonging to each session. Dreamcast boots from the second session, so it is necessary to create a dummy session as the first session when creating a Dreamcast disc. The "audio/data" and "data/data" terms just refer to whether the dummy session is made with an audio track or a data track (the second session always starts with a data track, since that's what Dreamcast boots from); it's commonly held that the data/data layout is compatible with more Dreamcasts, although this has been disputed.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Re: Help with DC disk (ubuntu/linux)

Post by BlackAura »

With wodim, you should use the "dev=/dev/whatever" syntax. If you only have one CD drive, you shouldn't even need to do that.

On the version of cdrecord included in older Ubuntu releases the "dev=/dev/whatever" syntax works, but I don't think it ever worked with the official cdrecord binaries.
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Help with DC disk (ubuntu/linux)

Post by Chilly Willy »

BlackAura wrote:With wodim, you should use the "dev=/dev/whatever" syntax. If you only have one CD drive, you shouldn't even need to do that.

On the version of cdrecord included in older Ubuntu releases the "dev=/dev/whatever" syntax works, but I don't think it ever worked with the official cdrecord binaries.
It worked on the version right before they switched to wodim. My PopSX utility (a python program that converts a PSX CD into a Popstation EBOOT) used cdrecord with the dev=/dev/cdrom syntax without a problem. I then had to change it to readom when cdrecord was replaced by wodim.
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Re: Help with DC disk (ubuntu/linux)

Post by Ex-Cyber »

IIRC, packages built from stock sources were compatible with that syntax, but printed an obnoxious warning about it being "unsupported".
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
Post Reply