Re: CG14 and 16bit colour
Bob Breuer <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.sparc |
|---|---|
| Message-ID | <CAHYW14-GVQOwQ3VyAMP-sVOcLxOeRByKO106NEJeXoQNinbRDQ@mail.gmail.com> |
On Tue, Apr 23, 2024 at 10:35 PM Mouse <[email protected]> wrote: > > > Also, cg14 is pretty much freely programmable when it comes to video > > modes. I've seen OF scripts to make it do 1920x1080. > > Yes, it can do 1920x1080 - I'm typing this on one. But I wouldn't call > it "pretty much freely programmable"; try to get an X resolution that > is not a multiple of 32 and, my experience indicates, you can expect it > to fail. See > http://www.sunhelp.org/pipermail/rescue_sunhelp.org/2008-August/124772.html > for my report on experiments I did back in, well, August 2008. The > last paragraph talks about the X resolution issue. (The list archive > has mangled one of my OF scripts, but you can fix it up by replacing > "cgfourteen at 2" with "cgfourteen@2".) > > > Most TFTs these days are bigger than 1152x900, native resolution just > > looks better than scaled. > > Yes...but the bandwidth necessary to push analog video at native > resolution is impractical enough that you mostly have to go to DVI, > HDMI, or the like to get native resolution. A cg14 can't have enough > framebuffer RAM to handle native resolution anyway in most cases. > 16-bit mode can go up to 1920x1080 even with only 4MB of VRAM, otherwise you need 8MB for the 24-bit mode. While the CG14 can be abused to enable 16-bit modes, its native support is only for 8-bit and 24-bit, and also simultaneous 8 and 24 on a per pixel basis. The XLUT selects the color depth and which CLUT to use. To get 16-bit, you need to use 2 of the CLUTs, one for each byte, then alpha blend them together, and use the DAC gamma table to scale back up. Because the CLUTs are used, you can freely choose from any of 555, 565, RGB, BGR, or any other combination that fits into 16 bits. It's been a while since I experimented with this, but I can give more details if you want. Bob