Hacking Brandish: The Dark Revenant translation

G-Han

Well-Known Member
OP
Newcomer
Joined
Feb 17, 2009
Messages
64
Trophies
0
XP
214
Country
Netherlands
CNgH1sS.jpg

About this project:
In another topic I’ve expressed my interest to work on a translation of Brandish: The Dark Revenant for PSP bit by bit. Difficulty-wise, it's something I'm able to handle with my current schedule and language skills. However, I’m not able to do this on my own. In the same thread as mentioned above, user GHANMI managed to provide me with a text dump, but is unable to insert the text back. And although I am able to translate Japanese, my knowledge of coding is extremely limited.

Hence, I was wondering whether someone would be willing to write me a program which extracts and inserts text from the files in Brandish: The Dark Revenant. This would allow me to work in e.g. a spreadsheet editor or CAT tool and to check how the translation appear in the game itself, so I basically would be able to advance on my own (pace). Like most people, my schedule is packed tightly and I won't be able to work every night on this project.

Despite being a long-time lurker and contributer, this is actually the first time I’m pitching a translation project, so please let me know if I forgot to mention something.

Progress:
Extracting text files: done.
Translation: ca. 19%.

About the game:
See Wikipedia for more information on the PSP remake and Hardcore Gaming for the series in general.

Screenshots (from GameFAQs):

gfs_115491_2_1.jpg
gfs_115491_2_4.jpg
gfs_115491_2_6.jpg
gfs_115491_2_9.jpg
 
  • Like
Reactions: Eleganto and KiEgon

GHANMI

Well-Known Member
Member
Joined
Jun 10, 2012
Messages
969
Trophies
0
XP
914
Country
Oh, and I should mention something.
The text is uncompressed Shift-JIS, but still accepts ascii characters just fine, and they show up with the appropriate width.
Its internal structure is very similar to Ys 7 and Nayuta no Kiseki.
For those attempting European translations, the font is out there and can be edited (at least the half width katakana letters) to satisfy your needs for accentuated characters.
There's also a pmf video with subtitles. You can edit it (editing it would degrade the fluidity, but in this case the video originally isn't that fluid to begin with) following a guide posted on CUE's forums (in Spanish).
As for the graphics... I don't know. Tilemolester?
 

neoxephon

Well-Known Member
Member
Joined
Jul 13, 2009
Messages
437
Trophies
0
Age
35
Location
USA
XP
547
Country
United States
I've been poking around inside this game and here are a few things that will be problematic:
  • Some of the text (such as item names and descriptions) appear to be hidden somewhere. There are two files that contain all of the items (/data/txt/item.tb + /data/ext/txt/item.tb) but editing these changes nothing in the game. In fact, they don't even appear to be used by the game. I've searched through all of the other files and not found the text anywhere else. I thought maybe it could be in the EBOOT.BIN (lots of games put text in there), but that isn't the case. Yet it has to be grabbing the text from somewhere. I'll keep looking later today when I get the chance.
  • The comma is used as a line break. If you want to use a comma at all, that will have to be changed.
The pointers seem to be something entirely different from what I've seen in other PSP games that I've poked around in. But I haven't spent much time with the pointers yet. I'll look at them more later on and once I figure out how they work, I can program a tool to dump and re-insert the text.

The graphic files shouldn't be a problem to edit. It uses the standard Falcom PSP format (.itp) and there are already tools that can convert from .itp to .bmp/.png and back again.

UPDATE
It seems that some of the files, such as item.tb, are packed into the .act files located in /data/pa

I am 99% sure that this is where the game is pulling that text from. The other files are just dummy files and are unused.

I can program a tool to separate the files, but they are compressed. I'm not an expert when it comes to compression algorithms, but I'll keep looking and see what I can figure out.

The script is uncompressed, though.
 
  • Like
Reactions: GHANMI and G-Han

neoxephon

Well-Known Member
Member
Joined
Jul 13, 2009
Messages
437
Trophies
0
Age
35
Location
USA
XP
547
Country
United States
I've basically finished the programming to unpack the .act files. Repacking I'll do shortly, it's simple. At the moment, I'm still trying to figure out the compression. Falcom likes to use LZSS variants, so it might be that.
 
  • Like
Reactions: G-Han

GHANMI

Well-Known Member
Member
Joined
Jun 10, 2012
Messages
969
Trophies
0
XP
914
Country
The comma is used as a line break. If you want to use a comma at all, that will have to be changed.


The graphic files shouldn't be a problem to edit. It uses the standard Falcom PSP format (.itp) and there are already tools that can convert from .itp to .bmp/.png and back again.


There should be a pspfont file (openable with Tile Molester, Mode 2-Dimensional, 2 bpp linear, reverse order, 2 tiles/row) where you can just draw the coma elsewhere as another symbol (like the dollar sign, maybe?). No need to spend unnecessary energy and effort beyond that on that particular issue that can be resolved without resorting to mips assembly.

I'd appreciate a lot if you could share a link to the "itp" tools here. xentax forums aren't showing the links for non-members anymore, which is quite problematic for anyone without a compatible credit card..
And if you can, please take a look at Nayuta no Kiseki/Ys 7 to see if your "act" tools work on it as well (the general file structure and even some of the contents (case in point: the graphic format and the font structure, and to a limited extent the script files) is really similar between all of those)
And thanks a lot for taking the time and effort to take a look at this. I'm still a long way too inexperienced to handle reverse engineering compressions
 

