Linux users and selfboot

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
WHurricane16
DC Developer
DC Developer
Posts: 92
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Wed Oct 17, 2001 7:44 pm
Location: Cape Fear Region, NC
Has thanked: 0
Been thanked: 0
Contact:

Linux users and selfboot

Post by WHurricane16 »

I never gave too much thought to this, but what exactly does Linux users use to selfboot and burn DC apps besides CD Record? What are the steps?
User avatar
pixel
Soul Sold for DCEmu
Soul Sold for DCEmu
Posts: 4991
Joined: Mon Jun 24, 2002 10:52 am
Has thanked: 2 times
Been thanked: 3 times

Post by pixel »

id imagine something with mkisofs, like with OS X users
basically, you take the plain files and run mkisofs through a couple rounds of processing and generate a set of ISOs.
but im sure someone with more Linux experience can actually help :wink:
smelialichu
DCEmu Freak
DCEmu Freak
Posts: 79
Joined: Sun Sep 15, 2002 3:50 am
Has thanked: 0
Been thanked: 0

Post by smelialichu »

Is it possible to burn a .cdi in Linux? If I used cdirip under linux, how would I burn the iso to make sure it stayed selfboot?
Ze_ro
Insane DCEmu
Insane DCEmu
Posts: 120
Joined: Thu May 22, 2003 7:08 pm
Location: MB, Canada
Has thanked: 0
Been thanked: 0

Post by Ze_ro »

I've been doing this for a while... what I generally do is make a directory to hold all the files while I populate the thing with ROMs... once it's all ready, I move the ip.bin file to the parent directory, and just do like this (With NesterDC for example (in fact, I stole this from a script that came with NesterDC)):

cdrecord dev=0,1,0 speed=8 -multi -audio audio.raw
cdrecord dev=0,1,0 -msinfo (always returns 0,11702 for me, but I usually check anyways)
mkisofs -l -r -C 0,11702 -V NESTERDC -o nesterdc.iso nesterdir
(cat ip.bin ; dd if=nesterdc.iso bs=2048 skip=16) > nesterdc.raw
cdrecord dev=0,1,0 speed=8 -xa1 nesterdc.raw

The "cat ip.bin" like is what makes it self-boot... it's equivalent to running ipins.exe or whatever else people use. The "-l" in mkisofs makes long (31 char) filenames, and the "-r" adds RockRidge extensions which allows VERY long filenames, as well as non-alphanumeric characters and such... RR extensions works very nicely with KOS based stuff like Nester, but doesn't work well with libdream stuff like DCStella and [D]Colem unfortunately.

The only time this has screwed up on me was when I burned [D]Colem without realizing that the 1st_read.bin wasn't scrambled.

I remember someone posted a set of commands that would create a differently formatted disk that would actually work in the "non-Milcd" Dreamcasts... but I can't remember what it was. I think it involved specifying the boot sector from within the mkisofs command, and it definitely didn't use the audio track.

--Zero
WHurricane16
DC Developer
DC Developer
Posts: 92
Joined: Wed Oct 17, 2001 7:44 pm
Location: Cape Fear Region, NC
Has thanked: 0
Been thanked: 0
Contact:

Post by WHurricane16 »

K, appreciate the info ;)
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

I came up with a way to burn Data/Data format discs using cdrecord. It was something like this:

Code: Select all

mkisofs -l -r -G ip.bin -o session1.iso data_dir
(dd if=session1.iso bs=2048 count=18; dd if=/dev/zero bs=2048 count=564) > session2.iso
cdrecord -dev=?,?,? -multi -xa1 session1.iso
cdrecord -dev=?,?,? -eject -xa1 session2.iso
Ze_ro
Insane DCEmu
Insane DCEmu
Posts: 120
Joined: Thu May 22, 2003 7:08 pm
Location: MB, Canada
Has thanked: 0
Been thanked: 0

Post by Ze_ro »

Does that use any less disc space?

--Zero
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

No, it should be about the same. Except I think I made a typo there. It should be 282, not 564. I think. The second line should extract the first 36KB of the session1.iso image, and pad it up to 600KB.

It doesn't make much difference, but it does mean that you don't have to worry about getting the multisession numbers (cdrecord -msinfo), or adjusting the LBA of the data track. I find it a lot simpler to do, and certainly much simpler to code in a shellscript or in another program, so I use it.

It's pretty much the same format used by bin2boot. XDP3 used a different format, which had a huge data track as the first session (containing a huge dummy file, I think), and the main data in the second session. But that method is much more complex.
Post Reply