News:

11 March 2016 - Forum Rules

Main Menu

London Seirei Tanteidan Translation

Started by bigbanana23, February 23, 2019, 12:17:39 PM

Previous topic - Next topic

bigbanana23

Hey all,

Long time lurker and follower of the scene here. I was looking to try my hand at a translation patch for the lesser known PSX RPG London Seirei Tanteidan and have made some decent initial progress but have hit a bit of a snag. I've managed to locate various parts of the script, the font, and generate the table, all the basic stuff. I've also dug into the ASM and have managed to perform a very basic hack to change the spacing of font characters on screen so that they aren't as distant from each other. Nothing fancy at all, just a 1 byte change from 13 (12px font width + 1 space) to 9.

The main snag that I've hit though is that while the characters are now closer together, the text boxes/speech bubbles still remain the same width as if they were fully spaced apart. The more characters in the string, the more empty space at the end of the textbox. I've combed through several traces of the code when a text box is drawn onscreen, and there are no other instances of a constant of 13 that affect the width of the actual text box. I've managed to make changes to the border, but I've been unable to find any way to change the width of the centre part with darker brown backgrounds and the actual text. I've also managed to move the textbox around onscreen to different positions, but so far I can only do this for text boxes and not speech bubbles.

Through experimentation, I've determined that the text box is drawn before the font is ever displayed. It's also clear that the textbox dynamically resizes itself based on the length of the lines within it. If I were to add a line break in the following screenshot, the box would narrow.



I've of course measured the width of the width of the text area in pixels and have checked trace logs to find it. When stepping through in a debugger, any changes to register values that contain the width of a textbox (as I've calculated it) only change its position on screen, never the actual width.

I was very kindly hoping that someone could point me in the right direction as to what I should look for/try next, as I've probably sunk as more time into trying to fix this one issue than anything else so far. I almost wish the game just used simple fixed-size text boxes like most other RPG's.

Thanks so much!

VicVergil

It would make sense, if the message box frame is rendered before the characters themselves, that the game does a first pass for the whole text box to count how long each line is, then how long the longest line is. That maximum is the width of the message box frame (not counting the edges).

Chances are that, in your case, instead of counting pixels, it's counting how many letters there are, then using that count to repeat an instruction elsewhere (drawing the message box in chunks?).

You could put a breakpoint on the text itself to find the routine.
Then you could make it so that count is fixed, or determined by the game when it detects a character at the very beginning (shift-jis standard has many to spare, either for this, or even dictionary compression with a dictionary reference you could stuff in the otherwise useless huge font graphic) or deduced with a formula from that maximum count.

I find it more impressive that you figured out where the fixed width value was, and how you modified that. If you don't mind, please share your method :)
It's amazing that you figured out something for London Seirei Tanteidan. It was high time it got translated :) Did you change the text routine internally to detect 1-byte characters to keep memory shortages from happening?

Quote from: bigbanana23 on February 23, 2019, 12:17:39 PM
I've also dug into the ASM and have managed to perform a very basic hack to change the spacing of font characters on screen so that they aren't as distant from each other. Nothing fancy at all, just a 1 byte change from 13 (12px font width + 1 space) to 9.

An 8 pixel wide font would be good, but a 6px one (like this one from Xenogears, that ended up being rendered as 8px because of technical issues) would fit even more text, and more importantly would make message box frame width calculations (should you decide to go the more complicated route of reworking it) much, much easier since it would be a division by 2.


mz

Hey, bigbanana23, I would have loved to help you with this, but I'm extremely burned out with ROM hacking.

In short, you can use pSX's GPU->Capture function or no$psx debugger. They can tell you what each "sprite" on screen is, where it came from, etc.

Although I can't even think about hacking right now, I have a lot of experience with PSX hacking (and love the system), so if you have any specific questions or want to voice chat with me via Discord, feel free to add me: mz#9923
There has to be a better life.

bigbanana23

#3
Hey mz and GHANMI, thanks a million for your suggestions. I'll definitely give them a try. It actually dawned on me last night after I'd already posted that the game is probably just constructing the textbox in chunks rather than per pixel. I poked around a bit this morning but didn't have any success, but I'll definitely dig deeper and try to isolate the code for the text windows to study it and understand it better.

Quote from: GHANMI on February 23, 2019, 09:30:23 PM
I find it more impressive that you figured out where the fixed width value was, and how you modified that. If you don't mind, please share your method :)
It's amazing that you figured out something for London Seirei Tanteidan. It was high time it got translated :) Did you change the text routine internally to detect 1-byte characters to keep memory shortages from happening?

Thank you so much, but it was definitely nothing to be impressed with. I just edited the font so that the first few lines of characters were 100% filled in and took a screenshot of the font displayed on screen. When I saw that it was displaying the characters 12 pixels wide with a 1 pixel space in between them, I just traced for a couple frames while a textbox was being drawn. I looked for each instance in the trace log for any ADDI or ADDIU instructions where the immediate was $0D and changed it to $09 until I found the right one that pulled the font closer together.

I also really like your idea of the 6px font. I didn't realize that there were any that were that skinny, but it would really simplify things once I get this textbox issue nailed down, especially if I can pull off a doubletext hack like you had mentioned which will be next on the to do list. Thanks so much!

Quote from: mz on February 24, 2019, 11:15:15 AM
Hey, bigbanana23, I would have loved to help you with this, but I'm extremely burned out with ROM hacking.

In short, you can use pSX's GPU->Capture function or no$psx debugger. They can tell you what each "sprite" on screen is, where it came from, etc.

Although I can't even think about hacking right now, I have a lot of experience with PSX hacking (and love the system), so if you have any specific questions or want to voice chat with me via Discord, feel free to add me: mz#9923

Thanks so much for the tips mz. I'll definitely hit you up on discord in the next couple of days for some advice.

Cheers!

aaronfox55

Hi!! everyone  ;D. Thanks for been working on this title, I saw it on youtube at moment ago and looks awesome. I would like to play it as soon has you finished with the translations to english.  :thumbsup:

Professor_Palmer

Man I have been trying to get someone to translate this game for years!!! Please let me know the status

bigbanana23

Hi all, I wanted to provide an update to anyone who might have been following this and wondering what happened.

I've recently picked this back up and would like to see it through to the end. So far I've implemented a VWF and have a full handle on how to dynamically resize the text boxes to better accommodate the narrower font. I will also implement a double text hack so that it accepts 1-byte text encoding rather than the shift-JIS 2-bytes. There's still plenty of room for me to add DTE and/or MTE systems as well, which will render an abundance of space for a quality English script. I intend to complete these ASM modifications in the upcoming days and will post progress for anyone who is interested to follow. I don't have a translator at this point so if anyone is interested in jumping aboard, I'd be more than grateful.

Moderators- apologies if this is considered necro'ing. Most appreciated if you could please move this thread to the Personal Projects forum, and I'll edit the first post to make it more appropriate. I intend to post frequent updates as this project moves along.

VWF:



bigbanana23

Just a quick update for anyone that might be following. The textbox sizing issue is now sorted out. It will now dynamically resize to the closest multiple of 13 pixels (the original tile width) in order to accommodate the combined width of the now variable-width characters.

I've also managed to allow it to accept 1-byte text encoding as opposed to the Shift-JIS 2-byte, effectively doubling the space I have for text. For example, the above was done in what would have only allowed for 16 characters. Nonetheless, I'll still write some DTE and MTE routines just to be on the safe side (and for the fun of learning :))