Xref: news2.mv.net comp.os.msdos.djgpp:2489 From: vicari AT mercurio (Marco Barbieri) Newsgroups: comp.os.msdos.djgpp Subject: Re: [Q] Homemade 16-bits-per-pixel gfx mode? Date: 5 Apr 1996 13:20:12 GMT Organization: Computer Science Dep. - Milan University Lines: 50 Message-ID: <4k36mc$5or@tic.sm.dsi.unimi.it> References: <4jtkgr$mfv AT news DOT euro DOT net> NNTP-Posting-Host: mercurio.cefriel.it To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Bram Stolk (bram AT gig DOT nl) wrote: : So I mean: by just using standard VGA stuff? : I already found out the following trick: : - read the port 3c6 four times : - write 3c6 once with value 128 : What it seems to do, is halve the horiz resolution, and make it : 15 bpp. : So if you do this in 320x200x8bpp, : you end up in 160x200x15bpp. I tried this out on my Cirrus VGA, and indeed something happened.. but it doesn't seem to be exactly like that. After some experiments, I found out that my VGA had entered a mode like this: - resolution: unchanged (320x200) - bpp: unchanged (8bpp) - write mode: 'direct', that is, what you write into video ram goes directly to the DAC, regardless of the palette settings. Actually, the bits in each video ram byte are organized as follows: IRRBBBGG ^ ^ msb lsb I = 1-bit intensity (2 levels) RR = 2-bit red (4 levels) BBB = 3-bit blue (8 levels) GG = 2-bit green (4 levels) I also noticed that the thing works the same in 'tweaked' modes (i.e. (360x480)). However, I think that the same could be obtained by setting the palette colours with the previous bit-allocation scheme. P.S. Hicolor-Lowres modes are available in VESA only from release 1.2 on, I think. My 1.09 VESA bios only supports Hicolor-Hires modes (640x480x15bpp). Good fun and especially... MERRY EASTER! :) Paolo ----------------------------------------- Paolo Vicari - vicari AT mailer DOT cefriel DOT it -----------------------------------------