+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Extracting XA and STR data...
Pages: [1]
Author Topic: Extracting XA and STR data...  (Read 467 times)
Rai
Guest
« on: January 28, 2007, 09:25:08 pm »

This is something that's really ticking me off about PSX games, even if the text is uncompressed, and I can edit it, I can't extract XA and STR data, and therefore I can't extract, and recompile the data. So is there anyway I can dump these things or am I screwed?
JCE3000GT
Guest
« Reply #1 on: January 28, 2007, 10:13:50 pm »

XA audio and STR video on most games can be extracted (and played) with this program.  Not only that but it can also extract more than that...TIMs also as well as other stuff.  http://homepage2.nifty.com/~mkb/PsxMC/index.html

The site is in Japanese, here's the downloads page: http://homepage2.nifty.com/~mkb/PsxMC/download.html

There are XA and STR encoders out there I just don't know where to get them now.  I've got them on a CDR somewhere when I was hacking PSX games years ago--but I doubt I'd feel like going through my 1200 CDRs looking for that one or two discs.  Hope this at least helps you a tiny bit.
Rai
Guest
« Reply #2 on: January 29, 2007, 11:23:29 am »

That doesn't really seem to work for me for some reason. I also tried using CDMage to extract,it, however, it seems to just dump larger versions of the files.
Cyberman
Guest
« Reply #3 on: January 29, 2007, 11:59:00 am »

Rai
You probably aren't extracting the data correctly.  Those files are NOT normal files. I repeat they are NOT normal files.
Right so what does that mean?
The ISO9660 format has a few tricky (and stupid) things on it.  Sectors are 2302 bytes in length for example. They also have a header that identifys the sector type.
Right so what does that mean?
You have Type 1 (normal Data format) and Type 2 secotrs.  Type 2 are a different size sector. <--- this is your problem.
CDMage is likely dumping the files CORRECTLY the file size reported is in 2K chunks and ignores the extra data per sector.

For CD Audio the extra data is error correction code. (XA I believe is this format otherwise it's the format the STR files are in).
For the STR files these are interleaved audio and video files.  The headers on the sectors tell you what each sector is and what channel they are.  (think streams of data). You need to extract the video and audio if you want to get the data from the STR file.  The Audio is in ADPCM and has several formats.  The video is the spell motion JPEG format Sony used for the PS1.  That's about it.

Anyhow you won't get far if you don't keep in mind that the sector sizes are different for some files on the disk.

Cyb
Rai
Guest
« Reply #4 on: January 29, 2007, 04:30:45 pm »

Quote from: Cyberman on January 29, 2007, 11:59:00 am
Rai
You probably aren't extracting the data correctly.  Those files are NOT normal files. I repeat they are NOT normal files.
Right so what does that mean?
The ISO9660 format has a few tricky (and stupid) things on it.  Sectors are 2302 bytes in length for example. They also have a header that identifys the sector type.
Right so what does that mean?
You have Type 1 (normal Data format) and Type 2 secotrs.  Type 2 are a different size sector. <--- this is your problem.
CDMage is likely dumping the files CORRECTLY the file size reported is in 2K chunks and ignores the extra data per sector. Every other STR extracts correctly, but when trying to extract "Open.STR" it gives me an error.

For CD Audio the extra data is error correction code. (XA I believe is this format otherwise it's the format the STR files are in).
For the STR files these are interleaved audio and video files.  The headers on the sectors tell you what each sector is and what channel they are.  (think streams of data). You need to extract the video and audio if you want to get the data from the STR file.  The Audio is in ADPCM and has several formats.  The video is the spell motion JPEG format Sony used for the PS1.  That's about it.

Anyhow you won't get far if you don't keep in mind that the sector sizes are different for some files on the disk.

Cyb
The reason I doubt CDMage is extracting the STR files correctly is because the opening video will not load(Goes black when OPEN.STR is supposed to play). Strangely, I can view the STR in an STR player however it won't actually load in the game. I would use the directly edit ISO trick but CDMage never saves correctly(Always says "Can't save to "[].bin"). Square.STR will play in the game, but won't play in a standard STR player like the others.
« Last Edit: January 29, 2007, 04:40:51 pm by Rai »
Cyberman
Guest
« Reply #5 on: January 29, 2007, 05:41:44 pm »

Mm... I doubt existing players will work with completely extracted data.  In fact I'm pretty sure they won't.
The video in the file may play fine (it uses only 2K) but audio data will be hosed (LOL) then the video will be hosed. Let me see MDECs are at 2X speed and I think 320x240 had an interleave of 6:1 so 6 sectors of video for each sector of audio. There are 150 sectors per second at 2x 15fps 10 sectors per frame of audio and video? Hmmm well anyhow. That puts things in perspective a bit. Regular CD audio is 75 sectors per sector (1x).
I am trying to think of a good way to extract the data, to be honest there is no.. "Good" way.  Why are you messing with the movies et al?  Are you planing on changing the video data or something? Might require some custom tools to do that. I use to have the matrix information for the encoding and the encoding method. Sony released a command line util a long while back that allowed you to compress motion JPEG data for the playstation as well.  Not sure what data for input it liked to be honest. Cheesy

Cyb
Rai
Guest
« Reply #6 on: January 29, 2007, 06:01:24 pm »

Quote from: Cyberman on January 29, 2007, 05:41:44 pm
Mm... I doubt existing players will work with completely extracted data.  In fact I'm pretty sure they won't.
The video in the file may play fine (it uses only 2K) but audio data will be hosed (LOL) then the video will be hosed. Let me see MDECs are at 2X speed and I think 320x240 had an interleave of 6:1 so 6 sectors of video for each sector of audio. There are 150 sectors per second at 2x 15fps 10 sectors per frame of audio and video? Hmmm well anyhow. That puts things in perspective a bit. Regular CD audio is 75 sectors per sector (1x).
I am trying to think of a good way to extract the data, to be honest there is no.. "Good" way.  Why are you messing with the movies et al?  Are you planing on changing the video data or something? Might require some custom tools to do that. I use to have the matrix information for the encoding and the encoding method. Sony released a command line util a long while back that allowed you to compress motion JPEG data for the playstation as well.  Not sure what data for input it liked to be honest. Cheesy

Cyb
Nah, I'm using the extract and recompile method. I tried editing the ISO by replacing files in CD Mage but that does work(Always says "Can't save to [].ISO"). So unless there's someway to extract STR files, or there's a better ISO editor out there, I'm screwed and won't be able to reinsert anything.
Cyberman
Guest
« Reply #7 on: January 29, 2007, 06:22:26 pm »

You may want to mess with some of Pixel's tools.
CDTool and LuaPatch

It's not easy stuff to use just to warn you ahead of time.

Cyb
Pages: [1]  


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