PocketMatrix forums

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

PocketHAL 0.6.0 released

The sixth release of PocketHAL, the next generation library for Pocket PC game development has been released.

Get it fresh at: http://pockethal.droneship.com

PocketHAL can currently be seen as an alternative to GAPI and GAPI-based libraries. You though GAPI was the fastest way to do graphics on your Pocket PC? Think again. PocketHAL can often run twice as fast as GAPI and further optimizations are in the work.

What's new in the 0.6 build:

* Special support for MediaQ devices.
* API changes to accomodate future devices / platforms.
Fantastic news Thierry! BTW, what do you mean by 'special support' for MediaQ-based devices?
Pejo Software - Per · 16 Feb 2004, 12:01 UTC
Version 0.6 did not seem to work on my iPAQ 2210. The screen is not updated properly. I think this has to do with you not updating the entire screen when working with MediaQ devices.

Am I doing something wrong?
Version 0.5 worked perfectly and I just replaced the Create and Initialize funtion with the new Create function.
Pejo Software - Per wrote:Version 0.6 did not seem to work on my iPAQ 2210. The screen is not updated properly. I think this has to do with you not updating the entire screen when working with MediaQ devices.


Weird, I use a 2210 for development. Are you using a viewport? Can you post your initialization code?

By any chance, are you caching the backbuffer pixels pointer between frame? If you are, then it would explain your problems. Make sure to call GetPixels() at the start of each frame to access the pixels.
Pejo Software - Per · 16 Feb 2004, 18:27 UTC
Thierry wrote:By any chance, are you caching the backbuffer pixels pointer between frame? If you are, then it would explain your problems. Make sure to call GetPixels() at the start of each frame to access the pixels.

I call GetPixels() every time that I write to the backbuffer. This means that I am calling GetPixels() a number of times during each frame.
Pejo was able to fix the problem by calling GetBackBuffer() each frame. This makes sense and is what I tough GetPixels() would do.

I will double check everything, but calling GetBackBuffer() each frame will most probably be a requirement in the end.
warmi · 17 Feb 2004, 03:09 UTC — KeyList missing in X96 build
Looks like KeyList definition and related functions are only present in ARM/emu build in 0.6.. this sort of messes up my nice framework :-)

I think it was a perfectly workable solution when this struct was there and working for all builds - even if it meant dummy struct for X86.

I could do some preprocessor work and define and populate this stuff myself but it is kind of ugly and frankly the way it was in 0.5 it was much cleaner from the API point of view.

Do you plan to bring it back or should I create my own wrapper to handle both X86 and ARM transparently ?
warmi wrote:Looks like KeyList definition and related functions are only present in ARM/emu build in 0.6.. this sort of messes up my nice framework :-)

...

Do you plan to bring it back or should I create my own wrapper to handle both X86 and ARM transparently ?


MMm yes... I disabled it on non-PPC builds. In retrospect, I don't think it was a good idea. I will add it back.
Pejo Software - Per · 17 Feb 2004, 18:02 UTC
PHAL 0.6 worked on my Smartphone!

I had to use the Pocket PC SDK though. If I used the Smartphone SDK I get a linker error (cannot open file "doclist.lib"). Are you using ATL?
Pejo Software - Per wrote:PHAL 0.6 worked on my Smartphone!


Awesome!

Pejo Software - Per wrote:I had to use the Pocket PC SDK though. If I used the Smartphone SDK I get a linker error (cannot open file "doclist.lib"). Are you using ATL?


That's weird. No I do not use ATL inside PocketHAL. It's a plain Windows CE 3.0 library (as far as I can tell). I've never heard of "doclist.lib" before, any idea what this is for? I guess that since my include path is pointed at a PPC platform, it try to links some PPC specific thing.

PHAL 0.6.1 is almost ready, it would be nice if I could announce it supports Smartphones.
Pejo Software - Per · 17 Feb 2004, 18:14 UTC
I should be able to reproduce this using the Smartphone emulator. I will take a look at this tonight.
I am simply letting you know that PocketHAL 0.6.1 has been released. Here is the list of changes from 0.6.0:

+ GetKeyList() is now available on non-PocketPC devices.
+ GetKeyList() now returns the arrow key codes
* Default orientation is now ORIENTATION_NORMAL (was ORIENTATION_UNKNOWN).
+ Added BeginScene() call and functionality to ensure user's applications
work on all devices. Swap() will now fail if BeginScene() wasn't call
before rendering the scene.
* Got rid of dependancy on <atlbase.h> which was preventing PocketHAL from
linking with the Smartphone SDK.
* MediaQ fixes related to losing focus
* GAPI fixes related to losing focus
+ Added flag to force a full update of the screen on MediaQ devices.
Specify SWAP_FULL_UPDATE when calling Display::Swap()

This version is expected to work as-is on Smartphones. There was indeed an overlooked dependancy on ATL. Could someone let me know how it works now on Smartphone?
Pejo Software - Per · 18 Feb 2004, 22:29 UTC
Yes, now it works with the Smartphone SDK also.
Pejo Software - Per wrote:Yes, now it works with the Smartphone SDK also.


Thanks for your help testing this Pejo. I guess I can now add Smartphones to the list of supported platforms. Awesome!

