Author Topic: [Release] Metal Max Xeno - English Translation v1.0 (PCSG00972 / PCSH10100)  (Read 533 times)

Offline Knofbath

  • End User
  • *
  • Posts: 7
    • View Profile
Porting Metal Max Xeno from PS4 to PSVITA.

Game files are located in "romfiles.psarc", update files are in "patch01.psarc". I will refer to romfiles.psarc for the remainder of the guide.

Translation files include image assets in ".gxt" located in "\romfiles.psarc\menu\" and text files located in \romfiles.psarc\xls\data\" and "\romfiles.psarc\xls\npc\".

"\romfiles.psarc\xls\data\" files follow a format where data pointers are located in a ".arr" file, which point to text strings in a ".nam" file.

"\romfiles.psarc\xls\data\sysmsg_message.arr" contains 2-byte pointers
Code: [Select]
01 00 15 00 8C 00 A6 00 E0 00 49 01 A1 01 1C 02
77 02 D3 02 07 03 28 03 6E 03 85 03 A7 03 CF 03
E6 03 08 04 2F 04 50 04 7E 04 B0 04 C4 04 E5 04
0B 05 23 05 3A 05 64 05 98 05 CC 05 FC 05 21 06
52 06 6D 06 90 06 B0 06 D8 06 F6 06 0D 07 41 07
6F 07 DF 07 FB 07 20 08 36 08 59 08 81 08 B4 08
ED 08 1F 09 5A 09 93 09 CD 09 03 0A 46 0A 8B 0A
BC 0A FF 0A 3B 0B 73 0B A9 0B E4 0B 1B 0C 57 0C
A2 0C ED 0C 38 0D 83 0D CE 0D 19 0E 64 0E AF 0E
FC 0E 49 0F 96 0F E3 0F 00 10 21 10 3C 10 56 10

"\romfiles.psarc\xls\data\sysmsg_message.nam" contains text strings separated by NUL(00)
Code: [Select]
01 00 - In development. $WW
15 00 - Either no corresponding weapon is equipped, or you are out of bullets and big waves, but you can't use any weapons!$WW
8C 00 - $WCAttack won't reach!$WW
A6 00 - Even if you use $_I right now, it will have no effect!$WW
E0 00 - You were so close to defeating it. Use the experience you've gained this time and challenge it again.$WW
49 01 - If you make one more adjustment, you might be able to defeat it. I hope you succeed.$WW

Issues with porting the PS4 version to the PSVITA include pointers/strings that don't match the input expected by the game, and certain .nam files hard-coded within the eboot.bin.

Example error: Menu items descriptions are 2 pointers off from their expected locations. Fixing this requires comparison between the original JP/CHI game and the sysmsg_message (.arr/.nam) files from the PS4 localization.



.nam files hardcoded into the eboot.bin are:
  • \xls\data\ability_data.nam
  • \xls\data\ability_setumei.nam
  • \xls\data\btl_message.nam
  • \xls\data\encount_data.nam
  • \xls\data\skill_table.nam

To edit the eboot.bin, you need a fully decrypted and decompressed copy of the eboot.bin.
FAGDec with 0syscall6 gives the proper .ELF file, which you'll then need to pass through make_fself.exe from the leaked PSVITA devkit.

Pointers for ability_data.nam and ability_setumei.nam are located in a 10-byte struct within the eboot.bin. First 2 bytes are the ability_data.nam(ability name), second 2 bytes are the ability_setumei.nam(ability description).
Code: [Select]
01 00 01 00 00 01 05 0A 12 1E
05 00 23 00 00 01 03 07 0C 14
14 00 48 00 00 01 03 07 0C 14

Pointers for btl_message.nam are located as 2-bytes, side-by-side. Issues with this are more mismatches between JP/CHI and the PS4 English localization.
Pointers for encount_data.nam(the various monster encounter biomes) are located in a 40-byte struct.
Pointers for skill_table.nam are located in a 24-byte struct.

NPC dialog and text for scripted events are run from the \romfiles.psarc\xls\npc\ folder. All these ".msg" files seem to work with no modification.




Image Replacement

Vita images are stores in the *.gxt format, which is essentially a *.dds file with a different header.

GXT header, courtesy of froid_san:
Code: [Select]
47 58 54 00 = ID string (GXT)
03 00 00 10 = version (3.01)
01 00 00 00 = number of texture in the file (1)
40 00 00 00 = Offset of the texture data/ header size (0x40)
00 FC 07 00 = Total size of the Textures (0x7FC00)
00 00 00 00 = Number of 16 entry palettes (P4) (0x0)
01 00 00 00 = Number of 256 entry palettes (P8)  (0x1)
00 00 00 00 = Padding (0x00000000)

40 00 00 00 = Offset of the single texture data (0x40)
00 F8 07 00 = Size of the single texture data (0x7FC00)
00 00 00 00 = Index of the palette (0x0)
00 00 00 00 = Texture flags/Not used?
00 00 00 60 = Texture Type
00 50 00 95 = Texture Base Format
C0 03 = Width (960)
20 02 = Height (544)
01 00 = Mipmaps (0x1)
00 00 = Not Used?/Padding


Texture type (GXT)
0x00 = SWIZZLED
0x40 = CUBE
0x60 = LINEAR
0x80 = TILED
0x0C = LINEAR STRIDED

