Hacking [PSP] La Pucelle Ragnarok Translation

ChepChep

Well-Known Member
Member
Joined
Feb 9, 2011
Messages
611
Trophies
0
XP
876
Country
United States
If anyone is interested in skipping directly to the new content on the PSP I found out there is a cheat built into the game to go directly to it.

At the title screen place the cursor on "Start" and press Triangle, Square, X, Triangle, Square, X, Circle.

I can confirm that this works.
 

ChepChep

Well-Known Member
Member
Joined
Feb 9, 2011
Messages
611
Trophies
0
XP
876
Country
United States
So I just solved the distribution issue. My plan is to use xdelta patching tool and release patches for each of the file I change. I tried patching with 3 or 4 different patching formats but they all create 600+ MB files. I guess I am changing too much in the ISO to make it worth doing. I will post how to apply the patch on the first post of the thread. Should not be much harder than how it was previously and we can keep those pesky LPR copyright material off the internet.
 

StorMyu

"I'm way too old for this"
Member
Joined
Jan 2, 2010
Messages
943
Trophies
1
Age
97
XP
1,093
Country
France
Thing is, if you try to make a patch from a whole iso if you change the whole file structure, you're gonna have a bad time.
 

Shrunken Pixel

Active Member
Newcomer
Joined
Nov 16, 2013
Messages
25
Trophies
0
Age
74
XP
69
Country
I've verified my modifications work on an actual PSP, including the modified TXP font, and there doesn't seem to be any problem. I'm getting exactly the same results off physical hardware as I have from the PPSSPP emulator (which I mainly use because uploading files to a PSP takes a long time) :)

I noticed that much of the UI (if not all of it) is contained within the EBOOT.BIN file itself, and this has been fairly straightforward to edit, though until I've tested thing thoroughly I can't be sure if I've missed any text I needed to alter because it's scattered all over the file. There are a few problems - namely a few bits of text I can't seem to find in the EBOOT, and I still can't figure out how to reduce the width of those spaces (which is the main culprit in pushing text outside windows and making things messy looking), but all in all I'm getting there.

The menus and text (outside of the talk-text) now uses the standard NIS La Pucelle font, while the talk text still uses a wider font.

Roi8G5X.png

wBeFOxX.png

xVietbJ.png
 
  • Like
Reactions: Linka

Shrunken Pixel

Active Member
Newcomer
Joined
Nov 16, 2013
Messages
25
Trophies
0
Age
74
XP
69
Country
Just an update to confirm the toolkit's PNG to TXP does actually work. The toolkit just takes a long amount of time (up to a few minutes) to do the conversion from PNG files compared to a couple of seconds for BMP files, so it appears the program has hung when it's just working incredibly hard. The generated files haven't had any compatibility issues with actual hardware so far that I've been able to notice.
 
  • Like
Reactions: Linka

ChepChep

Well-Known Member
Member
Joined
Feb 9, 2011
Messages
611
Trophies
0
XP
876
Country
United States
Shrunken Pixel,

How are you packaging everything back up with the fixed fonts? Are you using the toolkit to compress START_JP.LZS or the python script?

I cannot get the toolkit to compress START_JP.LZS and get it to work on my PSP. It works fine with PPSSPP emulator.
 

Shrunken Pixel

Active Member
Newcomer
Joined
Nov 16, 2013
Messages
25
Trophies
0
Age
74
XP
69
Country
Shrunken Pixel,

How are you packaging everything back up with the fixed fonts? Are you using the toolkit to compress START_JP.LZS or the python script?

I cannot get the toolkit to compress START_JP.LZS and get it to work on my PSP. It works fine with PPSSPP emulator.


I'm not doing anything special - I merely use the toolkit to export a TXP to PNG, edit the PNG in Paintshop Pro, then load that PNG back into the toolkit and convert it to TXP. The toolkit seems to freeze but eventually it creates the file.

With the file in the START_JP folder I compress the START_JP file, put the resulting file into the ISO, and then put the ISO on my PSP. I've not had a single issue with these files running on PSP yet so all I can say is your toolkit does the job perfectly. I haven't modified it in any way.

I have no issue using your toolkit to compress the file. I haven't seen the Python script.
 

ChepChep

Well-Known Member
Member
Joined
Feb 9, 2011
Messages
611
Trophies
0
XP
876
Country
United States
I think I know what is wrong. I was trying to add back in the START_JP.LZS an updated version of talk00.dat and I must have an error in the file or I converted too much text. I tried unpacking a version of START_JP.LZS I knew was working and then LZS it again and now it is working on my PSP (3000).

I got the files from Shrunken Pixel and I will try to merge the two version I currently have into a new patch. It might take me a few days to verify everything since I have little spare time except on the weekends. I most likely will want to play through Chapter 1 again on the PSP with the merged patch to confirm everything is working. (Takes about 2 hours of playing time + time to fix anything I find wrong)
 
  • Like
