Subject:
RE: Drawing modes
From:
Greg Haerr ####@####.####
Date:
19 May 1999 19:49:10 -0000
Message-Id: <01BEA1FE.20F14340.greg@censoft.com>
On Wednesday, May 19, 1999 1:21 PM, Alex Holden ####@####.#### wrote:
> On Wed, 19 May 1999, Greg Haerr wrote:
> > Don't get confused by the "read-modify-write" cycle that the EGA/VGA
> > controllers require for the damned hardware. It think this is what
> > you're looking at. The EGA/VGA doesn't require an rmw cycle for XOR, it
> > requires it for all writes, and the SET, AND, OR, XOR stuff is
> > controlled in yet another hw register.
>
> Since you keep insisting that it is possible to get around the requirement
> to do RMW, I've looked hard for any code which demonstrates this, but I'm
> sorry to say I've been unable find any. As an example, here is an extract
> from __linear_putpixel8 (the basis of pretty much all operations on 8 bit
> linear devices- the other bit depths all seem to work the same way) from
> allegro:
>
I'm not talking about the linear modes, they're easy, and of course
you have to read, xor, and write.
I'm talking about the planar modes, which are a pain in the ass.
I thought you were working on the vga16 driver, which uses the planar modes.
In the planar mode, the hardware is setup the way I've been describing.
> putpix_xor_mode:
> READ_BANK() /* read pixel from screen */
> xorb %es:(%eax, %ecx), %bl /* XOR */
> movl ARG3, %eax /* re-read Y position */
> jmp putpix_solid_mode
>
> Surely it reads it from the screen, modifies it, then writes it back?
>
> I've also looked hard at the GGI, W, and X low level framebuffer drivers,
> and none of them even seem to even implement different draw modes.
I don't doubt they may be hidden. I haven't had a chance to look
at the drivers you sent me. Does X support a framebuffer driver for the vga 16-color
planar mode, or just the linear modes?
I've
> looked at the kernel side code, and was unable to see any way to write to
> a graphics device in anything other that the ordinary SET mode, though it
> is pretty complex and I could have overlooked something.
In the planar drivers that I've seen, sometimes all the MODE_SET stuff
is hidden in an entirely separate proc that sets up the VGA hardware to automatically
do the XOR etc without having to write code for it per pixel.
>
> --------------- Linux- the choice of a GNU generation. --------------
> : Alex Holden (M1CJD)- Caver, Programmer, Land Rover nut, Radio Ham :
> -------------------- http://www.linuxhacker.org/ --------------------
>