This site is no longer active and is available for archival purposes only. Registration and login is disabled.

PocketHAL on Motorola Q


PocketHAL on Motorola Q

Postby Ludimate » Jul 5, 2006 @ 12:54am

Hi,

I've found (through a customer) that PocketHAL is exhibiting the problem mentioned in this article about GAPI on the new Motorola Q (which is a Windows Mobile 5.0 Smartphone) :
http://www.modaco.com/index.php?act=ST& ... 41988&st=0

Although the screen is 320x240, PocketHAL reports it as 176x220 (apparently as provided by GAPI) and the 176x220 displays in the left side of the screen with everything else black. On the Landscape 320x240 emulator, everything displays fine in glorious landscape full screen.

Naturally this mess is not PocketHAL's fault, but would there be a way of PocketHAL bypassing GAPI if it detects such weirdness? Even a BitBlt could be better than the left-side area+black which is now displayed. The other alternative would be using DirectX, which allows direct screen access.

- Thierry, any chance on a workaround for this problem?

Thanks and Best Regards,

Jorge Diogo
http://Ludimate.com
Ludimate
pm Member
 
Posts: 21
Joined: Jun 29, 2006 @ 8:40pm


Postby Kzinti » Jul 5, 2006 @ 6:16am

I suppose it fails because the Motorola Q returns "33" as the pixel format instead of "1".

Here is an updated version that should work. Just in case, I have enabled the logging mechanism. This will dump a file named "Log_PHAL.txt" in the root of the file system.

Can you provide your tester/user with this version and retrieve the log file?
Last edited by Kzinti on Jul 6, 2006 @ 4:24pm, edited 1 time in total.
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby Ludimate » Jul 5, 2006 @ 1:16pm

The user was very kind and returned the results very quickly. He says the display now shows full screen but it is rotated 90 degrees right:

= = = = = = = = = = = = = = = = = = = = = = = = = =
PocketHAL (Version 0.7.7)
Display::Create( hwnd = 7C08FFA0, W:0, H:0, O:0, S:2 )
Initializing display...
VideoDetect::DetectDrivers()
GDIDriver: Detect()
GDIDriver: Found W:320, H:240, D:16
GAPI: Detect()
GAPI: Loading GX.DLL
GAPI: Calling GXOpenDisplay( 7C08FFA0, GX_FULLSCREEN )
GAPI: Calling GXGetDisplayProperties()
GAPI: Detecting orientation
GAPI: Native orientation is 0
GAPI: Calling GXIsDisplayDRAMBuffer() @ 029C1538
GAPI: GXIsDisplayDRAMBuffer() returned TRUE
GAPI: Detecting PocketPC model
OEM String: "MotoQ"
GAPI: framebuffer address unknown, calculating offset
GAPI: Offset is 0
GAPI: Calling GXBeginDraw() to retrieve framebuffer
GAPI: framebuffer at 4a700000
GAPI: Calling GXEndDraw()
GAPI: Final framebuffer address = 4a700000
GAPI: Calling GXCloseDisplay()
DriverVGA: Detect()
DriverVGA: Raw info: W:240, H:320, X:2, Y:480, FB:4A500000
DriverVGA: Native orientation is 0
DriverVGA: Found W:240, H:320, D:16
DriverVGA: Offset is 0
DriverVGA: Final framebuffer address = 4a500000
CreateDriver( 00000009 )
Initializing video driver...
DriverVGA: Initialize()
Driver initialized!
Success, returning display params to caller (W:240, H:320, O:0, S:2)
= = = = = = = = = = = = = = = = = = = = = = = = = =


Not sure if this helps, I found from another test that on the Motorola Q, ChangeDisplaySettingsEx returns DMDO_90 in dmDisplayOrientation as its native orientation.

Also, the QVGA Landscape 320x240 emulator from Microsoft lists this:

