VOGONS


First post, by superfury

User metadata
Rank l33t
Rank
l33t

Has anyone (or a demo/game) ever used the different shift modes in ways they weren't made to be used normally?

So, the VGA has three different shift modes:
- Planar shift(1-bit per plane, normally used with monochrome CGA and 16-color modes).
- Packed shift(normally used with CGA 4-color modes).
- 256-color shift(normally used with 256-color modes and multiples thereof(16bpp, 24bpp, 32bpp).

You could implement 16-color modes using any three of those. Perhaps even 256-color modes as well.

Like, 256-color shift with 4-bit colors(just turn off 8-bit(bit 6 of the attribute mode control register during 320x200x256). Then, you have a linear version of 16-color graphics, essentially a linear version of the 640 pixel lines instead of spread throughout 4 planes in a 1/4 bit per plane way.
Then, to change a 4bpp pixel, it's just an offset, read, mask with f0 or 0f, or in the color, then write back?

UniPCemu Git repository
UniPCemu for Android, Windows and PSP on itch.io
Older UniPCemu PC/Android/PSP releases