Tiny file format

From Atari Wiki
Jump to navigation Jump to search
Tiny    *.TNY (any resolution)
        *.TN1 (low resolution)
        *.TN2 (medium resolution)
        *.TN3 (high resolution)

   Several people have reported sightings of mutated Tiny pictures that
do not follow the standard format, so let's be careful out there.  What
is described here is the format that David Mumper's original
TNYSTUFF.PRG produces. The TN4 extension has been found on animated low
resolution files. One can assume the same person(s) will also use TN5 and 
TN6 for extensions for animated medium and high resolution.

1 byte          resolution (same as NEO, but +3 indicates rotation
                information also follows)

If resolution > 2 {
1 byte          left and right color animation limits.  High 4 bits
                hold left (start) limit; low 4 bits hold right (end) limit
1 byte          direction and speed of color animation (negative value
                indicates left, positive indicates right, absolute value
                is delay in 1/60's of a second.
1 word          color rotation duration (number of iterations)

16 words        palette
1 word          number of control bytes
1 word          number of data words
3-10667 bytes   control bytes
1-16000 words   data words
42-32044 bytes  total

Control byte meanings:

        For a given control byte, x:

        x < 0   Copy -x of unique words to take from the data section 
                (from 1 to 128)
        x = 0   1 word is taken from the control section which specifies
                the number of times to repeat the next data word (from
                128 to 32767)
        x = 1   1 word is taken from the control section which specifies
                the number of unique words to be taken from the data
                section (from 128 - 32767)
        x > 1   Specifies the number of times to repeat the next word
                taken from the data section (from 2 to 127)

Format of expanded data:

   The expanded data is not simply screen memory bitmap data; instead, the 
data is divided into four sets of vertical columns.  (This results in
better compression.)  A column consists of one specific word taken
from each scan line, going from top to bottom.  For example, column 1 
consists of word 1 on scanline 1 followed by word 1 on scanline 2, etc., 
followed by word 1 on scanline 200.
   The columns appear in the following order:

   1st set contains columns 1, 5,  9, 13, ..., 69, 73, 77 in order
   2nd set contains columns 2, 6, 10, 14, ..., 70, 74, 78 in order
   3rd set contains columns 3, 7, 11, 15, ..., 71, 75, 79 in order
   4th set contains columns 4, 8, 12, 16, ..., 72, 76, 80 in order

Note that Tiny partitions the screen this way regardless of resolution; i.e., 
these aren't bitplanes.  For example, medium resolution only has two bitplanes, 
but Tiny still divides medium resolution pictures into four parts.

Back to ST Picture Formats