Compaq iPAQ (Linux) support

I’ve been tuning SDL for better performance on the Compaq iPAQ (Linux,
not WinCE). For now I’m concentrating on the framebuffer console driver.
This provides a 320x240 16-bit display, and SDL worked with that more or
less out of the box. I added support for the iPAQ’s touchscreen (simple
mouse-like protocol), and fixed a VT switching bug that was causing
SDL_SetVideoMode to hang (as you might suspect, VT’s have little
relevance on the iPAQ). I added a --enable-ipaq-tweaks Autoconf option
(but you still need a mile-long configure command line to do the
build… I’ll probably supply a script for that). Audio worked with no
hassle. The iPAQ has the potential to become a very solid SDL platform
with a little more tweaking.

Apparently the X11 driver also works. Someone managed to port Doom to
the iPAQ with it, though controls didn’t work correctly.

There are a few remaining issues that I could use advice on:

-Keys. The iPAQ has a directional keypad and four other buttons along
the bottom. These do not fit into the current SDL keyboard model very
well. What would be the best way to make these keys accessible from SDL?
A 4-button joystick driver, perhaps? Map them onto new keysyms? Choose
existing keysyms to represent them?

-Screen rotation. By default, the iPAQ configures its display as a
normal 320x240 framebuffer. This means you have to hold the iPAQ
sideways to read the display. This aspect ratio makes porting existing
games simple, but most PDA users are accustomed to a 240x320 vertical
display. As far as I can tell, there is no way to re-orient the screen
in hardware (I’ll investigate this, though). Do we create some monstrous
hack to rotate the framebuffer and emulate a 240x320 video mode, or just
leave it up to PDA game developers to display their graphics sideways?

-John

> -Keys. The iPAQ has a directional keypad and four other buttons along > the bottom. These do not fit into the current SDL keyboard model very > well. What would be the best way to make these keys accessible from SDL? > A 4-button joystick driver, perhaps? Map them onto new keysyms? Choose > existing keysyms to represent them?

FYI, the Zaurus has a ~37 key QWERTY keypad, as well as a 4-directional
pad (diagonals work :slight_smile: ) with a push-button in the middle.

It also has 4 ‘command’ buttons, a ‘home’ button, and ‘OK’ and 'Cancel’
buttons.

-Screen rotation. By default, the iPAQ configures its display as a
normal 320x240 framebuffer. This means you have to hold the iPAQ
sideways to read the display. This aspect ratio makes porting existing
games simple, but most PDA users are accustomed to a 240x320 vertical
display. As far as I can tell, there is no way to re-orient the screen
in hardware (I’ll investigate this, though). Do we create some monstrous
hack to rotate the framebuffer and emulate a 240x320 video mode, or just
leave it up to PDA game developers to display their graphics sideways?

Leave it up to us, I think. :wink:

-bill!On Wed, Jan 02, 2002 at 01:35:48PM -0600, John Hall wrote:

John Hall wrote:

-Screen rotation. By default, the iPAQ configures its display as a
normal 320x240 framebuffer.
This means you have to hold the iPAQ
sideways to read the display. This aspect ratio makes porting existing
games simple, but most PDA users are accustomed to a 240x320 vertical
display.

Since there are very few SDL games around that expect a 240x320 screen,
I don’t think we need to provide that resolution. It does not prevent
programmers from making vertical-mode games themselves

hi.

-Screen rotation. By default, the iPAQ configures its display as a
normal 320x240 framebuffer. This means you have to hold the iPAQ
sideways to read the display. This aspect ratio makes porting existing
games simple, but most PDA users are accustomed to a 240x320 vertical
display. As far as I can tell, there is no way to re-orient the screen
in hardware (I’ll investigate this, though). Do we create some monstrous
hack to rotate the framebuffer and emulate a 240x320 video mode, or just
leave it up to PDA game developers to display their graphics sideways?

Leave it up to us, I think. :wink:

-bill!

leaving this (or similar other problems) to the game developers would cause
sdl being less flexible i think.
anyway, a simple function that enables developers, and users, switching the
display sounds very interesting to me…

best regards,
Tolga.

Hi,

I’m not sure how the screen rotation is done (haven’t gotten the serial
cable for my ipaq yet, so it hasn’t been turned on), but from readint
the whitepaper on qt/embedded and qtopia, i learned that it is capable
of doing this (although it made it sound like this was basically
impossible under X).

Cameron MathesonOn Wed, 2002-01-02 at 12:35, John Hall wrote:

