Extracting data from final data track on GNU/Linux

Post discussions on how to downsample and hack CD-based games here. Discuss the best ways to fit your backed-up game onto a CD-R, or other ways to play GDI files on a real console.

Moderator: Moderators

dragos240
Posts: 3
Joined: Thu Feb 23, 2012 6:58 am

Extracting data from final data track on GNU/Linux

Post by dragos240 »

Hello,

I'm not sure how active this forum is still. But I recently dumped my "Chu Chu Rocket!" GD-ROM to my sd-card.

Using a few different methods, I was able to extract 2 out of the 3 data tracks with the exception of the final one. I was following a few guides and I saw that the final data track should be structured like so:

Code: Select all

FILE track19.bin BINARY
	TRACK 19 MODE1/2352
		INDEX 01 00:00:00
Track19 here is the final data track. The guides I've seen say that no pre nor post gap is needed for the final data track's extraction. I then use bchunk like so:

Code: Select all

$ bchunk -v track19.bin track19.cue track 
binchunker for Unix, version 1.2.0 by Heikki Hannikainen <hessu@hes.iki.fi>
	Created with the kind help of Bob Marietta <marietrg@SLU.EDU>,
	partly based on his Pascal (Delphi) implementation.
	Support for MODE2/2352 ISO tracks thanks to input from
	Godmar Back <gback@cs.utah.edu>, Colas Nahaboo <Colas@Nahaboo.com>
	and Matthew Green <mrg@eterna.com.au>.
	Released under the GNU GPL, version 2 or later (at your option).

Reading the CUE file:

Track 19: MODE1/2352    01 00:00:00 (startsect 0 ofs 0)

Writing tracks:

19: track19.iso 
 mmc sectors 0->44106 (44107)
 mmc bytes 0->103737312 (103737313)
 sector data at 16, 2048 bytes per sector
 real data 90331136 bytes
  86/86   MB  [********************] 100 %

However if I try to use any archive opener like I used for the others, it doesn't like to open.

Next I tried mounting the iso file with the mount command:

Code: Select all

# mount -o loop track19.iso mnt/
Password: 
mount: you must specify the filesystem type
That's telling me that something went wrong here. It's not correctly formatted. So I delete the file and try mounting the cue file with cdemu which supports .cue mounting. Upon mounting the cue file I get the same error. "You must specify the filesystem type". This leads me to believe that I'm formatting the .cue file incorrectly. Maybe a pregap is required here after all? Maybe the mode is not mode1/2352?

I'm stumped and I need to extract this data file for a project I'm working on. If anyone has an idea, feel free to post it.

On the other hand, if I cannot find a solution, can someone extract track19 for me then put it in either a .rar, .zip, or tarball archive and upload it?

Thanks in advance,
Dragos240
User avatar
Maddog
is awesome
is awesome
Posts: 1599
Joined: Sat May 12, 2007 4:12 pm

Post by Maddog »

Dreamcast has a little quirk when there's more than one data track:
track03 always contains the TOC (this shows where files are located) but the last data track contains the actual data, without a TOC!

That's why you had a problem with unrecognized filesystem etc etc.

There's an excellent solution, but I don't know if/how it may work on Linux. FamilyGuy has made the wonderful GDI2Data which makes the process as easy as clicking on a single .bat file!
It can be found here (other places too, but one is enough!)

Please post back if you get it working on Linux, other people might be interested too.
dragos240
Posts: 3
Joined: Thu Feb 23, 2012 6:58 am

Post by dragos240 »

I could make a script, if I knew more about how the process worked. I don't however. I've extracted 2 tracks. Track 1, and Track 3.

Is there any documentation about extracting different tracks that would help me? If so, I will happily make a script for linux.

Regards,
Dragos240
User avatar
atreyu187
Posts: 462
Joined: Mon Jul 25, 2011 8:13 pm

Post by atreyu187 »

You need to make a cuesheet and mount the image. Then take ISObuster to extract RAW data. This way you can get the filelist.txt form there anyhow all in one step to arrange proper sort order as well.
Nologic
Posts: 207
Joined: Sat Apr 14, 2007 12:14 pm

Post by Nologic »

Well I got an AutoIt script that will create CUE files by the hundreds if you have hundreds of GDI index's.

This can be compiled and ran through WINE in Linux...course then again the Batch Script done by FamilyGuy should also work in WINE.

I also have a script that will create a monolithic BIN+CUE...but I think I have an error in it...as I believe the Endiness needs to be swapped for data tracks to turn out proper.
User avatar
atreyu187
Posts: 462
Joined: Mon Jul 25, 2011 8:13 pm

Post by atreyu187 »

Would you mind sharing the AutoIT script to create CUE's in a batch? As when I rip my games to Mil-CD I do them in batches and making them by hand can be tiring. And FG's pack is great but there is no way to obtain the filelist using that so I just use ISOFix to LBA 45000 and then ISOBuster to get filelist and extract RAW data as I don't use emulation at all I just like to dump and rip them all for fun truth be told and when I get those games that are more then 5 tracks it gets tiring. I happen to like disc with 5 tracks as I can mount a generic CUE with the files and extract right away in ISOBuster without the need to ISOfix the image.
Nologic
Posts: 207
Joined: Sat Apr 14, 2007 12:14 pm

