Jump to content


Photo

Logistics Of Touchscreen Input For Emulated Software


  • Please log in to reply
18 replies to this topic

#1 Swiss_Cheeseman

Swiss_Cheeseman

    SwissCM

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 868 posts

Posted 10 August 2008 - 09:59 AM

The touch screen for the Pandora opens up some interesting possibilities for homebrew, mostly for emulators. For something like Basillisk II (a 68000 Mac emulator) having a touchscreen for mouse input would be very handy and quite easy to implement due to MacOS having standardised input.

For DOS games it's a different story. I know DOSBox (or at least the CVS versions of it) try to have absolute mouse positioning in windowed mode, but it's rarely accurate. The only other option is relative which is hardly a good alternative. There is two solutions to this that I can think of and both only work on a per-application basis.

1. Hook into and grab the positioning data straight from the software. This requires more technical knowledge and would not be universal at all and may not work with different versions of the same application, however it would be very accurate.

2. Use a calibration utility to measure mouse acceleration, speed and position. This could be done by the end user and would work with different versions of the same software (provided the mouse code didn't change), on the downside is that it would be fiddly and inaccurate at times.

Are there any other ways that are practical?

Edited by Swiss_Cheeseman, 10 August 2008 - 10:04 AM.


#2 linuxhacker

linuxhacker

    GP32 User

  • Member
  • PipPipPip
  • 36 posts

Posted 10 August 2008 - 04:36 PM

TS lib is your friend smile.gif. It will work with any TS device that uses the input layer (which I assume the Pandora does) and provides a interface for getting calibrated values with pen-up/pen-down events.
You would of course still need to modify your emulator to make use of the information but it makes the getting of data easy and free form worries of changes in drivers smile.gif.

#3 fusion_power

fusion_power

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2998 posts
  • Location:germany
  • Interests:GP2X ;)

Posted 10 August 2008 - 09:07 PM

By the way, is there any info about the type of Touchscreen used for the Pandora? A "Resistive" or a "Capacitive" one? I don't know much about this but afaik the Capacitive is the more modern one.

#4 Soulkiller

Soulkiller

    GP32 Hardcore

  • Member
  • PipPipPipPip
  • 105 posts

Posted 11 August 2008 - 05:12 AM

Most likly resistitve considering that it does not support two touchs at the same time which is a capacitive touchscreen feature.

#5 sindbad

sindbad

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1084 posts

Posted 11 August 2008 - 09:36 AM

Not only capacitive displays can support multitouch, and they have the drawback of not being able to use gloves or a stylus.

#6 Chip

Chip

    [Insert Custom Title Here]

  • X-treme Team
  • 3024 posts
  • Location:NJ, USA

Posted 11 August 2008 - 03:52 PM

The Pandora touchscreen is resistive. Resistive touchscreens cannot do multitouch, but they can do a half-assed pressure sensing.

Resistive screens work by having two electrically conductive sheets of plastic sitting on top of the screen, but not quite touching each other. When you touch the screen you are pressing the top layer down so it contacts the lower layer. Based on the resistance measured between the upper and lower layers, the device can calculate the location of contact. The down side is that the resistance can be thrown off by things like heat, moisture and time, so occasional recalibration is necessary.

Pressing harder on the top layer will cause more of it to contact the lower layer, and this will change the resistance of the connection. Based on this change, the device can infer the ammount of pressure applied. There are significant inaccuracies in this method, though. For instance, a light tap with something wide and soft (like a fingertip) will cause a larger contact patch then even a very hard tap by something small and hard (like a stylus). This makes useful pressure sensitivity much more problamatic, though not impossible.

#7 fusion_power

fusion_power

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2998 posts
  • Location:germany
  • Interests:GP2X ;)

Posted 11 August 2008 - 09:20 PM

Aha.
Things like scrolling with the finger/stylus sliding over the screen shouldnt be a problem, right?

#8 Tinnus

Tinnus

    GP Mania

  • GP32 Hardcore
  • PipPipPipPipPip
  • 496 posts

Posted 12 August 2008 - 12:31 PM

QUOTE(fusion_power @ Aug 11 2008, 06:20 PM) View Post
Aha.
Things like scrolling with the finger/stylus sliding over the screen shouldnt be a problem, right?

That's completely a software issue.

#9 fusion_power

fusion_power

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2998 posts
  • Location:germany
  • Interests:GP2X ;)

Posted 12 August 2008 - 09:07 PM

QUOTE(Tinnus @ Aug 12 2008, 02:31 PM) View Post

QUOTE(fusion_power @ Aug 11 2008, 06:20 PM) View Post
Aha.
Things like scrolling with the finger/stylus sliding over the screen shouldnt be a problem, right?

That's completely a software issue.

Nice. So let's hope, the OS/Firmware/Software Devs don't forget the "LOOK AND FEEL" and the usability of the Pandora Software. smile.gif

#10 anexanhume