I’ve been tuning SDL for better performance on the Compaq iPAQ (Linux,
not WinCE). For now I’m concentrating on the framebuffer console driver.
This provides a 320x240 16-bit display, and SDL worked with that more or
less out of the box. I added support for the iPAQ’s touchscreen (simple
mouse-like protocol), and fixed a VT switching bug that was causing
SDL_SetVideoMode to hang (as you might suspect, VT’s have little
relevance on the iPAQ). I added a --enable-ipaq-tweaks Autoconf option
(but you still need a mile-long configure command line to do the
build… I’ll probably supply a script for that). Audio worked with no
hassle. The iPAQ has the potential to become a very solid SDL platform
with a little more tweaking.

Apparently the X11 driver also works. Someone managed to port Doom to
the iPAQ with it, though controls didn’t work correctly.

There are a few remaining issues that I could use advice on:

-Keys. The iPAQ has a directional keypad and four other buttons along
the bottom. These do not fit into the current SDL keyboard model very
well. What would be the best way to make these keys accessible from SDL?
A 4-button joystick driver, perhaps? Map them onto new keysyms? Choose
existing keysyms to represent them?

-Screen rotation. By default, the iPAQ configures its display as a
normal 320x240 framebuffer. This means you have to hold the iPAQ
sideways to read the display. This aspect ratio makes porting existing
games simple, but most PDA users are accustomed to a 240x320 vertical
display. As far as I can tell, there is no way to re-orient the screen
in hardware (I’ll investigate this, though). Do we create some monstrous
hack to rotate the framebuffer and emulate a 240x320 video mode, or just
leave it up to PDA game developers to display their graphics sideways?

-John


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Cameron Matheson writes:

Hi,

I’m not sure how the screen rotation is done (haven’t gotten the serial
cable for my ipaq yet, so it hasn’t been turned on), but from readint
the whitepaper on qt/embedded and qtopia, i learned that it is capable
of doing this (although it made it sound like this was basically
impossible under X).

Rotation under X on the iPAQ is done with a command line option to the
X server. The screen can also be rotated on-the-fly. For those
interested in learning more about how SDL can fit nicely on the iPAQ
under Linux, the web site is http://www.handhelds.org

I haven’t used qt/embedded and qtopia so I can’t comment on how it’s
implemented there.

Derrell

Rotation under X on the iPAQ is done with a command line option to the
X server. The screen can also be rotated on-the-fly. For those
interested in learning more about how SDL can fit nicely on the iPAQ
under Linux, the web site is http://www.handhelds.org

And SDL works really fine on the iPAQ using X11 and thus managed to have
some cool games working (xrick, ScummVM, prboom, …).

It would even be better with the patch I sent to the list some times ago
(but seems to have been lost somewhere :slight_smile: ) that added support for the
keysyms of the iPAQ’s special keys.

             Lionel-- 
	 Lionel Ulmer - http://www.bbrox.org/
> It would even be better with the patch I sent to the list some times ago > (but seems to have been lost somewhere :-) ) that added support for the > keysyms of the iPAQ's special keys.

Don’t forget the Zaurus! :slight_smile:

Direction pad
Button in the middle of the d-pad
Cancel
Ok
5 app. buttons

and of course, a ~35-key QWERTY keyboard :wink: (but that’s less important
for games, usually)

-bill!On Fri, Jan 11, 2002 at 10:12:09PM +0100, Lionel Ulmer wrote:

The QPE in the iPAQ too can be rotated (on 0, 90, 180, 270). This is done
with a QPE app called Rotation… The actual rotation is done when the QPE
is restarted though, so it’s probably setting up a config file for QPE but I
don’t know which one.> ----- Original Message -----

From: derrell.lipman@unwireduniverse.com (Derrell Lipman)
To:
Sent: Friday, January 11, 2002 7:25 PM
Subject: Re: [SDL] Compaq iPAQ (Linux) support

Cameron Matheson writes:

Hi,

I’m not sure how the screen rotation is done (haven’t gotten the serial
cable for my ipaq yet, so it hasn’t been turned on), but from readint
the whitepaper on qt/embedded and qtopia, i learned that it is capable
of doing this (although it made it sound like this was basically
impossible under X).

Rotation under X on the iPAQ is done with a command line option to the
X server. The screen can also be rotated on-the-fly. For those
interested in learning more about how SDL can fit nicely on the iPAQ
under Linux, the web site is http://www.handhelds.org

I haven’t used qt/embedded and qtopia so I can’t comment on how it’s
implemented there.

Derrell


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I have the Rotation app on my Zaurus, and it simply affects the rotation
of the next app. I open. (So, for example, I have have a sideways
terminal, and upright IRC client, and an upside-down web browser, if I
wanted to :slight_smile: )

-bill!On Sat, Jan 12, 2002 at 05:41:58PM +0200, Alexander Popov wrote:

