SHARE
TWEET

FLASHBACK Documentation

LuigiBlood Jan 4th, 2014 (edited) 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Flashback (PC DOS) Doc
  2.  
  3. MBK (Bank) [Map!]
  4. PGE (Piege) [Map Layout] [In Doc]
  5. PAL (Palette) [Map Layout] [In Doc]
  6. CT  (Collision) [Map Layout] [In Doc]
  7. MAP (Map) [Map Layout] [In Doc]
  8. RP  (Bank Sprite_car) [Map!]
  9. ANI (Animations) [Map!] [In Doc]
  10. OBJ (Objects) [Map!] [In Doc]
  11. TBN (Texts) [Map!] [In Doc]
  12.  
  13. SPC (Global Sprites "global.spc") [!]
  14. ICN (Icons "GLOBAL.ICN") [!]
  15. SPR (Sprites) [!]
  16. FNT (Font "FB_TXT.FNT") [!]
  17. TXT (Cutscene Text) [!]
  18. BIN (Cutscene Text Offsets) [!]
  19. DEMO*.BIN (Demo) [!]
  20. CMD (Cutscene Commands) [!] [In Doc]
  21. POL (Cutscene Polygons) [!] [In Doc]
  22. OFF (SPRM indice) [!]
  23.  
  24. -
  25. LEV (Map) [Amiga]
  26. TAB (Sprite Table) [Amiga?]
  27. SGD (Sprite Map) [Amiga?]
  28. FIB
  29. ------------------
  30. LEVEL FILE NAMES
  31. level1
  32. level2
  33. level3, dt (Amiga)
  34. level4, level4_1 (PGE/OBJ/ANI/TBN), level3_1 (Amiga)
  35. level4, level4_2 (PGE/OBJ/ANI/TBN), level3_2 (Amiga)
  36. level5, level5_1 (PGE/OBJ/ANI/TBN), level4_1 (Amiga)
  37. level5, level5_2 (PGE/OBJ/ANI/TBN), level4_2 (Amiga)
  38.  
  39. ------------------
  40.  
  41. MBK files - Bank Data
  42. First byte is the number of entries
  43.  
  44. Pointer Entry (6 bytes):
  45. 0x0000 - 8-bit - Amount of Entries
  46.  
  47. 0x0000 - 32-bit BE - Offset
  48. 0x0004 - 16-bit BE - Size / 32 [in bytes] (bit15 set = Uncompressed)
  49. [repeats]
  50.  
  51. Entry:
  52. -0x004 - 32-bit BE - Size (bytes) if compressed?
  53. 0x0000 - Entry
  54.  
  55. ---------
  56.  
  57. PGE files - Piege
  58. Offset - Size - Desc
  59. 0x0000 - 16-bit LE - Number of entries
  60. ---
  61. Entry (32 bytes):
  62. 0x0000 - 16-bit LE - Type
  63. 0x0002 - 16-bit LE - Position X
  64. 0x0004 - 16-bit LE - Position Y
  65. 0x0006 - 16-bit LE - Object Node Number
  66. 0x0008 - 16-bit LE - Life
  67. 0x000A - 16-bit LE - Counter Value 1
  68. 0x000C - 16-bit LE - Counter Value 2
  69. 0x000E - 16-bit LE - Counter Value 3
  70. 0x0010 - 16-bit LE - Counter Value 4
  71. 0x0012 - 8-bit - Object Type
  72. 0x0013 - 8-bit - Init Room
  73. 0x0014 - 8-bit - Room Location
  74. 0x0015 - 8-bit - Init Flags
  75. 0x0016 - 8-bit - Colliding Icon Number
  76. 0x0017 - 8-bit - Icon Number
  77. 0x0018 - 8-bit - Object ID
  78. 0x0019 - 8-bit - Skill
  79. 0x001A - 8-bit - Mirror X
  80. 0x001B - 8-bit - Flags
  81. 0x001C - 8-bit - Unknown
  82. 0x001D - 8-bit - none
  83. 0x001E - 16-bit LE - Text Number
  84.  
  85. ---------
  86.  
  87. PAL files - Palette
  88.  
  89. Collection of 16-color palettes
  90.  
  91. Color Format:
  92. 16-bit BE = 0x0BGR (PC)
  93. 16-bit LE = 0x0RGB (Amiga)
  94.  
  95. 0x000F << 2
  96. 0x00F0 >> 2
  97. 0x0F00 >> 6
  98.  
  99. If not black
  100. R |= 3
  101. G |= 3
  102. B |= 3
  103.  
  104. ---------
  105. CT files - Collisions
  106.  
  107. Delphine Compressed!
  108.  
  109. 0x0000 - 0x40 - Up Room Transport Number
  110. 0x0040 - 0x40 - Down Room Transport Number
  111. 0x0080 - 0x40 - Right Room Transport Number
  112. 0x00C0 - 0x40 - Left Room Transport Number
  113. 0x0100 - 0x1C00 - Collision Entries for each room
  114.  
  115. Entry:
  116. 0x00 - 0x70 - Collision
  117.  
  118. 0x00 = No Collision
  119. 0x01 = Collision
  120.  
  121. Even Offsets 0x00, 0x20... = Climbable, Walk...
  122. Odd Offsets  0x10, 0x30... = Walls
  123.  
  124. ---------
  125. MAP files - Room Map graphics
  126. ---
  127. 0x0 - 0x180 - Room Map Offset Entries (0x40 rooms)
  128. -Offset Entry:
  129. 0x0 - 32-bit LE - Offset to MAP entry
  130. 0x4 - 16-bit LE - Size
  131.  
  132. -MAP Entry:
  133. 0x0 - 8-bit - Palette Slot 1
  134. 0x1 - 8-bit - Palette Slot 2
  135. 0x2 - 8-bit - Palette Slot 3
  136. 0x3 - 8-bit - Palette Slot 4
  137. 0x4 - Graphics
  138.  
  139. Unpacked Graphics (Negative Offset, offset = -offset):
  140. 0x0000 - 0xE000 - Graphics
  141.  
  142. Linear format, 0x40 bytes per line, 8bpp
  143. 0x40 (X) * 224 (Y) bytes
  144. 256 * 56 * 4
  145. 1/4 uses a different palette?
  146.  
  147. L0PPCCCC
  148. C= Color
  149. P= Palette
  150. L= Layer
  151.  
  152. Packed Graphics (Positive Offset):
  153. 0x0 - 16-bit LE - Graphics Part 1 Size (does not count itself)
  154. 0x2 - Size - Packed Graphics Part 1
  155. 0x? - 16-bit LE - Graphics Part 2 Size (does not count itself)
  156. 0x? - Size - Packed Graphics Part 2
  157. 0x? - 16-bit LE - Graphics Part 3 Size (does not count itself)
  158. 0x? - Size - Packed Graphics Part 3
  159. 0x? - 16-bit LE - Graphics Part 4 Size (does not count itself)
  160. 0x? - Size - Packed Graphics Part 4
  161.  
  162. Pack Format:
  163. Read Code
  164. If code < 0
  165.     N = 1 - code
  166.     put next byte N times
  167. Else (code >= 0)
  168.     N = code++
  169.     copy N number of bytes
  170.  
  171. ---------
  172. SPC - GLOBAL.SPC - Sprites
  173.  
  174. 0x00 - 16-bit BE - Number of Entries / 2
  175.  
  176. ---------
  177. TBN files - Interaction Text/Item names
  178. 16-bit BE absolute offsets to ASCII text.
  179. First text is always 0x00.
  180.  
  181. ---------
  182. ANI files - Animations
  183.  
  184. 0x00 - 16-bit LE - Number of animation entries (DOES NOT COUNT TO OFFSETS)
  185. 0x02 - 16-bit LE - Entry Offsets (- 2)
  186.  
  187. Entry Header:
  188. 0x00 - 16-bit LE - Number of frames (Seq)
  189. 0x02 - 8-bit - Sound ID
  190. 0x03 - 8-bit - Unused
  191. 0x04 - 16-bit LE - PGE Flag 0x8
  192. 0x06 - 32-bits - Frames
  193.  
  194. Frame Data:
  195. 0x00 - 16-bit LE - Animation Number (0x7FFF), bit15 = Mirror X
  196. 0x02 - 8-bit - Delta X
  197. 0x03 - 8-bit - Delta Y
  198.  
  199. ---------
  200. OBJ files - Object Nodes
  201. Header
  202. 0x0000 - 16-bit LE - Number of object nodes
  203.  
  204. Pointers
  205. 0x0002 - 32-bit LE (aligned) - Pointer Offset to OBJ Node Entry
  206. [and so on]
  207.  
  208. Node Entry
  209. 0x00 - 16-bit - Unused?
  210. 0x02 - 16-bit LE - Last OBJ Number (Number of objects?)
  211. [Object Entries]
  212. How to count:
  213. Diff = (OBJ Node Entry Offset + 1) - (OBJ Node Entry Offset)
  214. Object Entries = (Diff - 2) / 0x12
  215.  
  216.  
  217. Object Entry (0x12 bytes)
  218. 0x00 - 16-bit LE - Type
  219. 0x02 - 8-bit - dx
  220. 0x03 - 8-bit - dy
  221. 0x04 - 16-bit LE - Init OBJ Type
  222. 0x06 - 8-bit - Opcode 2
  223. 0x07 - 8-bit - Opcode 1
  224. 0x08 - 8-bit - Flags
  225. 0x09 - 8-bit - Opcode 3
  226. 0x0A - 16-bit LE - Opcode Argument 1
  227. 0x0C - 16-bit LE - Opcode Argument 2
  228. 0x0E - 16-bit LE - Opcode Argument 3
  229. 0x10 - 16-bit LE - ???
  230.  
  231. Call:
  232. Opcode 1: A = arg1; B = 0;
  233. Opcode 2: A = arg2; B = arg1;
  234. Opcode 3: A = arg3; B = 0;
  235. If all goes well:
  236. Type = Init OBJ Type
  237. Check Flags
  238.  
  239. Flags--:
  240. 0bSSSSCIDF
  241.  
  242. SSSS = Score
  243. C = Infinite Life
  244. I = Increment Life
  245. D = Decrement Life
  246. F = XOR bit0 of PGE
  247.  
  248. Opcodes--:
  249. 0x00 - none
  250. 0x01 - Is Input Up?
  251. 0x02 - Is Input Backwards?
  252. 0x03 - Is Input Down?
  253. 0x04 - Is Input Forward?
  254.  
  255. 0x05 - Is Input Up Mod?
  256. 0x06 - Is Input Backwards Mod?
  257. 0x07 - Is Input Down Mod?
  258. 0x08 - Is Input Forward Mod?
  259.  
  260. 0x09 - Is Input Idle?
  261. 0x0A - Is Input No Mod?
  262.  
  263. 0x0B - Get Collision 0u
  264. 0x0C - Get Collision 00
  265. 0x0D - Get Collision 0d
  266. 0x0E - Get Collision 1u
  267. 0x0F - Get Collision 10
  268. 0x10 - Get Collision 1d
  269. 0x11 - Get Collision 2u
  270. 0x12 - Get Collision 20
  271. 0x13 - Get Collision 2d
  272.  
  273. 0x14 - Does Not Collide 0u
  274. 0x15 - Does Not Collide 00
  275. 0x16 - Does Not Collide 0d
  276. 0x17 - Does Not Collide 1u
  277. 0x18 - Does Not Collide 10
  278. 0x19 - Does Not Collide 1d
  279. 0x1A - Does Not Collide 2u
  280. 0x1B - Does Not Collide 20
  281. 0x1C - Does Not Collide 2d
  282.  
  283. 0x1D - Collides 0o0d
  284. 0x1E - Collides 2o2d
  285. 0x1F - Collides 0o0u
  286. 0x20 - Collides 2o2u
  287. 0x21 - Collides 2u2o
  288.  
  289. 0x22 - Is In Group? (A = Group Number)
  290. 0x23 - Update Group 0
  291. 0x24 - Update Group 1
  292. 0x25 - Update Group 2
  293. 0x26 - Update Group 3
  294.  
  295. 0x27 - Is Piege Dead?
  296.  
  297. 0x28 - Collides 1u2o
  298. 0x29 - Collides 1u1o
  299. 0x2A - Collides 1o1u
  300.  
  301. 0x2B - ZOrder If Type And Different Direction (A = ?)
  302. 0x2C - ZOrder If Type And Same Direction (A = ?)
  303. 0x2D - ZOrder By Object (A = ?)
  304.  
  305. 0x2E - NOP
  306.  
  307. 0x2F - Pickup Object (A = ?)
  308. 0x30 - Add Item to Inventory (A = ?)
  309. 0x31 - Copy Piege (A = Source Piege)
  310. 0x32 - Can Use Current Inventory Item?
  311. 0x33 - Remove Item from Inventory
  312.  
  313. 0x34 - Unknown (Collision) (A = ?)
  314.  
  315. 0x35 - Is Input Mod?
  316.  
  317. 0x36 - Set Collision State 1 (A = ?)
  318. 0x37 - Set Collision State 0 (A = ?)
  319.  
  320. 0x38 - Is In Group 1? (A = ?)
  321. 0x39 - Is In Group 2? (A = ?)
  322. 0x3A - Is In Group 3? (A = ?)
  323. 0x3B - Is In Group 4? (A = ?)
  324.  
  325. 0x3C - ZOrder By Anim Y If Type (A = ?; B = ?)
  326. 0x3D - ZOrder By Anim Y (A = ?)
  327.  
  328. 0x3E - Set Piege Counter (A = Value)
  329. 0x3F - Dec Piege Counter (A = ?)
  330.  
  331. 0x40 - Unknown (A = ?)
  332.  
  333. 0x41 - Wake Up Piege (A = Counter Value ID)
  334. 0x42 - Remove Piege (A = Counter Value ID)
  335. 0x43 - Remove Piege If Not Near
  336. 0x44 - Load Piege Counter (A = Counter Value ID)
  337.  
  338. 0x45 - ZOrder By Number (A = ?)
  339. 0x46 - ZOrder If Different Direction, Compare Var1 = 0 (A = ?)
  340. 0x47 - ZOrder If Same Direction, Compare Var2 = 0 (A = ?)
  341. 0x48 - Unknown (A = ?) [Ian]
  342. 0x49 - ZOrder If Index (A = ?)
  343. 0x4A - Inventory? (A = ?)
  344.  
  345. 0x4B - Kill Piege
  346. 0x4C - Is In Current Room?
  347. 0x4D - Is Not In Current Room?
  348. 0x4E - Scroll Position Y (A = Delta Y)
  349. 0x4F - Play Default Death Cutscene (A = Death Cutscene if no default)
  350.  
  351. 0x50 - ZOrder By Object (A = ?)
  352. 0x51 - none
  353. 0x52 - Hit Detection 1 (A = ?; B = ?)
  354. 0x53 - Hit Detection 2 (A = ?; B = ?)
  355.  
  356. 0x54 - Is Piege Near? (A = Piege?)
  357. 0x55 - Set Life (A = Value)
  358. 0x56 - Inc Life (A = Value Inc)
  359. 0x57 - Set Piege Default Anim? (A = Counter Value ID)
  360. 0x58 - Set Life Counter (A = Piege?)
  361. 0x59 - Dec Life Counter (A = Piege?)
  362. 0x5A - Play Cutscene (A = Cutscene ID)
  363. 0x5B - Is Temp Var 2 Set To A? (A = Value)
  364. 0x5C - Play Death Cutscene (A = Death Cutscene ID)
  365.  
  366. 0x5D - Hit Detection 3 (A = ?; B = ?)
  367. 0x5E - Hit Detection 4 (A = ?; B = ?)
  368. 0x5F - Collision?
  369.  
  370. 0x60 - Find And Copy Piege (A = Group ID?)
  371. 0x61 - Is In Random Range? (A = Modulo?)
  372.  
  373. 0x62 - Hit Detection 5 (A = ?; B = ?)
  374. 0x63 - Hit Detection 6 (A = ?; B = ?)
  375. 0x64 - Gun Hit Detection 1 (A = ?; B = ?)
  376.  
  377. 0x65 - Add To Credits (A = Counter Value ID [3 = invalid])
  378. 0x66 - Sub From Credits (A = Counter Value ID [3 = invalid])
  379.  
  380. 0x67 - Unknown (A = ?)
  381.  
  382. 0x68 - Set Collision State 2 (A = ?)
  383. 0x69 - Save State
  384.  
  385. 0x6A - Unknown (A = ?)
  386.  
  387. 0x6B - Is In Group Slice?
  388.  
  389. 0x6C - Unknown (A = ?)
  390.  
  391. 0x6D - Is Colliding Object? (A = ?)
  392.  
  393. 0x6E - Elevator? (A = Group ID?)
  394. 0x6F - Unknown (A = Group ID?)
  395. 0x70 - Inventory? (A = Group ID?)
  396. 0x71 - Reorder Inventory? Elevator? (A = Group ID?)
  397. 0x72 - Collision?
  398. 0x73 - Find Piege, Inventory? (A = Piege?)
  399.  
  400. 0x74 - Collides 4u (A = ?)
  401. 0x75 - Does Not Collide 4u (A = ?)
  402. 0x76 - Is Below Conrad?
  403. 0x77 - Is Above Conrad?
  404. 0x78 - Is Not Facing Conrad? (A = ?)
  405. 0x79 - Is Facing Conrad? (A = ?)
  406. 0x7A - Collides 2u1u (A = ?)
  407. 0x7B - Display Text (A = Text To Display)
  408.  
  409. 0x7C - Find Piege? (A = ?)
  410.  
  411. 0x7D - Play Sound (A = 0xVVII; VV = Volume; II = SFX ID)
  412.  
  413. 0x7E - ZOrder By Index, Compare Var1 (A = ?)
  414. 0x7F - Collision?
  415.  
  416. 0x80 - Set Piege Pos X
  417. 0x81 - Set Piege Pos Mod X
  418. 0x82 - Change Room (A = ?)
  419. 0x83 - Has Inventory Item? (A = Object ID)
  420.  
  421. 0x84 - Change Level (A = Level + 1)
  422. 0x85 - Shake Screen
  423.  
  424. 0x86 - Gun Hit Detection 2 (A = ?; B = ?)
  425.  
  426. 0x87 - Play Sound Group (A = Counter Value ID)
  427. 0x88 - Adjust Position
  428.  
  429. 0x89 - none
  430.  
  431. 0x8A - Set Temp Var 1 (A = Value)
  432. 0x8B - Is Temp Var 1 Set To A? (A = Value)
  433.  
  434. ---------
  435.  
  436. Cutscene Format
  437. CMD files - Cutscene Commands
  438.  
  439. Header--
  440. 0x00 - 16-bit BE - Number of Cutscene Entries
  441. Entry-
  442. 0x00 - 16-bit BE - Offset (Does not count header)
  443.  
  444. Full offset is calcutated like this:
  445. (NN + 1) * 2 + Entry Offset
  446.  
  447. Opcodes--
  448.  
  449. 0x00 - Mark Current Position
  450. 0x04 NN - Refresh Screen (NN = Flag)
  451. 0x08 NN - Wait for Sync (NN = Frame Delay)
  452. 0x0C SSSS (XXXX YYYY) - Draw Shape (S = Shape Offset, if > 0x8000 then custom X and Y)
  453.  
  454. 0x10 NN SS - Set Palette
  455. 0x14 - Mark Current Position
  456. 0x18 NNNN - Draw String at bottom (N = String ID)
  457. 0x1C - NOP
  458.  
  459. 0x20 - Skip 3 bytes
  460. 0x24 [MM NNNN]*n - Refresh All [Same as Handle Keys]
  461. 0x28 SSSS (XXXX YYYY) ZZZZ XZ YZ - Draw Shape and Scale (Same as before, ZZZZ = Zoom (512 as base), XZ/YZ = Scale)
  462. 0x2C SSSS (XXXX YYYY ZZZZ) XZ YZ IIII OOOO 1111 (2222 3333) - Draw Shape Scale and Rotate
  463.         S & 0x8000: XXXX YYYY
  464.         S & 0x4000: ZZZZ
  465.         S & 0x2000: 2222
  466.         S & 0x1000: 3333
  467.  
  468. 0x30 - Draw Credits Text
  469. 0x34 NNNN XX YY - Draw String at Position
  470. 0x38 [MM NNNN]*n - Handle Keys (M = Mask, NNNN = Relative position?)
  471.         MM & 1: Up
  472.         MM & 2: Down
  473.         MM & 4: Left
  474.         MM & 8: Right
  475.         MM & 0x80: Button
  476.         MM == 0xFF: End (no NNNN)
  477.  
  478. 0x80-FF - Stop
  479.  
  480. Arguments are Big Endian
  481.  
  482. ----------
  483.  
  484. POL files - Cutscene Polygons
  485. 0x0000 - Shape Table Offset
  486. 0x0004 - Pallette Data Offset
  487. 0x0008 - Vertices Table Offset
  488. 0x000C - Shape Data Offset
  489. 0x0010 - Vertices Data Offset
  490.  
  491. --Shape Table Offsets
  492. 0x0 - 16-bit BE - Shape Data Offset [ID = NNNN & 0x7FF]
  493.  
  494. --Pallette Data Format
  495. 16 colors Format: 0RGB
  496.  
  497. --Shape Data Format
  498. 0x0000 - 16-bit BE - Number of entries (Fake 16-bit, 8-bit)
  499. 0x0002 - Entries
  500. -Entry
  501. 0x0000 - 16-bit BE - Vertices ID (0x3FFF = max)
  502. 0x0002 - 8-bit - Color
  503.  
  504. if (ID & 0x8000):
  505. 0x0002 - 16-bit BE - dx (if ID & 0x8000)
  506. 0x0004 - 16-bit BE - dy (if ID & 0x8000)
  507. 0x0006 - 8-bit - Color
  508. ID & 0x4000 = Alpha Color?
  509.  
  510. --Vertices Data Format
  511. 0x0000 - 8-bit - Number of vertice entries
  512. -Entry
  513. If number & 0x80 = true (Ellipse)
  514.     XXXX YYYY IIII OOOO
  515.     Ellipse from X,Y to I,O
  516. If 0 vertices           (Point)
  517.     XXXX YYYY
  518.     Draw Point at X,Y
  519. Else                    (Polygon)
  520.     XXXX YYYY [II OO]*NN
  521.     X,Y as base, I,O relative X,Y to base
  522.  
  523. ----------
  524.  
  525. Flashback Genesis (U)
  526. 0018E8:6000 - Anti-Anti-Mod (E) (Rev 1) also (U)
  527.  
  528. LEVEL1.OBJ?
  529. 0x083E5C - 0x230 - LEVEL1.CT
  530. 0x08408C - 0x8B1C - LEVEL1.LEV
  531. 0x08CBA8 - 0xC0 - LEVEL1.PAL
  532. 0x08CC68 - 0x3062 - LEVEL1.MBK
  533. 0x08FCCA - 0xF425 - LEVEL1.SGD
  534. 0x09F0F0 - 0xD62 - LEVEL1.PGE
  535. 0x09FE52 - 0x4A? - LEVEL1.RP/RPC?
  536. 0x09FE9C - 0xFF - LEVEL1.TBN (ENG)
  537.  
  538. 0x0BCD04 - LEVEL2.PGE
  539. 0x112CAA - Cutscene French Text Offsets (Relative 16-bit)
  540. 0x112D94 - Cutscene French Text
  541. 0x1141E8 - Cutscene English Text Offsets (Relative 16-bit)
  542. 0x1142D2 - Cutscene English Text
  543. 0x15EBA4 - Cutscene Offsets (8 bytes per cutscene, first is CMD, second is POL)
  544.     DEBUT.CMD
  545.     DEBUT.POL
  546.     (0x15EBDC - Intro)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top