Re: [AD] Porting Allegro to the PS2

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


On Sat, Jun 08, 2002 at 11:37:43AM -0500, Joshua Walker wrote:
> > Still, none of that will be very useful for Allegro.  I'd
> > investigate the possibility of providing Allegro with a
> > framebuffer in system RAM and uploading that as a texture every
> > frame -- IIRC the PS2 has very good DMA speeds... on our PS2
> > project we were swapping all of our textures (10-15Mb I think)
> > in and out at 30fps.  This also allows easy reading from the
> > screen, since it's just a virtual framebuffer in system memory.
> > 
> 
> But the problem is that I can't use the GS to write to textures in 
> system ram. I will have to use software woutines to draw plygons then 
> use the IPU to pipe the video data to the GS. I can't use the GS to make 
> plygons anymore. GS is a one-way street, It can't write the normal 
> system ram and the only way to get info out of the GS is to ask to see 
> if a particular pixel is in a particular coordindnate in the vewable 
> window.

So don't use the GS to draw Allegro primitives -- as I said
above, use Allegro's standard vtable to draw to a memory bitmap,
then upload it as a texture and draw a full-screen quad using
that texture.

Or find out whether fbdev is supported; if so, it probably does
all the above stuff for you.  I think the real crux of whether
to use the Linux console driver or write your own system driver
is whether the stuff the Linux console driver provides is
supported on the PS2.

> texture had a 24-bit color look up table. I can display with the GS a 
> 32bit (24 bit color-8 bit alpha) picture on the same screen with the 8 
> bit textures without raising/dropping the colordeph. I also can rotate 
> the palette on the 8 bit texture without messing up any other 8 bit 
> textures, unless they are using the same Color Lookup Table.

That's not so special really -- it's just a hardware version of
what Allegro does for 8bpp sprites in a higher depth video mode.
(In Allegro you'd have to set the appropriate palette before
drawing each sprite, but just using select_palette, no need to
update the hardware.)

However, if your interest in the PS2 is mostly to play with its
graphics hardware, then porting Allegro won't help you very
much.  What you may get out of porting Allegro is some friendly
familiar input routines, file loading, maybe sound support and
other things which will make you feel more at home while you
concentrate on your low-level fun with the graphics hardware.
In a sense, this is what AllegroGL provides for OpenGL users --
access to all of Allegro's routines except graphics, which are
done through OpenGL -- but in your case, since you are the user,
you can decide what to bother writing and what to ignore. :)

George



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