Adorage ClariSSA
Jump to navigation
Jump to search
This is a continuation of Adorage SSA, now using IFF format.
Container structure
ClariSSA files start with FORM SSA
chunk, followed by ANIM
chunk with animation parameters or MDHD
if this is a project file referring other animations. Only animation file will be documented here.
After the header individual frames follow inside individual FORM DLTA
chunks. It contains the following chunks:
DSCR
-- current frame coding parameters (first byte is coding method, 1 - SSA, 3 - RLE);COST
-- palette in some format (a byte for start index, a byte for number of entries minus one, each palette entry is 16-bit colour index and 32-bit colour);BEST
-- opcodes for SSA or RLE;DAST
-- 16-bit plane data values used in reconstruction.
Compression methods
Like with its predecessor, the format codes image data per bitplanes. The main difference is that now data for all bitplanes of a frame is grouped together and opcode 0x00
is used as a delimiter between planes.
SSA
This format has only even-numbered opcodes:
0x00
-- end of plane;0x02
-- next byte plus one is the amount of 32-bit words to skip;0x04
-- the same but instead of a byte a 16-bit value is read fromDAST
;0x06, 0x08
-- copy 2*N+2 or 2*N+3 values fromDAST
to output where N is the next byte value;0x0A, 0x0C
-- same but repeat single value that many times instead;0x0E..0x1C
-- copy 1..8 16-bit values fromDAST
;0x1E..0x2A
-- repeat 16-bit value 2..8 times;0x2C..0x3A
-- skip 1..8 16-bit values in output;0x3C..0x9C
-- next byte is the number of bytes to skip in output, then read 1..49 16-bit values fromDAST
;0x9E..0xDC
-- same but it's repeating single value fromDAST
1..32 times.
RLE
This is a simple format that supports the following opcodes:
0x00
-- fetch 16-bit value fromDAST
. If it's zero this is end of plane, otherwise skip that amount of bytes;0x01..0x3F
-- next byte is the number of bytes to skip in the output before outputting the same number of 16-bit values fromDAST
as the opcode value;0xF0..0xFF
-- next byte is the number of bytes to skip in the output before repeating 16-bit values fromDAST
as many times as the negative opcode value (i.e.0xFF
is repeat once).