[AD] Progress report on Linux console Allegro

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


Hi, I was going to write and upload last night but it got rather
late.  I'll write now and upload this evening.

I've been copying code from the old Linux Allegro, rearranging
it to fit the new structure.  Currently I have a system driver,
Michael's timer driver, and a VGA graphics driver (only
supporting 320x200x8 at the moment, but that's trivial to change
of course).  By this evening I'll probably have a working
keyboard driver and possibly mouse driver too.

Unfortunately, I had to add fields to the GFX_DRIVER struct,
which means I've had to modify all the other graphics drivers,
which means I might have broken them and can't test to check.  I
also moved Michael's timer driver to the `unix' directory, which
may clash with changes of his own.  Urgh, I hate large patches.
:)

Speaking of which, the 3.9.19 patch is awkward to apply, on
Linux.  Some of the files in it are text files which `fixunix'
does not touch, these come from other platforms.  So running
`fixunix.sh' and passing the patch file through dos-to-unix
conversion doesn't work.  Neither does applying the patch to a
raw distribution, because some files which are Unix-specific
seem to be in DOS format in the patch.  Also, the files
`AUTHORS', `CHANGES' and `README' (IIRC) are capitalised in the
ZIP but not in the patch.

Anyway, I hope this is of interest; I'll upload the patch
tonight.  Most of the work was already done by Marek and Tim, of
course; I've just moved their code around.  I think it works
better now, though.

Just a few last comments to things I think Michael said:  Yes,
as I wrote above your timer driver works fine with no
modifications.  In the existing Linux Allegro, input devices are
not polled on SIGALRM, they are accessed asynchronously using
SIGIO -- unless you put them in another mode where they must be
polled.  For now I'm using SIGIO; I think it's portable to all
Linux systems, which is all that matters for these drivers since
they're restricted to Linux anyway.

Oh, and a more general question.  In Linux, we get notified when
there's a VC switch (=> the screen bitmap will be lost), and
again when we switch back.  Is there a standard way to handle
this in Allegro 4, like the lost bitmat callbacks in the old
WinAllegro?  There is an argument for not saving the bitmap
contents -- memory!  And disk space, if you choose to dump it to
disk.  Currently the default handler saves and restores the
bitmap, but if you install your own handler the default one does
not run, so there's an easy way to disable the saving if you
need to.

-- 
george.foot@xxxxxxxxxx

ko cilre fi la lojban  --  http://xiron.pc.helsinki.fi/lojban/



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