Author Topic: CHRONO CROSS FILE EXPLORATION THREAD  (Read 64701 times)

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 FILE EXPLORATION THREAD
« Reply #645 on: June 30, 2008, 03:09:23 am »
What would the presence of a debug flag as opposed to a debug "room" tell us, M? I'm especially interested in the zoom function that the debug mode makes use of; my guess is the model size for each room is specified by the fieldscript, which is most likely one of the other LZSS-compressed files in each of the game's rooms.
Mostly what it'd tell us is that it's entirely possible to cue up the debug menu in basically any room of our choice.  It'd definitely be interesting to do it in the Developer's Ending; it'd be more than interesting to do it in the Models Saying Their Names room (can't remember the room number for it off the top of my head, but it's the Termina dock, with a bunch of models scattered all over it, and talking to each model gets a four-letter string out of them) because you could theoretically change the sizes of those models as well.

For what it's worth, it looks like rewriting the tools in C# ought to be much more useful, though I may need a small amount of help writing model export/import functionality.  Luminaire, do you have any C# experience, or is it just Python? :D

EDIT: gah, either Babelfish is being lousy, or they used French slang that it doesn't recognize. :D

EDIT #2: Seems like there's no IRC channel for the site that's readily accessible.  For what it's worth, people are welcome on my (hosted on my own home computer, which only goes down when things go wrong!) server if we need to have something a little more real-time than forum posting - konata.echoes-online.com is the server name (yes, I'm a Lucky Star fan) and pretty much any channel name is fair game.  Send a /msg to MDenham if you go on (chances are I'm at work on a weekday, but I'll get to you when I'm back from work).
« Last Edit: June 30, 2008, 04:45:28 am by MDenham »

Luminaire85

  • Guru of Time Emeritus
  • Chronopolitan (+300)
  • *
  • Posts: 311
    • View Profile
    • Chrono Cinema
Re: CHRONO CROSS FILE EXPLORATION THREAD
« Reply #646 on: June 30, 2008, 08:31:30 am »
For what it's worth, it looks like rewriting the tools in C# ought to be much more useful, though I may need a small amount of help writing model export/import functionality.  Luminaire, do you have any C# experience, or is it just Python? :D

I don't know C#, but I know C++ very well (and Python kinda well now, of course).

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 FILE EXPLORATION THREAD
« Reply #647 on: July 02, 2008, 05:23:18 am »
For what it's worth, it looks like rewriting the tools in C# ought to be much more useful, though I may need a small amount of help writing model export/import functionality.  Luminaire, do you have any C# experience, or is it just Python? :D

I don't know C#, but I know C++ very well (and Python kinda well now, of course).
How about French? :lol:

I'm in the process (very slow, for two reasons - one, my abysmal French, and two, their...  uh, peculiar programming practices - seriously, messy globals all over the place, other oddities, written entirely in regular C...) of translating the TT tools to English and C#, and at the rate I'm going at at present, I might have a working version sometime around the end of the year.  :shock:

If you feel up to trying to follow how I write code and/or learning C# (it really isn't that different from C++, aside from a few things that basically produce "safer" code), I'll see about making sure my home SVN server is functional and put the code in there.  (Actually, that goes for anyone - anyone interested in either learning C# and applying it, or who already knows C#, or who knows French and has done some programming before, lemme know.)

Oh, and BTW - once we have this version of the tools written up into a usable state, the next step is to give it an actual user interface, rather than making people resort to just command-line stuff.  The obvious conclusion of this is a full CC editor, but that'll require finding out what, if any, data is hard-coded in the engine itself...

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: CHRONO CROSS FILE EXPLORATION THREAD
« Reply #648 on: July 02, 2008, 09:55:10 am »
First Square Enix puts up a Chrono Trigger DS site, and now MDenham is writing a Chrono Cross editor. Can this week get any better? :lee:

M, one thing to keep in mind is that (to my knowledge) the Terminus Traductions tools does not dump all the game files as Yazoo's utility pack does. I think the TT tools are more designed for editing the dialogue files. However, it's highly possible I just haven't figured out how to work the TT tools properly yet. For example, there's got to be a video dump feature because there's a folder for the videos, but I haven't successfully dumped those yet.

In any case, the TT tools do dump all the room files, and is supposed to be capable of rebuilding a Chrono Cross game disc. And all the .OUT numbers we've got in our encyclopedia should still be applicable to what the TT tools prodces. Can you tell from your exploration so far if there's a general LZSS decompression function in the TT tools M?

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 FILE EXPLORATION THREAD
« Reply #649 on: July 02, 2008, 08:39:29 pm »
M, one thing to keep in mind is that (to my knowledge) the Terminus Traductions tools does not dump all the game files as Yazoo's utility pack does. I think the TT tools are more designed for editing the dialogue files. However, it's highly possible I just haven't figured out how to work the TT tools properly yet. For example, there's got to be a video dump feature because there's a folder for the videos, but I haven't successfully dumped those yet.

