PaintShop file format

From AtariForumWiki
Jump to: navigation, search
PaintShop plus    *.PSC (st high resolution)
                  *.DA4 (st high resolution, double height)

*.DA4 files are simple screen dumps:

64000 bytes    image data (uncompressed, thus 640x800)
-----------
64000 bytes    total for file

*.PSC files are compressed:

6 bytes     file id ["tm89PS"]
1 word      version  [0xCB = 2.03]
1 byte      ? [always 2]
1 byte      ? [always 1]
1 word      image width in pixels - 1 [always 639]
1 word      image height in pixels - 1 [always 399]
--------
14 bytes    total for header

?           image data:
The image data is not compressed based on pixels, but rather scan lines. Starting at the
top and working downward. There are 9 unique codes:
 
Codes:
  0    set current line all white (0x00)
 10    copy line above (next byte + 1) times
 12    copy line above (next byte + 256 + 1) times
 99    copy from stream 80 * 400 lines (full image)
100    fill next line with (next byte) as line style [(b << 8 ) | b]
102    fill next line with (next 2 bytes) as line style [(b1 << 8) | b2]
110    copy from stream 80 bytes to current line
200    set current line all black (0xFF)
255    marks end of file (stop process codes)

'line style' mentioned above is a reference to VDI function vsl_udsty(), set user-defined
line style pattern. Essentially, fill that line with the bit pattern.

Back to ST Picture Formats