Texture base format 0x34
00 00 00 85 = DXT1 no alpha
00 00 00 86 = DXT3
00 00 00 87 = DXT5
10 00 04 00 = 1555
00 00 00 10 = ARGB4444
00 10 00 0C = ARGB8888
00 00 00 0C = ABGR8888
00 50 00 0C = XRGB888
00 10 00 98 = RGB888
00 10 00 05 = RGB565
00 50 00 04 = RGB555
00 10 00 02 = RGB4444
00 10 00 04 = ARGB 1555
00 10 00 95 = palette ABGR 8bpp | 256 colors
00 00 00 95 = palette ARGB 8bpp | 256 colors
00 50 00 00 = L8
00 60 00 00 = A8
00 20 00 07 = A8L8
00 30 00 07 = L8A8
00 50 00 09 = L16

PS4 images are stored in a very similar *.gnf format.

To Extract Vita images use Scarlet.  https://github.com/xdanieldzd/Scarlet
To Extract PS4 images, use Noesis and export to *.dds. https://richwhitehouse.com/index.php?content=inc_projects.php&showproject=91
Edit/Resize PS4 images with your favorite image editor. (I used Paint.NET)
To Convert *.dds to *.gxt, use psp2gxt.exe from the leaked Vita or PS3 SDK.
  • If you are getting "Invalid UBC texture width", then your *.dds is in the wrong format. (MMX uses DXT5 and ABGR8888 for all images, best to check the original GXT header for which to use.)

Metal Max Xeno also uses some magic bits to layer images. The magic bits are at the end of the source GXT file. They seem to subdivide the image into horizontal and vertical slices, so this one is 1x horizontal and 50x(hex 32) vertical.



I just used a hex editor to copy them to the new GXT file created by psp2gxt.exe.

The last few images were hidden away in *.pack files, which seem to be a container file with *.gxt, *.mdl and *.anim files.

I used a set of quickbms scripts made by froid_san (see attachment) to extract the *.gxt images and replace them with converted and resized files from the PS4 *.pack. (PS4 *.mdl files didn't work on Vita, probably due to different sized images.)

Images imported back into the *.pack should be the exact same size as the exported ones. (I was getting size differences due to not having mipmaps in my imports).
« Last Edit: September 18, 2020, 11:13:54 PM by Knofbath »

Offline Knofbath

  • End User
  • *
  • Posts: 7
    • View Profile
Re: Metal Max Xeno (PCSG00972 / PCSH10100)
« Reply #1 on: August 24, 2020, 10:26:53 AM »
[Release v0.8]

A port of the PS4 version to Vita.

To apply patch install rePatch.skprx(v3.0), update game to latest version(JP - 1.07, CHI/KOR - 1.03), then copy patch to `ux0:rePatch/<GAMEID>/`.

What is Translated: 

* Main Menu 
* Dialog 
* Skills 
* Items/Weapons/Equipment 
* Monsters 
* Area names 
* Battle messages 
* Help Library 

What is not translated: 

* Certain Menus(Config menu in particular) 
* Many various interface buttons and images 
* Wanted Monster popups during battle 

Contributors
/u/ExData7 - obtaining the PS4 files, and image conversion
Knofbath - eboot.bin modding and file editing

Special Thanks:
MetalFan - tips on file formats and help finding pointers
dots_tb - making rePatch which makes this possible, and some file decryption tips
froid_san - tips on extracting and manipulating data

« Last Edit: August 24, 2020, 11:21:35 AM by Knofbath »

Offline Knofbath

  • End User
  • *
  • Posts: 7
    • View Profile
Re: [Release] Metal Max Xeno - English Translation(PCSG00972 / PCSH10100)
« Reply #2 on: August 31, 2020, 01:44:13 PM »
[Release v0.85]

Iron Base Menus translated - this should be a massive QoL improvement for most people
JP has gotten a lot of random text translated, less work was needed on CHI/KOR
WANTED monster and Quest images are done

TODO:
Jukebox - I would like to see the Official Soundtrack track list
Titles - Drifter is done as a placeholder, need a full list of the PS4 titles, otherwise it'll be google translated poorly
More image work:
 - make the button tooltips fit the interface properly
 - adjust the equip targeting image icon041.gxt
 - area names need some improvement
 - more interface buttons with text on them need work






Edit: Whoops, wrong psarc in CHI/KOR, fixed
« Last Edit: August 31, 2020, 02:15:35 PM by Knofbath »

Offline Knofbath

  • End User
  • *
  • Posts: 7
    • View Profile
Re: [Release] Metal Max Xeno - English Translation(PCSG00972 / PCSH10100)
« Reply #3 on: September 12, 2020, 07:26:34 AM »
[Release v1.0]

Titles and Jukebox translated.
Images inserted.
CHI bugfix - Fixed Revert DEF and Revert Slot Type being pointed to the same string
JP bugfix - Fixed Skill names not displaying properly in battle popup.
100% done.

Known issues:
There are 3 animations that may look odd or garbled, Ultra Modifying, Extermination Bonus, Points Bonus.
Space limitations on certain strings mean they are abbreviated or otherwise altered.
I killed the green/red arrow that tells you if ATK went up or down, it had to go for my sanity.
*Ability name Snipe+1 is missing on both versions. Fixed in MMX_hotfix_1.7z
*Mishuku Base zone images are garbled. This is due to different image handling because the original text is wider than the source image. No idea how to quickly fix.

More thanks to froid_san for helping me unpack/reinsert .pack animations to get this to 100%.





« Last Edit: September 17, 2020, 08:23:46 PM by Knofbath »