Reactions: Shrunken Pixel

ChepChep

Well-Known Member
Member
Joined
Feb 9, 2011
Messages
611
Trophies
0
XP
876
Country
United States
So I can confirm that the font fix works on my PSP. I plan to try to fix the files in START_JP.LZS so that they all have the same single width font. Should go very quickly since its in English.
 
  • Like
Reactions: Airu and Linka

Shrunken Pixel

Active Member
Newcomer
Joined
Nov 16, 2013
Messages
25
Trophies
0
Age
74
XP
69
Country
Concerning the double-space issue, I did quite a bit of research trying to find a fix for that. I haven't been able to find a solution as yet, but I can confirm that this isn't caused by any of the three font files (FontB0000.txp, fontB.fnt and fontB.ftd). It doesn't matter how any of these files are altered, spaces always remain twice as wide as we want them.

I can't figure out what fontB.ftd does; nulling the file (filling the file with zeros) corrupts the graphics a bit, but it's obvious spaces are unchanged.

The fontB.fnt file contains the font-grid mappings for the characters and nothing else. This can be easily edited with the toolkit, and while the third and fourth bytes would appear to correspond with character #0 (which +32 corresponds to ASCII space in hex-editors and the toolkit), this mapping is always ignored by the game. The game literally does not have or use a space character.

What must happen appears to be this: when the game is parsing text, if it encounters a &32 in a string the game just skips drawing anything and moves the draw-cursor forward 40 pixels (the width of a full-sized glyph in the font). This means the value could be hard-coded into the binary as part of the game's actual program code which means it's going to be incredibly difficult to locate.

I also noticed that there was at least one (may be more) case of there not being enough space in the EBOOT file for some bits of English text. An example is the "Insert/Replace" text that appears when arranging units. There's just enough available bytes to have the word "Insert" and two extra bytes for the button image that appears before it, but there's no space for a "00" null termination, resulting in the game considering the next part "Replace" as part of the same piece of text.

Since the text in the EBOOT must be pointered, it should be possible (if the pointer is located, and 1 subtracted from it) to shunt the problem text one byte backwards in the file making room for the null terminator.

Both problems are going to be tough to solve, it's difficult to say whether either are realistically possible either, but I'll persevere for the time being (mainly on the space issue; if I can sort this out not only would everything look nicer, but there should be less cases of text overflowing the boxes or screen) just in case I make some kind of breakthrough.
 

ChepChep

Well-Known Member
Member
Joined
Feb 9, 2011
Messages
611
Trophies
0
XP
876
Country
United States
I had a chance to edit all the files in START_JP.LZS and fix all the double width charcs to single width.

I plan to package it tonight into an ISO so I can start play testing Shrunken Pixel's font fix. If everything goes well, hopefully will have a new patch in the next few days with all the fonts mostly fixed.

Then I plan to get back to translating the NPC and story in chapter 2.
 
  • Like
Reactions: Shrunken Pixel

Shrunken Pixel

Active Member
Newcomer
Joined
Nov 16, 2013
Messages
25
Trophies
0
Age
74
XP
69
Country
You converted those files very fast :)

You'll need to keep the chat-text in Shift-JIS though. I experimented with trying to use standard ASCII in the chat-text (and it does actually work) but those dialogue boxes seem to be stuck in full-width mode only. Using the ASCII font aligns all the letters to the same grid that the wider font uses and the letters look more spaced-out than they're supposed to. The wider font might not look as nice as we'd like but it hides that particular problem.
 

ChepChep

Well-Known Member
Member
Joined
Feb 9, 2011
Messages
611
Trophies
0
XP
876
Country
United States
There is also another bug in the talk text where is you have an odd number of characters it will cause the PSP to crash about 25-50% of the time.
 

Shrunken Pixel

Active Member
Newcomer
Joined
Nov 16, 2013
Messages
25
Trophies
0
Age
74
XP
69
Country
There is also another bug in the talk text where is you have an odd number of characters it will cause the PSP to crash about 25-50% of the time.


That's probably related, with the game coded to expect only Shift-JIS characters there, probably for speed. The solution might be to include a space character (ASCII #32, &20 in hex) at the end of lines that have an odd number of characters, as it's a valid character that doesn't display any graphics. It won't work with zeros as zeros are already being used to separate and null-terminate each string.
 

ChepChep

Well-Known Member
Member
Joined
Feb 9, 2011
Messages
611
Trophies
0
XP
876
Country
United States
Alright so I have uploaded a new patch with the font fix. It does fix many of the single width characters. The side effect is that most of the Japanese is now garbled. I am not too worried about it . Anyways go grab patch V0.1.1 if you are interested.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://store.steampowered.com/bundle/34203/Tomb_Raider_Definitive_Survivor_Trilogy/ mmm