Eschaton GamesRPG Tsukuru 3 a guide to the Japanese original

How it works#

This is the technical page: the programs on RT3's disc, how it loads its code, where things sit in memory, what its save files hold, how it stores and draws Japanese, how an event is stored and how the music plays. RT3 and RPG Maker are one program built twice, so the RPG Maker guide's How it works holds for RT3 in its design, and this page gives what RT3 does differently and where RT3 keeps things. Addresses are RAM addresses in RT3's RPG3.EXE unless a line says otherwise, and numbers with 0x are hexadecimal.

4programs: the boot program, the launcher, RPG Tsukuru 3 and Animetica
898entries in COMDATA.BIN, the pictures and tables
25sections in OVERLAY.BIN, loaded when needed
92event opcodes, the same as RPG Maker's
3,489characters in the kanji font
2,704of RPG Maker's functions found again in RT3

The disc and its programs#

The PlayStation starts SLPS_010.93, a small boot program, which plays the logo movies and loads MAIN.EXE, the launcher: the title screen where ↑ and ↓ choose a program (Getting started). The launcher starts RPG3.EXE, RPG Tsukuru 3 itself, or ANIM.EXE, Animetica, and both go back to it when you leave.

FileSize (bytes)What it is
SLPS_010.93147,456The boot program. Its table names two movies, L_ASCII.STR and KUUSOU.STR, and then MAIN.EXE
L_ASCII.STR1,226,752ASCII SOFT's knight-on-horse logo movie (Hidden and unused)
KUUSOU.STR2,785,280Kuusou Kagaku's logo movie
DUMMY.STR1,226,752The horse movie again, under another name
MAIN.EXE190,464The launcher: the title screen and its choice, then RPG3.EXE or ANIM.EXE
RPG3\RPG3.EXE1,005,568RPG Tsukuru 3 itself: the top menu, Game, Edit and Test Play
RPG3\COMDATA.BIN8,218,624898 entries: map sets, wallpapers, characters, objects, monsters, the kanji font, the title-name font, the keyboard, effects, title pictures, the sample game, tables
RPG3\SOUND0.BIN4,202,496The sound banks, the jingles, the 35 songs and the bank the Kanadeeru songs play on: byte for byte RPG Maker's
RPG3\OVERLAY.BIN1,101,82425 sections of code and data, read in when needed
ANIM\ANIM.EXE526,336Animetica
ANIM\…Animetica's own files: TIM.LPK, ANM.APK, ANIM.VB, the sample library SAMPLE.DAT with its index SAMPLE.IDX
DUMMY.DAT33,944,960Padding

The two discs hold the same kinds of files, with two differences. RT3's root has no picture files: RPG Maker's disc adds TIM_BOOT.LPK (the boot logos), TIM_TT.LPK (the launcher's title picture and menu) and ANM_OPN.APK, and its boot program reads the first. And RT3's disc still has the horse movie under the name its boot table gives it, where RPG Maker's has only the copy (Hidden and unused). SOUND0.BIN and two of Animetica's files, ANIM.VB and ANM.APK, are the same on both discs, byte for byte; the programs and the other archives differ.

The three archives#

As in RPG Maker, almost everything is in three archives in the RPG3 folder, found through a directory in RPG3.EXE: a count, the CD path, the developers' PC path (C:\PTCL\GAME\DATA\COMDATA.BIN and the like, the same as RPG Maker's), and one {offset, size} pair per entry.

RT3's own COMDATA entries:

RT3 What In RPG Maker
2A9–2AB The kanji font: two pages of glyphs and their palettes (Packed text and the kanji font) 2A9 is the 8 × 12 English font instead
322, 323 The sample game: 322 the scenario , 323 the System 320, 321: its translation
324–328 The title-name font: the glyph page and one palette row for each of the four colours 322, 323: RPG Maker's version
35B–35D The kana keyboard's three backdrops, loaded at boot 356–358, never loaded
35F The kind of each keyboard tile, which picks its colours none
361 The keyboard's tile sheet none: RPG Maker has a sheet of its own

Overlays: the code that loads when needed#

RPG3.EXE holds the top menu, the field, the event interpreter, the text engine and the sound layer. The rest is in OVERLAY.BIN's sections, plain MIPS code and data loaded at fixed addresses. The editors, the field menu and the memory card pages share one window at 0x800F4000, so only one is in memory at a time; the battle engine loads at 0x80105000, above it, so that Battle Test can run beside Monster Placement.

