Hacking Grand Knights History English Patch Alpha (looking for help)

SkyBladeCloud

Well-Known Member
Member
Joined
Oct 7, 2010
Messages
452
Trophies
0
Age
33
XP
1,420
Country
It all makes sense.

In graphic computing, vertex coordinates (or in this case, texture coordinates) are multiplied by transformation matrices to apply standard 3D (and by extension, 2D too) transformation. By multiplying by a transformation matrix you'd be

-Adding a translation vector (an X-Y vertex is MOVED summing an x'-y' vector).
-Summing a rotation component (these are trigonometric operations over the X-Y vector )
-Multiplying a scale vector (an X-Y vertex is SCALED by multiplying a x'-y' vector)

I wouldn't be surprised if the game supports tags to rotate the text too ;)

I guess vertex coordinates are (as you can see in the GE debugger) floats in this game because (as you can also see in the GE debugger) PSP transformation matrices use floating point components.
Now what is really great here is the fact that, in this game, those transformations can be tweaked straight from the text using those tags Lyan discovered (They couldn't be more useful!). Now, if I were the manager behind the project, I'd go with Lyan's solution, since IMHO all texts look great as they are now, and it would be a matter of stretching only the ones that are too long.

My solution would affect all characters in the game. The width table is located in OVERLAY_MO4UMD.BIN; at offset 0x2c46b8 you'll find an array of 16 bit integers with 158 elements; those are the pixels that will take each latin character (they are in the same order than in the font). You could, for example, try to reduce one, or two pixel each. And yes, that's just the allowed space for each character, so reducing it won't stretch them. The actual difference on screen would obviously depend on the matrix transformation. For example, if you add one pixel, and then do something like @s(2.00), the final increment would be 2 pixels (this is just theory, though). Anyway, hopefully all this takes care of text overun ;)

~Sky
 
  • Like
Reactions: Randqalan

Lyan53

Member
Newcomer
Joined
May 11, 2010
Messages
24
Trophies
0
Age
46
Location
France
XP
172
Country
France
My solution would affect all characters in the game. The width table is located in OVERLAY_MO4UMD.BIN; at offset 0x2c46b8 you'll find an array of 16 bit integers with 158 elements; those are the pixels that will take each latin character (they are in the same order than in the font).
Exactly, just after, you can found character table:
offset: 0x2c47f8
size of table: 0x1f0

For the french project, I've adapted this table to add our special characters
120705092233165694.png


and after, you can found font data:
120513062837462096.png

- 4 bytes: size of font picture (2 for width/2 for height)
- 1 byte: number of picture inside font
- 2 bytes: size for each chars inside font (1 for width/1 for height)
- 2 bytes: number of chars by lines and column (1 for line/1 for column)

In my first tests (before I found the text tags), I've tried to reduce directly the font, but the result was not conclusive (problem such as misaligned menus text, and others...), and I finally abandoned this idea when I found the text tags (very useful for this game).


"Holy crap, it's Lyan!" - that was the first thing that popped into my head when I read your post. When I first started this project and did the research, I stumbled on your post (in French) about this game and studied the sub-par Google translation of it. Despite the half-gibberish, I still learned quite a bit, so I thank you for that.

In addition, this information looks extremely useful! I had no idea you could do this. The credits file uses a format similar to this, but I didn't know this is what it did. That's amazing, and a big help.
Glad my work and informations has helped you for your project :)

I tested your patch and you have done a much better job than me on the game. There are many things I could not do with my skill level ^^


I have a little question, I noticed that you are using plugin (prx) to hook internal PSP functions to change region (OSK, Save, Screenshot). My question is the next:
Why don't you do that directly inside the EBOOT.BIN?
 

justfuit

Active Member
OP
Newcomer
Joined
Dec 10, 2013
Messages
42
Trophies
0
XP
143
Country
United States
Now, if I were the manager behind the project, I'd go with Lyan's solution, since IMHO all texts look great as they are now, and it would be a matter of stretching only the ones that are too long.
I've tested some text with the tagging so far, and things are looking pretty good, since I only have to modify the text that's too long. I've encountered a minor issue where the tags are being applied to chunks of text, but I just have to look at it some more. It's looking like the tag solution is the way to go.

You're a lot more knowledgeable regarding graphics, so I might need your help regarding a different issue later, but one thing at a time, right?

I have a little question, I noticed that you are using plugin (prx) to hook internal PSP functions to change region (OSK, Save, Screenshot). My question is the next:
Why don't you do that directly inside the EBOOT.BIN?
The PRX patch used to do much more. It used to hook at load time and write ASM code into memory because I thought that was the only way to patch some things. It was very easy to change the internal function region with the PRX patch, and since I was using it anyway, it seemed logical.

Later on, I found that all the ASM code I was editing using the patch was actually inside the overlay file. Modifying the overlay file defeated the purpose of the PRX patch, so I just cut out all the load-time hooking stuff. I haven't really looked into it since.

Long story short, the PRX patch will be removed, but I just haven't gotten to it yet.

I know the game is kind of dead since there's no multiplayer, but I'd be glad to help if you wanted to finish your project if you could find Japanese-French translators. You might even be able to go English-French if you want to use my translator's text, although you might lose some things in translation.
 

Lyan53

Member
Newcomer
Joined
May 11, 2010
Messages
24
Trophies
0
Age
46
Location
France
XP
172
Country
France
The PRX patch used to do much more. It used to hook at load time and write ASM code into memory because I thought that was the only way to patch some things. It was very easy to change the internal function region with the PRX patch, and since I was using it anyway, it seemed logical.

Later on, I found that all the ASM code I was editing using the patch was actually inside the overlay file. Modifying the overlay file defeated the purpose of the PRX patch, so I just cut out all the load-time hooking stuff. I haven't really looked into it since.

Long story short, the PRX patch will be removed, but I just haven't gotten to it yet.
Okay, I understand better now, thank you for explanations :)


I know the game is kind of dead since there's no multiplayer, but I'd be glad to help if you wanted to finish your project if you could find Japanese-French translators. You might even be able to go English-French if you want to use my translator's text, although you might lose some things in translation.
This project has never been a priority for me.
When I started working on this game, it was mostly out of curiosity. Also because the decision of the publishers cancel western translations was unfair for us...

But I knew it would be difficult to find Japanese/French translators... They are few, busy on other projects, or not interested by the game. Some have proposed to work on it, and have renounced or disappeared ^^

At the moment, I'm working on other projects and I will not have time to revive the french translation of GKH, but the idea of ​​using your English translation could be interesting for later ;)

Thank you for your offer, if I decide to restart this project, I will not hesitate to come and ask for your help and advice :)
 

justfuit

Active Member
OP
Newcomer
Joined
Dec 10, 2013
Messages
42
Trophies
0
XP
143
Country
United States
This is a criware bigfile game, right? How do you unpack and repack the bigfile?
Correct. I got an unpacking tool from one of the guys who first hacked the game. I don't know exactly how it works, but when I talked to him about it, he said it's like other .CPK files, but the TOC was encrypted. After he was able to decrypt it, he was able to extract the files from the CPK using the decrypted TOC.

To repack, I use a tool called CriPackedFileMaker.
 

Sintrial09

Well-Known Member
Newcomer
Joined
Mar 31, 2014
Messages
87
Trophies
0
Age
35
XP
1,173
Country
United States
Sorry for the noob question, but I did look everywhere with no luck. The game looks fine plays well, but no music. Sounds works well. Is there anyway to fix this? I haven't been on the scene for psp since 2010 I am running 5.50 Prometheus. Please I really need help :(
 

justfuit

Active Member
OP
Newcomer
Joined
Dec 10, 2013
Messages
42
Trophies
0
XP
143
Country
United States
Not the problem, updated and still same problem. anyone know how to fix this?
Have you tried an unpatched ISO to see if the sound works? I haven't encountered any sound problems at all working on this, so I'm not sure if it's related to the patch or if it's the source file used for the patching process.
 

Randqalan

The Wheel of Time Turns
Member
Joined
Jan 25, 2014
Messages
1,098
Trophies
1
Location
M00N Base quanto
XP
2,085
Country
United States
Not the problem, updated and still same problem. anyone know how to fix this?
Might help if we knew what sort of update on CFW you did
Have you tried an unpatched ISO to see if the sound works? I haven't encountered any sound problems at all working on this, so I'm not sure if it's related to the patch or if it's the source file used for the patching process.

Just to let you know have had no problems on ME 2.2 or PRO CFW Collection both 6.20
 
  • Like
Reactions: Deleted User

Sintrial09

Well-Known Member
Newcomer
Joined
Mar 31, 2014
Messages
87
Trophies
0
Age
35
XP
1,173
Country
United States
6.60 pro c3 is the firmware I am on. Already tried a Untouched Iso and it worked great. Patch it and no music at all. This bites I really wanted to play this game, maybe one day there will be a working version for me.
 
D

Deleted User

Guest
6.60 pro c3 is the firmware I am on. Already tried a Untouched Iso and it worked great. Patch it and no music at all. This bites I really wanted to play this game, maybe one day there will be a working version for me.

Try pro C2 or B10 from official PRO download site https://code.google.com/p/procfw/downloads/list
There's no such a thing as C3 as far as i know. Maybe you got an unofficial version of pro.
 
  • Like
Reactions: Randqalan

Hargrun

Support the arts! (The games, silly.)
Member
Joined
May 22, 2014
Messages
442
Trophies
0
Age
32
Location
Rio de Janeiro
XP
308
Country
Brazil

Sintrial09

Well-Known Member
Newcomer
Joined
Mar 31, 2014
Messages
87
Trophies
0
Age
35
XP
1,173
Country
United States

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @K3Nv2 https://www.youtube.com/watch?v=9yWIobzBdKc