Re: [AD] Porting Allegro to the PS2

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


On Fri, Jun 07, 2002 at 09:55:31AM +0100, Laurence Withers wrote:
> > and something is now amiss in my liballeg-4.0.1
> 
> Hmm... it seems that the 'iopl()' (I/O privilege level) call is not 
> available on PS/2 linux. Presumably they have some other call instead. 
> But I think these iopl() calls are only used in the VGA/ModeX type 
> things again. As a quick fix, I have attached a patch which should 
> (hopefully) stop all calls to iopl(). I can't test it though.
> 
> In the long run, these bits need to be wrapped in an autoconf test and 
> not compiled if Allegro is compiled without VGA (ie. `--disable-vga'). 
> The patch should be trivial; only I don't know how autoconf works. 
> (Presumably it defines a preprocessor macro if VGA is required?).

Actually I'd just test with autoconf if iopl is available, and
if not, #define it (in internal headers) to always return
failure.  The code checks the return value, except in cases
where it doesn't care about the return code.

Regarding the problems with inline assembler in the header
files, that's obviously not possible on non-x86 machines and so
it should not be used on them (the whole ioport system doesn't
apply).  The problem is that the Linux code has only ever been
used on x86 platforms.  The generic Unix code has been used on
other architectures, so if you disable Linux support you should
be OK.  I don't think much of the Linux support applies to your
PS2 version anyway.  So, try configuring with --disable-linux.

But, you must enable either Linux console support of X support,
or provide your own PS2 system driver.  Intuition tells me the
latter is the better approach, but it may be worth checking
through the Linux console code to see if it actually does apply
to the PS2 (I think it doesn't).

George



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