GrafX2 2.9.3227
The ultimate 256-color painting program
Atari ST picture formats

Support for Atari ST picture formats. More...

+ Collaboration diagram for Atari ST picture formats:

Functions

static void PI4_16b_to_16p (const byte *src, byte *dest)
 8bpp Planar to chunky conversion. More...
 
static void PI1_8b_to_16p (const byte *src, byte *dest)
 4bpp Planar to chunky conversion. More...
 
static void PI2_4b_to_16p (const byte *src, byte *dest)
 2bpp Planar to chunky conversion. More...
 
static void PI1_16p_to_8b (const byte *src, byte *dest)
 Chunky to 4bpp planar conversion. More...
 
static void PI1_decode_palette (const byte *src, T_Components *palette)
 Decode the 16 colors Atari ST(E) palette. More...
 
void PI1_code_palette (const T_Components *palette, byte *dest)
 Code a 16 colors Atari ST(E) palette. More...
 
static void PI1_load_ranges (T_IO_Context *context, const byte *buffer, int size)
 Load color cycling data from a PI1 or PC1 image (Degas Elite format) More...
 
void PI1_save_ranges (T_IO_Context *context, byte *buffer, int size)
 Saves color ranges from a PI1 or PC1 image (Degas Elite format) More...
 
void Test_PI1 (T_IO_Context *context, FILE *file)
 Test for Degas file format. More...
 
void Load_PI1 (T_IO_Context *context)
 Load Degas file format. More...
 
void Save_PI1 (T_IO_Context *context)
 Save a PI1 Degas uncompressed picture. More...
 
static void PC1_4bp_to_1line (const byte *src0, const byte *src1, const byte *src2, const byte *src3, byte *dest)
 4bpp planar to chunky conversion. More...
 
static void PC1_1line_to_4bp (const byte *src, byte *dst0, byte *dst1, byte *dst2, byte *dst3)
 Convert 1 line of 320 pixel from chunky to 4bpp planar. More...
 
void Test_PC1 (T_IO_Context *context, FILE *file)
 Test for Degas Elite Compressed format. More...
 
void Load_PC1 (T_IO_Context *context)
 Load Degas Elite compressed files. More...
 
void Save_PC1 (T_IO_Context *context)
 Save a Degas Elite compressed picture. More...
 
void Test_NEO (T_IO_Context *context, FILE *file)
 NeoChrome Format : More...
 
void Load_NEO (T_IO_Context *context)
 Load Neochrome file format. More...
 
void Save_NEO (T_IO_Context *context)
 Save in NeoChrome format. More...
 
void Test_TNY (T_IO_Context *context, FILE *file)
 
void Load_TNY (T_IO_Context *context)
 
void Save_TNY (T_IO_Context *context)
 Save in Tiny compressed format. More...
 
void Test_CA1 (T_IO_Context *context, FILE *file)
 test for CrackArt format. More...
 
void Load_CA1 (T_IO_Context *context)
 
void Save_CA1 (T_IO_Context *context)
 Save a 320x200 16c picture in CrackArt format. More...
 

Detailed Description

Support for Atari ST picture formats.

The Atari ST has 3 video modes :

Supported formats :

Function Documentation

◆ PI4_16b_to_16p()

static void PI4_16b_to_16p ( const byte src,
byte dest 
)
static

8bpp Planar to chunky conversion.

Reads 16 pixels from 8 words with TT low resolution layout.

Parameters
src16 bytes Atari TT screen memory
dest16 bytes buffer

Referenced by Load_PI1().

◆ PI1_8b_to_16p()

static void PI1_8b_to_16p ( const byte src,
byte dest 
)
static

4bpp Planar to chunky conversion.

Reads 16 pixels from 4 words with Atari ST low resolution layout.

Parameters
src8 bytes Atari ST screen memory
dest16 bytes buffer

Referenced by Load_CA1(), Load_NEO(), Load_PI1(), and Load_TNY().

◆ PI2_4b_to_16p()

static void PI2_4b_to_16p ( const byte src,
byte dest 
)
static

2bpp Planar to chunky conversion.

Reads 16 pixels from 2 words with Atari ST medium resolution layout.

Parameters
src4 bytes Atari ST screen memory
dest16 bytes buffer

Referenced by Load_CA1(), Load_NEO(), Load_PI1(), and Load_TNY().

◆ PI1_16p_to_8b()

static void PI1_16p_to_8b ( const byte src,
byte dest 
)
static

Chunky to 4bpp planar conversion.

For ST Low resolution.

Parameters
src16 bytes buffer
dest8 bytes (4 words in Atari ST memory screen layout)

Referenced by Save_CA1(), Save_NEO(), Save_PI1(), and Save_TNY().

◆ PI1_decode_palette()

static void PI1_decode_palette ( const byte src,
T_Components palette 
)
static

Decode the 16 colors Atari ST(E) palette.

Parameters
src32 bytes Atari ST(E) palette
paletteGrafX2 palette structure

References T_Components::B, T_Components::G, and T_Components::R.

Referenced by Load_CA1(), Load_NEO(), Load_PC1(), Load_PI1(), and Load_TNY().

