Author Topic: Chrono Cross Music and Sound Investigation  (Read 10331 times)

Satoh

  • CC:DBT Dream Team
  • Magical Dreamer (+1250)
  • *
  • Posts: 1291
  • Am I your dream... or are you mine...?
    • View Profile
Re: Chrono Cross Music and Sound Investigation
« Reply #45 on: July 09, 2008, 01:55:00 am »
Wooow, so does the SPU actually force the use of APCM in every game? And does that stand for Adaptive Pulse Code Modulation?

For my own reference and anyone else who's interested, a short wikipedia primer on Pulse Code Modulation. Also, the Bible that halkun wrote has a wealth of knowledge on the SPU that Chrono Cross needs to interact with.


So wait, is I'm understanding the PCM article, does that mean we only need to run an MP3 through with the right sample timer to encode it into a CC compatable format?

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Chrono Cross Music and Sound Investigation
« Reply #46 on: July 09, 2008, 01:58:23 am »
I have absolutely no understanding of music data as yet, so we'll have to wait for halkun's answer on that. I still haven't found documentation on Adaptive PCM yet, so I'm not sure how it relates to PCM exactly. Other than that it's "adaptive." :D

MDenham

  • CC:DBT Dream Team
  • Chronopolitan (+300)
  • *
  • Posts: 330
  • Glowsticks are not a weapon.
    • View Profile
    • Java IRC - konata.echoes-online.com
Re: Chrono Cross Music and Sound Investigation
« Reply #47 on: July 09, 2008, 02:16:03 am »
Wooow, so does the SPU actually force the use of APCM in every game? And does that stand for Adaptive Pulse Code Modulation?

For my own reference and anyone else who's interested, a short wikipedia primer on Pulse Code Modulation. Also, the Bible that halkun wrote has a wealth of knowledge on the SPU that Chrono Cross needs to interact with.


So wait, is I'm understanding the PCM article, does that mean we only need to run an MP3 through with the right sample timer to encode it into a CC compatable format?
:D If only it were that simple.

First off, you'd have better luck with an uncompressed .WAV file - MP3s need to be decoded as their samples are in a format that bears little or no resemblance to PCM samples (not really problematic for current-gen systems, slightly problematic on a PS2, and probably "stand-alone program only" for the PSX).

The problem then becomes that an uncompressed .WAV file is, well, rather large...