Make Data. Each entry loads its own overlay section into the window at 0x800F4000.
Make Data. Each entry loads its own overlay section into the window at 0x800F4000.
SectionSize (bytes)Loaded atWhat
005,7240x800F4000Config
0193,5520x800F4000Dungeon
026,2880x800F4000Feature Edit
0355,7400x800F4000Monster Placement (Battle Test loads 0F beside it)
04220,7040x800F4000Events, the largest
0576,7290x800F4000Field
0638,7240x800F4000Heroes
0751,7560x800F4000Items
0843,8760x800F4000Jobs
0960,1200x800F4000Magic
0A53,6600x800F4000Monsters
0B5,2760x800F4000Parameter Names
0C2,8400x800F4000the Scenario's Registered Data
0D4,3640x800F4000the System's Registered Data
0E5,8440x800F4000Title
0F108,2480x80105000the battle engine
102,392nevera text-rendering test (hidden)
1158,7520x800F4000the field menu
1270,8620x807E6FF4Field's table of which world-map parts may sit next to which (data, not code)
13, 15, 184 eachneverplaceholders, one word each
1465,7120x800F4000the memory card pages: load, save, external data, the Utility, the sample game
1613,8960x800F4000a PC-host file browser for the developers, which nothing opens (hidden)
1727,4180x80768000the kana keyboard's grids, read in every time the keyboard opens

Each section is read by a load descriptor, {archive 2, section, address}, and RT3's table of them names the same sections in the same order as RPG Maker's. Two do more in RT3: 0x17, the kana keyboard's grids, which the name-entry page reads into the work area after the Scenario image every time it opens, where RPG Maker never loads it; and 0x14, the memory card pages, whose register menu has a fourth kind of external data, . Field loads 0x12, its table of the world map's parts, in both programs. Sections 0x10, 0x12, 0x17 and the three placeholders are byte for byte the same on both discs.

The state machine and the task system#

RT3 runs the way RPG Maker does: one main loop through a table of modes and steps, and inside each mode a pool of tasks, each a small state machine of its own, updated and drawn every frame (The state machine and the task system).

Memory#

RT3 gives every part of the 2 MB of main RAM a fixed job, as RPG Maker does, but most of its big blocks sit lower: its System, Scenario and save images 0x14000 bytes (80 KB) below RPG Maker's.

AddressWhat is thereRPG Maker
0x80010080–0x80105080RPG3.EXE as loaded0x80010080–0x80117080
0x800F4000the overlay window: one editor, the field menu or the card pages at a time0x80104000
0x80105000the battle engine0x80117000
0x8072A200the save block, 0x1E00 bytes: what a player save holds0x8073E200
0x8072C200the System Data image, up to 0x1DE00 bytes0x80740200
0x8074A200the Scenario Data image, up to 0x1DE00 bytes0x8075E200
0x80768000the work area after the Scenario image; the kana keyboard's grids are read in here0x8077C000
0x807916B8five music buffers of 0x6400 bytes each0x807A56E0, 0x6000 bytes each
0x807B1ABCthe external data's bookkeeping: 15 songs, then 15 monsters, 9 characters, the title0x807B1AE0, without the songs
0x807B1BD8the import space, 0x2F428 bytes, up to 0x807E10000x807B1B90, 0x2F470 bytes
0x807E1000the memory card pages' buffer
0x807E8254the live game state: party, switches, treasure flags, bag, Goldthe same

Video memory is laid out as in RPG Maker, with RT3's own text in it: the kanji font's two pages at (512, 256) and (576, 256), with its palettes in the second page's spare rows at (576, 504); the title-name font's page at (960, 256) with one palette row for each colour at (960, 496); and the keyboard's tile sheet at (962, 129), where RPG Maker loads its own.

Memory card files#

Every file RT3 writes is named BISLPS-01093, RT3's product code, plus a kind and a slot letter or a name. RPG Maker's names have BASLUS-00640 and RMSYS, RMSCE, RMGAM and RMGAT in their place, so neither program lists the other's saves.

Name after BISLPS-01093WhatTitle on the cardBlocks
R3SYS + letterSystem Data + the game's title + the play time1–15
R3SCE + letterScenario Data + the scenario's name + the play time1–15
R3GAM + lettera player's save + the leader, the level, the play time1
R3GAT + lettera Test Play save + the same1
C_ + namean Animetica character + name1
M_ + namean Animetica monster + name, and when packedby size and packing
B_ + namean Animetica title picture + nameby packing

The fifth kind of file a game uses is another program's: a Kanadeeru 2 song, BISLPS-00903KDC + an id, Kanadeeru 2's own product code, with the title NAME (The song on the card).