◆ PI1_code_palette()

void PI1_code_palette ( const T_Components palette,
byte dest 
)

Code a 16 colors Atari ST(E) palette.

Parameters
paletteGrafX2 palette structure
dest32 bytes buffer

References Get_palette_RGB_scale(), GFX2_DEBUG, and GFX2_Log().

Referenced by Save_CA1(), Save_NEO(), Save_PC1(), Save_PI1(), and Save_TNY().

◆ PI1_load_ranges()

static void PI1_load_ranges ( T_IO_Context context,
const byte buffer,
int  size 
)
static

◆ PI1_save_ranges()

void PI1_save_ranges ( T_IO_Context context,
byte buffer,
int  size 
)

Saves color ranges from a PI1 or PC1 image (Degas Elite format)

References T_IO_Context::Color_cycles, T_IO_Context::Cycle_range, T_Color_cycle::End, T_Color_cycle::Inverse, T_Color_cycle::Speed, and T_Color_cycle::Start.

Referenced by Save_PC1(), and Save_PI1().

◆ Test_PI1()

void Test_PI1 ( T_IO_Context context,
FILE *  file 
)

Test for Degas file format.

References File_error, File_length_file(), and Read_word_be().

◆ Load_PI1()

◆ Save_PI1()

void Save_PI1 ( T_IO_Context context)

◆ PC1_4bp_to_1line()

static void PC1_4bp_to_1line ( const byte src0,
const byte src1,
const byte src2,
const byte src3,
byte dest 
)
static

4bpp planar to chunky conversion.

Converts 1 line (320 pixels) at a time.

Parameters
src040 bytes for plane 0
src140 bytes for plane 1
src240 bytes for plane 2
src340 bytes for plane 3
dest320 bytes destination buffer

Referenced by Load_PC1().

◆ PC1_1line_to_4bp()

static void PC1_1line_to_4bp ( const byte src,
byte dst0,
byte dst1,
byte dst2,
byte dst3 
)
static

Convert 1 line of 320 pixel from chunky to 4bpp planar.

Parameters
src320 bytes buffer
dst040 bytes buffer for plane 0
dst140 bytes buffer for plane 1
dst240 bytes buffer for plane 2
dst340 bytes buffer for plane 3

Referenced by Save_PC1().

◆ Test_PC1()

void Test_PC1 ( T_IO_Context context,
FILE *  file 
)

Test for Degas Elite Compressed format.

References File_error, File_length_file(), and Read_word_be().

◆ Load_PC1()

◆ Save_PC1()

void Save_PC1 ( T_IO_Context context)

◆ Test_NEO()

void Test_NEO ( T_IO_Context context,
FILE *  file 
)

NeoChrome Format :

1 word          flag word [always 0]
1 word          resolution [0 = low res, 1 = medium res, 2 = high res]
16 words        palette
12 bytes        filename [usually "        .   "]
1 word          color animation limits.  High bit (bit 15) set if color
                animation data is valid.  Low byte contains color animation
                limits (4 most significant bits are left/lower limit,
                4 least significant bits are right/upper limit).
1 word          color animation speed and direction.  High bit (bit 15) set
                if animation is on.  Low order byte is # vblanks per step.
                If negative, scroll is left (decreasing).  Number of vblanks
                between cycles is |x| - 1
1 word          # of color steps (as defined in previous word) to display
                picture before going to the next.  (For use in slide shows)
1 word          image X offset [unused, always 0]
1 word          image Y offset [unused, always 0]
1 word          image width [unused, always 320]
1 word          image height [unused, always 200]
33 words        reserved for future expansion
32000 bytes     pixel data

Dali *.SD0 (ST low resolution) .SD1 (ST medium resolution) .SD2 (ST high resolution)

Files do not seem to have any resolution or bit plane info stored in them. The file extension seems to be the only way to determine the contents.

1 long file id? [always 0] 16 words palette 92 bytes reserved? [usually 0]

References File_error, File_length_file(), and Read_word_be().

◆ Load_NEO()

◆ Save_NEO()

◆ Test_TNY()

void Test_TNY ( T_IO_Context context,
FILE *  file 
)

◆ Load_TNY()

◆ Save_TNY()

void Save_TNY ( T_IO_Context context)

Save in Tiny compressed format.

Todo:
support medium and high resolution

fill the buffer with the special Tiny Stuff organization

See also
Load_TNY

References File_error, NULL, Open_file_write(), T_IO_Context::Palette, PI1_16p_to_8b(), PI1_code_palette(), T_IO_Context::Pitch, Remove_file(), T_IO_Context::Target_address, WORDS_EQU, Write_byte(), Write_bytes(), and Write_word_be().

◆ Test_CA1()

void Test_CA1 ( T_IO_Context context,
FILE *  file 
)

test for CrackArt format.

Test that the files starts with the "CA" signature, then 1 byte for the compressed flag (0 or 1), then 1 byte for the resolution (0=low, 1=med, 2=high)

References File_error, and Read_bytes().

◆ Load_CA1()

◆ Save_CA1()

void Save_CA1 ( T_IO_Context context)