PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

quick PH questions

Hi,

I have two ongoing projects, one of them being 3d using a custom
engine I'm writing. It seems that everybody writing a 3d engine
claims to have nice speedups with pocketHAL, so I've decided to
give it a try despite I can't understand how pocketHAL can give
such speedups if 90% of the time is spent in my
functions but it won't hurt me to try :)

I have some questions about PH, some of them answered by me which I
think they're correct ( feel free to correct me if not ) which may
serve as a FAQ for future developers ( and myself ;) ). Unfortunately
information is spread all over the forum, but there's no place where
you can find this info in a single thread to get a general idea of
PH capabilities. (ok, if you have a link with everything explained
it'll be great too!)


* The backbuffer has always the same pitch, so you don't need to
rotate sprites/fonts/your 3d engine output to fit orientation. The
swap function is the one which rotates everything to show the output
in the choosen orientation? (I suppose it's the swizzling/unswiszzling
feature in the FAQ, but for non english speakers swizzling it's quite
hard to understand ;) )

* The backbuffer is always RGB565 and Swap converts it to any other
format (i.e. RGB444 or even monochrome?) if needed?

* PH only works fullscreen? (for the moment at least)

* Is there a way to compile your code with a PH "PC version" using
VS6 and debug there?

* PH doesn't need GAPI dll (nor other libs,so it's an standalone
executable) , however the docs says GAPI might be used
if available. Does this means it's only used for compatibility issues
(non tested devices, non working devices,...)?

* Do I have to provide 3 exes for ARM/XScale processors?
(PPC2000,PPC2002 & WM2003) or the same exe could work in all ARM/Xscale
processors?


* reported working devices (in 0.6, based on the thread about 0.6 RC1)
Casio E-125
Audiovox Maestro
Ipaq 2210,3835,1910,3765,3970,5450,3600,1945
XDA II
Toshiba E-750,E-740
Axim X5


TIA :)
Hi Kak, I will update my web site with the info. But for now, here is a quick answer to your post:

1) The backbuffer pitch is not guaranteed to be the same between calls to Display::Swap(), but the orientation is. The Swap() function will rotate the backbuffer to fit the orientation you asked for. This is indeed what I call "swizzling".

2) The backbuffer is always in the RGB565 format, PHAL figure out any transformation needed when updating the actual display.

3) As of version 0.5, PHAL only works fullscreen. Windowed support is coming.

4) The PocketHAL_x86_PC.lib library was compiled with VC6 and was successfully tested with VC6 and VC7.1. So yes, you can work with VC6 and debug your code before recompiling for the PPC.

5) PHAL doesn't require PHAL to work on PPC. This means that you don't have to bother installing it on older PPC2000 devices. If the specific video controller of your device can't be determined (or if there is no optimized driver for it), GAPI will be considered the "best driver" to use. In practice, simply ignore any GAPI issues, PHAL will take care of them for you.

6) PHAL 0.5 had multiple libraries for ARM and emulators. It turns out that this is uneeded. Starting with PHAL 0.6 there will be only one lib for ARM and only one for the Emulators. You do not need to provide 3 exes for Arm/XScale. Simply compile your program with the PPC2000 SDK (EVC3) and it will work on all Arm/XScale devices. (That has been my experience.)

7) These devices were reported as working with PHAL 0.6. I expect any PPC to work with PHAL 0.5.