Advertisement
DashmanGC

Structure of BIN files inside bpilot.pak

Jul 15th, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. Structure of BIN files inside bpilot.pak
  2.  
  3. * BIN files start with the string 'ATMB'.
  4. * Next 4 bytes indicate the number of entries inside the file (little endian), which equals the number of entries in the pointer table.
  5. * Each pointer is 4 bytes long (little endian).
  6. * There's no padding after the pointer table or at the end of the file.
  7.  
  8. Each section pointed at by the table will contain one or several battle lines. Supposedly one line is meant to be used after the previous one.
  9.  
  10. The structure of a line is as follows:
  11.  
  12. bytes 0 - 3: 81 95 82 86 (visibly recognizable since it's SJIS for &f)
  13. bytes 4 - 7: 00 00 04 00 (maybe it's the duration of the line?)
  14. bytes 8 - 11: xx xx 00 00 where xx seems to indicate the portrait number for the character.
  15. bytes 12 - 19: all zeroes
  16. bytes 20 - 23: xx 00 00 00 where xx seems to indicate the order of the dialogue in the battle: 01 - standing still, 02 - action (not sure if there's more).
  17. bytes 24 - 25: 81 93 (% in SJIS)
  18. bytes 26 - 27: character's ID (same ID as in the character pictures)
  19. bytes 28 - 31: 81 95 82 96 (&v in SJIS)
  20. bytes 32 - 35: voice's ID
  21. bytes 36 - 37: flags for the voice? (apparently, always 0)
  22. bytes 38 - ?: Battle line. Inside a battle line, 0a indicates a carriage return.
  23. bytes ? - end: There's THREE possible ways of closing the structure:
  24. a) '0a' - means there's more battle lines in this section.
  25. b) '0a 0a 00' - means this is the last battle line in this section.
  26. c) '0a 00' - means it's the last battle line in the section AND the last section of the file.
  27.  
  28. * The FIRST line section of the file (just after the pointer table) starts with a '0a'. The pointer in the table points at the 0a byte.
  29. * Sometimes, before bytes 24 - 25, there's this extra structure:
  30.  
  31. bytes 0 - 3: 81 95 82 86 (&f)
  32. bytes 4 - 5: ?? (usually 01 00)
  33. bytes 6 - 7: ?? (usually 01 00)
  34. bytes 8 - 11: ??
  35.  
  36. This section might indicate a change of target for the camera or maybe the start of an animation.
  37. It's present in some combination attacks like Operation V and in normal attacks like Photon Beam or shooting the 180mm cannon with a Ground Gundam.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement