Xref: news2.mv.net comp.os.msdos.djgpp:2561 From: bram AT gig DOT nl (Bram Stolk) Newsgroups: comp.os.msdos.djgpp Subject: Re: [Q] Homemade 16-bits-per-pixel gfx mode? Date: 9 Apr 1996 08:32:34 GMT Organization: Euronet Internet Lines: 44 Message-ID: <4kd7b2$ba3@news.euro.net> References: <4jtkgr$mfv AT news DOT euro DOT net> NNTP-Posting-Host: shadwell.gig.nl To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hello Coder, In a previous posting I wrote: : I want to use a 16 bit per pixel mode (or else 15 bpp). : And I would like a resolution of 320x200. (or something close, : in fact 320x240 would be better because of the square pixels). : However, UNIVBE doesnt give me this mode. : Is it possible to create your own mode, without having to support : all chipsets? : 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. : However, sometimes when I do this, the performance of screenwrites : seems to come to a halt. (e.g. 50 times slower than regular modes) Now I know something more about it. 3c6 is a regular VGA register: the DAC Pixel Mask 0. However, on some vga cards, when you do a read 4 times, an internal flipflop does a flip or a flop, and then another register is selected for writing. I think that this hack only works for SDACs. Lot of people mailed me telling me it doesnt work, so sorry for the confusion. Hope it's a bit more clear now. Bram Stolk