= = = = = = = = = = = = = = = = = = = = = = = = = =
PocketHAL (Version 0.7.7)
Display::Create( hwnd = 7C07FFC0, W:0, H:0, O:0, S:2 )
Initializing display...
VideoDetect::DetectDrivers()
GDIDriver: Detect()
GDIDriver: Found W:320, H:240, D:32
CreateDriver( 00000001 )
Initializing video driver...
GDIDriver: Initialize()
Driver initialized!
Success, returning display params to caller (W:320, H:240, O:0, S:2)
= = = = = = = = = = = = = = = = = = = = = = = = = =

Thanks,

Jorge Diogo
Ludimate
pm Member
 
Posts: 21
Joined: Jun 29, 2006 @ 8:40pm


Postby Kzinti » Jul 5, 2006 @ 5:24pm

So as PocketTV mentionned, the screen is rotated 90 degrees (and not reported as such). I unfortunately have no way of detecting if this is 90 degrees clockwise or counterclockwise. So here is a new version that might work (or might display the image upside down).

Please let me know if this version works properly or not.
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby Ludimate » Jul 6, 2006 @ 12:31pm

Ludimate
pm Member
 
Posts: 21
Joined: Jun 29, 2006 @ 8:40pm


Postby Kzinti » Jul 6, 2006 @ 4:24pm

Attachments
PocketHAL_Moto2.zip
POcketHAL 0.7.7 with fix for Motorola Q.
(62.75 KiB) Downloaded 1076 times
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby Bapdude » Sep 17, 2006 @ 9:46pm

I'm using the latest PocketHal_7_7_e with the Motorola-Q fix. However, the display is all messed up. Instead of showing the entire display (320x240), I only see a small section in the very middle.

Image

Is there something I need to add/remove from my code to get PocketHal to display correctly on the Motorola Q?

Thanks...
User avatar
Bapdude
pm Member
 
Posts: 140
Joined: May 14, 2004 @ 5:06am


Postby Kzinti » Sep 18, 2006 @ 8:17am

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby Bapdude » Sep 18, 2006 @ 10:10am

User avatar
Bapdude
pm Member
 
Posts: 140
Joined: May 14, 2004 @ 5:06am


Postby Kzinti » Sep 19, 2006 @ 4:41am

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby Bapdude » Sep 20, 2006 @ 4:45am

User avatar
Bapdude
pm Member
 
Posts: 140
Joined: May 14, 2004 @ 5:06am


Postby fast_rx » Sep 20, 2006 @ 7:18pm

User avatar
fast_rx
pm Member
 
Posts: 660
Joined: Jun 10, 2003 @ 4:24pm


Postby Bapdude » Sep 20, 2006 @ 10:37pm

Oops...you may be right. :?

If that's the case, I don't see any other hard-coded screen values in the framework (game.cpp) related to blitting. There are some hard-coded values in Game::DeviceToLogical but this is for stylus translations for different screen orientations.

Any idea what Kzinti is talking about? I'm clueless at this point, so any suggestions would be greatly appreciated!

Thanks...
:D
User avatar
Bapdude
pm Member
 
Posts: 140
Joined: May 14, 2004 @ 5:06am


Postby Presto » Sep 21, 2006 @ 2:43pm

I've recently been through the PF screen size code to get my games working on square screen devices. The FROG_PC section is definitely only for the PC build. It uses GetSystemMetrics for the PPC sizes, which is a few lines above what you were looking at (should be line 86). It could be that the GetSystemMetrics is reporting the screen size as 176x220.

For my own code, I added a GetOEMString function, so I can adjust things based on certain models. You might want to override the GetSystemMetrics() calls if the model is "MotoQ".

As a quick test, you should be able to comment out the GetSystemMetrics line and add one that reports the screen size as 320x240.

Good luck. :)

-John
User avatar
Presto
pm Insider
 
Posts: 763
Joined: Jan 20, 2003 @ 5:51am
Location: Kalesian Archipelago


Postby Kzinti » Sep 21, 2006 @ 4:33pm

Oh yes... That's probably the problem. Did you add the "HI RES AWARE" flag to your resources? (ie: "CEUX")? If you don't, PocketHAL might operate in 176x220 mode instead of 320x240.
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Next

Return to PocketFrog & PocketHAL


Sort


Forum Description

SDKs for fast and robust device-independent access to Pocket PC display hardware.

Moderators:

sponge, Kzinti

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron