Page 2 of 2

Re: Astral Chain package

Posted: Tue Sep 10, 2019 11:43 pm
by demonslayerx8
gren wrote:
Tue Sep 10, 2019 11:22 pm
I was working through the file format on my own and worked out all of pkz and most of DAT file structure but I couldn't figure out what the 5th table was for in DAT files and it seems maybe unneeded? The first 4 were for offsets, file type, file name, and size, but I couldn't for the life of me figure out what the 5th was. Any one got any ideas?

Also I have 010 templates for pkz dat, and wip templates for the texture ones as well but don't have too much on textures yet. Will post when I get home later
read above
  • table1 - texture offset locations in wtp
    table2 - texture filesize in wtp
    table3 - flags for the game
    table4 - hashes to reference textures in materials
    table5 - texture header info

Re: Astral Chain package

Posted: Wed Sep 11, 2019 2:04 am
by Kerilk
gren wrote:
Tue Sep 10, 2019 11:22 pm
I was working through the file format on my own and worked out all of pkz and most of DAT file structure but I couldn't figure out what the 5th table was for in DAT files and it seems maybe unneeded? The first 4 were for offsets, file type, file name, and size, but I couldn't for the life of me figure out what the 5th was. Any one got any ideas?

Also I have 010 templates for pkz dat, and wip templates for the texture ones as well but don't have too much on textures yet. Will post when I get home later
Nice catch! I hadn't seen it. It exists in Nier also, and I hadn't noticed. I can tell you that ignoring it in Nier is not showing much impact. This looks like some metadata. Some of it are hash for files, and the rest looks like priority class for data streaming? I'll commit an update binary template in once I am done with it.

Edit: Okay I understand what it is, it is a hash map of hashes, so hashes can be retrieved faster.

Edit 2: Here is a corrected binary template: https://github.com/Kerilk/bayonetta_too ... %20base.bt

Re: Astral Chain package

Posted: Wed Sep 11, 2019 4:46 am
by gren
demonslayerx8 wrote:
Tue Sep 10, 2019 11:43 pm
gren wrote:
Tue Sep 10, 2019 11:22 pm
I was working through the file format on my own and worked out all of pkz and most of DAT file structure but I couldn't figure out what the 5th table was for in DAT files and it seems maybe unneeded? The first 4 were for offsets, file type, file name, and size, but I couldn't for the life of me figure out what the 5th was. Any one got any ideas?

Also I have 010 templates for pkz dat, and wip templates for the texture ones as well but don't have too much on textures yet. Will post when I get home later
read above
  • table1 - texture offset locations in wtp
    table2 - texture filesize in wtp
    table3 - flags for the game
    table4 - hashes to reference textures in materials
    table5 - texture header info
No. I am talking about the DAT files. These are containers for more files - much like the pkz but the DAT files are contained within pkz files.
Kerilk wrote:
Wed Sep 11, 2019 2:04 am
gren wrote:
Tue Sep 10, 2019 11:22 pm
I was working through the file format on my own and worked out all of pkz and most of DAT file structure but I couldn't figure out what the 5th table was for in DAT files and it seems maybe unneeded? The first 4 were for offsets, file type, file name, and size, but I couldn't for the life of me figure out what the 5th was. Any one got any ideas?

Also I have 010 templates for pkz dat, and wip templates for the texture ones as well but don't have too much on textures yet. Will post when I get home later
Nice catch! I hadn't seen it. It exists in Nier also, and I hadn't noticed. I can tell you that ignoring it in Nier is not showing much impact. This looks like some metadata. Some of it are hash for files, and the rest looks like priority class for data streaming? I'll commit an update binary template in once I am done with it.

Edit: Okay I understand what it is, it is a hash map of hashes, so hashes can be retrieved faster.

Edit 2: Here is a corrected binary template: https://github.com/Kerilk/bayonetta_too ... %20base.bt
Awesome! Hashes make a lot of sense for that. Makes sense they reused stuff from bayonetta/nier I guess. Will probably be a good resource to look at for other stuff.

Re: Astral Chain package

Posted: Wed Sep 11, 2019 5:40 am
by Kerilk
Well there are other binary templates for Astral chain wmb files in the same directory. You can also decode bxm files (which are binary xml files) using the Bayonetta 2 bxm.bt (mind the byte ordering though). Motion formats are also known.

Re: Astral Chain package

Posted: Wed Sep 11, 2019 7:45 pm
by gren
In the wta binary template, is textureInfo.format supposed to be of the texture_format_t type? I ran a script to parse every WTA in the romfs and there a handful of format codes that aren't listed in the comment for that entry (0x38, 0x25, 0x29, 0x01) which can be found in files like ui/core.wta, core/pre_texture.wta, and a few other loose files

Re: Astral Chain package

Posted: Wed Sep 11, 2019 8:06 pm
by Kerilk
No this is still wip and the enum is not used.
See discussion there:
https://github.com/Kerilk/noesis_bayonetta_pc/issues/11