Chrono Trigger translation development system

0. Contents

This is the documentation of chronotools-1.6.8.
   1. Purpose
   2. How to begin?
   3. Current status
      3.1. Version history
   4. Program list
      4.1. ctdump
      4.2. ctinsert
      4.3. other
         4.3.1. makeips
         4.3.2. unmakeips
         4.3.3. assemble
         4.3.4. xray
         4.3.5. viewer
         4.3.6. spacefind
         4.3.7. taipus.rb
         4.3.8. sramdump
         4.3.9. base62
   5. Useful features
      5.1. Name conjugation
      5.2. Font/dictionary skew
      5.3. Automatic paragraph wrapping
      5.4. Variable width 8pix font
      5.5. Very configurable
   6. Requirements
   7. Copying
      7.1. If you only are interested in some features/parts
   8. See also
   9. Downloading

1. Purpose

Tools aiding in Bisqwit's Finnish Chrono Trigger translation.

Meant to be useful for anyone who wants to become a translator for Chrono Trigger and translate the game to their own language.

2. How to begin?

So here's what you do if you want to translate Chrono Trigger. If this is not okay for you, then you use other programs like Thingy and probably get some of your work done in a much harder way.

3. Current status

Chronotools is under active development. Here's the current situation.
Last updated: 2003-09-28

Subject Percentage
Dialog handling 120% everything works, extra features
Dialog font handling 120% everything works, extra features
Status font handling 100% everything works
Character set issues 100% everything works
Compression algorithms 100% everything works
Item/tech/monster font handling 80% useless in its current state
Graphics handling 95% minor details left
Signature feature 100% everything works
Error recovery 10% silent ignore
Documentation 0% practically no documentation; that's why you must contact

3.1. Version history

Copypaste from the Makefile:
# VERSION 1.0.3  was the first working! :D
# VERSION 1.0.4  handled fixed strings too
# VERSION 1.0.5  found item descriptions
# VERSION 1.0.6  compressed better
# VERSION 1.0.7  compressed more carefully
# VERSION 1.0.8  documented the script
# VERSION 1.0.9  fixed "..." handling and located the font
# VERSION 1.0.10 had knowledge of character sets
# VERSION 1.0.11 had a working font insertor
# VERSION 1.0.12 had better knowledge of special codes
# VERSION 1.0.13 used 62-base numbers
# VERSION 1.0.14 added taipus.cc
# VERSION 1.0.15 updated FIN/README and ct_fin.txt, but neither are archived
# VERSION 1.0.16 added taipus.rb, fixed homepage urls and fixed mmap error checking.
# VERSION 1.0.17 working again; uses space better; little modularized
# VERSION 1.0.18 more of above
# VERSION 1.0.19 code organising... improved 'i' in 8x8 font.
# VERSION 1.0.20 binpacker changes, some translation done too
# VERSION 1.0.21 more translation, some documentation, font palette changes.
# VERSION 1.0.22 more translation, autowrapping support, conjugation detection code
# VERSION 1.1.0  did some assembly hacking, support for code patching
# VERSION 1.1.1  conjugating conjugating conjugating... work goes on
# VERSION 1.1.2  and so on
# VERSION 1.1.3  and so on... almost working! "case" still doesn't work.
# VERSION 1.1.4  conjugating finally works!
# VERSION 1.1.5  some bugfixes
# VERSION 1.1.6  fixed an allocation bug and optimized the code generator a bit
# VERSION 1.1.7  some translation, more asm changes
# VERSION 1.1.8  syntax changes in the compiler, optimizations
# VERSION 1.1.9  support for font/dictionary size skew
# VERSION 1.1.10 new configuration system. Time to squash bugs.
# VERSION 1.1.11 configuration works, font-enhancement works.
# VERSION 1.2.0  variable-width 8pix font has stepped in, but has many many bugs.
# VERSION 1.2.1  more vwf stuff, backup before doing big changes
# VERSION 1.2.2  vwf stability++, also techniques now vwf. Scrolling bugs.
# VERSION 1.2.3  lots of more translation
# VERSION 1.2.4  8pix system deciphered, more bugs introduced
# VERSION 1.2.5  characterset enlarged by 512, only vwf8 bugs still
# VERSION 1.2.6  using nonstandard hash_map for greatly improved performance
# VERSION 1.2.7  creating another compiler
# VERSION 1.2.8  improved dictionary compression
# VERSION 1.2.9  compiler progress, first windows binaries are working
# VERSION 1.2.10 cursive font support
# VERSION 1.2.11 some translation, compression optimizations
# VERSION 1.3.0  new compression options, font reorganizer, generic typeface engine
# VERSION 1.4.0  image patching support, more font reorganizing support
# VERSION 1.4.1  lots of more translation (I'm archiving it here for my convenience)
# VERSION 1.5.0  end of the compiler project; using assembler (xa65) now.
# VERSION 1.5.1  vwf8 optimizations, assembly experiments
# VERSION 1.5.2  compressed graphics support: decompressor and compressor
# VERSION 1.5.3  better graphics compressor
# VERSION 1.5.4  another archive-only version
# VERSION 1.6.0  signature support (custom compressed image on startup screen)
# VERSION 1.6.1  some remodularizing of code
# VERSION 1.6.2  fixed the vwf8 scrolling problems and some other bugs
# VERSION 1.6.3  battle item lister fixed - no vwf8 problems there now
# VERSION 1.6.4  battle tech lister almost done; dumper: partial jap ROM support
# VERSION 1.6.5  is working on an assembler
# VERSION 1.6.6  has an almost working assembler
# VERSION 1.6.7  has a complete assembler, doesn't require xa65 anymore

