Paintworks

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Links)
(Attributed the big block of text; replaced the Atari Forum Wiki link with Template:AtariForumWiki (left the Google Cache link there, but presumably that's going to disappear at some point itself))
(2 intermediate revisions by one user not shown)
Line 3: Line 3:
 
|formattype=electronic
 
|formattype=electronic
 
|subcat=Graphics
 
|subcat=Graphics
|extensions={{ext|cl0}} {{ext|sc0}} {{ext|cl1}} {{ext|sc1}} {{ext|cl2}} {{ext|sc2}}
+
|extensions={{ext|cl0}} {{ext|sc0}} {{ext|cl1}} {{ext|sc1}} {{ext|cl2}} {{ext|sc2}} {{ext|pg0}} {{ext|pg1}} {{ext|pg2}}
 
|released=1986
 
|released=1986
 
}}
 
}}
Line 13: Line 13:
  
 
<code>CL2/SC2</code> files are 640x400 in mono
 
<code>CL2/SC2</code> files are 640x400 in mono
 +
 +
== Identification==
 +
From the Atari Forum Wiki page (see [[#Links]]):
 +
<pre>
 +
Paintworks    *.SC0 *.CL0 (st low resolution)
 +
              *.SC1 *.CL1 (st medium resolution)
 +
              *.SC2 *.CL2 (st high resolution)
 +
              *.PG0 (st low resolution, double high)
 +
              *.PG1 (st medium resolution, double high)
 +
              *.PG2 (st high resolution, double high)
 +
 +
Early versions of Paintworks were called N-Vision. These are often mistaken as
 +
NEOchrome files. One should not rely on the file extension to determine the contents.
 +
 +
1 word      file id [0x00]
 +
                recommend using 'secondary file id' for identification
 +
1 word      resolution [0 = low, 1 = medium, 2 = high]
 +
                recommend using 'flags' to determine resolution
 +
16 words    palette
 +
12 bytes    file name, usually ["        .  "]
 +
1 word      ?
 +
1 word      ?
 +
1 word      ?
 +
9 bytes      secondary file id ["ANvisionA"]
 +
1 byte      flags, bit field: cxrrtttt
 +
                c = compression flag [1 = compressed]
 +
                x = not used
 +
                r = resolution [0 = low, 1 = medium, 2 = high]
 +
                t = type [0 = page, 1 = screen, 2 = clipart, 4 = pattern]
 +
                    page = double high, thus 320x400, 640x400, 640x800
 +
                    screen = standard st resolutions
 +
                    clipart = standard st resolutions
 +
                    pattern = no documentation at this time
 +
64 bytes    ?
 +
---------
 +
128 bytes    total for header
 +
 +
?            image data:                                     
 +
Uncompressed images are simply screen dumps as one might expect.
 +
 +
Compressed images are a two step process, RLE decoding and re-ordering.
 +
RLE decompression:
 +
 +
/* Written by Lonny Pursell - placed in to Public Domain 1/28/2017 */
 +
void decode_rle(uint8 *data, uint8 *bmap, uint32 bms) {
 +
    uint8  cmd, chr;
 +
    uint16  i;
 +
    uint32  src=0, dst=0, cnt=0;
 +
    do {
 +
        cmd = data[src++];
 +
        if (cmd & 0x80) {                  /* literal? */
 +
            cmd = cmd & 0x7f;
 +
            memcpy(&bmap[dst], &data[src], (uint32)cmd);
 +
            dst = dst + (uint32)cmd;
 +
            src = src + (uint32)cmd;
 +
        } else {                            /* repeat? */
 +
            chr = data[src++];
 +
            for (i=0; i<cmd; i++) {
 +
                bmap[dst++] = chr;
 +
            }
 +
        }
 +
        cnt = cnt + cmd;
 +
    } while (cnt<bms);
 +
}
 +
 +
The uncompressed data is arranged as follows:
 +
 +
ST low resolution:
 +
    All of plane 0..., all of plane 1..., all of plane 2..., all of plane 3...
 +
ST medium resolution
 +
    All of plane 0..., all of plane 1...
 +
ST high resolution:
 +
    No rendering required.
 +
</pre>
  
 
== Software ==
 
== Software ==
Line 23: Line 97:
 
== Links ==
 
== Links ==
 
* http://www.atarimania.com/utility-atari-st-paintworks_28363.html
 
* http://www.atarimania.com/utility-atari-st-paintworks_28363.html
* [http://www.atari-wiki.com/index.php/Paintworks_file_format Paintworks_file_format]
+
* {{AtariForumWiki|Paintworks_file_format|Atari Forum Wiki page}}
* [http://webcache.googleusercontent.com/search?q=cache%3Ahttp%3A%2F%2Fwww.atari-wiki.com%2Findex.php%2FPaintworks_file_format&oq=cache%3Ahttp%3A%2F%2Fwww.atari-wiki.com%2Findex.php%2FPaintworks_file_format&aqs=chrome..69i57j69i58.975j0j4&sourceid=chrome&ie=UTF-8 Paintworks_file_format (google cache)]
+
** [http://webcache.googleusercontent.com/search?q=cache%3Ahttp%3A%2F%2Fwww.atari-wiki.com%2Findex.php%2FPaintworks_file_format&oq=cache%3Ahttp%3A%2F%2Fwww.atari-wiki.com%2Findex.php%2FPaintworks_file_format&aqs=chrome..69i57j69i58.975j0j4&sourceid=chrome&ie=UTF-8 Paintworks_file_format (google cache)]

Revision as of 04:16, 19 August 2020

File Format
Name Paintworks
Ontology
Extension(s) .cl0 .sc0 .cl1 .sc1 .cl2 .sc2 .pg0 .pg1 .pg2
Released 1986

Paintworks is a graphics program for the Atari ST published by Activision in 1986.

CL0/SC0 files are 320x200 with 16 colors

CL1/SC1 files are 640x200 with 4 colors

CL2/SC2 files are 640x400 in mono

Contents

Identification

From the Atari Forum Wiki page (see #Links):

Paintworks    *.SC0 *.CL0 (st low resolution)
              *.SC1 *.CL1 (st medium resolution)
              *.SC2 *.CL2 (st high resolution)
              *.PG0 (st low resolution, double high)
              *.PG1 (st medium resolution, double high)
              *.PG2 (st high resolution, double high)

Early versions of Paintworks were called N-Vision. These are often mistaken as
NEOchrome files. One should not rely on the file extension to determine the contents.

1 word       file id [0x00]
                 recommend using 'secondary file id' for identification
1 word       resolution [0 = low, 1 = medium, 2 = high]
                 recommend using 'flags' to determine resolution
16 words     palette
12 bytes     file name, usually ["        .   "]
1 word       ?
1 word       ?
1 word       ?
9 bytes      secondary file id ["ANvisionA"]
1 byte       flags, bit field: cxrrtttt
                 c = compression flag [1 = compressed]
                 x = not used
                 r = resolution [0 = low, 1 = medium, 2 = high]
                 t = type [0 = page, 1 = screen, 2 = clipart, 4 = pattern]
                     page = double high, thus 320x400, 640x400, 640x800
                     screen = standard st resolutions
                     clipart = standard st resolutions
                     pattern = no documentation at this time
64 bytes     ?
---------
128 bytes    total for header

?            image data:                                      
Uncompressed images are simply screen dumps as one might expect.

Compressed images are a two step process, RLE decoding and re-ordering.
RLE decompression:

/* Written by Lonny Pursell - placed in to Public Domain 1/28/2017 */
void decode_rle(uint8 *data, uint8 *bmap, uint32 bms) {
    uint8   cmd, chr;
    uint16  i;
    uint32  src=0, dst=0, cnt=0;
    do {
        cmd = data[src++];
        if (cmd & 0x80) {                   /* literal? */
            cmd = cmd & 0x7f;
            memcpy(&bmap[dst], &data[src], (uint32)cmd);
            dst = dst + (uint32)cmd;
            src = src + (uint32)cmd;
        } else {                            /* repeat? */
            chr = data[src++];
            for (i=0; i<cmd; i++) {
                bmap[dst++] = chr;
            }
        }
        cnt = cnt + cmd;
    } while (cnt<bms);
}

The uncompressed data is arranged as follows:

ST low resolution:
    All of plane 0..., all of plane 1..., all of plane 2..., all of plane 3...
ST medium resolution
    All of plane 0..., all of plane 1...
ST high resolution: 
    No rendering required.

Software

Sample files

Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox