Author Topic: Zaurus Faster In Portrait Mode Than Landscape?  (Read 4822 times)

flexibyte

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://www.flexibyte.com
Zaurus Faster In Portrait Mode Than Landscape?
« on: May 17, 2006, 09:15:23 pm »
Hi, I just received my C3200 a couple of days ago and have been trying various ROMs. I found pdaxrom to be ideal for me and the new beta4 is fantastic.

I compiled and install the stratagus game engine and upon running it I was disappointed. It is slow and unplayable, sound is very jerky and so is movement. I can also see really bad tear lines.

I then tried running it in portrait mode (480x640) and it ran fantastically! Sound was now perfect, and it seemed to be running the same as on my desktop PC.... but I cant play it sideways .

Could I have done something wrong when compiling stratagus? Do I need to enable some sort of hardware acceleration to allow landscape to match portrait performance?

This is incredibly frustrating me for. This will make lots of games unplayable when they could potentially run great. What about zpsx? How will that combat this issue?

Thanks,
Phill
New UK/Europe Zaurus Seller - Website coming soon.

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Zaurus Faster In Portrait Mode Than Landscape?
« Reply #1 on: May 17, 2006, 10:54:19 pm »
Quote
Hi, I just received my C3200 a couple of days ago and have been trying various ROMs. I found pdaxrom to be ideal for me and the new beta4 is fantastic.

I compiled and install the stratagus game engine and upon running it I was disappointed. It is slow and unplayable, sound is very jerky and so is movement. I can also see really bad tear lines.

I then tried running it in portrait mode (480x640) and it ran fantastically! Sound was now perfect, and it seemed to be running the same as on my desktop PC.... but I cant play it sideways .

Could I have done something wrong when compiling stratagus? Do I need to enable some sort of hardware acceleration to allow landscape to match portrait performance?

This is incredibly frustrating me for. This will make lots of games unplayable when they could potentially run great. What about zpsx? How will that combat this issue?

Thanks,
Phill
[div align=\"right\"][a href=\"index.php?act=findpost&pid=127509\"][{POST_SNAPBACK}][/a][/div]

are you sure its running in 480x640 and not 240x320?
most games run fine in 320x240 mode, but 640x480 requires some overclocking for high frame rate games.
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

flexibyte

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://www.flexibyte.com
Zaurus Faster In Portrait Mode Than Landscape?
« Reply #2 on: May 18, 2006, 09:22:33 am »
hmm... it could be that it was running at: 480x480 because the 2 sides were not visisble (the game was running 640x480 windowed mode while the desktop was running at 480x640)... but I have heard that the screen has to be rotated in software from the native 480x640 res, so it makes sense that it runs slow.

Also, i can only get mplayer working smoothly in portrait.. and its unwatchable in normal clamshell mode. Infact the different with mplayer is huge when i rotate the screen.

I will do a test with my SDL games and report back soon. Ill try running it in true 480x640 fullscreen and then in 640x480.
New UK/Europe Zaurus Seller - Website coming soon.

flexibyte

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://www.flexibyte.com
Zaurus Faster In Portrait Mode Than Landscape?
« Reply #3 on: May 18, 2006, 07:18:56 pm »
Ok, I just compiled one of my home made SDL demos in 320x240 resolution. Running it fullscreen seemed to keep the desktop at 640x480 and just run my demo in the middle of a black screen. Doing xrandr -s 0 before running it made it seg fault, so for this test I just left it at 640x480 (if anyone knows why it seg faults and how to run it in true 320x240 res, please let me know).

Running in landscape - the demo ran fairly jerky - and it shouldnt because its very simple.
Running in portait - the demo ran perfectly with a doubtless speed increase.

Once again, I ask why this is? I could write my games and demos sideways, but that would make porting them hard and kind of silly.

Thanks,
Phill
New UK/Europe Zaurus Seller - Website coming soon.

adf

  • Hero Member
  • *****
  • Posts: 2807
    • View Profile
    • http://
Zaurus Faster In Portrait Mode Than Landscape?
« Reply #4 on: May 18, 2006, 07:34:51 pm »
Quote
Ok, I just compiled one of my home made SDL demos in 320x240 resolution. Running it fullscreen seemed to keep the desktop at 640x480 and just run my demo in the middle of a black screen. Doing xrandr -s 0 before running it made it seg fault, so for this test I just left it at 640x480 (if anyone knows why it seg faults and how to run it in true 320x240 res, please let me know).

Running in landscape - the demo ran fairly jerky - and it shouldnt because its very simple.
Running in portait - the demo ran perfectly with a doubtless speed increase.

Once again, I ask why this is? I could write my games and demos sideways, but that would make porting them hard and kind of silly.

Thanks,
Phill
[div align=\"right\"][a href=\"index.php?act=findpost&pid=127672\"][{POST_SNAPBACK}][/a][/div]
That's odd.  I seem to remember pocketworkstation data from the PW page saying things were faster in landscape
**3100 Zubuntu Jaunty,(working on Cacko dualboot), 16G A-Data internal CF, 4G SD, Ambicom WL-1100C Cf, linksys usb ethernet,  BelkinF8T020 BT card, Belkin F8U1500-E Ir kbd, mini targus usb mouse, rechargeble AC/DC powered USB hub, psp cables and battery extenders.

**6000l  Tetsuized Sharprom, installed on internal flash only 1G sd, 2G cf

flexibyte

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://www.flexibyte.com
Zaurus Faster In Portrait Mode Than Landscape?
« Reply #5 on: May 18, 2006, 08:29:01 pm »
Quote
That's odd.  I seem to remember pocketworkstation data from the PW page saying things were faster in landscape
[div align=\"right\"][a href=\"index.php?act=findpost&pid=127674\"][{POST_SNAPBACK}][/a][/div]

Oh? When I used to use OpenBSD, that had this problem too. Everything ran smoother in portrait mode. I spoke to the developers about this and they said its because the screen has to be rotated in software. They also said that in other roms this was done with hardware acceleration, so it was much less noticable and sometimes not noticable at all.

Does the same happen in beta3 with the 2,4 kernel? Ive not tried that yet - maybe the rotation of the screen in 2.6 kernel is not working as well as in 2.4. I may look at this myself soon, as I want to reinstall beta4 anyway.

I also tried ZPSX running final fantasy 7. At first glance it seemed to be running faster in portrait mode too. Later I will do some tests with a stop watch and give my results. Perhaps if this is never fixed ZPSX could be rewritten sideways, like my earlier comment and run in portait mode, but be oriented in landscape mode - but that might be a lot of work and once again just silly.
New UK/Europe Zaurus Seller - Website coming soon.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Zaurus Faster In Portrait Mode Than Landscape?
« Reply #6 on: May 19, 2006, 05:31:33 am »
It's probably because the natural orientation of the screen (framebuffer) is portrait and therefore things have to be rotated before being displayed when in landscape mode.

On the c7x0 this is done in hardware (so there should be no difference in speed), but the cxx00 machines have to use iwmmt I think, which performs this (quickly I admit) in software, therefore there may be a difference for these machines.

That's my vague rememberance anyway (there were lots of posts about speeds in different orientations when the machines first came out a long time ago btw)

If anyone can confirm/deny this authoritatively, then please do so.

Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

flexibyte

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://www.flexibyte.com
Zaurus Faster In Portrait Mode Than Landscape?
« Reply #7 on: May 19, 2006, 06:32:34 am »
Hmmm yeah... great... so the Zaurus is using some of its power just to rotate its screen to its default clamshell orientation.

Whenever I saw iwmmt i always thought that was hardware acceleration for the older devices for some reason. How can I enable iwmmt support in my SDL apps for example?

And would you think it would be wise to go ahead and design my games sideways?
New UK/Europe Zaurus Seller - Website coming soon.

emip

  • Newbie
  • *
  • Posts: 29
    • View Profile
Zaurus Faster In Portrait Mode Than Landscape?
« Reply #8 on: May 22, 2006, 05:29:44 am »
Take a look at the Intel PXA27x users manual, it documents the LCD controller built into our Z's processor. IIRC it does have hardware accelerated rotation built into it, but the pxafb framebuffer driver in the current 2.6 kernel does not use this feature. (It doesn't use the PXA's internal video SRAM either, IIRC).
Kernel hacking, anyone?

Dima202

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Zaurus Faster In Portrait Mode Than Landscape?
« Reply #9 on: May 22, 2006, 05:36:43 am »
"pxafb framebuffer driver in the current 2.6 kernel does not use this feature. (It doesn't use the PXA's internal video SRAM either, IIRC)."
Yeah, this will probably really improve some games on our Zaurses
--Also video playback? ))))

