Advertisement
Guest User

Harvest Moon 3DS XBB and PAPA documentation

a guest
Sep 21st, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.84 KB | None | 0 0
  1. 1. XBB Archive Format
  2. a. A block - Header Blocks
  3. in this block is used to update the number of files, magic header, and reserved
  4. for purposes other reply. but of all of the files in hm, 24 bytes after
  5. magic header and the file count is not used.
  6.  
  7. The length of the block: 32 Byte.
  8.  
  9. format:
  10. u32 {
  11. u4: Magic Header (58 42 42 01 - XBB)
  12. u4: FileCount
  13. U24: reserved / padding
  14. }
  15.  
  16. b. block B - FileSystem Blocks
  17. On this block is used to determine the position of the offset of a file and the file name
  18. it. It was not immediately know the intent of this checksum u4 used ...
  19.  
  20. to determine the length of the block, FileCount * 16 Byte.
  21.  
  22. format:
  23. UFC * 16 {
  24. u4: FileOffset
  25. u4: FileSize
  26. u4: FileNameOffset
  27. u4: CheckSum (?)
  28. }
  29.  
  30. c. block C - / Blocks
  31. On this block is still diketahu what does what to do.
  32.  
  33. for long menenjukan on this block, FileCount * 8 Byte.
  34.  
  35. format:
  36. UFC * 8 ​​{
  37. u4: CheckSum
  38. u4: FileIndex
  39. }
  40.  
  41. If seen look at this block contains a table sequence based checksum.
  42. Weve for what? o.o
  43.  
  44. d. block D / FIMG Blocks
  45. On this block contains files that are in the archive format xbb.
  46.  
  47. to determine the length of this block,
  48. FileArchiveSize - (BlockASize + BlockBSize + BlockCSize).
  49.  
  50. 2. PP Archive Format
  51. a. A block
  52. in this block contains a magic header PAPA (50 51 50 51), is quite strange why wear
  53. this name. On this block size of 20 bytes, there are some parts of the
  54. the constant value which is always the same, do not yet know its usefulness.
  55.  
  56. format:
  57. U20 {
  58. u4: MagicHeader
  59. u4: Padding - unused
  60. u4: Constant Value - 0C
  61. u4: FileSizeArchive**
  62. u4: FileCount
  63. }
  64.  
  65. **NOTE: This part confused me a bit, but after checking it against a lot of PAPA files from both games, I can confirm that this number will ALWAYS be the value of the first offset in Block B, minus C. So if the offset to your first file/text string is 4C (4C000000), then this number will be 40 (40000000). I guess this is the size of the block containing the pointers? I'm not entirely sure. I also haven't yet checked to see if this is the case with .xbb files.
  66.  
  67. b. block B
  68. in this block contains the starting position of each section, always-sized file 0 0
  69. byte. to determine the size of each file offset [i + 1] -offset [i].
  70.  
  71. to determine the length of this block, FileCount * 4 Byte.
  72.  
  73. format:
  74. u4 {
  75. u4: FileOffset
  76. }
  77.  
  78. c. block C
  79. in this block also has a few small parts, such as archive
  80. in the archive, especially not compressed in compressed: 3.
  81.  
  82. to determine the length of the block, FileArchiveSize - (sizeBlokA + sizeBlokB)
  83.  
  84. d. block C.A***
  85. The continuation of the block C, mostly pp file is almost the same data structure
  86. in this block. However, the use and handling of data in this block different
  87. different. for example, US and JP version of the message, the same ANB SoS is no different.
  88.  
  89. to determine the length of the block CA Header: 8 + (4 * PartCount)
  90.  
  91. format:
  92. UCAS {
  93. u4: C.A Size (might be wrong, I'm 99% sure this value is equal to CA + C, but I'm leaving the original documentation as-is)
  94. u4: C.A Count
  95. u4 * [C.A Count]: Offset C.A
  96. }
  97.  
  98. For parts made dialogue text, usually formatted UCS / UTF-8 for parts
  99. identifier usually use ASCII.
  100.  
  101. ***NOTE: Block CA comes BEFORE block C. Block C is your data, like your text strings, and block CA is information about it. As you can see, it begins with the size of the ENTIRE block C (so C + CA), then the number of "files," then the offsets to those files. Generally, the first two offsets won't change unless the type changes. And this is easier to keep track of in Story of Seasons since the variable names come before the string itself. Also note that the offset/pointer values are RELATIVE TO wherever block CA starts for your file. So if my CA block starts at 0x18, and my first offset/pointer in CA is 0x14, then my first "file" starts at 0x14 + 0x18 = 0x2C. For Msg PAPA files, this is a 4-byte block containing the word "Msg." After that at 0x18+0x18=0x30 is my second file. In ANB, this will be where the string starts, and in SOS, this is the string's variable name referenced by the .nut scripts. It will look something like this: 'MES_TEST_TEXT_1_01..'
  102.  
  103. I hope I'm not being too confusing. It helps if you have a hex editor out and you are viewing the file in a format such that 8 numbers are grouped at once (so that your magic header looks like this: 50415041), that way you can see everything 4 bytes at a time, just like the documentation above
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement