XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sun Feb 18, 2018 11:28 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Tue Dec 26, 2017 4:44 pm 
Offline
ultra-n00b

Joined: Tue Dec 26, 2017 1:23 pm
Posts: 3
Has thanked: 0 time
Have thanks: 1 time

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:
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:
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.

You can make the ads go away by registering



Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Wed Dec 27, 2017 5:18 am 
Offline
n00b

Joined: Sat Dec 16, 2017 9:10 am
Posts: 14
Has thanked: 13 times
Have thanks: 0 time
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.


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Wed Dec 27, 2017 6:04 am 
Offline
ultra-n00b

Joined: Tue Dec 26, 2017 1:23 pm
Posts: 3
Has thanked: 0 time
Have thanks: 1 time
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.


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Thu Dec 28, 2017 12:20 am 
Offline
n00b

Joined: Sat Dec 16, 2017 9:10 am
Posts: 14
Has thanked: 13 times
Have thanks: 0 time
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.


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Fri Jan 05, 2018 2:44 pm 
Offline
beginner

Joined: Fri Dec 15, 2017 5:21 pm
Posts: 21
Has thanked: 1 time
Have thanks: 22 times
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


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Sat Jan 06, 2018 2:27 am 
Offline
veteran
User avatar

Joined: Mon May 12, 2014 10:41 pm
Posts: 140
Has thanked: 17 times
Have thanks: 39 times
Thanks!
Image


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Sat Jan 06, 2018 5:06 pm 
Offline
beginner

Joined: Fri Dec 15, 2017 5:21 pm
Posts: 21
Has thanked: 1 time
Have thanks: 22 times
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.


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Sat Jan 06, 2018 8:34 pm 
Offline
veteran
User avatar

Joined: Mon May 12, 2014 10:41 pm
Posts: 140
Has thanked: 17 times
Have thanks: 39 times
@ffgriever
405 files: https://zenhax.com/download/file.php?id=3808


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Sat Jan 06, 2018 9:16 pm 
Offline
ultra-n00b

Joined: Sun Jun 18, 2017 7:15 pm
Posts: 6
Has thanked: 0 time
Have thanks: 4 times
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?


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Sun Jan 07, 2018 10:46 am 
Offline
n00b

Joined: Sat Dec 16, 2017 9:10 am
Posts: 14
Has thanked: 13 times
Have thanks: 0 time
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?


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Sun Jan 07, 2018 2:03 pm 
Offline
beginner

Joined: Fri Dec 15, 2017 5:21 pm
Posts: 21
Has thanked: 1 time
Have thanks: 22 times
It does. Just make sure the text is utf8 encoded.


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Sun Jan 07, 2018 3:51 pm 
Offline
n00b

Joined: Sat Dec 16, 2017 9:10 am
Posts: 14
Has thanked: 13 times
Have thanks: 0 time
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


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Sun Jan 07, 2018 5:13 pm 
Offline
beginner

Joined: Fri Dec 15, 2017 5:21 pm
Posts: 21
Has thanked: 1 time
Have thanks: 22 times
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.


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Mon Jan 08, 2018 12:51 am 
Offline
veteran
User avatar

Joined: Mon May 12, 2014 10:41 pm
Posts: 140
Has thanked: 17 times
Have thanks: 39 times
Zolodei wrote:
makcar, dismantled the MSA archive or rebuilt the image?

I used Photoshop to edit dds.


Top
 Profile  
 
 Post subject: Re: Okami HD PC - Texts files
PostPosted: Mon Jan 08, 2018 3:36 am 
Offline
n00b

Joined: Sat Dec 16, 2017 9:10 am
Posts: 14
Has thanked: 13 times
Have thanks: 0 time
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?



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group