The container#

A System or Scenario save is RPG Maker's container with longer text fields: the standard PlayStation header with the title, then at 0x180 the same checksum, sizes and compressed flag, the same password, and RT3's longer author and name.

OffsetRT3RPG Maker
0x180checksum, stored size, image size, compressed flagthe same
0x190password, 16 bytesthe same
0x1A0author (the first staff name), 36 bytes18 bytes
0x1C4the game's or the scenario's name, 36 bytesat 0x1B2, 18 bytes
0x200the image, from 0x8072C200 or 0x8074A200from 0x80740200 or 0x8075E200

A long name is shortened in the card's title as its start, and its end (), where RPG Maker cuts it short. In a Scenario save, the image size in the header is the exact length, not rounded up to a word as in RPG Maker.

Word-LZ compression#

The compression is RPG Maker's, word for word: the same LZ77 on 32-bit words, the same checksum, so the project's tools read RT3's saves unchanged (Word-LZ compression). It packs Japanese no better than English: RT3's scenarios store at a median of 90 % of their size. RT3 can show its own figures: hold START while the memory card menu opens and a sixth row, , reports the sizes before and after and the time the packing takes (The compression report).

Player saves#

A player save is one block: the header, then a copy of the save block, 0x1E00 bytes at 0x8072A200, the same size as RPG Maker's. Its fields are RPG Maker's, moved by the longer text: the game's title is 36 bytes and the scenario's name 16, so the fields from the map to the Gold sit 16 bytes later; the 16 character records are 104 bytes each (RPG Maker: 100), with a 16-byte name, so everything after them sits 80 bytes later. The Ending's snapshots fill the rest, with 80 bytes less room than in RPG Maker.

System and Scenario data in outline#

System Data#

The System image at 0x8072C200 is a game info block of 0x4A0 bytes (RPG Maker: 0x200), twelve linked section headers, and the twelve sections. The sections are RPG Maker's, with the same header lengths, index tables and limits; every record keeps its fields in RPG Maker's order after the name, so every offset past the name is RPG Maker's plus 4.

