Re: [AD] First GGI questions

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


Peter Wang <tjaden@xxxxxxxxxx> writes:
> Hi!  I was hacking at ggi.c earlier this morning (i.e. 3am :), and I
> managed to get the driver to "work".  Using the ggi X and DGA drivers it
> can set a screen mode (but not colour depth) and use the usual drawing
> primitives.  It can also set the palette when running in an 8 bpp video
> mode.

Great!

> Anyway... the GGI docs say that the read and write addresses for the same 
> frame buffer *could* be in different locations.  How could I go about 
> working around that little glitch?  Perhaps some other driver already 
> handles this kind of weirdness?

The DOS VESA driver can do this. You need to make different functions for 
handling the read and write bank switches, and return different addresses 
from each. The VESA code does this by adding _window_2_offset to the return 
address in the read bank switcher (the code is in vesas.s).

You won't ever actually see this happen in practice, though. A few ancient 
Trident and Avance cards used to work like this, but nothing at all recent 
does it.

> Second, it also says that some resources may need to be locked/unlocked
> with ggiResourceAcquire and ggiResourceRelease.  However it does not
> specifically say *which* resources.  I was thinking that if only the 
> screen required this it could be overcome with 
> acquire_screen/release_screen.  Any thoughts?

That's what those routines are intended for, yes.


--
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."



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