4. Program list

4.1. ctdump

Dumps the script and fonts from a given ROM.
Requires chrono-dumpee.smc.
Produces ct_eng.txt, ct8fn.tga and ct16fn.tga.

Sample of produced script:

;1000ad (Lucca's home)
*z;106 pointerstrings (12pix font)
$F1IO:
[nl]
            You got 1 [item]!
$F1IQ:
LARA: Oh, hi Crono.[nl]
   Lucca's off at Leene Square with[nl]
   her father, Taban, unveiling her new[nl] 
   invention.
$F1IS:
LARA: Lucca and Taban only care[nl]
   about their silly toys!
(Dumped from the English ROM)

The windows version of this program is downloadable on this page.
Usage example: ctdump chrono-uncompressed.smc > ct_eng.txt

sample
Example screenshot in Spanish

4.2. ctinsert

Reinserts the (edited) script and (edited) fonts to a ROM.
Requires the files referenced by ct.cfg (usually ct.txt, ct8fn.tga and ct16fn.tga and optional extra fonts and code files).
Produces ctpatch-hdr.ips and ctpatch-nohdr.ips.
Curiously, it doesn't require the ROM.

4.3. other

4.3.1. makeips

makeips compares two ROMs and produces a patch file in IPS format.

4.3.2. unmakeips

unmakeips reads a ROM and an IPS file and produces a patched ROM file.

4.3.3. assemble

An xa65-compatible 65816 assembler program.
Full source code can be found in its separate package at http://bisqwit.iki.fi/source/snescom.html .

4.3.4. xray

xray is a libggi-requiring application for browsing the ROM contents.

4.3.5. viewer

viewer requires S-Lang and is a textmode ROM browser originally developed by me for Pokémon hacking.

4.3.6. spacefind

A bin-packing algorithm test.

4.3.7. taipus.rb

This one is publicly available. It conjugates names in Finnish.
It has now been translated to SNES assembly (or sort of).
It works. :)

4.3.8. sramdump

Views a sram dump file in a readable format.

4.3.9. base62