sashz

  • Sr. Member
  • ****
  • Posts: 388
    • View Profile
    • http://
Zaurus Faster In Portrait Mode Than Landscape?
« Reply #10 on: May 22, 2006, 06:01:19 am »
No hardware rotation in PXA27x, only software.
Default LCD orientation 480x640 - portrait. For landscape that uses software rotation, its why landscape mode slower.

For PXA27x acceleration:
modprobe pxafb_overlay

that will create 3 devices:
/dev/fb1 - Overlay1 - RGB modes only
/dev/fb2 - Overlay2 - RGB and YUV modes
/dev/fb3 - Hardware cursor (128x128 max)

for initialize overlay, you need write info about resolution and mode with ioctl FBIOBUT_VSCREENINFO to one of this overlay devices, like as for normal framebuffer. Than get info for device as for normal framebuffer and use it.
I will post sample sources later.
« Last Edit: May 22, 2006, 06:01:53 am by sashz »

flexibyte

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://www.flexibyte.com
Zaurus Faster In Portrait Mode Than Landscape?
« Reply #11 on: May 22, 2006, 10:04:56 am »
Quote
No hardware rotation in PXA27x, only software.
Default LCD orientation 480x640 - portrait. For landscape that uses software rotation, its why landscape mode slower.

For PXA27x acceleration:
modprobe pxafb_overlay

that will create 3 devices:
/dev/fb1 - Overlay1 - RGB modes only
/dev/fb2 - Overlay2 - RGB and YUV modes
/dev/fb3 - Hardware cursor (128x128 max)

for initialize overlay, you need write info about resolution and mode with ioctl FBIOBUT_VSCREENINFO to one of this overlay devices, like as for normal framebuffer. Than get info for device as for normal framebuffer and use it.
I will post sample sources later.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=128036\"][{POST_SNAPBACK}][/a][/div]


Sounds interesting. I'll be looking forward to the samples.
New UK/Europe Zaurus Seller - Website coming soon.

zodttd

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Zaurus Faster In Portrait Mode Than Landscape?
« Reply #12 on: May 22, 2006, 11:48:07 am »
Thanks sashz for the pxafb_overlay info!
I was just going to ask about that...

ZodTTD
http://www.zodttd.com for all your psx4all needs (as in downloads and support). :)

CLICK HERE TO DONATE ANY AMOUNT VIA PAYPAL

Thanks for the support! I can hardly wait to get back into Zaurus development again. :)