GLBasic forum

Main forum => Bug Reports => Topic started by: Millerszone on 2011-Aug-04

Title: HP TouchPad - screen is not centered and not full screen
Post by: Millerszone on 2011-Aug-04
Continued from here:
http://www.glbasic.com/forum/index.php?topic=6683.msg53937#msg53937 (http://www.glbasic.com/forum/index.php?topic=6683.msg53937#msg53937)

The screen capture below is what the TouchPad looks like when I try to compile for WebOS at screen
size 320x480 and 768x1024, of coarse all of the buttons don't work since screen is not centered.
Sound did play.

So, next I downloaded "Hit the Deck Baseball" for the pre(320x480) from the App Catalog, everything worked o.k
but the the bat swing and ball moment was not as smooth as on the old palm pre.
Sound was o.k. Network also worked for the high scores.

I also tried adding "uiRevision": 2 to the appinfo.json file, but no difference to the graphics.
(The uiRevision key tells WebOS that your app is capable of running full-screen on a TouchPad,
avoiding the annoying phone emulator.)

So if I download an app from the App Store Catalog, the graphics are scaled and centered,
but if re-compile with GLBasic and install the ipk the screen is shown in the bottom left corner when screen
size is set to 320x480 or 768x1024.

"Hit the Deck Baseball", Dr Shivers and B'lox downloaded from the HP App Catalog fills the screen nicely.

So far I'm really impressed with the TouchPad.

Post ipk for me to test or email.

Here is a good page to read: webOS 2.0(mojo) to webOS 3.0(enyo)
http://beckism.com/2011/07/webos-mojo-to-enyo/ (http://beckism.com/2011/07/webos-mojo-to-enyo/)

