+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Chrono Cross Hacking Project; How to rip sound effects & instruments?
Pages: [1]
Author Topic: Chrono Cross Hacking Project; How to rip sound effects & instruments?  (Read 862 times)
FaustWolf
Guest
« on: October 16, 2007, 02:00:31 pm »

Ladies and gentlemen of the rom hacking community, I bid you warm greetings.

Weird introductions aside, I'm working with a number of Chrono Cross fans to map out the Cross CD data, which will hopefully help us get at model and pre-rendered background data that hasn't been ripped yet despite the fact that there doesn't seem to be a Table of Contents on the CD images. Naturally, there's a thousand questions I could ask you folks right now, but I'll keep it to the most pressing matter at hand and ask other questions later if necessary.

Anyway, I'm interested in ripping Chrono Cross' .STR data in its native format (i.e., saving the data as .STR) so I can go back and locate its offsets in the CD image with a hex editor. I can find and view the .STRs with PSXMc just fine, but of course the closest format I can export to is compressed .str (.CSTR I think). That's still somewhat useful for tracing where the .STRs are in the CD image, but not nearly as useful as getting the .STRs in their original format. I've checked out PSMPlay as well and it seems to detect the .STRs, but when I try to read the data the program gives me a "Bad Magic Number" error. Is there a surefire method for ripping .STR data from PlayStation CDs / .isos?

And secondly, I suspect that .STR FMVs may be stored as individual frames and not as "movie files" per se. Is this understanding correct, from anybody's previous experience? If so, that would mean whatever music and sound effects play during a PlayStation game's FMVs would be stored elsewhere on the disc, no?

Thanks in advance for slogging through this, and double thanks for any words of wisdom you can provide!
« Last Edit: November 03, 2007, 12:02:13 pm by FaustWolf »
Sephiroth 1311
Guest
« Reply #1 on: October 18, 2007, 04:21:03 pm »

The French group "Terminus Traduction" released 2 years ago the tools they used to dump the data... and that means movies too.
However, you'll have to reconfigure a bit those tools, since they dump only the files which are necessary for a translation (that means they dump only the movies containing text)... but it shouldn't be too hard.
Same happens whit the other files... anyway, if you study a bit their tools, you'll easily dump all of the files.

Furthermore, there are some file lists which may come in handy. Tongue
FaustWolf
Guest
« Reply #2 on: October 18, 2007, 06:08:00 pm »

Thanks Sephiroth! I've got my immediate .STR dumping problem solved with a more recent version of PSMPlay, but yes, I've definitely got to take a good look at Terminus Traductions' tools. Next up is ripping sound data.
FaustWolf
Guest
« Reply #3 on: October 19, 2007, 07:42:02 pm »

Does anyone know of a way to view a PSX CD's table of contents / index file, which tells the console/emulator where to look for the various game resources? I've got what I think might be a TOC ripped from the Chrono Cross CD, but it's useless until I can get it into an intelligible format. It doesn't look like I can attach things at this forum, so I'll link to the file if anyone would like to take a look at it: http://rapidshare.com/files/63794276/CC_Index_Possibility.zip.html

Any ideas? Has anyone here done this sort of thing before?
Sephiroth 1311
Guest
« Reply #4 on: October 20, 2007, 12:29:33 pm »

If I recall correctly, the index table starts at sector 24. Tongue
FaustWolf
Guest
« Reply #5 on: October 20, 2007, 01:20:43 pm »

Yes, yes, that's very good, because that's what I pulled from the iso (starting offset C000).

Any way to view it? Someone on the qhimm forums posted the following code to parse the Xenogears index file, which was hidden just like Cross':

Code:
extract(char *filename)
{
    unsigned long start_sector, file_size;
    unsigned char start[3], size[4];
    char numero[10];
    // first directory number 0
    int directory_number = 0;

    // create file with cd file index
    create_index_file();

    index_file = fopen("index_cd.bin", "rb");

    for (i = 0; ; i++)
    {
        file_position = fread(start, 1, 3, index_file);
        file_position = fread(size, 1, 4, index_file);

        // reverse bytes order (low endian)
        start_sector = start[0] | (start[1] << 8) | (start[2] << 16);
        file_size = size[0] | (size[1] << 8) | (size[2] << 16) | (size[3] << 24);

        // end of file
        if (file_size == 0x00ffffff)
        {
            break;
        }
        if (start_sector == 0 && file_size > 0)
        {
            filename[9] = 0;
        }
        // directory
        if (file_size > 0xff000000)
        {
            // create directory name (name - number of directory)
            filename[9] = 0;
            sprintf(numero, "%d", directory_number++);
            strcat(filename, numero);
            strcat(filename, "\\\\");
            mkdir(filename);
        }
        // file
        if (start_sector != 0 && file_size < 0xff000000 && file_size > 0)
        {
            printf("file number %d, size: 0x%x byte - ", i, file_size);
            parse_file(start_sector, file_size, i, filename);
        }
    }
}