Post by Nologic »

Yeah I'll let you at it...as soon as I fix an issue I just noticed...it works fine for Tosec GDI's but fails for ReDump GDI's.

Oh if you give me links to the tools you are use along with what command line augments you use...or settings...I might be able to automate a good chunk of stuff for you.


*Update *
Okay here is the script in both source and executable.
[Linky]

Ended up doing nearly a complete rewrite...not that it was that broken...just the code was that ugly.

Keep in mind the GDI index must be in the same folder as the tracks to it...as the script needs to read the file size to set correct gap spacing.

Let me know if you run into any problems.

*Update*
Well I found a few issues and have since corrected them.

Now with ISOBuster I'm guessing you are using a command line like:

Code: Select all

isobuster.exe /m /c /nosplash /d:<VirtualCD> /scan /t:all "/tree:iso:<HardDrive>\<FolderPath>\FileList.txt?<%LBA> , <%RELPATH>" "/ef:iso:<HardDrive>\<FolderPath>\data\"
Which should end up looking something like this:

Code: Select all

isobuster.exe /m /c /nosplash /d:k /scan /t:all "/tree:iso:D:\My Projects\GDI To CUE\Junk\FileList.txt?<%LBA> , <%RELPATH>" "/ef:iso:D:\My Projects\GDI To CUE\Junk\data\"
So whats next? I can sort and rewrite the FileList.txt to your sorttxt.txt easy enough.

This isn't my gig...so hand holding is sort of in order. :p
User avatar
atreyu187
Posts: 462
Joined: Mon Jul 25, 2011 8:13 pm

Post by atreyu187 »

Yea I am thinking it is just because there is no overhead traffic. I only have one NiC card and don't like wifi as it just isn't fast enough so I stay plugged in most of the time. Well I got a new monitor right next to my laptop so I can dump right here now easily and fast without running a bunch of wires.
Nologic
Posts: 207
Joined: Sat Apr 14, 2007 12:14 pm

Post by Nologic »

I think you cross posted. Well when I was dumping I had a VGA box hooked up to my DC which was in turn connected to my KVM so I just used the same monitor. :)

Well I'm looking at following the guides done by TuxTheWise over at snesorama...site is now down...so had to use a archive of the tutorials.

Making GDI files bootable on real Dreamcast with perfection

Extracting GDI dumps files

Looking at the above tutorials I should be able to automate most if not all of it.

@ dragos240 -

Another idea than trying to run stuff through WINE is to install VirtualBox and create a system in it that has WinXP installed along with all the app's you need. It takes up more space on your system...but at least you'll be able to do everything you need to do.
User avatar
atreyu187
Posts: 462
Joined: Mon Jul 25, 2011 8:13 pm

Post by atreyu187 »

No biggie as I am pretty seasoned at doing it now as I have ripped over 150 games to Mil-CD format. And I don't fuss with redump at all so no worries there. Thanks for the info and heads up. I archived all of Tux's guides before it went down even the SFD guide he posted.
Nologic
Posts: 207
Joined: Sat Apr 14, 2007 12:14 pm

Post by Nologic »

Well I ran into a road block...sort of...there is other stuff I can do...but here is the issue Tux mentions doing a hex edit on "1ST_READ.BIN"...looking for the values of "5E B0 00 00" and replacing them with "96 00 00 00" the problem is...I'm not finding them.

Anyways this is what I got so far:
[Linky]

Creates CUE's
Mounts in Alcohol 120
Scans with ISO Buster (2.8.X+)
Creates FileList
Converts FileList to Sorttxt.txt
Dumps ISO contents
Converts audio tracks to WAV
Compacts AFS files
Grabs BootFirst.bin (IP.BIN)
Patches the Bootfirst.bin (IP.BIN) - Region Free & VGA

Still a ways to go...but getting there...If I can just sort out this Hex edit issue.
User avatar
atreyu187
Posts: 462
Joined: Mon Jul 25, 2011 8:13 pm

Post by atreyu187 »

Nice work man
Nologic
Posts: 207
Joined: Sat Apr 14, 2007 12:14 pm

Post by Nologic »

Hey could you check "F355 Challenge Passione Rossa" as that is what I'm running into the issue with.

However according to (here) it's suppose to be:
Serach
00 45 0E 0C A6 00 00
change it to
00 45 0E 0C 5C 2E 00

But I'm not finding that ether. :(

I think this script will be likely limited to just the basic grunt work...and require the care and love of a human to actually finish things up.
User avatar
atreyu187
Posts: 462
Joined: Mon Jul 25, 2011 8:13 pm

Post by atreyu187 »

Ill look into it as I normally use data/data layout as I can use the entire disc if need be and requires less hacking and that is the route I went with on this rip of the game.
dragos240
Posts: 3
Joined: Thu Feb 23, 2012 6:58 am

Post by dragos240 »

Wow! Thanks guys for your work. I had thought that this project had all but died and gone to the second page to be forgotten forever.

-Dragos240
Post Reply