Author Topic: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)  (Read 30357 times)

utunnels

  • Guru of Reason Emeritus
  • Zurvan Surfer (+2500)
  • *
  • Posts: 2797
    • View Profile
Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
« Reply #120 on: February 26, 2009, 10:47:41 am »
Hmm, sorry, I think I didn't get your words before.
What do you mean by "128x16"?

They are 16x16 sprites, aren't they?

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
« Reply #121 on: February 26, 2009, 12:16:41 pm »
When I looked at the VRAM, it appeared that the background was composed of 128x16 pixel tiles. However, if they're truly 16x16 pixel tiles like in SNES games, it's perfectly reasonable that the tile assembly here would take care of the issue I was experiencing while reconstructing; I wasn't subdividing the 128x16 image pieces.

utunnels

  • Guru of Reason Emeritus
  • Zurvan Surfer (+2500)
  • *
  • Posts: 2797
    • View Profile
Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
« Reply #122 on: February 26, 2009, 08:30:31 pm »
I think it  was just a coincidence. In some rooms, the tiles are completely out of order.
Do you use a vram viewer? So those tiles are using the same palette? Sometimes they don't, so that'll make them hard to be assembled manually.

yaz0r

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 65
    • View Profile
Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
« Reply #123 on: February 27, 2009, 07:23:37 pm »
Sorry for the lack of news, I've been very busy irl. Just to let you know, here his the room 242 field script disassembly. As you can see, there have been a bit of progress. A lot of unhandled opcode remains but it's starting to give interesting results.

utunnels

  • Guru of Reason Emeritus
  • Zurvan Surfer (+2500)
  • *
  • Posts: 2797
    • View Profile
Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
« Reply #124 on: February 27, 2009, 08:29:56 pm »
That is awesome.
Now we can have a direct view of the dialogues without checking them manually.

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10797
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
« Reply #125 on: February 28, 2009, 11:17:50 am »
Since we have the power to investigate this now...

I think in room 295 - Water Dragon Isle Campfire scene, in the US ROM, there's some unused text in the debug portion:

Code: [Select]
--------DUMMY START--------
   
* DEBUG MENU
~~~Quit
~~~Knife
~~~Pos

* Press Button to Cont

* Press Button to End
   
* Draw Knife

* Sheaf Knife

 [Water Dragon Isle, amazing dialogue in Debug Menu]
 
 [Kid?]
   So tell me now
   Even if it is a lie
   That angels unseen
   Watch over the works of men.
 
 [Hydra Marshes (Home), debug menu with strage dwarve lines]
 
--------DUMMY START--------

The interesting part is the poem, "So tell me now / even if it is a lie / that angels unseen / watch over the works of men." I wonder if that ever had a use?

utunnels

  • Guru of Reason Emeritus
  • Zurvan Surfer (+2500)
  • *
  • Posts: 2797
    • View Profile
Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
« Reply #126 on: February 28, 2009, 11:48:15 am »
Yeah, it is interesting.
The US translation is a aabb quatrain, while the JPN one is a aaba quatrain.

 オレに言ゎせりゃ
 デタラメもいいとこさ、
 見えない天使が人の行いを
 見守ってるなんてのは。

P.S. It is obviously spoken by Kid, if it is actually used somewhere.

utunnels

  • Guru of Reason Emeritus
  • Zurvan Surfer (+2500)
  • *
  • Posts: 2797
    • View Profile
Finally I got PCSX to work.
It seems the loading screen will last for ages, so I thought it was simply frozen.
I think I was a bit too late.


utunnels

  • Guru of Reason Emeritus
  • Zurvan Surfer (+2500)
  • *
  • Posts: 2797
    • View Profile
Here's the raw script pack from demo version with room numbers.
If someone wants to translate it...

------------
Well, it seems the room numbers are different from the final version...

« Last Edit: March 02, 2009, 12:30:55 pm by utunnels »

OneWingedAngel

  • Iokan (+1)
  • *
  • Posts: 10
    • View Profile
Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
« Reply #129 on: September 02, 2018, 08:38:14 pm »
This thread has been dead for 9.5 years, but:

Is the list of opcodes the full list of known codes?  I'm reading through the dump of fieldscript, and I think I've figured out a couple that aren't on that list.