Converts addresses between hex and base62 formats. I.e. $C2:5D4C -> 0eJI and vice versa.
This development system uses base62 in the script dumps to reduce the amount of code written.

5. Useful features

5.1. Name conjugation

It works! It currently has support for conjugating names on fly.
It's very important in Finnish, where you can't just add "'s" to anything to make a genitive.
For example, genitive of name Matti is "Matin", and genitive of name Crono is "Cronon".
The conjugator-engine is a textual script file translated to 65c816 assembly on demand. It can be customized to do conjugation in any language, not just Finnish.

5.2. Font/dictionary skew

It's quite complicated to explain, but shortly said:

In normal Chrono Trigger, the character set is as follows:

In Chronotools,

There are drawbacks though.

Despite these hazards this system might be a lifesaver for someone doing an Estonian, Portuguese or even Thai translation.

If you are translating to a language that utilizes thousands of different symbols, like Chinese, you might want to try to base on the Japanese version instead. This utility pack bases on the English version.
(Sorry, I can't help you with issues regarding the Japanese ROM.)

5.3. Automatic paragraph wrapping

It works! The program takes automatically care of proper line lengths, so you don't have to risk running into unexpected too-long-lines or making too short lines in paranoia.
You can force line breaks (like in HTML), but you don't have to.

The image on the right shows this script piece:

Tämä on Leenen Aukio. Sanotaan, että jos
joskus kuulee Leenen Kellon soivan, elää
mielenkiintoisen ja onnellisen elämän!
And is equal to if I had wrote this:
Tämä on Leenen Aukio. Sanotaan, että[nl]
jos joskus kuulee Leenen Kellon soivan,[nl]
elää mielenkiintoisen ja onnellisen[nl]
elämän!

5.4. Variable width 8pix font

It works! Item, monster and technique names in Chrono Trigger are limited to 10 characters (restriction is enforced by both the screen layout and the ROM space).
This is way too little for Finnish, which has long words.

For this reason Chronotools creates a vwf8 engine that allows the game to draw the names in thinner font that fits on the screen.

It still has the length limitation in the ROM though, but this will be fixed eventually.

5.5. Very configurable

I have tried to put almost everything in text-only config files instead of hardcoding it in the programs. You won't be depending on me to do little updates for your purposes.

6. Requirements

For source code (if you're a developer):
A POSIX compatible system (like Linux or FreeBSD) with GNU tools (GNU make, GCC etc) is required.
These programs are archived as C++ source code.
For binaries (if you're an unfortunate user stuck with some "Windows"):
I don't have a microsoft-operating system here on my hand, but I have mingw32, which appears to produce working commandline billware binaries. They should work in Windows 2000, Windows 98 and possibly most other Windows systems as well.
I don't offer binaries for any other platforms.
If you fear the text mode and command line, you better change your attitude and start learning :)

At the bottom of this page, there's ctdump as a sample win32 program, but to get the full system and support, you have to contact me with email.

The VWF8 code requires an assembler. Previously it had to be xa65 (which can be found in Debian and compiled for other systems), but now Chronotools has its own assembler.

7. Copying

If you're interested, throw me email.

I'm not publishing files on this web page, because it's a well-known fact that many people in ROM hacking scene aren't very respectful to copyrights.
Aug 2 2003: Oops, I made an exception. Let's see what kind of problems it causes.

7.1. If you only are interested in some features/parts

This system doesn't contain much reusable material, although it now does contain some separate assembly code.
I have made my own systems to compile and link code.
If you're uncertain, send me email and explain your situation.

8. See also

9. Downloading

The official home page of chronotools is at http://iki.fi/bisqwit/source/chronotools.html.
Check there for new versions.

Generated from progdesc.php (last updated: Sun, 28 Sep 2003 03:50:51 +0300)
with docmaker.php (last updated: Thu, 13 Feb 2003 15:11:29 +0200)
at Mon, 29 Sep 2003 15:02:32 +0300