neoxephon

Well-Known Member
Member
Joined
Jul 13, 2009
Messages
437
Trophies
0
Age
35
Location
USA
XP
547
Country
United States
There should be a pspfont file (openable with Tile Molester, Mode 2-Dimensional, 2 bpp linear, reverse order, 2 tiles/row) where you can just draw the coma elsewhere as another symbol (like the dollar sign, maybe?). No need to spend unnecessary energy and effort beyond that on that particular issue that can be resolved without resorting to mips assembly.

I'd appreciate a lot if you could share a link to the "itp" tools here. xentax forums aren't showing the links for non-members anymore, which is quite problematic for anyone without a compatible credit card..
And if you can, please take a look at Nayuta no Kiseki/Ys 7 to see if your "act" tools work on it as well (the general file structure and even some of the contents (case in point: the graphic format and the font structure, and to a limited extent the script files) is really similar between all of those)
And thanks a lot for taking the time and effort to take a look at this. I'm still a long way too inexperienced to handle reverse engineering compressions

Yeah, I'll definitely try that with the font, if I can get past the compression issue. I'm very, very much a beginner with ASM.

The .itp tool can be found here: http://www.pokanchan.jp/dokuwiki/software/itxcnv#itp_converter

It's command line, but really simple to use.
 
  • Like
Reactions: GHANMI

neoxephon

Well-Known Member
Member
Joined
Jul 13, 2009
Messages
437
Trophies
0
Age
35
Location
USA
XP
547
Country
United States
Man, this game has some weird stuff going on.

I noticed that doing any kind of modification to the packed files in the .act files (that I mentioned before) made absolutely no visible changes in the game.

Just when I was about ready to go crazy, I decided to just try something out for the hell of it.

I changed the name of 2 items in the uncompressed items file (located in /data/txt/item.tb).

I then put the modified item.tb into the ISO. After, I deleted the two files that contain (among other files) the compressed versions of the item.tb file.

Guess what? Now the game is automatically reading the text from the uncompressed item.tb, that it wasn't reading from before.

Check it out...
ULJM05424_00000.jpg
ULJM05424_00001.jpg


Notice the item names are now in sexy English?

If things work out as well as they have so far, we might be able to avoid having to deal with any of the compression.
 

neoxephon

Well-Known Member
Member
Joined
Jul 13, 2009
Messages
437
Trophies
0
Age
35
Location
USA
XP
547
Country
United States
I'm still trying to figure out the pointer system, specifically the pointer system for the script. There is some kind of pointer system, I can tell that much from my tests, but it does not seem to be any of the typical pointer systems that I've worked with in other games.
 
  • Like
Reactions: G-Han

G-Han

Well-Known Member
OP
Newcomer
Joined
Feb 17, 2009
Messages
64
Trophies
0
XP
214
Country
Netherlands
I'm still trying to figure out the pointer system, specifically the pointer system for the script. There is some kind of pointer system, I can tell that much from my tests, but it does not seem to be any of the typical pointer systems that I've worked with in other games.

Is it something I might be able to help with?
 

zero_g_monkey

Well-Known Member
Member
Joined
Aug 9, 2013
Messages
332
Trophies
0
Age
44
XP
321
Country
United States
Just wanted to say this is brilliant. Figuring out that you can delete the compressed file and use the uncompressed one... Wonderful. Did a test run on the first few minutes of Zero no Kiseki. It works!!! Good luck with the project. Falcom pointers are either straight forward or broken down like the file contains individual files or they go the block method... or the are completely random (as in haven't figured them out myself). The pointers are what have been holding me up with Eiyuu Densetsu 1 & 2 on PSX. Again, good luck and great find.
 

neoxephon

Well-Known Member
Member
Joined
Jul 13, 2009
Messages
437
Trophies
0
Age
35
Location
USA
XP
547
Country
United States
Yeah, I still haven't had any luck figuring out the pointers. The uncompressed file trick works with Nayuta no Kiseki, as well. Probably works with most of their PSP games.
 
  • Like
Reactions: GHANMI

GHANMI

Well-Known Member
Member
Joined
Jun 10, 2012
Messages
969
Trophies
0
XP
914
Country
Actually, I tried with Tengai Makyou IV PSP. There's a font (uncompressed) included in the eboot, and the script (an uncompressed file that seems to also include graphics by the hex data patterns but not sure really) is divided on 12 files.. When I tried modifying both of them and keeping the same size (with UMDReplace, then verifying extracting the files again to check if they have been replaced indeed), the game behaves exactly as if it hasn't been touched at all, original text, fonts and all.
I don't really know whether they have a compressed duplicate or not.
Could this be some standard practice for PSP games? Or a bug with PPSSPP? I wish I knew.

JDid a test run on the first few minutes of Zero no Kiseki. It works!!!
To be honest those games and their gargantuan script scare me to the point of not even thinking about touching their isos.
(Then again, I was crazy enough to look into Manjimaru DS (a game whose speedruns clock at 13 hours): uncompressed Shift-JIS text, though compressed graphics and font. They are however compressed in a format that accepts a bigger color palette than the TG-CD original: a pipe dream of mine would be translating those whenever I learn Japanese with the already FF4-quality graphics enhanced to SNES-quality)

EDIT: sorry for double-posting.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/MddR6PTmGKg?si=mU2EO5hoE7XXSbSr