I am 99% sure that opAE(0x01) indicates that this entity's script 4 is the "on key item interaction" script.  In every case I've looked at, it appears in script 0 *if and only if* the entity's script 4 has one or more IF checks using USED_KEY_ITEM.

Are others still working on deciphering fieldscript?  I couldn't find a more recent thread discussing it.

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10797
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
« Reply #130 on: September 03, 2018, 11:43:57 pm »
I don't think anyone's been actively messing with it. Prizvel and Danetta were the most recent people working on hacking on Cross, but not sure if they touched fieldscript.

OneWingedAngel

  • Iokan (+1)
  • *
  • Posts: 10
    • View Profile
Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
« Reply #131 on: September 13, 2018, 12:14:14 pm »
Here's my plan of attack to get things moving on this front again:

1) Translate the Terminus Traduction tools into English.  I might leave most/all of the actual variables in French, and only translate comments, printed strings, and scripting commands.  I've found their code to be really well organized/structured, and their tools more complete than the other sets.  This also includes removing the French translation that sits in the Textes_Avant folder in the distributed version (so that extracting and reinserting does what you'd expect) and fixing the accent issue with script extraction.  I'll try to write better documentation that provides instructions for the *order* of scripts to run.

2) Move utunnel's fieldscript decompiler (and compiler?) into the TT tools.  That is, have the TT tools run the LZSS decompressor and fieldscript decompiler on file 0003 in each room, as part of its script extraction routine.

3) Rewrite/edit the decompiled fieldscript format to be more human-friendly / editable.  This includes a few things:

     - Remove the hexidecimal indexing at the start of each line, or at least make it optional.

     - Change the format of decompiled IF statements to point to a marker in the code (e.g. LANDING_POINT(2)), not a hex reference.  As is, all IF statements are decompiled literally, indicating the file position marker to jump to if the condition is/not met.  This makes it difficult to add lines (or change a line to an opcode with a different byte length) to the fieldscript, as it requires the user to change *every* file position marker after the added lines.

     - Make the IF statements more consistent.  As others have noted, some of the IF-type opcodes seem to be upside down, or are phrased in the negative (e.g. IF_CHARACTER_NOT_IN_PARTY).  As far as I can tell, all IF opcodes are most directly phrased as IF(condition) CONTINUE, ELSE GOTO(reference).

     - Add metadata files for labeling entities and scripts at decompile time (add comments to individual entities and scripts).  If the metadata file for a room doesn't exist when it is decompiled, the decompiler will make a "blank" or default file with the right number of entities and scripts per entity.  A human can then edit that file to overwrite default names and descriptions, so it decompiles "nicer" next time.

4) Write a fieldscript compiler that's compatible with the new format, and have the TT tools recompress and insert it when the script is reinserted.

5) Make some sort of database / something of unknown opcodes (frequency, where they occur relative to other operations, etc), as a reference for trying to decipher them.  Yes, this is vague.

---------------------------------

I'm going to do all of this in a public GitHub repo, both in order to generate a history of changes from code written by others that's publicly available and to (hopefully) foster collaboration with others.  In particular, just about anyone should be able to contribute to the fieldscript metadata labeling, once those files exist-- no programming, just labeling.

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10797
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
« Reply #132 on: September 13, 2018, 03:41:04 pm »
Let me know if you need to contact the Terminus people. I think yaz0r is still active...I swear he e-mailed me about something or other a year ago, so I should have his e-mail on the Compendium account if you need.

kolt54321

  • Earthbound (+15)
  • *
  • Posts: 39
    • View Profile
Re: CHRONO CROSS ROOM SCRIPT INVESTIGATION THREAD (formerly event script thread)
« Reply #133 on: September 26, 2018, 01:17:46 am »
Here's my plan of attack to get things moving on this front again:


Please do let us know if you get things running! I'd be interested to hear.

Danetta

  • Guru of Time Emeritus
  • Porrean (+50)
  • *
  • Posts: 51
  • So where is it going?
    • View Profile
I also had a thought about porting all the stuff into TT or smth, but TT is also Windows-specific, which is not very pretty.
I still think it's worth to make TT platform-independent.


By the way, I rewrited some of the old decompiler's code to make it more organized and easy-to-change. Never finished the work tho.