[AD] GGI patch for 3.9.21

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


http://members.xoom/psyk/3921-ggi.diff.gz

After you ./configure you will have to add `-lggi' to the LIBS= line in
makefile, as I don't understand those .m4 things.  Warning: do not try
the dga or svga GGI targets unless you have another computer to telnet
in from, or if you like rebooting.

The driver works with both the console and the X system drivers
(although not very well).  It automatically emulates different colour
modes if required, which makes it a bit of a wart, but I thought that
was better than having GFX_SAFE failing under >8bpp colour depths (eg.  
under X).  Anyway, I can't do high colour with SVGAlib, and sometimes
I'm too lazy to go into X. :)  It can be removed easily though.

Where possible, the driver uses what GGI calls `direct buffers' which
gives direct access to the video memory.  If that is not possible it
simply malloc's a bit to use as the screen bitmap, and uses unwrite_bank
to refresh the parts touched with screen->write_bank.  It's a little
slow though, and especially so with the GUI routines.  I'm waiting to
see what techniques the other drivers end up using, so I can scab it off
them. :)

In ggi.c there are a couple of functions which use inline assembly, but
have bits of C stuck inbetween, which may or may not slow them down.  
In any case, it's ugly.  Could some assembly guru clean that up,
pleeease?

The problem with using the current console driver is that it assumes
you're using the vga driver (correct me if I'm wrong), and sets up
console switching, etc. This is not required as libggi automatically
does this for you (and is conflicting). It also wants root privileges.  
The problem with the X driver is that is pops up a window, which ggi
also does.  So your input comes from the "Allegro Application" window,
while your output is on the "GGI-on-X" window :)  Should I add another
system driver, or just modify the current ones as required?

Peter
-- 
tjaden@xxxxxxxxxx - http://psynet.net/tjaden/ - ICQ: 4588779



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/