Frame Buffer Programming - Need Documentation
Hey Guys, Im working on a 2d Game Engine for embedded x86 Linux.
As size and efficiant use of resources is extrememly important, i have decided to use the vesafb frame buffer via its block device /dev/fb
excluding the need to X, SDL, or DirectFB.
Its currently in very early development - ( works my mmap'ing /dev/fb0, then memcpy'ing pixels line by line.
This is all working very nicely, except for the opviouse faults...
* Occasional Flickering...
* std-output overwriting the graphics.
* Blinking Cursor flickering in the top corner.
I need to know.....
1) How to page flip ( double buffering )
2) How to wait for Verticle sync
3) How to prevent Linux From writing text to the fbdev that im using.
4) What kernel source files provide the /dev/fb0 block device interface.
I Assume that the first two are done with ioctl's
However i cannot find any odumentation on how.
and i have no diea what so ever about how to implement number 3.
i have read the vesafb.c source code, however this does not appear to be the kernel source code that provides the /dev/fb0 block device, and so offers no information on ioctl codes.
Im affraid that i have never programmed outside of the X11 environment.. and so am a little lost at this level.
What doesnt help, is that most how-to's about frame buffers under linux were written a very long time ago, in the days of kernel 2.0.
Anyways... Thanks for any help / advice / links / code anyone can provide.