Hi Folks!

The idea came up to held an interesting scene compo when Axis reengineered
the data file format of the famous Atari ST demo „STNICCC 2000“ by Oxygene

Aim is to port that demo on as many platforms as possible. The Atari
8bit version parses the original Atari ST data file (640kb) and renders the
polygon stream as fast as it can. The time counter shows the actual time
spent for complete rendering and stops when it restarts the flight.

Heaven, 1st November 2018

What are we talking about… there was a time when grench ST mega group Oxygene released

Axis of Oxyron reverse engineered the data format of the demo which is actually a polygon stream rendered in realtime on the ST and the idea was born how the demo would look like on different platforms like Amiga, Atari 8 Bit, C64, PC, GBA or HP calculator, smartwatches etc.

and today at Silly Venture party me presenting the Atari 800 version using the VBXE video expansion to render the stream. the 640kb big data file is not altered and parsed with the 6502 and rendered with the blitter. palette is converted to ST palette format.

Data file description will follow in next days with more detailed informations but here is the data file I used to parse:

Data File

File description:

The stream contains flags, palette-data and vertex-/polygon-data for 1800 frames.
The stream is segmented in 64KB blocks.
A frame never crosses such a 64KB boundary.
Polygons can have 3-15 vertices.
Polygons can cover each other, so a non-convex polygon filler is needed.
Polygons are rendered to a 256×200 pixel screen in 4 bit color depth.
The palette (16 out of 512 colors) can change from frame to frame.
Words are 2 bytes in big endian order.
Colors are stored as words in Atari-ST format 00000RRR0GGG0BBB (512 possible colors).

Every frame stores the following data:

1 byte Flags Bit 0: Frame needs to clear the screen.
Bit 1: Frame contains palette data.
Bit 2: Frame is stored in indexed mode.

If frame contains palette data
{
1 word Bitmask

For every set bit in the Bitmask (0-15)
{
1 word Color The color has to be copied into the palette at the reverse index of the actual bit,
because the bitmask is stored in reverse order.
In other words: If bit 15 of mask is set -> update color 0 of palette,

if bit 0 of mask is set -> update color 15 of palette.
}
}

If frame is stored in indexed mode
{
1 byte Number of vertices (0-255)

For every Vertex
{
1 byte X-position
1 byte Y-position
}

While (…)
{
1 byte Poly-descriptor Contains: hi-nibble – 4 bits color-index
lo-nibble – 4 bits number of polygon vertices

Some special cases are encoded in the descriptor byte:
$ff = End of frame
$fe = End of frame and the stream skips to the next 64KB block
$fd = End of stream (we are done \o/)

For every vertex of the polygon
{
1 byte Vertex-id (0-255)
}
}
}
Else if frame is stored in non-indexed mode
{
while (…)
{
1 byte Poly-descriptor (See indexed mode)

For every vertex of the polygon
{
1 byte X-position
1 byte Y-position
}
}
}