--------------------------------------------------------------------- | The dap fileformat is part of the AGB editor 'polyester'. | | dap file format is a copyright. (c)copyright wayne "dappa" mike. | | You may encode and decode these files as you wish. | | you can get 'polyester' the AGB(advanced gameboy editor) from | | www.dappa.org | | | | please report ant bugs or typos to dappa@dappa.org | | doc version 1.0 | | =- by wayne mike -= | |___________________________________________________________________| The dap file format is a raw bitmap file. That holds palette and image data in a straight forward manner. BYTE OFFSET: DESCRIPTION: SIZE(in bytes) 0 'd' (constant) 1 1 'a' (constant) 1 2 'p' (constant) 1 3 file lock byte 1 0=not locked. 1=locked. 4 width 2 6 height 2 8 color depth 1 1=8bpp 2=24bpp 3=not supported 16bpp 9 color palette 768 in R,G,B format. ------------------- If in an R,G,B mode the palette will be padded with 0's 777 image (width*height) if in R,G,B mode the the format is R,G,B. -------------------- Else each byte is an index into the color table. ABOUT THE LOCK BYTE ------------------- the lock byte is like a warning system to people that may be viewing your file. if you are writing a decoder and this byte is set. pop a message up for the user saying that this file is not to be modified. -> an encoder you ask the user if he/she wanted to lock the file.