Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Okami HD PC - Texts files

Read or post about compression. And decompression. Or ask questions how to decompress your files.
prime
ultra-n00b
Posts: 3
Joined: Tue Dec 26, 2017 1:23 pm
Been thanked: 1 time

Re: Okami HD PC - Texts files

Post by prime »

Hello, I'm new here. Please excuse me for my poor English.
I want to be of little help to you.

(This is just my test resut. If there are any wrong information, Please correct me.)


Thanks for ffgriever, I've unpacked ENG font file PC and PS3 version.
(PS3: through QuickBMS script I've made. that is imperfect version)

Here's link of unpacked ENG font file I've unpacked.(core_20.bin(PC), core.bin(PS3))
https://mega.nz/#!iR9nlayT!_2EjmaB-ZNrz ... 3aThWo9OB8


I think the MSA file is associated with font table.

For example, in core_20.bin, there are many files and you can find MessCore.DDS and MessCore.MSA file. This is same on PS3 version too.

------------------------------------------------------------------

1. DDS file.
In both MessCore.DDS, you can figure out some properties.

PC(DX10): number of letter: 213 / image size: 2400x2400
PS3(DXT5): number of letter: 212 / image size: 1200x1200

With this file, you can make your own OKAMI HD table.

DDS Viewer: Noesis(v4.296)
(http://richwhitehouse.com/index.php?con ... sv4296.zip)

DDS Edit: Intel® Texture Works Plugin for Photoshop
(https://software.intel.com/en-us/articl ... rks-plugin)
(Requirements of this plugin is Photoshop CS6, but it also works on my Photoshop CS5)

----------------------------------------------------------------------

2. MSA file
Open two MessCore.MSA through HEX editor. You can figure out some similarities on structure.

*Note: PC version uses little endian, and PS3 version uses big endian.(the little endian data must be read backward)

MessCore.MSA(PC, little endian)

Code: Select all

D5 00 58 02 58 02 28 28 01 00 60 18 01 02 67 80 
01 03 67 8C 01 01 B3 80 01 02 63 80 01 C3 72 94 
01 C2 72 90 01 02 C3 54 01 C0 92 80 01 01 83 4C 
01 02 43 4C 00 03 93 90 00 01 73 90 00 41 D3 80 
00 81 73 80 00 81 B3 80 00 41 B3 80 00 81 D3 84 
00 81 B3 80 00 41 B3 80 00 81 A3 80 00 41 C3 80 
00 81 C3 84 00 01 E3 84 00 03 E3 80 00 01 D3 80
MessCore.MSA(PS3, big endian)

Code: Select all

00 D4 02 58 02 58 28 28 01 00 01 86 01 09 C1 A0 
01 0D C1 A3 01 04 C2 E0 01 08 C1 A0 01 0C B1 E5 
01 08 B1 E4 01 08 C3 15 01 00 B2 60 01 04 C2 13 
01 08 C1 13 00 0C C2 64 00 04 C1 E4 00 04 D3 60 
00 04 E1 E0 00 04 E2 E0 00 04 D2 E0 00 04 E3 61 
00 04 E2 E0 00 04 D2 E0 00 04 E2 A0 00 04 D3 20 
00 04 E3 21 00 04 C3 A1 00 0C C3 A0 00 04 C3 60
in PC version
1st 2 byte: 0x00D5(HEX)=213 -> number of CHAR on font table(see MessCORE.DDS)
2nd 2 byte: 0x0258(HEX)=600(DEC) -> width/4(width of MessCore.DDS: 2400)
3rd 2 byte: 0x0258(HEX)=600(DEC) -> height/4(height of MessCore.DDS: 2400)
4th 2 byte: 0x28(HEX)=40(DEC) -> width_each_letter/4, height_each_letter/4


in PS3 version
1st 2 byte: 0x00D4(HEX)=212 -> number of letter on font table(see MessCORE.DDS)
2nd 2 byte: 0x0258(HEX)=600(DEC) -> width/2(width of MessCore.DDS: 1200)
3rd 2 byte: 0x0258(HEX)=600(DEC) -> height/2(height of MessCore.DDS: 1200)
4th 2 byte: 0x28(HEX)=40(DEC) -> width_each_letter/2, height_each_letter/2


After 8h, there are lots of data.
they are located per 4 byte, 212 times.
(4 x 212 + 8 = 856(DEC) =0x358(HEX)
-> the data of MessCore.MSA file ends on 358h.

So I think it means MSA file is associated with font table, and each of 4 byte data in MSA file might be linked to letter each other(After 8h)

For example, on PS3 version, I've changed some value of MSA file.
(Actually, I've changed value in unpacked wolves.cpk, on core.bin area....)
0xFC~0xFF: 00 09 34 20 -> 00 09 32 10

Then width of the letter 'm' was cut. it looks like 'n'.
It means 6-7th value in 4 byte are width of letter on text screen.

But I cannot figure out the role of other data and I want to figure it out later.


Though my words are frantic article, I hope it will be helpful to you.


p.s-In MSD file, You can find many text with using font table.

But As ffgriever says, there are lots of command HEX code between the sentences.

ex) 80 01 - end of dialog / 31 35 - issun says / B9 02 xx xx - gamepad button (on the sentence "press the A button")

This HEX code must be figured out what codes are doing.
I'm trying to figure the role of codes, but it will take a long time.
innocentius92
n00b
Posts: 14
Joined: Sat Dec 16, 2017 9:10 am
Has thanked: 13 times

Re: Okami HD PC - Texts files

Post by innocentius92 »

prime I'm trying to figure the role of codes, but it will take a long time
Thanks a lot *u* I will wait for any tool that helps translate this game for people who speak other languages. In my case, Spanish.
prime
ultra-n00b
Posts: 3
Joined: Tue Dec 26, 2017 1:23 pm
Been thanked: 1 time

Re: Okami HD PC - Texts files

Post by prime »

innocentius92 wrote:prime I'm trying to figure the role of codes, but it will take a long time
Thanks a lot *u* I will wait for any tool that helps translate this game for people who speak other languages. In my case, Spanish.

innocent92 I've seen Spanish patches for PS2 and Wii version before.

here's the link
http://okami.romhackhispano.org/

I think there are user translated text in there.

Could you patch it to PS2 or Wii version and extract MSD FILE?

If the text contents and commands are not much different between PC and PS2, you can compare structure of some MSD file and test to copy-paste it.
(before paste, consider little endian and big endian type)

If it succeed, what you need to prepare is spanish font graphic.

Or contact to the spanish translate team. It could be helpful somehow.
innocentius92
n00b
Posts: 14
Joined: Sat Dec 16, 2017 9:10 am
Has thanked: 13 times

Re: Okami HD PC - Texts files

Post by innocentius92 »

prime Yes, i know the translations for ps2 and wii and I have both. but now i want to work on PC version, the real HD.
ffgriever
beginner
Posts: 30
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 28 times

Re: Okami HD PC - Texts files

Post by ffgriever »

Here's a simple tool to unpack/repack MSD files. It lacks some stuff like speaker codes (like hmff is narrator, etc. - I've got all of them from PS2 version, so no problem here) and some special codes are not recognized (it's fine, actual 16bit short values are inserted into the file). I might add these later, but it won't break compatibility.

http://ff12.pl/down/okami-tools-20180105.zip
User avatar
makcar
veteran
Posts: 154
Joined: Mon May 12, 2014 10:41 pm
Has thanked: 22 times
Been thanked: 45 times

Re: Okami HD PC - Texts files

Post by makcar »

Thanks!
Image
ffgriever
beginner
Posts: 30
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 28 times

Re: Okami HD PC - Texts files

Post by ffgriever »

There is an issue with the MSD unpacker/repacker. The very first value (number of dialogs) is not u32 but u16 folowed by another u16. Trivial to fix, but the tool will crash on some of the files. Unfortunately I won't have access to the source code until Monday (I've been working on it during my lunch break and left the drive at work, it's also why this bug happened as I had only three files to test on). You can zero the second value out and the restore it after repack if you're in a hurry.
User avatar
makcar
veteran
Posts: 154
Joined: Mon May 12, 2014 10:41 pm
Has thanked: 22 times
Been thanked: 45 times

Re: Okami HD PC - Texts files

Post by makcar »

Zolodei
n00b
Posts: 11
Joined: Sun Jun 18, 2017 7:15 pm
Been thanked: 4 times

Re: Okami HD PC - Texts files

Post by Zolodei »

ffgriever, there are files with the order of bytes big-endian, this is the folder st0 and std.
makcar, dismantled the MSA archive or rebuilt the image?
innocentius92
n00b
Posts: 14
Joined: Sat Dec 16, 2017 9:10 am
Has thanked: 13 times

Re: Okami HD PC - Texts files

Post by innocentius92 »

ffgriever wrote:There is an issue with the MSD unpacker/repacker. The very first value (number of dialogs) is not u32 but u16 folowed by another u16. Trivial to fix, but the tool will crash on some of the files. Unfortunately I won't have access to the source code until Monday (I've been working on it during my lunch break and left the drive at work, it's also why this bug happened as I had only three files to test on). You can zero the second value out and the restore it after repack if you're in a hurry.
The okami-msd tool don't recongnize ñ á é í ó ú ¿ ¡ and other spanish characters, can you fix it, my friend?
ffgriever
beginner
Posts: 30
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 28 times

Re: Okami HD PC - Texts files

Post by ffgriever »

It does. Just make sure the text is utf8 encoded.
innocentius92
n00b
Posts: 14
Joined: Sat Dec 16, 2017 9:10 am
Has thanked: 13 times

Re: Okami HD PC - Texts files

Post by innocentius92 »

ffgriever wrote:It does. Just make sure the text is utf8 encoded.
I converted it and coded it in UTF-8 and when I applied the SMD tool I got this message. And then when you apply it in core_20.bin, encrypt it and start the game, the game crashes.
Image
Image
ffgriever
beginner
Posts: 30
Joined: Fri Dec 15, 2017 5:21 pm
Has thanked: 1 time
Been thanked: 28 times

Re: Okami HD PC - Texts files

Post by ffgriever »

Remove the BOM (which doesn't have any sense anyway as utf8 has no byte order, you always read 8 consecutive bits at once, so no marker is necessary, they really should call it utf8 header or something). The tool is unaware of any BOM value at the beginning and it might cause these issues. As I wrote, it supports properly all the characters you've quoted above.

It expects "^\{Dialogs: *([0-9]+)\}$" and the bom makes it "^0xEF 0xBB 0xBF \{Dialogs: *([0-9]+)\}$". The regular expression just doesn't find a match then.
User avatar
makcar
veteran
Posts: 154
Joined: Mon May 12, 2014 10:41 pm
Has thanked: 22 times
Been thanked: 45 times

Re: Okami HD PC - Texts files

Post by makcar »

Zolodei wrote:makcar, dismantled the MSA archive or rebuilt the image?
I used Photoshop to edit dds.
innocentius92
n00b
Posts: 14
Joined: Sat Dec 16, 2017 9:10 am
Has thanked: 13 times

Re: Okami HD PC - Texts files

Post by innocentius92 »

makcar wrote:
Zolodei wrote:makcar, dismantled the MSA archive or rebuilt the image?
I used Photoshop to edit dds.
How did you do it? Photoshop does not recognize the DDS file extension.

¿Can you help me, please?
Post Reply