I'm not sure what programming language it's in though; C++ maybe? I'm told it only works for Xenogears, though. Any idea if that's true, and how it could be modified if necessary?

EDIT: Oops, I think the forum interpreted some symbols as smilies; I didn't put it in there. Wherever you see a smily, think < <  8 ) without the spaces.
« Last Edit: October 20, 2007, 04:33:57 pm by FaustWolf »
KC
Guest
« Reply #6 on: October 20, 2007, 01:41:02 pm »

I think Chrono Cross's file system works a bit different.
If I remember correctly, you get the starting sector (3 bytes) and the complement/8 for the last sector (1 byte, so... size of last sector = 2048-byte*8). Then the game reads sector after sector, until the sector header specifies that it's the end of the file.
FaustWolf
Guest
« Reply #7 on: October 20, 2007, 02:26:39 pm »

Thanks KC. That explains why I was told elsewhere the coding wouldn't work for Xenogears. If I changed the necessary parts of the code to reflect Cross' file structure, would that do the trick you think?
creaothceann
Guest
« Reply #8 on: October 20, 2007, 04:28:14 pm »

There are several ways to disable smileys, the easiest is to enable that checkbox in the "Additional Options" of that post.
Zeality
Guest
« Reply #9 on: October 20, 2007, 11:18:43 pm »

I'll mirror FW's post at QHMM:

Quote
I've run a search on both kernel and KERNEL and found nothing. However, there does seem to be a .EXE starting approximately at offset 13000 of the first Chrono Cross disc. Additionally, there's a short area of the disc that reads in ASCII:



The individual files this slice of hex seems to refer to - files with .WAA, .WEP, or .KMD extensions - aren't readily detectable from the ASCII I believe. Though I'll check again later. Could this info be useful potentially? Both the .EXE header and the chunk of ASCII shown above occur very far away from where I believe the Table of Contents is.

And if it's relevant, I've got the Square's Preview Demo Disc, with the file structure intact. The director for "KID", or the Chrono Cross demo, has these files in it:

KID.EXE
CRONO.HED
CROCRO.IMG
TITLE.XAM
BLOOD.XAM
TIDAL.XAM
END.DAT

I can't rip the XAM ones (I get some "invalid MS-DOS function" error). CROCRO.IMG is the actual game of course, and the others I've hosted here in case they are of use:

http://chronofan.com/Black/Cross/CRONO.HED
http://chronofan.com/Black/Cross/END.DAT
http://chronofan.com/Black/Cross/KID.EXE
FaustWolf
Guest
« Reply #10 on: October 21, 2007, 05:56:30 pm »

It appears that we've probably found a way to bypass the need for an index file altogether for Chrono Cross -- we've rediscovered a disc dumping tool already written by Yazoo, the guy who ripped the .PSFs from Cross years ago!

Ramsus at the Compendium has modified the code to make it run more effectively, and we've apparently got all files on the first disc dumped! If anyone's interested in what's going on at the Compendium, the relevant posts start here:

http://www.chronocompendium.com/Forums/index.php/topic,4729.msg83045.html#msg83045

Now that we've got the files, we'll need to worry about decompression of models and other data - that's the hard part, and we'll probably be back here with other questions. Yazoo created decompression tools as well, but we're unsure yet if they work for all the various file types that are in Cross.

Sephiroth 1311 also sent me more of Yazoo's tools recently. Thanks Sephiroth! They might be tools we haven't seen yet.
FaustWolf
Guest
« Reply #11 on: November 03, 2007, 12:31:54 pm »

Okay, time to revive this thread with some new questions for the romhacking community.

As part of the quest to dissect the first Chrono Cross CD, I'm trying to find a way of ripping sound data in its native format. Using PSound, I acquire 1740 sound effects/instruments from the physical CD and 18,903 sound effects/instruments from my ripped iso file. Not sure what's causing the huge difference there, but I know lots of the sounds detected on the ripped image are inaudible; perhaps the extra detections are errors. But that's just me thinking out loud. Now onto some questions:

1.) PSound only exports to .WAV, which doesn't help me plot out where all the sound data is on the CD image. Anyone know of a program that can scan for sound data like PSound but export that data in its original format?

2.) According to my rudimentary understanding of how game music "works," the tracks are actually stored as a gazillion separate instrument sounds, then the game music driver uses sequence data to assemble all these sounds into what we perceive as in-game music. Is this understanding basically correct?

3.) I understand that some music is stored as streaming .XA files, though I'm doubting that this is the case with Chrono Cross' music data. But could someone point me to a recommended .XA file ripper, just for the heck of it?

Any input regarding Playstation sound data ripping / formats / etc. is more than welcome.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC