QuickBasic BSAVE Format

We'll assume the picture dimensions are width * height x bpp (where bpp means bits per pixel).

File Header
The total length of the header is 7 bytes

Byte 00Must be &HFD (253) to be a valid BSAVE file
Bytes 01 to 02Segment where the datas were stored in memory before using BSAVE
Bytes 03 to 04Offset where the datas were stored in memory before using BSAVE
Bytes 05 to 06width*height*(bpp/8)+5 : Size of the array stored in the file + 5


Memory Dump of the buffer got using GET command
Bytes 07 to 08width*bpp
Bytes 09 to 10height
Bytes 11 to 11+width*height*(bpp/8)Color indexes map got using GET command


Checksum
Last byte : This is a kind of checksum. I have no more information about this byte but it appears to depend on the picture dimensions.

Note: All number in this document are written in decimal

No comments: