Xenoblade - .pkh/.pkb files
-
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
Xenoblade - .pkh/.pkb files
Here's a sample. filecutter.bms applied when needed.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
-
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
Re: Xenoblade - .pkh/.pkb files
Cool. This script worked for almost all files except for adx.pkb/.pkh and ahx.pkb/.pkh.
Since the adx.pkb and ahx.pkb files are AFS archives themselves...
Code: Select all
offset filesize filename
--------------------------------------
- enter in folder E:\Dolphin-x64\Games\xenoblade
coverage file 0 0% 0 1430
- open input file E:\Dolphin-x64\Games\xenoblade\adx.pkh
- enter in folder E:\Dolphin-x64\Games\xenoblade
- open input file E:\Dolphin-x64\Games\xenoblade\adx.pkb
Error: incomplete input file 0: E:\Dolphin-x64\Games\xenoblade\adx.pkh
Can't read 4 bytes from offset 00000596.
Anyway don't worry, it's possible that the BMS script has been written
to exit in this way if it's reached the end of the archive so check it
or contact its author or verify that all the files have been extracted.
Please check the following coverage information to know if it's ok.
coverage file 0 93% 1334 1430
Last script line before the error or that produced the error:
25 get OFFSET long
-----
offset filesize filename
--------------------------------------
- enter in folder E:\Dolphin-x64\Games\xenoblade
coverage file 0 0% 0 67510
- open input file E:\Dolphin-x64\Games\xenoblade\ahx.pkh
- enter in folder E:\Dolphin-x64\Games\xenoblade
- open input file E:\Dolphin-x64\Games\xenoblade\ahx.pkb
Error: incomplete input file 0: E:\Dolphin-x64\Games\xenoblade\ahx.pkh
Can't read 4 bytes from offset 000107b6.
Anyway don't worry, it's possible that the BMS script has been written
to exit in this way if it's reached the end of the archive so check it
or contact its author or verify that all the files have been extracted.
Please check the following coverage information to know if it's ok.
coverage file 0 99% 67414 67510
Last script line before the error or that produced the error:
25 get OFFSET long
Since the adx.pkb and ahx.pkb files are AFS archives themselves...
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Xenoblade - .pkh/.pkb files
Script 0.2
The problem was caused by the lack of OFFSETs in these 2 archives... yeah completely missing, so I use the size to get the offsets.
The problem was caused by the lack of OFFSETs in these 2 archives... yeah completely missing, so I use the size to get the offsets.
-
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
Re: Xenoblade - .pkh/.pkb files
Huh. I tested these files on your updated script and they worked fine.
However, I also tested these files with the afs.bms script, so this is sort of an alternative solution.
However, I also tested these files with the afs.bms script, so this is sort of an alternative solution.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Xenoblade - .pkh/.pkb files
I think that AFS is one of the archived files, you should have multiple AFS files in the archives.
-
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
Re: Xenoblade - .pkh/.pkb files
"multiple AFS files"... So you're saying that most of the .pkb files have .afs files in them?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Xenoblade - .pkh/.pkb files
Well, it's an archive so it's meant to contain multiple files.
With only 2Mb I can't give you a complete answer because it's possible that for those 2 archives it opts for the AFS archive format instead of the pkh/pkb used for the other files. That would explain why the offsets are missing from pkh.
I'm no longer surprised of the weird choices of developers
With only 2Mb I can't give you a complete answer because it's possible that for those 2 archives it opts for the AFS archive format instead of the pkh/pkb used for the other files. That would explain why the offsets are missing from pkh.
I'm no longer surprised of the weird choices of developers
-
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
Re: Xenoblade - .pkh/.pkb files
So that means the adx.pkb and ahx.pkb files are meant to be AFS files, isn't that so?
Ma'am, these developer choices are confusing me...
Ma'am, these developer choices are confusing me...
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Xenoblade - .pkh/.pkb files
You can do a very simple test.
Open one of these two pkb files in a hex editor and search for the occurrences of the following bytes 0x41 0x46 0x53 0x00 ("AFS\0").
From a quick check that I have just made it appears that adx.pkb and adx.pkb are just AFS archives because the offset containing the filenames (retrieved with afs.bms) is very close to the end of the pkb archives, so there is no space for other files.
After this finding I have updated the xenoblade.bms script for telling the user to use afs.bms with these pkb archives.
Open one of these two pkb files in a hex editor and search for the occurrences of the following bytes 0x41 0x46 0x53 0x00 ("AFS\0").
From a quick check that I have just made it appears that adx.pkb and adx.pkb are just AFS archives because the offset containing the filenames (retrieved with afs.bms) is very close to the end of the pkb archives, so there is no space for other files.
After this finding I have updated the xenoblade.bms script for telling the user to use afs.bms with these pkb archives.
-
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
Re: Xenoblade - .pkh/.pkb files
That's good enough, thanks.