PocketMatrix forums

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

PocketHAL 1.0.6 Released

PocketHAL 1.0.6 is available.

- Fixed orientation issue with all 320x240 Windows Movile devices
- Fixed display orientation issue with WM2003SE and WM2005 emulators
- Fixed rendering issue with non-hires aware apps on 480x480 VGA devices
- Fixed orientation issue with Motorola Q9C
- Fixed orientation issue with imate 810f
- Disabled optimizations on LG CT810 (display was freezing)


You can download PocketHAL here: http://www.droneship.com/

Donators can obtain the registered copy (without the logo/banner) by e-mailing us.
pacomac · 26 May 2009, 14:12 UTC — Strange behaviour using PocketHAL 1.06
Ok, there could be a rational explanation for this problem, but its driving me nuts.

I have a couple of projects compiled for Windows Mobile 2003 SE (for backward compatibility) using PocketHAL 1.03. I've been testing these programs using the Windows Mobile 6 Professional QVGA Emulator specifically to test compatibility with 320x320 pixel devices as I don't have any to hand.

Using PocketHAL 1.03, I get back a screen buffer of 240x320 pixels after calling PHAL::Display::Create() (which uses the left 2/3 of the screen), but on version 1.06 I'm getting a 240x240 display which is being stretched to fill the entire display.

My projects do not have the HIRES aware flags set, and I'm passing values of dp.m_width = 0 and dp.m_height = 0 to PHAL::Display::Create(hWindow, dp).

Has anyone any ideas what is going on here? :roll:

NOTE: I've had a couple of people testing my project (compiled with PocketHAL 1.03 on the Samsung EPix i907 and it is returning 240x320 pixels. What should PocketHAL's default behaviour be on a 320x320 device?
What compiler / SDK are you using? More specifically, what subsystem version is used on the linker line?

If you link for Windows Mobile 6.0, then you don't need the hires flag... It will be as if it was always there.

On Windows Mobile 2003 SE, the flag needed to be added explicitly.

To answer your last question, I would expect a 320x320 screen if the hires flag is there or if you are linking for Windows Mobile 6 and above.
Kzinti wrote:What compiler / SDK are you using? More specifically, what subsystem version is used on the linker line?

If you link for Windows Mobile 6.0, then you don't need the hires flag... It will be as if it was always there.

On Windows Mobile 2003 SE, the flag needed to be added explicitly.

To answer your last question, I would expect a 320x320 screen if the hires flag is there or if you are linking for Windows Mobile 6 and above.


I am using Visual Studio 2008 but compiling for Pocket PC 2003 (ARMV4) in order for the EXE to be compatible across a broader range of devices from WM2003 SE to WM6.1.

I don't have the hires flag set, because in most cases I want to target 240x320 rather than 480x640 (too slow) devices.

Since I don't have a 320x320 pixel device, I've been cradling the 'WM6 Professional Square QVGA Emulator' and installing my software onto the cradled emulator.

The result is that with PocketHAL 1.03 I am getting a 240x320 pixel backbuffer, whereas with 1.06 I am getting a 240x240 pixel backbuffer which is being stretched to fit the 320x320 pixels.

So basically I'm asking why there is a difference between PocketHAL 1.03 and 1.06 when my projects don't have the hires aware flag and are not compiled with the WM6 SDK?

Update: Linking with the Windows Mobile 6 Professional SDK (ARMV4I) using PocketHAL 1.03 or 1.06 results in the same 240x240 pixel backbuffer being stretched to full screen.
I will have to investigate this with the debugger.

PocketHAL is supposed to use the same resolution that is reported by the OS (ie: used for stylus input). If that isn't the case, then it doesn't work as expected.

There was a bug with the "square" emulators that got fixed recently in PocketHAL, so it might have something to do with it (ie: it was buggy before and now works properly). Again, I will need to trace this in the debugger to make sure that's the case.
Kzinti wrote:I will have to investigate this with the debugger.

PocketHAL is supposed to use the same resolution that is reported by the OS (ie: used for stylus input). If that isn't the case, then it doesn't work as expected.

There was a bug with the "square" emulators that got fixed recently in PocketHAL, so it might have something to do with it (ie: it was buggy before and now works properly). Again, I will need to trace this in the debugger to make sure that's the case.


Great, if it's working as expected I'll have to live with it, but to me neither versions of PocketHAL seem to be giving expected results. I would have assumed a 320x320 pixel backbuffer, rather than 240x240 pixels.

Up until now I've lived with the fact my application works on 240x320 pixel devices, even if it doesn't fill the entire width of the screen. However, moving to PocketHAL 1.06 would mean my app needs re-designing to only use 240x240 pixels, and then have to suffer the horrible scaling as it is stretched to full screen.

Anyway, please let me know what you find.

Update: I've noticed that debugging GAPI games on the QVGA emulator exhibits the same behaviour as PocketHAL 1.03, in that they seem to open a 240x320 pixel backbuffer, I'm not sure if this is significant.
There is also another bug I've found in PH 1.0.6.

If I link with the PocketPC 2003 SDK or the Windows Mobile 6 Professional SDK and run on any square screen device, the touch screen co-ordinates are rotated by 90 degrees. (i.e. If I tap the top left of the screen, the result is something gets selected at the top right).

Version 1.0.5 was fine, other than the bug I reported previously. I'm not sure why nobody else is reporting this problem!!
We've got a problem on Samsung i780 and the same problem is even on Emulators Pocket PC 5.0 240x240, 480x480 and Windows Mobile 6 Professional 240x240, 320x320, 480x480!!!

In PocketHAL 1.0.6 on square device the screen is rotated to the side (wrong orientation), while clicks are not rotated (they are in correct orientation)! So the clicks do not correspond to picture on the screen...
pacomac wrote:Great, if it's working as expected I'll have to live with it, but to me neither versions of PocketHAL seem to be giving expected results. I would have assumed a 320x320 pixel backbuffer, rather than 240x240 pixels.


I have investigated this and it behaves as expected. GDI reports a 240x240 display without the "hi res flag", so PocketHAL uses 240x240.

In older versions (1.0.3) it would report 240x320. This was a bug.
hrissan wrote:We've got a problem on Samsung i780 and the same problem is even on Emulators Pocket PC 5.0 240x240, 480x480 and Windows Mobile 6 Professional 240x240, 320x320, 480x480!!!

In PocketHAL 1.0.6 on square device the screen is rotated to the side (wrong orientation), while clicks are not rotated (they are in correct orientation)! So the clicks do not correspond to picture on the screen...


I just fixed this and will release a new version by the end of the week. When I tested using the emulator, I was getting the correct orientation but input was rotated 90 degrees. This only affects square displays.
Input orientation issue with square displays fixed in 1.0.7.