SectionRecord (bytes)RPG MakerNumbers
0Title1616—
1Config88—
2Feature Edit's switches44—
3Parameter names22 × 822 × 6—
4Magic4440231 (0 is the editor's "new" template)
5Items2824251
6Heroes264, after a 124-byte prefix26016
7Jobs565216
8Monsters5652251
9Field maps279 + 25 a town + 7 a path275 + 21 + 79
10Dungeon mapsSample 23; Custom 36 + its layers19; 32 + layers991 (0–990)
11Monster Placement2 + 13 an areathe same991

Scenario Data#

The Scenario image at 0x8074A200 is RPG Maker's with a 16-byte name (RPG Maker: 18), so everything after the name sits 4 bytes earlier: the length of the event data, the table of 991 map numbers, the start point and the chain of event blocks. The blocks, records, pages and conditions are RPG Maker's, byte for byte in format (Scenario Data).

The event bytecode#

The 92 opcodes are RPG Maker's, in the same order, with the same lengths: the table of lengths is at 0x80098F4C and the handlers' at 0x80099CE8. One opcode differs: 0x59 Next Scenario is 17 bytes, a 16-byte name, where RPG Maker's is 19. The RPG Maker guide lists every opcode (The event bytecode and its interpreter).

Three things in the commands change their meaning, not their layout:

All four scenarios of THE EVENT OF TODAY, 14,726 pages and 48,237 commands, parse with RT3's table of lengths, and each comes back byte for byte when it is built again.

Packed text and the kanji font#

Everything typed in RT3 is stored packed. A table at 0x80099674 gives 200 common characters one byte each, and anything else is two-byte Shift-JIS:

Bytes What
0x20–0x80 spaces, hiragana, the digits 0–9 at 0x30–0x39 and the capitals A–Z at 0x41–0x5A, the small kana, the first katakana
0x81–0x98 the first byte of a two-byte Shift-JIS character: symbols, Latin and Greek, Cyrillic, kana, the kanji of JIS level 1
0x99–0xFF the rest of the katakana, the small katakana, then the voiced and half-voiced kana (が … ぽ, ガ … ポ, ヴ)
0x01 xx RT3's own glyphs: ♪, ♡, Ⅰ to Ⅹ, a sword and a shield

Digits and capitals keep their ASCII codes, so a name in capitals reads as plain ASCII. Because only lead bytes up to 0x98 are free, the kanji of JIS level 2 can't be stored.

The font is three of RT3's own COMDATA entries, 2A9 to 2AB: a complete JIS level-1 set of 3,489 glyphs, symbols, kana, Latin, Greek and Cyrillic, and the kanji from 亜 to 腕. Each glyph is a 12 × 11 cell, 21 to a row. Each 4-bit pixel holds four one-bit planes, so one 256 × 256 page holds four fonts' worth of glyphs, and a palette lights only the pixels of one plane. RT3's own glyphs (0x01 xx) and a half-width font sit in the last plane, past the last kanji.

The start of the kanji font, drawn from RT3's COMDATA and found equal to RT3's video memory: symbols, Latin, kana, Greek and Cyrillic, then the kanji in JIS order.
The start of the kanji font, drawn from RT3's COMDATA and found equal to RT3's video memory: symbols, Latin, kana, Greek and Cyrillic, then the kanji in JIS order.

The typewriter that prints text has the same seven modes in both programs. RT3 uses two of them, and RPG Maker one other:

ModeWhat it printsIn RT3In RPG Maker
0, 1two-byte Shift-JIS, 3 or 4 cells a character0: the editors and menusdead
2the small 8 × 8 fontdeaddead
3Shift-JIS through a second pathdeaddead
4, 5packed text, turned into Shift-JIS, 3 or 4 cells4: Normal messages, choices, the Inndead
6single bytes in the 8 × 12 English font(no mode 6)the only live mode

The sound driver#

RT3 plays the same files as RPG Maker through Sony's sound library, libsnd, but an older build of it. The sequencer is RPG Maker's: 90 ticks a second, 24 voices, the same note and loop handling. What differs:

The bank is SOUND0's entries 3 and 4, a General MIDI-style set of 105 instruments with two drum kits, the same file as on RPG Maker's disc, where nothing plays it (The drums an octave off).

The 105-instrument bank's raw samples, one after another: the sounds the Kanadeeru songs play on.

A Kanadeeru song comes from the import space, not the disc. It is kept packed, in a format marked LZC, a flag-byte LZSS like Animetica's, and unpacked every time it starts, into all five music buffers at once. The unpacked song is a standard PlayStation sequence, which RT3's library accepts whichever way round its four-letter mark is written.

The project logged every write RT3 made to the sound chip while it played all thirteen of THE EVENT OF TODAY's songs, through their loops and a fade, and a fade-in, and replayed them through a model of RT3's driver: 847,088 writes, every one the same.

Battles and the random numbers#

The battle engine is overlay section 0x0F at 0x80105000. It makes the same decisions as RPG Maker's from the same random numbers: 2,082 decisions logged in sixteen of RT3's battles, with every random number RT3 drew, replayed through RPG Maker's battle rules without a difference (The random numbers has RPG Maker's generator). The one change inside is the fighter record, 0x98 bytes against RPG Maker's 0x90 for the longer names; monsters of one kind are told apart by a full-width letter added to the name (, …) instead of a digit.

How the study checked all this#

The same three kinds of evidence as for RPG Maker: static, read from RT3's code and data in a disassembler; corpus, checked against the RT3 games on the project's cards; and emulator, compared with RT3 running in PCSX-Redux, driven by scripts that press buttons, log calls and save memory on exact frames.

PartHow it was checkedResult
Disc, executables, overlaysstaticthe extractor, run on RPG Maker's disc, rebuilds that disc's files byte for byte; 2,704 of RPG Maker's 4,081 functions paired with RT3's by the order of their calls
Card files and the compressioncorpus and emulatorTHE EVENT OF TODAY's System and four scenarios read and rebuilt byte for byte; three player saves written by RT3 rebuilt byte for byte, and, converted, loaded by RPG Maker with equal memory
Event bytecodecorpus93 map blocks, 2,026 events, 14,726 pages and 48,237 commands parsed with RT3's size table, none failing
Textemulatorthe font in video memory equal to COMDATA; menus, lists and messages equal pixel for pixel; Message 2's fade, 49 frames exact
Option listsstatic260 list records against RPG Maker's 257, 244 of them laid out the same
Soundemulator847,088 sound-chip writes over 95,256 ticks replayed through a model of RT3's driver, 0 mismatches
Battlesemulator2,082 decisions in 16 battles replayed through RPG Maker's rules from RT3's own random numbers, 0 mismatches
The sample gameemulatormemory after loading it equal to COMDATA 322 and 323

Fan-made reference material, one of the Eschaton Games Tsukuru guides. Not affiliated with the publishers of the titles it covers. Corrections and questions: contact@eschaton.games.