anexanhume

    GP32 Hardcore

  • GP32 Hardcore
  • PipPipPipPip
  • 285 posts

Posted 12 August 2008 - 09:40 PM

I've heard it will be an inductive touchscreen. It will guess where you are going to touch next wink.gif

(I hope someone gets the EE joke).

#11 DJWillis

DJWillis

    Random GP32/GP2X/Wiz & Pandora Moocher

  • GP Guru
  • 1427 posts
  • Gender:Male
  • Location:Bath, Somerset, UK
  • Interests:Hmmm, Home Cinema, using Oxygen and not being dead just yet.

Posted 15 August 2008 - 01:31 PM

Just to confirm. It is a resistive touch screen nicely abstracted behind TSLib with TSLib doing filtering and some other cool stuff and outputting as a /dev/input/event* device.

You can of course bang the hardware if you must but there is little or no point wink.gif.

"Gestures" are just a matter of coding appropriate support. Plenty of work being done on that in various projects outside the Pandora. "Gesture" input is common enough on resistive screens and has been around as long as I can remember just without the Apple "spin".

QUOTE
By the way, is there any info about the type of Touchscreen used for the Pandora? A "Resistive" or a "Capacitive" one? I don't know much about this but afaik the Capacitive is the more modern one.


Nope, they are just different for different applications. More modern does not come into it. Restive can be really quite accurate when using say a stylus. Capacitive by it's very nature is much more broad brush and 'approximate' if your using the human body as a power source wink.gif.

Any more info needed?

#12 CyruzDraxs

CyruzDraxs

    GP32 Hardcore

  • GP32 Hardcore
  • PipPipPipPip
  • 215 posts
  • Gender:Male

Posted 15 August 2008 - 07:19 PM

QUOTE(DJWillis @ Aug 15 2008, 06:31 AM) View Post

Any more info needed?

Can you give out an exact model number? I'd like to have a more detailed look at it's specs. From what I've heard it's the same screen used in the Archos 605, but I can't find model numbers for it anywhere.

#13 Kyosys

Kyosys

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 1009 posts
  • Location:Germany

Posted 16 August 2008 - 11:35 PM

This can be answered by people who have experience with devices using the same screen, but how sturdy is it? I want my pandora to last and last and last just like a duracell battery!

#14 DJWillis

DJWillis

    Random GP32/GP2X/Wiz & Pandora Moocher

  • GP Guru
  • 1427 posts
  • Gender:Male
  • Location:Bath, Somerset, UK
  • Interests:Hmmm, Home Cinema, using Oxygen and not being dead just yet.

Posted 17 August 2008 - 04:43 PM

QUOTE(CyruzDraxs @ Aug 15 2008, 08:19 PM) View Post

QUOTE(DJWillis @ Aug 15 2008, 06:31 AM) View Post

Any more info needed?

Can you give out an exact model number? I'd like to have a more detailed look at it's specs. From what I've heard it's the same screen used in the Archos 605, but I can't find model numbers for it anywhere.


Model for the TS? It's just the standard TS that comes with the screen hooked up to an ADS7846 controller. I am not sure if the touch screens ever have specific model numbers.

QUOTE(Kyosys @ Aug 17 2008, 12:35 AM) View Post

This can be answered by people who have experience with devices using the same screen, but how sturdy is it? I want my pandora to last and last and last just like a duracell battery!


It's a little hard for me to comment as my development Pandora is a REALLY early one without a case so I can't say what it is like when mounted but the touchscreen seems very sturdy and it would take all the abuse your likely to chuck at it in normal use.

Mine has not marked at all in my testing and of course adding a screen protector is a good idea for that extra layer of protection but your starting with a very solid screen and TS combo.

#15 MilanC

MilanC

    GP32 Hardcore

  • Member
  • PipPipPipPip
  • 128 posts

Posted 22 August 2008 - 01:03 AM

QUOTE(Chip @ Aug 11 2008, 07:52 PM) View Post
I'm certain the Pandora touchscreen is resistive. Resistive touchscreens cannot do multitouch, but they can do a half-assed pressure sensing.

Resistive screens work by having two electrically conductive sheets of plastic sitting on top of the screen, but not quite touching each other. When you touch the screen you are pressing the top layer down so it contacts the lower layer. Based on the resistance measured between the upper and lower layers, the device can calculate the location of contact. The down side is that the resistance can be thrown off by things like heat, moisture and time, so occasional recalibration is necessary.

Pressing harder on the top layer will cause more of it to contact the lower layer, and this will change the resistance of the connection. Based on this change, the device can infer the ammount of pressure applied. There are significant inaccuracies in this method, though. For instance, a light tap with something wide and soft (like a fingertip) will cause a larger contact patch then even a very hard tap by something small and hard (like a stylus). This makes useful pressure sensitivity much more problamatic, though not impossible.

Mmh... quite interesting... anybody knows if there's a way to implement this on Pandora?