To be honest, if we don't want to go through the hassle of trying to port the game's engine completely over to PS2 (which, while it'd allow higher-polycount models as well, would require hacking not just CC, but also [preferably] at least one of the PS2 FF games) we'd be better off finding a way to do Redbook audio (which practically guarantees that we're looking at a 3-disc minimum unless there's a fair amount less to the overall game).

Satoh

  • CC:DBT Dream Team
  • Magical Dreamer (+1250)
  • *
  • Posts: 1291
  • Am I your dream... or are you mine...?
    • View Profile
Re: Chrono Cross Music and Sound Investigation
« Reply #48 on: July 09, 2008, 02:21:27 am »
Well...hmm... I guess I go with my original stand of "hiring"(blackmailing) a midi artist into writing all the MP3 tracks we've found and want ported... (though writing it in a program specific to APCM formatted samples...)

MDenham

  • CC:DBT Dream Team
  • Chronopolitan (+300)
  • *
  • Posts: 330
  • Glowsticks are not a weapon.
    • View Profile
    • Java IRC - konata.echoes-online.com
Re: Chrono Cross Music and Sound Investigation
« Reply #49 on: July 09, 2008, 02:24:13 am »
Well...hmm... I guess I go with my original stand of "hiring"(blackmailing) a midi artist into writing all the MP3 tracks we've found and want ported... (though writing it in a program specific to APCM formatted samples...)
I'd be extremely surprised if the CC engine doesn't have an unused (or nearly so) function in it to play Redbook tracks, though.  (Isn't the ending theme over the credit roll for the "good" ending in CC vocal?  That'd be much easier to do as a normal Redbook track than in this sample format.)

Satoh

  • CC:DBT Dream Team
  • Magical Dreamer (+1250)
  • *
  • Posts: 1291
  • Am I your dream... or are you mine...?
    • View Profile
Re: Chrono Cross Music and Sound Investigation
« Reply #50 on: July 09, 2008, 02:37:15 am »
Well...hmm... I guess I go with my original stand of "hiring"(blackmailing) a midi artist into writing all the MP3 tracks we've found and want ported... (though writing it in a program specific to APCM formatted samples...)
I'd be extremely surprised if the CC engine doesn't have an unused (or nearly so) function in it to play Redbook tracks, though.  (Isn't the ending theme over the credit roll for the "good" ending in CC vocal?  That'd be much easier to do as a normal Redbook track than in this sample format.)

We'll need to look into that, but I know nothing of redbook, do you know of a simple explanation for it? I'm not up on many audio media formats.

MDenham

  • CC:DBT Dream Team
  • Chronopolitan (+300)
  • *
  • Posts: 330
  • Glowsticks are not a weapon.
    • View Profile
    • Java IRC - konata.echoes-online.com
Re: Chrono Cross Music and Sound Investigation
« Reply #51 on: July 09, 2008, 02:49:55 am »
Well...hmm... I guess I go with my original stand of "hiring"(blackmailing) a midi artist into writing all the MP3 tracks we've found and want ported... (though writing it in a program specific to APCM formatted samples...)
I'd be extremely surprised if the CC engine doesn't have an unused (or nearly so) function in it to play Redbook tracks, though.  (Isn't the ending theme over the credit roll for the "good" ending in CC vocal?  That'd be much easier to do as a normal Redbook track than in this sample format.)

We'll need to look into that, but I know nothing of redbook, do you know of a simple explanation for it? I'm not up on many audio media formats.
It's pretty simple - it's a standard CD audio track!  There's a lot of error-correction data to it (hell, there's a lot of error-correction data to a CD in general - if you were storing solely data on a CD, with none of the error-correction stuff, you'd be able to store 2.2GB on it!) as far as the media itself is concerned, but basically it's just "burn it as a regular CD audio track after all the data gets put on".

Satoh

  • CC:DBT Dream Team
  • Magical Dreamer (+1250)
  • *
  • Posts: 1291
  • Am I your dream... or are you mine...?
    • View Profile
Re: Chrono Cross Music and Sound Investigation
« Reply #52 on: July 09, 2008, 04:25:35 am »
So theoretically we could:
A burn the music as an audio disc and cut it back out via an ISO+ hexeditor.
B Write the music with anything that enables export to .CDA.
C Wait for you to give me a better idea of what we need instead of blindly guessing.

Lol amirite?

MDenham

  • CC:DBT Dream Team
  • Chronopolitan (+300)
  • *
  • Posts: 330
  • Glowsticks are not a weapon.
    • View Profile
    • Java IRC - konata.echoes-online.com
Re: Chrono Cross Music and Sound Investigation
« Reply #53 on: July 09, 2008, 05:02:32 am »
So theoretically we could:
A burn the music as an audio disc and cut it back out via an ISO+ hexeditor.
B Write the music with anything that enables export to .CDA.
C Wait for you to give me a better idea of what we need instead of blindly guessing.

Lol amirite?
Number B (ha!) would be correct - burn the disc(s) with however much data + several audio tracks.

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1756
    • View Profile
Re: Chrono Cross Music and Sound Investigation
« Reply #54 on: July 10, 2008, 07:25:30 pm »
I can't do the close file inspections you do since I don't have a copy of Chrono Cross, but I want to share something. It looks like sequence data may also be tagged with "AKAO".

I looked a bit at PSFs I changed to compress2 level 0 with PSFLab.

I copied and pasted part of an AKAO block from a PSF of Grasslands of Time over an AKAO block of Drowning Valley in a Chrono Cross image. I also copied and pasted something which follows the block I copied in the PSF and also in my memory dumps, but is elsewhere in the Chrono Cross image. I managed to get a glitchy version of Grasslands of Time. (Warning: Has beeping noises)
I haven't had any success with my other tests.

[attachment deleted by admin]
« Last Edit: July 10, 2008, 07:35:30 pm by Vehek »

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Chrono Cross Music and Sound Investigation
« Reply #55 on: July 11, 2008, 12:19:46 am »
Fascinating! Vehek, are PSFs literally the original data ripped from a game image? I could never figure out whether each individual PSF file contains samples and sequences, or if it's something different from the original data due to post-processing or something. Though since you found AKAO blocks within the Chrono Cross PSFs, that might point to the PSFs actually being composed solely of ripped data.

In any case, the next step might be for me to grab an AKAO block from a Chrono Cross PSF and see if it's in the original game image.

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1756
    • View Profile
Re: Chrono Cross Music and Sound Investigation
« Reply #56 on: July 11, 2008, 12:28:18 am »
I think PSFs are likely to have some compression, which is why I had to use PSFLab to reduce the compression. (At least, that's what I think I did.)
For some reason, 0x800 and onward of the AKAO blocks I've looked at (counting the first A in AKAO as 0) is different in the Chrono Cross image I have than in the PSFs and memory dumps I have.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Chrono Cross Music and Sound Investigation
« Reply #57 on: July 11, 2008, 12:44:10 am »
Vehek, is the Chrono Cross image you have on hand capable of being dumped with MDenham's modified dumper? I think it works both with ISOs and BINs now. Since you know so much about SNES music data, you'd probably be able to zip through PSX sound formats pretty quickly. I welcome you to have at the Chrono Cross sound data if you've got the time and interest, since I won't be able to look at it in any depth for quite some time.

Satoh

  • CC:DBT Dream Team
  • Magical Dreamer (+1250)
  • *
  • Posts: 1291
  • Am I your dream... or are you mine...?
    • View Profile
Re: Chrono Cross Music and Sound Investigation
« Reply #58 on: July 11, 2008, 10:53:15 pm »
Vehek, is the Chrono Cross image you have on hand capable of being dumped with MDenham's modified dumper? I think it works both with ISOs and BINs now. Since you know so much about SNES music data, you'd probably be able to zip through PSX sound formats pretty quickly. I welcome you to have at the Chrono Cross sound data if you've got the time and interest, since I won't be able to look at it in any depth for quite some time.

You assume that they're related. It's dangerous to assume these things... Never assume anything will be easy, then when something is easy, its a very nice surprise XD.

But I know nothing about media formats so maybe it will be easy...

MDenham

  • CC:DBT Dream Team
  • Chronopolitan (+300)
  • *
  • Posts: 330
  • Glowsticks are not a weapon.
    • View Profile
    • Java IRC - konata.echoes-online.com
Re: Chrono Cross Music and Sound Investigation
« Reply #59 on: July 13, 2008, 01:36:52 pm »
For what it's worth, I think the list of instruments there is partly wrong - it looks like every even file from 2274-2408 is an instrument, and every odd file from 2273-2407 is a sequence.

That said, this bears much more of a resemblance in terms of functionality to .MOD tracking than MIDI composing, for those of you who have been around since the bad old days of dialup and the Amiga. :D

Things that seem to be the case with the sequences:  (note: early/late references are to 2273.out)

FE 00 - Command terminator.  Not to be confused with:
FE xx 00 - Unknown, but probably relates to a channel number.  How many audio channels does the PSX support in hardware - does 24 sound right (the xx I'm seeing here hasn't exceeded 16 [=22 decimal])?
FD 02 - Unknown.  Appears frequently early on as the two bytes immediately preceding FE 00; appears mid-"string" later on.
FC 02 - Similar to FD 02.  Also similarly unknown.
8x, 9x - Unknown; seems to be single-byte commands.  I've seen 88, 89, 93, 94, 98, and 99.  Not all 8x commands are single-byte.  Specifically, 85 and 8C seem to be two bytes.

More updates as I wade through the sequences.
« Last Edit: July 13, 2008, 01:41:32 pm by MDenham »