Re: [AD] Porting Allegro to the PS2

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


On Fri, Jun 07, 2002 at 11:09:07PM +0100, Laurence Withers wrote:
> Attached is a patch which wraps any VGA-specific code (ie. the code 
> causing Joshua problems) in a preprocessor test for ALLEGRO_LINUX_VGA. 
> Since all the iopl() calls were connected with VGA code, I also wrapped 
> them in a test for this macro. The logic for this decision is simple: 
> VGA is only available on Linux/i386, iopl() is only available on 
> Linux/i386, so the presence of one determines the presence of the 
> other.

As I said before, I think it's better to just provide a version
of iopl which returns failure; it's simpler than catching all
the places that call it, and not hard to check for in the
configure script if you know how. ;)  It's not necessarily VGA
stuff that needs the ioperms.

> I'm going to have to disagree with George about the relevance of the 
> Linux driver on the PS/2, because I think the mouse, keyboard, timer 
> and sound drivers are all relevant. There is also the possibility of 
> framebuffer support being added.

I didn't mean to suggest that the Linux driver should never
support anything other than x86, I just doubt that it's useful
on PS2.  I don't know anything about PS2 Linux but I suspect
it's just a Linux kernel with some hacked together libraries to
access the hardware -- judging by the libraries Sony supply for
real PS2 development, I'd be very surprised if they bothered to
make a working fbdev or anything useful like that! :)

Not that I'd blame them particularly; the interesting thing
about PS2 Linux is sure to be having access to the more strange
bits of its hardware, rather than porting real world
applications across.

On the other hand, implementing fbdev would be a really simple
way for them to get an X port working... but then, it's been
said that they didn't use XFree86 anyway, so they probably
didn't do it this way.  As I said, I don't know what they
actually provide in PS2 Linux and whether it's any good.

My doubts about using the Linux console driver came from looking
through aintlnx.h and remembering what little the Linux console
system driver actually does -- most of it is in the generic Unix
driver.  The Linux console driver itself just does a bit of
console management (finding a console we can have full control
of, handling display switching), keyboard handling (maybe this
is useful on PS2), mouse handling (probably not useful on PS2,
since it doesn't have a serial mouse, though perhaps a PS2 USB
mouse driver would also work in x86 Linux? or maybe it has gpm?)
and graphics drivers (IMHO only fbcon is a candidate for working
on PS2, and that's only if they actually supply a kernel fbdev
driver).

The timer and sound drivers are in the generic unix code, not
the Linux console code, so they can still be used by a separate
PS2 system driver.

Going back to previous points though, I'm a little surprised if
the X system driver for Allegro doesn't work on the PS2 -- I
think the original poster said that Allegro assumes XFree86, but
if it does then this is news to me. :)

George



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