In any case, the TT tools do dump all the room files, and is supposed to be capable of rebuilding a Chrono Cross game disc. And all the .OUT numbers we've got in our encyclopedia should still be applicable to what the TT tools prodces. Can you tell from your exploration so far if there's a general LZSS decompression function in the TT tools M?
To be honest, I'm not entirely sure if it actually does dump all the game files or not (I haven't gotten that far in following the code).

As far as a general LZSS decompression function, I think "Lzss_D" is the command for that (with the new tools, it'll be "unpack-lzss" - longer but more readable commands are a plus, I think) - and just based on a quick once-over of its code, it doesn't seem to do any sort of special case stuff for the decompression.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: CHRONO CROSS FILE EXPLORATION THREAD
« Reply #650 on: July 02, 2008, 10:23:14 pm »
Suh-weeeeet. I think I was simply not able to get the LZSS_D and LZSS_C functions to execute properly because they're expecting very specific arguments, and I have no idea what to input at this point.

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 FILE EXPLORATION THREAD
« Reply #651 on: July 02, 2008, 10:24:41 pm »
Suh-weeeeet. I think I was simply not able to get the LZSS_D and LZSS_C functions to execute properly because they're expecting very specific arguments, and I have no idea what to input at this point.
It takes a string of file numbers/ranges, so something like:

Lzss_D 1-8;11;13-41;56-59;62

is what it'll expect.

Boo the Gentleman Caller

  • Guru of Life Emeritus
  • Hero of Time (+5000)
  • *
  • Posts: 5262
    • View Profile
Re: CHRONO CROSS FILE EXPLORATION THREAD
« Reply #652 on: July 03, 2008, 12:41:07 am »
I heart the Compendium.  I'm pumped the way this project is going and eternally grateful to find that MDenham is making the CC Editor!  WOOOOOOT!

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
Re: CHRONO CROSS FILE EXPLORATION THREAD
« Reply #653 on: July 03, 2008, 07:32:34 am »
To be honest, I'm not entirely sure if it actually does dump all the game files or not (I haven't gotten that far in following the code).

My tools were able to dump all the game files, regardless of their type, as it was also able to regenerate a completly working CD from all the dumped files.

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 FILE EXPLORATION THREAD
« Reply #654 on: July 03, 2008, 10:09:04 am »
To be honest, I'm not entirely sure if it actually does dump all the game files or not (I haven't gotten that far in following the code).

My tools were able to dump all the game files, regardless of their type, as it was also able to regenerate a completly working CD from all the dumped files.
That's what I thought, but I wasn't entirely sure yet.  (It really wouldn't have made sense if it didn't dump everything!)

Oh, BTW, for anyone currently semi-frustrated with the whole "I need two separate ISOs of each disc, one for each set of tools" thing (I seem to recall one set of tools wants a raw image?) it looks to be fairly trivial to handle being able to read both formats as the difference is just additional error correction info, etc.  So the updated version of the tools, with any luck, should basically be "drop in any ISO of the discs and play around with it".

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
Re: CHRONO CROSS FILE EXPLORATION THREAD
« Reply #655 on: July 03, 2008, 10:16:01 am »
It should be really trivial to modify my tools to handle other iso format.

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 FILE EXPLORATION THREAD
« Reply #656 on: July 03, 2008, 10:29:48 am »
It should be really trivial to modify my tools to handle other iso format.
Yeah, it looks to be.  It's just a matter of finding spare time (and occasionally trying to guess what the code is doing because, for whatever reason, I can't pick apart the French :D - I'm working at it, though) and slowly grinding away at it. :)

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
Re: CHRONO CROSS FILE EXPLORATION THREAD
« Reply #657 on: July 03, 2008, 11:24:30 am »
All the code I wrote back then was very baddly written. It has been so many years now...

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: CHRONO CROSS FILE EXPLORATION THREAD
« Reply #658 on: July 03, 2008, 10:58:02 pm »
Oh, snap -- yaz0r's back. :lee: yaz0r, did you ever do an lzss-dec.exe? I've got an lzss-comp.exe and the source, but nothing for the decompression. All the LZSS-compressed files in Chrono Cross use the exact same compression routine, don't they? As soon as we get something that does general LZSS decompression, I imagine we can start tearing into the fieldscript and its in-battle equivalent.

Speaking of which, how does your script-dec.exe differ from general LZSS decompression? Are the script files still in a relative alphabet when they're decompressed, and the script-dec.exe needs to convert that relative alphabet into ASCII? I've tried running your script decompression tool on a non-dialogue LZSS compressed script and it couldn't process, so I imagine the utilities for script decompression have some extra functions built in to handle formatting of the data or something.

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
Re: CHRONO CROSS FILE EXPLORATION THREAD
« Reply #659 on: July 04, 2008, 05:54:54 am »
I have a CC LZSS decompressor somewhere (I'll have to look for it in my backup discs tonight). It's *probably* used elsewhere in the game (like the event scripts) but I can't say for sure, I never really worked on that. I suppose that all the files starting with the same magic as the text files are in the same lzss format.

There is no such thing as general LZSS decompression. LZSS is an algorithme and can be implemented in a lots of different way. CC LZSS is rather different than other implementation of LZSS. Usualy, you have a byte giving you the compression state of the next 8 blocs. In the case of CC, you just have one bit giving you the state of the following bloc.