(http://www.americantc.com/Images/hitthedeckTouchpad.png)
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Millerszone on 2011-Aug-15
I posted the problem in the webOS development forum, here is one of the replies:
"Our OpenGL ES drivers on TouchPad don't handle 768x1024 screen size. The native screen size there is 1024x768,
and you need to rotate manually in your GL code to work in portrait mode."

Here is the webOS thread:
https://developer.palm.com/distribution/viewtopic.php?f=39&t=17372 (https://developer.palm.com/distribution/viewtopic.php?f=39&t=17372)

So I did what he said, here is the results:
(http://www.americantc.com/Images/logo_touchpadNew.png)
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Aug-15
It's odd that Pre .PDK games (like those created with GLB) scale up to fit the TP screen, but games specifically tailored to fit the actual screensize don't work properly. I'm sure it's something that Gernot will be able to sort out easily when he gets back.

We're all still waiting for the last update, which now includes Pixi support. After I provided Gernot with a Pixi he was able to sort out some GLB/Pixi problems pretty quickly. I don't see that the TouchPad will be much of a problem. Perhaps you just need to provide him with a shiny new TouchPad to get the problem solved sooner, rather than later? ;) :P
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: MrTAToad on 2011-Aug-15
Dont forget he's on holiday at the moment...
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Aug-15
QuoteI'm sure it's something that Gernot will be able to sort out easily when he gets back.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: MrTAToad on 2011-Aug-15
Ah - didn't see that :)
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Kitty Hello on 2011-Aug-16
oh dear. Please post the output of the console debug thing. And also the values for GETSCREENSIZE/GETDESKTOPSIZE, please. Darn, I need a device.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Millerszone on 2011-Aug-16
Quote from: Kitty Hello on 2011-Aug-16
oh dear. Please post the output of the console debug thing. And also the values for GETSCREENSIZE/GETDESKTOPSIZE, please. Darn, I need a device.
GETDESKTOP: 768x1024
GETSCREENSIZE: 1024x768

I can't get into the console.
When I run deviceshell.bat I get "Sever unexpectedly closed network connection". So then I run pdk-device-install.bat and get:
Error: No device detected.
Connect device and make sure Developer Mode is enabled.

The device is connected and in Developers mode.
I can connect with the Palm Pre.

But with the TouchPad I can't install an ipk from GLBasic, I have to use this app "WebOSQuickInstall.jar" to install.

I'm going to install webOS 3.0 and see if that'll work.


Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Millerszone on 2011-Aug-16
O.K. i got in the console with webOS SDK 3.0.2.
Debug info:
Code (glbasic) Select

root@HPTouchPad:/media/cryptofs/apps/usr/palm/applications/com.smashedfly.logo# ./glbasic-webos-exe
debug works at all
preplic
lic done
timer
rbow
rbow init
SDL_init video
SDL_GetVideoInfo = 1024x768 @ 32 bpp
Setting video mode: 0x0x0 fl=2
SDL_SetVideoMode seems to be 1
get accurate timer - 1st call
flip - 1st call
BGRA ext supported
Texture size limit: 4096
init fbo
2D VP
OGRB init [OK]
Cptn
Network
Input
Window mode
Create DXin
sdl_grab
reptr
getexe
cd
set cdir to: /media/cryptofs/apps/usr/palm/applications/com.smashedfly.logo
exepath=curdir= /media/cryptofs/apps/usr/palm/applications/com.smashedfly.logo
Init Finalized
Shut down GLB
glb is shut down
PDL_Quit
</PDL_Quit>
exit
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Kitty Hello on 2011-Aug-17
In your platform options, did you set the resolution to 768x1024?
Please swap it to 1024x768. If the screen is rotated incorrectly then, please use SETORIENTATION to fix it.
I think the pad is using landscape as a native mode thus I choose the wrong orientation for it.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Millerszone on 2011-Aug-17
I have the project resolution set at 1024x768. I also tried 768x1024.
I then tried SETORIENTATION 0 thru 3 but always had the black space on the bottom(Home Button)

Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Kitty Hello on 2011-Aug-17
I'll investigate further. This week evenings are so full, I won't make it, though. Not even on the weekend. :(
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Aug-31
I can confirm that there are indeed problems with orientation and display on TouchPad. I've got one now too.

(Just a gentle reminder to Gernot for when he gets his TouchPad).
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Kitty Hello on 2011-Aug-31
I threatened with a lawyer but no resonse since. I don't think I get one :(
Where did you get yours?
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Aug-31
I got mine through eBay. Staples failed to provide my order (and ignored two emails to them about it before finally responding that it had been cancelled).

Mine was double the price of the firesale, but still half the original price. There may well be more stocks in a week or so, but if you want to guarantee a TP, it looks like silly money is the order of the day on eBay. Even the dev portal isn't guaranteeing devices for devs. :(
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Kitty Hello on 2011-Aug-31
guess I'll have to buy an expensive one then, too.
Thing is - I ordered THREEEEE and the guy shipped one to another one - I can see that from the votes - and he does NOT DELIVER. I'm so sure he has them somewhere and wants to sell for 2x price with a different eBay account.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Aug-31
Quote from: Kitty Hello on 2011-Aug-31
I'm so sure he has them somewhere and wants to sell for 2x price with a different eBay account.
It wouldn't surprise me in the slightest. He sold too low then realized later that by cancelling your order he could make more money. What a git.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Kitty Hello on 2011-Aug-31
Great ebay: EUR 299 is the cheapest. OK for 32GB,  279,- for 16GB. WTF!!!
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Aug-31
You might be interested in this - http://www.pcadvisor.co.uk/news/tablets/3300260/hp-says-more-touchpads-are-coming/?cmpid=HTML-DN310811&olo=daily%20news

Hopefully you'll have better luck next time :)
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Millerszone on 2011-Aug-31
Last week I signed up to receive an email notification when HP has more TouchPad's in stock.
If I get lucky and get one, I sell to Gernot.

This is where I signed up for the email notification. Currently not taking anymore.
http://www.hp.com/united-states/webos/us/en/tablet/touchpad-availability.html

HP should have gave the firesale prices to webOS developers first.

Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Crivens on 2011-Sep-01
I triple confirm it. My game uses 3D in portrait mode and it runs upside down. Plus it is positioned incorrectly on the screen like the others mentioned. I think as well that the screen ratio is slightly out too as it doesn't look quite right for the resolution. On top of this it also doesn't respond to the correct location when touching the screen (it's a fair bit off it seems). It could be that the touchscreen is correct and drawing it is incorrect.

Oh, and also the accelerometer doesn't seem to work correctly at all. What is perfect on the Pre (and iOS) seems to be widely out in my game.

Cheers
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Kitty Hello on 2011-Sep-02
Mine is shipping now. I expect it next week, monday. (USA-Germany UPS Express)
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Sep-02
:)
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Crivens on 2011-Sep-02
It's a nice little machine, especially for the (lower) price. Look into it and install preware. Much better now. I've installed a few things to get it running faster and smoother, and right now is clocking stable at 1.7Ghz (a lot of people have seen 1.9Ghz running ok but I've heard of some problems at the minute. Best to wait until ironed out). Nice. Incase anyone is wondering I first used F15C and this only clocked one core and didn't work correctly (plus put text when booting onto the screen). Now am using Warthog kernel and seems much better. Add a load of other patches and plugins into it and it running brilliantly. Lovely device. Downside is I've done zero GLB today :(

Can't wait for Gernot to get his and then fix up the problems we have been having.

Cheers
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Sep-02
I'm not O/C'ing my machine - that way I can see the REAL speed of my apps and what the general populace should be seeing too.

I may well patch my machine at some point, but I've not bothered for my Pixi, Pre Plus or Pre2 and haven't really felt the need to so far.

Also, I know it's practically impossible, but I don't want to brick any of my machines - I really can't afford to replace them, even if i could get hold of them!
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Crivens on 2011-Sep-02
The utility you use has profiles so you can lower it back again instantly. Is pretty well put together

Cheers
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Kitty Hello on 2011-Sep-13
I forgot to mention, this is fixed now.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Sep-13
Quote from: Kitty Hello on 2011-Sep-13
I forgot to mention, this is fixed now.
Yay! =D

Just had a play and it works fine, however the screen is upside down (HOME key at bottom in portrait mode). Not a big deal though, as we can rotate this.

It works brilliantly though :)
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Crivens on 2011-Sep-13
What's fixed now? The screen problems? Whoop! Does the accelerometer also work ok? I seemed quite wrong when I tested it but obviously could just be to do with the screen problems.

Do you have to compile specifically for TP or just use WebOS and it will work along with Pre machines? Also does compiling for the Pixi work on it like it does on the Pre (ie. non-optimised)?

Cheers
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Sep-13
I first ran a regular PRE app on it and it ran in the top corner, but you could see the whole image and the touchscreen was accurate and responsive.

I scaled it up using POLVECTOR to TouchPad size and it filled the screen correctly. :)

The only problem is that it is all upside down (if you have it in portrait mode with HOME key at bottom). Easily sorted though.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Millerszone on 2011-Sep-13
I still have to do more testing with HTD Baseball on the Touchpad, but grabsprite doesn't work correctly. Game is in portrait mode and like Ian said, it's upside down from the home button, no big deal.

Also having lag, FPS seems to be only 30 fps. With this game anything less than 60fps the ball won't be smooth. Game runs at 60 fps on an old pre with 1.4.5.

I noticed flash video is really sluggish on the Touchpad.

I still have until the end of the month to return my loaner touchpad. Might be returning to HP.


Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Sep-13
The TP is surprisingly slow, compared to the Pre, isn't it?
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Crivens on 2011-Sep-13
Mine also runs upside down (unsurprising after everyone else mentioned it), but also the accelerometer isn't quite correct. Or at least I'm using the same code as I used on the iDevices and Pre2 and it doesn't run the same. While using the GETJOYX on my game on a Pre2/iDevice works perfectly for what it is intended it seems to lean massively to one side on the TP. Infact even if perfectly flat it still thinks it is turned some. I'd look into it more but I've got to prepare for a business trip to Dubai (damn timing...) for a week and won't have the time to check it all out.

Everything else seems to be working as good as the Pre2 for me though, including a bit of sprite2mem action for resizing images, music and sound, plus 3D work.

I didn't see it lag at all, seemed very smooth, although I'm not doing much in my 3D world. Plus I was O/C'ed to 1.7Ghz on both cores. Reducing it to 1.2Ghz seemed to make it not *quite* as smooth but it may have been just me as it looked pretty similar. Again though I'm not doing that much in my 3D scene. Maybe GLB isn't fully optimised for the TP or the TP needs a couple of updates to get out the wrinkles. I did patch it to remove a couple of logging systems which is mainly for hardware error logging, which apparently slows the device down a bit plus is probably useless now. It's not as if HP are going to fix it or give you a new one... Oh and I got rid of the ripple. Again, another hit on the CPU, and is pretty useless.

Cheers
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Sep-13
I'm getting 60FPS out of my app (on 1.2Ghz), but I have to be a bit more careful and had to change my plans a bit - scaling reduced the FPS more than I was expecting, so will have to alter code (to make up for positioning of images and touchscreen) and make the graphics full size. No worries, as I had considered doing this anyway. It'll just take a lot longer to do.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Crivens on 2011-Sep-13
It's what I do with mine. I resize all images and save them at the correct size in the beginning. Seems ok to me on the TP.

Cheers
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Sep-13
If I have to make the game HD anyway, I might as well make the images HD too, so I'm re-drawing them, not just resizing them.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Millerszone on 2011-Sep-13
I'm getting 60 fps with pong game. I don't know why HTD is lagging. All other devices it runs at 60+.
I'm using all images from iPad and are hires. Field image is 1.4 mb png alone.
Anyway, won't be converting HTD to touchpad since I 'm working on new projects.


Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Crivens on 2011-Sep-13
Mine are retina anyway so it's pretty close. On the other hand it's only icons that are resized as my game is 3D so it works fine.

Cheers
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Millerszone on 2011-Sep-14
FPS is back up to 60. I forgot to remove delta timing from the animations, didn't need for webOS.

After I do a GRABSPRITE my images are displayed incorrectly when I display the grabbed image.

Here is the grabsprite image 768x1024 redisplayed:
(http://www.americantc.com/Images/HTDGrabsprite.png)
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Kitty Hello on 2011-Sep-14
oh bad. Please use createscreen instead of grabscreen until I might be able to fix it.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Millerszone on 2011-Sep-14
Quote from: Kitty Hello on 2011-Sep-14
oh bad. Please use createscreen instead of grabscreen until I might be able to fix it.

O.k. I used CREATESCREEN for the full screen field, and worked perfect, but I also use GRABSPRITE 
to copy parts of the field. I guess that's not possible with CREATESCREEN since there is no postion x,y.

Any other way that I can capture parts of the screen or will I have to just make separate sprites or wait for a fix?


Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Slydog on 2011-Sep-14
If you wanted a specific portion from the field, first render the field to a sprite using CREATESCREEN, like you did.
Then, use CREATESCREEN again on a different sprite id, and use POLYVECTORs to draw the portion of the field you want.
Like:

Code (glbasic) Select
//... field previously rendered to sprite 'sp_field'
CREATESCREEN 0, sp_part, part_width, part_height
USESCREEN 0
STARTPOLY sp_field, 2
POLYNEWSTRIP
POLYVECTOR 0, 0, part_x1, part_y1, colour // TL
POLYVECTOR 0, part_height, part_x1, part_y2, colour // BL
POLYVECTOR part_width, 0, part_x2, part_y1, colour // TR
POLYVECTOR part_width, part_height, part_x2, part_y2, colour // BR
ENDPOLY


[Edit] If you don't need the parts to be their own sprites and only need to plot them to the screen, then skip the CREATESCREEN part and just use the POLYVECTOR parts, with the proper x,y values (the code above plots it to 0,0)
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Kitty Hello on 2011-Sep-15
Just use drawsprite if you dont want to scale, rotate, teint. But, yeah thats the idea.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Millerszone on 2011-Sep-15
Thanks for the above code. I'll try it out.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: ampos on 2011-Sep-16
I have got 3 emails about my app not working fine on TP (the back button from the menu is a bit... unresponsibe). What surprised me is that some said the screen display was up/down.

Can someone download Glowing Sky Free and test on his TP? (search for "diniplay", it is easier)

Thank you.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Sep-16
Confirmed, the screen is upside down (I posted about this recently).

As for the back button on the menu - I can't even bring up the menu...

Everything else seems to work nicely though.
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: ampos on 2011-Sep-16
Don't you see the MENU button on the bottom right of the screen, or in this case, the top left?

Just try pressing the corners to bring the menu...
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Ian Price on 2011-Sep-16
QuoteDon't you see the MENU button on the bottom right of the screen, or in this case, the top left?
Um... No. However, if you run your finger along the bottom (actually the top) of the screen the menu does appear, but there's no obvious button. However once you are in options, you can't exit (as per feedback).
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: Kitty Hello on 2011-Sep-19
flip screen with SETORIENTATION(mod(GetORientation()+2, 4) )
Title: Re: HP TouchPad - screen is not centered and not full screen
Post by: ampos on 2011-Sep-19
I used

Code (glbasic) Select

?IFDEF WEBOS
   if xresolution=768
      setorientation 2
   endif
?ENDIF


Fixed  :nana: