News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Berserk PS2 how to get the alphabet values?  (Read 19351 times)

Puck

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #20 on: April 14, 2013, 06:03:19 pm »
I am not really sure about what you are changing; are you still changing this??:

If yes, you have at least 1 pac file inside the misc.pac that you know has all the letters ( the one from the game options) so that it the source of your "font".
I don't have the game with me now but from my memory i never see those "ABCD...." that was cut after the F at first glance like the problem you had (yes, i know you found other letters after it).

First you need to compare that "source" font with the "defective" font inside the event.pac.
Are they the same?? what changes?? Are those values really cut after the "F"??
Can the "source" font be inserted in the space of the "defective" one without expanding the place??
Can the "source" font be cut so that it has only the latin letters??
If the answers to the last 2 question is no, you need to do what i told you in the last post and compare the sub-pac files from event.pac with misc.pac. I am pretty sure there will be a file size in the pac header that you need to correct if you expand the file and probably a pointer to the data after those "ABCD" that you need to repoint.

I didn't added the "alphabet" seen in that picture, because I figured that the information about the letters(font) starts where it says "font_sample" and ends where it says:


What I did was copying the font from the "save game option", where the memory card menu appears and ask you to save the game. I selected all the information and pasted over the first dialogue on "event.pac" font. I just replaced the original font of "event.pac" first dialogue. The first dialogue font size is like 100kb and the save game font is like 80kb, so I had plenty of space.





Also, using the "RRunpacker" it allows the extract all the files from any .pac file of the game. With this extractor I extracted all the files of "misc.pac" and it appears a folder called "FONT". In it there is a 2.5mb file with the name "ALL". I believe that file contains the information of all the fonts of the game, but it is too heavy to just replace over the originals.


I don't know how to edit each font, because when open in a Hex Editor it doesn't show things that can recognize or understandable  :-\
So the only thing I can do know is copying and replacing over the originals  :(

By the way, is it there a way to modify a file without having to build the .iso every time?
« Last Edit: April 14, 2013, 08:13:51 pm by Puck »

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #21 on: April 15, 2013, 04:30:35 am »
Can you post the link to download that RRunpacker please??

RetroHelix

  • Full Member
  • ***
  • Posts: 148
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #22 on: April 15, 2013, 09:39:41 am »

Puck

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #23 on: April 15, 2013, 03:30:24 pm »
Here is the RRunpack

https://www.dropbox.com/s/4vvpp95e39g9ac2/RRUnpack.rar

April 16, 2013, 01:05:08 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Awesome! I think I got it!



I replaced this font over the original.



It kind of suck that the L's and R's buttons doesn't appear but I don't think it is so important for them to be there  :D

The font is 40kb. It would be really sweet to have a repacker so the same font could be use for every other dialogue. Every dialogue uses a different font and the font for the cut-scenes is like 10kb  :(

So now it is required a repacker to finally be able to fully translate this game!
« Last Edit: April 16, 2013, 01:07:38 am by Puck »

DarknessSavior

  • Hero Member
  • *****
  • Posts: 5031
  • Darkness.
    • View Profile
    • DS: No, not the Nintendo one.
Re: Berserk PS2 how to get the alphabet values?
« Reply #24 on: April 18, 2013, 10:00:32 am »
If you get all of this figured out and get a script dumped, I might be interested in translating this. Looks like a good game. And at least two internet reviewers I like recommended it.

~DS
Red Comet: :'( Poor DS. Nobody loves him like RC does. :'(
Sliver-X: LET ME INFRINGE UPON IT WITH MY MOUTH
DSRH - Currently working on: Demon's Blazon, Romancing SaGa, FFIV EasyType.
http://www.youtube.com/user/DarknessSavior

Puck

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #25 on: April 18, 2013, 09:02:11 pm »
If you get all of this figured out and get a script dumped, I might be interested in translating this. Looks like a good game. And at least two internet reviewers I like recommended it.

~DS

It is quite easy to get the text. With MadEdit and UTF-8 encoding the text can be readable, of course it is in Japanese  :P

The only thing that is needed now is the Repacker. If you knew a good programmer that could do this, would be really awesome.

 :laugh:

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #26 on: April 18, 2013, 10:07:32 pm »
Well, you not really listen to what people say to you...right Puck??
Till now you got a lot of good luck but now you start to work with some structure or method and not just try out.
A good dimonstration of what i want to tell you: say hi to the ALL font (not perfectly allineated and not in the correct sequence):






















and now say hi to the "memory card font" : it's the font that is used for all memory card messages:



What i mean with work with system??
You said you got some success by changing those "font" values but you got stuck because of the size limits.
You completely ignored what i told you about study the file from the beginning, you completely ignored when i told you to see if you can "cut down" the font to have only the characters you need.
Here is what you should do:


You see the black box is some kind of ID, the red one are offsets and the blue one are sizes.
More in detail:


The first 4 bytes are unknow but doesn't seem to be important
4 bytes unknow again but could be pointer table size (x500)
4 bytes "font values" pointer (yes. probably the same you are changing)
4 bytes "font values" size (so here you have the value you need to change to make everything fit)
>
4 bytes some kind of ID (start sequenzial but get messed up later)
4 bytes padding x00000000
4 bytes first phrase offset
4 bytes first phrase size
repeat from >

So, if what i said before is correct:



The black box is the rest of the pointer table, the red is your "font values" and the blue one is the text.
From the last pic you got "x1005 and x64" check the start offset of your "font value"....yes, it's x0510 (1005 föipped) and if you count the characters. you will arrive to "DEL" and one x00 as separator exactly at 100 = x64.
Check the rest of the offsets and you will see they are correct for the text as well.

Another thing you completely ignored is the what i told you to try to see the font and from there you could easy find the values of the letters.
Check the *font values* in this last pic and memorise the "text" version of it: i mean this:
SP0@P`p!1AQaq"2BRbr#3CScs$4DTdt%5EUeu&6FVfv'7GWgw(8HXhx)9IYiy*:JZjz+;K[k{,<L\l|-=M]m}.>N^n~/?O_o
Scroll up to the image of the "memory card font".....see something familiar??

UPDATE:
Well, well, well, nice game you picked here.
Here is the source of your pain:

Not understand??
Take a look at your 2 first pics you posted and at this font....you understand what is going on??
This game has almost more font on it as text  :crazy: and before you ask, no, not only those in the font directory.
So what this game do?? Well it's looking like he has a font for each "block" of text and this font is not even sequencial but they are build with the letters that appear on the text and in the order they appear in the text.
So if you look at your first hex screen and my font here above, you will see that there is D *button* (in japanese) and then C A B exactly in the sequence they appear in the hex editor.
The same way, if you scroll to the bottom of that file in the hex editor, you will see the english word "SAVE" and that's why you see those S and V at the bottom of the font (by the way, this means you was actually wrong in your first post that it show only till F, if you would continue, you would had found S and V as well :p )

Well, what this mean?? you will need to change all this incomplete fonts with one with all the latin letters or find a way to tell the game to not use those incomplete fonts but load that in the font folder.

« Last Edit: April 19, 2013, 12:03:59 am by Auryn »

Puck

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #27 on: April 19, 2013, 12:03:54 am »
You're the genius  :D

Obviously not everybody has the same experience as you do  :o

1. How did you get the image of the font "ALL"?
I tried with many graphic programs and none of it showed anything good.

2. I understand your explanation about pointers on the "Save data font" , but what about the "font_sample" file that is like 80kb?

3. I tried checking the event.pac dialogues files using the pattern of the "save data font", but it is kind of different. I got the pointers but the file size I don't get it =/

It has 3 files (1st for the text, 2nd for ?, 3tr for font)

4. How using this method would help the deficit in size, or getting the correct font in a low size?

Sorry for being a slow learner  :'(

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #28 on: April 19, 2013, 12:12:32 am »
We cross posted :p
Here is an example of how you view the one above in CT2:


By changing the palette to black and white you will see like the one in my last post.

Most will be not alineated and most i saw till now are in .unk files.

You could probably copy and paste the latin font from the font folder over this fonts but I believe it's still too big to fit everywhere so you need to see if there is free space after the font in the pac file or study the latin font format and cut it down to just the essential letters you need.

Puck

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #29 on: April 19, 2013, 12:46:27 am »
Can you send me a link to your Crystal Tile 2? The one I download from here does not have the MFC71U.DLL and it does not work =/

Using the Latin font is just too big and the font characters are quite big too. The font that worked with the color and ASCII characters was this one:

misc.dpac\MSDB\0102.pac\0001.ukn

The only problem is that it is 40kb

The fonts in the cut-scene are like 10kb and here is where there is a problem.
« Last Edit: April 19, 2013, 01:23:32 am by Puck »

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #30 on: April 19, 2013, 09:33:49 am »
A) http://bit.ly/11kQx6R
or http://bit.ly/11kReNh

B) ok, i can accept the fact that the latin font is too big graphically but now you have the right one in your hands. So i repeat again, you have 4 ways to go now:
1)you have study the format of that font, you have to study the format of your pac files and find the pointers to the various sections of your file and naturally the sizes if they are stored there.
By doing this, you can check if there is still space to fit the 40kb in those 10kb (by expantion or overwriting empty space) or
2) delete the unused letters from the 40kb (making the right correction naturally) and get it down to 10kb.
or
3) a mix of 1 and 2
4) is to insert all latin letters you need in those 10kb but you still need to do study the format.


I will be even more precise (follow on my last pic):
You see the top /left most rectangle in that pic??
That part is the part with "sample font ....", i am pretty sure there are pointers there, pointers that point to all those rectangles with the button graphics (right of it till the yen symbol).
There should be a pointer to the yen symbol in there as well.
Then there is all those rectangles with the dots in it after the font. If you didn't notice, that is your width table so that you have a VWF in your game.
By selectively deleting or changing those things, you can personalize your font so that he will serve your needs and fits where you want it.
Anyway in this case you can go 2 ways again.
Or you make 1 font for all texts or you do what the game do and create a font for every text block with only the letters on it that you need.
That's up to you

Puck

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #31 on: April 20, 2013, 02:35:46 am »
I kind of understand how to find the pointers of the dialogues, but I can't seem to find the pointers in the font file.

For example in this file:
misc.dpac\MSDB\0102.pac\0001.ukn

I don't get it how to locate the pointers.

Using the CrystalTile2 I can identify the letter inside of the font. The problem I have is how the dialogue tells the game to go to ? pointer for the "A" letter or the "Circle" button.

I feel that if I simply modify the font or move things around, it won't work because there has to be some sort of "address" to that particular character  :-\

I know I'm doing something wrong, but can't know what  :banghead:

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #32 on: April 20, 2013, 11:47:53 am »
Quote
how the dialogue tells the game to go to ? pointer for the "A" letter or the "Circle" button.
What you think you are changing when you change the famous "font values"??

Puck

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #33 on: April 20, 2013, 04:02:33 pm »
What I mean is this.



That selection is the letter "u" in that font. But there has to be a pointer to that section. If I simply replace another letter into that same offset there could be trouble.

How this font works so that it can allows normal ASCII values to be represented for that letter "u" and so on ?

I don't seem to find the pointers. I can only find them in the dialogues files.

 :-\


Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #34 on: April 20, 2013, 09:39:38 pm »
Almost all you need to know is explained in my post above between the "memory card" font and the "UPDATE".
I say almost because i admit that there is nothing about the "buttons images" and their value but anyway, you would let that part of the font alone so it doesn't really matters. Just parse the text to find those values and let them untouched.
Did I say you have to insert in ASCII?? Unicode is perfectly fine.

Puck

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #35 on: April 21, 2013, 01:47:54 am »
So, I edited the font.

I copy and pasted each and every letter from the working font to the cutscene 10kb font. It didn't fit every letter and symbol but I still give it a try.

This is the result



This happens during the 2nd cutscene. The image doesn't appear on my emulator, don't know why. The text, however, is all messed up. The changing does not properly show the full letter, but instead they are shown cut like in half or something.

I think that there has to be something on the same font file that designate some sort of pointer and maybe the width of each character.

I edited it too with CrystalTile2, but got the same results.

 :-\

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #36 on: April 21, 2013, 12:52:39 pm »
And you are surprised about it??

Do you have any idea of how a font in general work??

Do you have any idea of how a VWF works??

To get the font to work, you need to correct the link that say to the game " when you see the value xx  in the text print tile yy" and you do that by changing the "font values".
Then you need to complete the font graphically with the missing letters by copy paste from another font or by draving yourself.
Last but not least you have to correct that "width font table" i talked about a while ago but you completely ignored it.

Puck

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #37 on: April 21, 2013, 04:05:25 pm »
There must be a language barrier here. Please bear with me. I'm trying my best to get things done  :'(

No, I don't know what a VWF is.

"when you see the value xx  in the text print tile yy" and you do that by changing the "font values"

Where do I find the "font values" of the cut-scenes or any other dialogue?

In your example above the red section only works for the Save game dialogue file. The game has 2 files, one .stb file for dialogue and a .ukn file for the font. Well, in the cutscenes it both uses .ukn but the dialogue is the 0000 file while the font is the 0001 file.

I can get the pointers for the other dialogues (.stb file), but I only get the pointer of each text string and its size  :-\
I don't understand how a text string and its size on the dialogue file has any relation to the font file  :huh:

For example here is the dialogue of the 2nd cut-scene of the game. I figured out the pointers following what you said in the post above.



The red is the pointer to the first text string and the blue indicates its size. Now how does this refer to the font file?

Here is the font file, just in case.
https://www.dropbox.com/s/fbg0aafmm8gvvgw/0001.ukn




Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #38 on: April 21, 2013, 07:12:24 pm »
Well, if there is a language barrier, then go search for yourself in your language how a pc works especially from when you press a button on your keyboard till you see the letter on screen.
If you lack this basic knowledge of how a font work, what a VWF is or a FWF, passing by character encoding you will not get anywhere.

Quote
"when you see the value xx  in the text print tile yy" and you do that by changing the "font values"

Where do I find the "font values" of the cut-scenes or any other dialogue?
Please go back and re-read all this thread, I don't want to re-explain something i marked with a big black box in a preview post i made. Re-explain this, will only make more confusion as other.
I will quote myself again as hint to where to read:
Almost all you need to know is explained in my post above between the "memory card" font (PIC) and the "UPDATE" (TEXT).

All you said about the pointer and the text but I can not answer you your question of what font is used where. You have to find out what font is used for that file.
One method is to "corrupt" the font files (example by "painting" on orizontal line over all letters, the next font a vertical line, then a diagonal for the next font) and then play the game and make a list of what font is used where.
This by the way, is one of the first things i check when i start to hack a game, what font is used where because most games tend to have unused fonts on them.


Puck

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Berserk PS2 how to get the alphabet values?
« Reply #39 on: April 21, 2013, 08:22:32 pm »
You mean that I should edit the font in CrystalTile2 according to the cutscene font which uses Japanese spacing?

Something like this?



The top letter "u" is from the working font and the "u" on the bottom is the position the font from the cutscene uses.

EDIT:

Alright! Got some results


What I did was positioning the letters in the same place as they were in the original Japanese font.
This is how the font looked. There's still some alignment to be done and understand more how this font works and finish replacing the other letters.



Translating by modifying the font according to the new text and using the 3 bytes Unicode values would end in a shortage of space. I know that the pointers can be adjusted but the there is not enough room in the file. Just the first text string that translates to "Guts! Guts! Hey, wake up already" needs  96 bytes of Unicode values.

This cutscene has 7 text strings within a size of 403 bytes. The only way would be by using ASCII values or having a "Rebuilder", which could allow increasing the size of every file without problem.

That would be my guess :P
« Last Edit: April 22, 2013, 01:59:43 am by Puck »