Tales Of Destiny 2 English Patch
Tales of Destiny 2 (PS2)
This projection is an attempt at an open-source translation for Tales of Destiny two, both for PS2 and PSP.
To exist clear, this is not for Tales of Eternia (PSP) or Tales of Destiny II (PS1).
After starting and handing off an open-source projection for Tales of Destiny Manager's Cut (PS2), the aim of this project is have tools and resources available to complete a patch for Tales of Destiny 2 (PS2), a "sequel" to the first game.
This repository aims to collect all known data nearly this game in social club to create a patch.
Join on Discord: https://discord.gg/HZ2NFjpedn
Spreadsheet with Info: https://docs.google.com/spreadsheets/d/1UVaEjK0o-V1-3atPHfRRw2q9QQcCzPCpr4GXJ2MLvvg
Wanted Items
- Translators! Commencement by checking ps2/scenarios and add
#
before the Japanese line and type English translation underneath.
FILE.FPB (PS2) INFO
- The pointer tabular array is in the
SLPS_251.72
file starting at0xDD320
- Each entry of the tabular array consists of (A) a 26-bit offset -> the file outset inside
SLPS_251.72
SLPS_251.72
Outset | Description | Notes |
---|---|---|
00000000 | ELF Start | Beginning of file |
000CA328 | Font (.tm2) | Excerpt and use comptoe.exe |
000C9D41 | Font Map | Map lowercase to font |
Mapping Lowercase Letters
- Edit
.tm2
from0x0CA328
and supplant some Hiragana - Go to
0x0C9D41
in the SLPS_251.72 file - Information technology should have a
0x17
- That's the glyph alphabetize for lowercase "a"
- Replace that with
0x31
which is "ぁ" - And just follow the sequence up until
0x4B
- Formula to detect offset for low bytes:
0xC9D00
-0x20
+0xASCII
- Example: For lowercase letter
a
:0xC9D00
-0x20
+0x61
=0x0C9D41
. So at this get-go, mapa
to0x31
th letter in the font (originallyぁ
, new font isa
).
FILE.FPB (PSP) INFO
- FILE.FPB has data to unpack the files inside
EBOOT.BIN
- Decrypted
EBOOT.BIN
is also known equallyULJS00097.BIN
- Each entry of the table consist of (A) a 21-scrap showtime -> the file offset inside
FILE.FBP
and (B) eleven-bits for flags -> Compression, file type, etc... - In order to extract the big file, one would calculate each file size based on the next file'southward offset.
- That is enough to excerpt the whole FBP. Reversing the process, it would be easy to repack it.
- The pointer table starts at the
0x44
, which references the very first file in the parcel (the font). - 21-bits are enough to reference whatsoever file in the package. That'due south because they represent not a byte outset, but a sector in the disc.
- The ISO9660 standard uses
0x0800
bytes sectors. The way to work with them actually depends of the fashion you retrieve it though: - If yous shift xi-bits from data, you lot'll become the file sector, so yous can get the byte showtime multiplying that value by
0x0800
. - Since these 21-$.25 take the virtually pregnant function of the data, yous can employ a
0xFFFFF800
mask to information technology, to directly get the byte start to the file
Implementation
unsigned int fileSize = (nextSector - currentSector) * 0x0800 - remainder;
For example, to extract the font we would await at the post-obit data:
-
First file -> Sector 0, remainer 0x044C
-
Second file -> Sector 92
-
Showtime = 0 * 0x0800 = 0
-
Size = (92 - 0) * 0x0800 - 0x044C = 48BB4
And that should cover extracting the FBP.
ULJS00097.BIN / EBOOT.BIN
Beginning | Description | Notes |
---|---|---|
00000000 | ELF Starting time | Beginning of file |
Resources
- https://gamefaqs.gamespot.com/ps2/561922-tales-of-destiny-2/faqs/58741
- https://gbatemp.net/threads/romhacking-in-tales-of-destiny-2.373960/
- https://gbatemp.net/threads/romhacking-in-tales-of-destiny-2.373960/folio-iii
- https://pastebin.com/fCVPLUP4
- https://www.mediafire.com/file/e44c1ksxl7a17z8/ToD2_String_Extract_v1.7z/file
- https://github.com/talestra/talestra/tree/primary/compto
Hacker Note one
The main difference between PSP and PS2 versions is the pinch organization. While PS2 uses a mixture of LZSS and RLE, PSP uses zLib. The format of the inner files should be identical.
Earlier compression, most interesting files are packed using a SCPK header. There is always one initial file (background), so a descriptor table (with one entry per boosted file), and then the rest of the files (a ready of sprite + amination files, and finishing, a script file).
Groundwork and sprite files use 8-scrap indexed RGBA colour, reaching a maximum of possible 256 colour per palette. Note that the graphic format does support multiple palettes for a same pixel matrix.
The script files utilize the SCED signature, and comprise two main sections:
- The code section, which governs the scripted logic.
- The text section, which contains the strings coded in a custom format.
The ideal mode to parse the SCED is to decompile the lawmaking section, which contains pointers to the text section.
The important fleck almost the text is that, once decoded, the string consists in an array of font indices.
Hacker Notation two
The TM2
font inside SLPS_251.72
works the post-obit way:
- there are x 4-fleck palettes at the begining
- the number of palette seems to be at byte 0x05
- each palette is then
0x40
bytes - each palette comes with a
0x10
bytes sub-header, so0x50
per palette - the file header is
0x10
bytes too - after the palette array, there is another
0x10
subheader for the pixel matrix - this i includes the resolution (128 x 512 in this case)
- the matrix size is the balance of the data in the file
- 128 x 512 / 2 (divided past 8 because the matrix is 4 bits)
- on a PSP 4-bit graphic, the lower nibble corresponds to the first pixel out of both! And that accounts for the remaining 32768 bytes of the file
Hacker Note three
To extract font epitome from 0018.bin
(PS2) and 0000.bin
(PSP):
- take every 4 bits and draw a pixel any level from black to white according to it
- for instance 0 -> black and 15 -> white
- and then requite information technology a width (I don't remember exacly, but it was a power of 2)
- That will finer give you lot the font graphic file
- edit it, and reverse everything
- also update the font descriptor to keep it consistent with your editions
- though the game (probably) doesn't really use the font descriptor, it's just useful to decode the text past a romhacker
Screenshots
Credits
- Thank you to Amarant01 for graphics design work for the fonts, check out his work here: https://www.behance.internet/deco-7105af
- Thanks to Lanyn for allowing utilise of Tales of Destiny 2 English translation script, check out https://world wide web.youtube.com/user/lanyn/videos
- Thanks to the Temple of Tales Translations team (http://temple-tales.ru/translations.html) for providing tools to extract the skits and scenarios
- Thanks to alizor for creating the Python scripts to excerpt and repack both PS2 and PSP versions of the game
- Thanks to SkyBladeCloud from GBATemp for tips on how the game / file works
- Cheers to flamethrower / flame1234 from GBATemp for having Python scripts available to excerpt the PSP version of the game
Source: https://github.com/lifebottle/Tales-of-Destiny-2
0 Response to "Tales Of Destiny 2 English Patch"
Post a Comment