Paintworks
From Just Solve the File Format Problem
(Difference between revisions)
(Added info on Paintworks) |
Dexvertbot (Talk | contribs) m (Change telparia.com samples link to template) |
||
| (5 intermediate revisions by 2 users 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 14: | Line 14: | ||
<code>CL2/SC2</code> files are 640x400 in mono | <code>CL2/SC2</code> files are 640x400 in mono | ||
| − | == Identification == | + | == 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 22: | Line 93: | ||
== Sample files == | == Sample files == | ||
| − | * | + | * {{DexvertSamples|image/paintworks}} |
== Links == | == Links == | ||
* http://www.atarimania.com/utility-atari-st-paintworks_28363.html | * http://www.atarimania.com/utility-atari-st-paintworks_28363.html | ||
| + | * {{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)] | ||
Latest revision as of 04:06, 28 December 2023
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 |
[edit] 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.
[edit] Software
[edit] Sample files
[edit] Links
Categories:
- File Formats
- Electronic File Formats
- Graphics
- File formats with extension .cl0
- File formats with extension .sc0
- File formats with extension .cl1
- File formats with extension .sc1
- File formats with extension .cl2
- File formats with extension .sc2
- File formats with extension .pg0
- File formats with extension .pg1
- File formats with extension .pg2