Were Compaq on something when they designed the totally illogical video memory layout for the 38xx?
Having conducted some initial tests, I can confirm that my graphics application currently runs at 20fps with correct conversion from an off-screen buffer to the video memory, and 30fps with a direct memcpy (and therefore displaying a rearranged representation of my buffer on the screen).
Has anyone had any experience with writing specialised graphics functions (polygon blitters and so on) to "natively" write to the 38xx screen layout, therefore allowing a direct memcpy from the offscreen buffer to display memory?
I'm slightly concerned that the overhead caused by the overhead of the extra functionality in my graphics functions will negate the benefit of being able to perform a memcpy between the offscreen buffer and the display memory. Especially given that my application makes use of alpha transparencies and therefore a certain amount of overdraw.
jht:well, while loading rotate all your graphics and recalculate your sprite positions for 38xx screen layout and then you get no performace penalty and a nice memcpy for blitting... it's quite some additional work thru...
>Were Compaq on something when they designed the totally illogical video memory layout for the 38xx?
This topic comes up a lot - the ipAQ 38xx has the LCD upside down. GAPI suppports this but apparently some dumb games hardcoded the iPAQ 36xx/37xx memory layout directly without querying GAPI pitch values.
So to combat this problem Compaq chose to expose a buffer the same as the 36xx and 37xx, and then flip it using a very slow copy (15ms or something I think).
If you want someone to blame, there are three main parties:
1) The authors of the games written for the iPAQ 36xx and 37xx who hardcoded their graphics so naively it wouldn't even work with the next model. It's really not too hard to support the 38xx, Jornada or any future PPCs by using the correct pitch values. I don't have a Cassiopeia, but I am writing my routines to support the screen layout because even though it's a smaller market I don't have any reason not to and it's only a few extra lines of code to use a pitch of 512 instead of 480.
You should mainly blame the old authors before the 38xx came out, because the damage is done now, but people are still doing it I imagine.
2) Whoever decided the flip the iPAQ 38xx LCD - why why why?
3) Compaq, for exposing a Ram buffer and flipping it rather than allowing direct access, as per the GAPI spirit.
Anyone know which way round the 39xx is?
well they did rotate it 180 degrees from 36xx/37xx (which are already rotated), but don't worry, they have got still several possibilites available. They can rotate it 180deg. from normal, they can flip it horizontally or vertically after one of the rotations and - wouldn't count on that - they can make it right this time and keep the screen 240x320x16bpp without a rotation.
But I wouldn't worry about that, knowing them they will choose the worsest solution from all... they will make it interlaced;P
mmm, why were on the 38xx problems, does anyone know if easyce works with the wierd screen problems? as I'm using easyce 2.0 in my current game!
-Brendan
Please ignore last post, I checked the code, there is a 38xx "option" in there for updating the wierd screen
which begs the Q, what about the 39xx ipaqs ?
-Brendan
Britcode, could you clarify on your third point? Am I to understand that there is an built-in involuntary delay of ~15ms imposed by the flip every time I refresh the screen?
Tell me this is not true...
jont:yes it's true, everytime you call gxenddraw or what's the name... that's why most ppl create a special case procedure for 38xx devices that doesn't call gxbegindraw/gxenddraw but just writes directly to screen memory (read as goes around the 15ms flip delay).
Check easyce2.0 sources as it's implemented there.
Thanks for clearing that one up ... I never fully understood what GXEndDraw did but having looked at easyce sources it makes sense now.
And there was me thinking that I was writing to a standard screen format, 13h style ... if pocket pc development is this messy now just imagine how it'll be in a couple of years time - back to something like the old days of 286/386/486/CGA/EGA/Hercules/VGA/8514/Adlib/SB/Roland

Generally speaking, you can use GXIsDisplayDRAMBuffer to determine whether or not it is necessary to call GXEndDraw.
Dan East