Any takers to test this on HPC (Jornada 710/720/728)? It should work as-is... I just need a confirmation.
Mr X · 19 Feb 2004, 00:27 UTC — Input?
Is there anything I need to do to get input working? I ported yeti from phal0.4 to 0.61 and now it crashes (in winxp) whenever I hit a key.

specifically, I get an access violation on the DispatchMessage(&msg); line:

Code:
while (msg.message != WM_QUIT)
{
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else
{

if (quit)
break;
phal_flip();
}
}



any ideas?

Alternately, can someone give me a trivial phal sample that just opens a window and sits there until you hit a key.

Ta
Mr X wrote:Is there anything I need to do to get input working? I ported yeti from phal0.4 to 0.61 and now it crashes (in winxp) whenever I hit a key.
(...)

any ideas?


Ah crap! Yes I know what this is. Some debug code that stayed in the final build. Arg! I will fix this in a few hours and release (0.6.2).

Sorry about that.
It is now fixed. Please give 0.6.2 a try.
Thanks, I'll check it out tomorrow.

What are the mediaq changes?
Well that works much better. The keyboard list isn't rotated when in landscape orrientation.

Performance is better, sometimes. Just starting yeti and sitting stationary, frame rate has gone from 31 (ph0.4) to 51.

In the title screen, framerate has gone from 44 to 77.

Rotating quickly, framerate is unchanged from the previous version.

In general running around, frame rate does seem improved.

Thanks
Mr X wrote:Well that works much better. The keyboard list isn't rotated when in landscape orrientation.


I unfortunately removed the feature. Linking the input and the display orientation didn't make much sense. To compensate for this, you have two choices for keys:

1) Rotate the arrow key codes yourself.
2) Use GetKeyList(), it now returns the arrow keys.

For mouse input, you will have to do it yourself. I might add a "DeviceToLogical" function, but it is trivial to write yourself.

Mr X wrote:Performance is better, sometimes. Just starting yeti and sitting stationary, frame rate has gone from 31 (ph0.4) to 51.

In the title screen, framerate has gone from 44 to 77.

Rotating quickly, framerate is unchanged from the previous version.

In general running around, frame rate does seem improved.


That's awesome. What device are you using?
ipaq 2200.

I am now getting frame rates of 25-50 for fullscreen 3d. Without sound or complex ai though

I'll stick an updated demo up in the next couple of days,

Sean
warmi · 20 Feb 2004, 19:16 UTC — Question
Quick question:

If I were to call Display* Create( HWND hwnd, DisplayParameters& params = DisplayParameters() ); with HWND of a top level window <b>without</b> switching to full screen mode first, would flip() work as expected - in other words, does PocketHAL support windowed mode ?

Thanks
PocketHAL doesn't currently support windowed mode, but it will in the next version (0.7.0).
PocketHAL 0.6.3 has been released with a fix and some changes for the VSYNC functionality.

There is a new flag for swapping: SWAP_VSYNC that will synchronize the swap with the VSYNC signal (when possible, meaning on StrongARM and XScale). Tearing will be minimized on other controllers (MediaQ for example).
PocketHAL 0.6.4 has been released, fixing the performance issues in portrait mode on the XDA 2 and the Asus 620.
The PocketHAL documentation has been updated to the PocketHAL 0.6.4 API.

http://pockethal.droneship.com/documentation.html
Hey Thierry,

Any update on PF 0.8.0? Not trying to nag, just eager to try it out.

-John
I guess he will say this weekend :wink:

just kidding thierry :D
take your time
That's it, I am not answering this question anymore =)

And guess what is waiting for me right now at the post office: my new Asus M5! So you probably can figure out what I will do this very weekend.

More info on what is a M5: http://www.asus.com/products/notebook/m ... erview.htm
Pejo Software - Per · 11 Mar 2004, 14:14 UTC
Thierry wrote:So you probably can figure out what I will do this very weekend.

Coding on PF with your new M5? :)
Pejo Software - Per":2btabaki]

That's actually some part of it, yes =) But it definitely will take some time to configure and play around with.
Congrats! It's always fun with a new laptop.. After having used a powerbook for work the past two years I switched back last week to a <a href="http://h10010.www1.hp.com/wwpc/us/en/sm/WF05a/321957-64295-89315-321838-f1-364182.html">HP nc8000</a> for my daily work. It's far from slim (the Asus looked really nice), but I like the kind of robust feeling I get from using it.. :) Sure the Mac gui is nice, but I really like Windows better... And I can finally get back to some "lunch-programming"..
"The only difference between men and boys is the price of their toys "

neat toy you got thierry, have fun with it 8)
It is indeed a nice toy =) Now I need to find a use for it... LOL.

OK... PocketHAL 0.6.5 has been released and I consider this version to be quite stable. It fixes the following two things:

1) Toshiba E740/E750 flickering problem in portrait mode.
2) WM_PAINT / MediaQ driver interaction problem.

Thanks to J.Edwards and fast_rx for all their help troubleshooting these two issues.

Now I should be able to focus my attention back to PocketFrog.
Oh good, then I'll be looking forward to THIS weekend then ;)
fzammetti wrote:Oh good, then I'll be looking forward to THIS weekend then ;)


No pressure now, Thierry ;). Seriously, thanks for doing such a great job with PF. I hope to be able to release my first PF game within the next few months and I'll be sure to let you know when its out.