VGA shift register used in other ways?

Emulation of old PCs, PC hardware, or PC peripherals.

VGA shift register used in other ways?

Postby superfury » 2019-11-17 @ 21:08

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?
Posts: 3374
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Return to PC Emulation

Who is online

Users browsing this forum: No registered users and 2 guests