[GEM Development] Video mode - bitplane vs packed pixels

John Elliott jce at seasip.info
Thu Feb 1 05:34:45 PST 2024


You can get the number of planes using vq_extnd(), but I don't think
there's any way to determine the native pixel format used by the screen
(short of drawing on the screen, using vro_cpyfm() to read the bits, and
making deductions from what you get back). Back when GEM was being sold
commercially, almost everything was either mono or 16-colour in 4
bitplanes; I think the one 256-colour driver was for the 8514/a, which
used 8 bitplanes.

The 256-colour drivers I wrote use packed pixels on the display, but
still present video memory to vro_cpyfm() as eight planes. The older
ones do a lot of shifts and rotations to do this (so the first "plane"
maps to bit 0 of every byte, the second "plane" maps to bit 1 of every
byte and so on). The newer ones avoid this by saying plane 0 is bytes
0,8,16,24... of video RAM, plane 1 is bytes 1,9,17,25... and so on.

--
John Elliott

Cyprian Konador wrote:
> Hi Team,
>
> I'm working on a small application which operates on offscreen
> graphics data, that I transfer via vro_cpyfm to the screen.
> Now I wonder how to distinguish video mode: bitplane vs packed pixels.
> Do you have any tips?
>
> Thanks
>
> Regards
> Cyprian
> https://260ste.atari.org
>
>
>
> _______________________________________________
> gem-dev mailing list
> gem-dev at simpits.org
> http://www.simpits.org/mailman/listinfo/gem-dev



More information about the gem-dev mailing list