The QPE in the iPAQ too can be rotated (on 0, 90, 180, 270). This is done
with a QPE app called Rotation… The actual rotation is done when the QPE
is restarted though, so it’s probably setting up a config file for QPE but I
don’t know which one.

I spent most of yesterday hacking on this. A quick update:

-According to an authoritative source, the iPAQ does not support screen
rotation in hardware. It must be done in software.

-SDL_DOUBLEBUF was causing the framebuffer driver to request an invalid
dotclock, which left the framebuffer in an unusable state. I have
disabled hardware page flipping for now; I’m not sure if the LCD even
supports it. The framebuffer is local memory (I think), so it’s still
sufficiently fast.

-Tapping the touchscreen generates an envar-configurable mouse button
event.

-The keypad now generates Ctrl, Alt, Enter, Escape, Space, Shift, and
arrow key events. I plan to make these configurable through envars. I
also plan to provide an option for mapping keypad events to joystick
motion events. (I originally intended to implement the keypad as a
joystick, but it turns out that it acts like a normal keyboard with
strange scancodes.)

-Is there any reason we do not yet support an optional .sdlrc or
sdl.ini? That might be cleaner than the usual cadre of envars.

-The sound driver may need some work. I’m still looking into this. It
works fine with some apps, but in many common situations it performs
badly.

-DarcNES/SDL and Wolf3D are playable. Wolf has a crash bug, but it
shouldn’t be too hard to track down. Zelda looks GREAT on the iPAQ’s
small screen – the NES’s native 256x240 res fits the iPAQ’s 320x240 LCD
very nicely. :slight_smile:

-SMPEG also works. I had the Steve Ballmer “Developers, developers,
developers!” video playing yesterday. Audio performance was
unacceptable, though.

-JohnOn Saturday, January 12, 2002, at 10:41 AM, Alexander Popov wrote:

The QPE in the iPAQ too can be rotated (on 0, 90, 180, 270). This is
done
with a QPE app called Rotation… The actual rotation is done when the
QPE
is restarted though, so it’s probably setting up a config file for QPE
but I
don’t know which one.

----- Original Message -----
From: <Derrell.Lipman at UnwiredUniverse.com>
To:
Sent: Friday, January 11, 2002 7:25 PM
Subject: Re: [SDL] Compaq iPAQ (Linux) support

Cameron Matheson writes:

Hi,

I’m not sure how the screen rotation is done (haven’t gotten the
serial
cable for my ipaq yet, so it hasn’t been turned on), but from readint
the whitepaper on qt/embedded and qtopia, i learned that it is capable
of doing this (although it made it sound like this was basically
impossible under X).

Rotation under X on the iPAQ is done with a command line option to the
X server. The screen can also be rotated on-the-fly. For those
interested in learning more about how SDL can fit nicely on the iPAQ
under Linux, the web site is http://www.handhelds.org

I haven’t used qt/embedded and qtopia so I can’t comment on how it’s
implemented there.

Derrell


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

-SMPEG also works. I had the Steve Ballmer “Developers, developers,
developers!” video playing yesterday. Audio performance was
unacceptable, though.

This is due to the MP3 library used by SMPEG (it is full of FP math). I once
tried to look at SMPEG to see if it would be easy to ‘plug’ another MP3
library (like libmad or the one in ffmpeg) but I found the SMPEG code rather
difficult to understand :slight_smile:

I had it built on iPAQ/X and had the same problems with sound output.

        Lionel-- 
	 Lionel Ulmer - http://www.bbrox.org/

“John R.Hall” wrote:

I have
disabled hardware page flipping for now; I’m not sure if the LCD even
supports it. The framebuffer is local memory (I think), so it’s still
sufficiently fast.

the question is rather whether the LCD has a “refresh” which can interfere
with screen updates. the principal benefit of hardware page-flipping is
lack of tearing

-Is there any reason we do not yet support an optional .sdlrc or
sdl.ini? That might be cleaner than the usual cadre of envars.

I agree it has become quite clumsy. But you can always put your environment
variables in a file called .sdlrc and source it as a step of program launch

Not an optimal solution on every platform, nor even on most of them.On Wed, Jan 16, 2002 at 10:59:32AM +0100, Mattias Engdegard wrote:

-Is there any reason we do not yet support an optional .sdlrc or
sdl.ini? That might be cleaner than the usual cadre of envars.

I agree it has become quite clumsy. But you can always put your environment
variables in a file called .sdlrc and source it as a step of program launch


Joseph Carter Only l33t on Thursdays

  • Dry-ice can’t code his way out of a paper bag
    dry-ice: int main() { ExitPaperBag(); return 0; }
    Is that how that’s done then? takes notes

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020116/eb218cf9/attachment.pgp