maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [REQUEST] HW Keyboard -> Multitouch emulation (https://talk.maemo.org/showthread.php?t=65717)

silbah 2010-11-16 15:24

[REQUEST] HW Keyboard -> Multitouch emulation
 
Hi,

I've recently came across several Palm Pre games and I have installed them and been running them with preenv.

I was surprised at how well most of the games I tried would run, in terms of graphics, sound and performance.

The problem is the lack of multitouch, which makes it difficult or almost impossible to play some games properly.

My suggestion is to capture the keyboard presses and make custom definitions within preenv to simulate touchscreen 'presses' occuring simultaneously on differente screen coordinates, effectively fooling the game's controls.

How difficult would this be? Considering the limited number of games there are, would this be feasable?

Please let me know what you think. Specially if someone is willing to implement this!

silbah

maddude 2010-11-17 13:34

an idea to fix the preenv games multitouch problem .
 
ok preenv games are the best, they have one small problem, mltitouch, we need multitouch in games like driver, nova and hero of sparta, and to fix that on our n900 we can use the keyboard ! yes the keyboard would be something awesome to replace multitouch, what i mean is that we can user the up/down/left/right buttons to move in driver or nova or.... and that way we can use the touch screen for other things like shooting, driving, or what ever .
is this possible guys ? configurating some preenv controls to the keyboard.

MINKIN2 2010-11-17 13:51

Re: an idea to fix the preenv games multitouch problem .
 
It is possible but you would need to find a way to interact with the control files in the games them selves. This may mean having to edit the control files though and that is not allowed :(

What issues are you having with Hero of Sparta and Driver?

Nova is a pain i know but it becomes easy to run and jump with practice and you only really have to do that 3 times in the whole game.

Michmo 2010-11-17 14:19

Re: an idea to fix the preenv games multitouch problem .
 
Or maybe an application to simulate the touchscreen eg: the "Q" key simulate the upper left corner and the "P" key simulate the upper right corner.

silbah 2010-11-17 14:49

Re: an idea to fix the preenv games multitouch problem .
 
Made the same suggestion yesterday.
But didn't get any replies...

http://talk.maemo.org/showthread.php?t=65717

*sigh*

Maybe I posted in the wrong place...

maddude 2010-11-17 16:03

Re: an idea to fix the preenv games multitouch problem .
 
driver works fine with accelerometer control, but still nova is a pain, and this game have awesome graphycs, and how about assasin's grid (didn't install it) but it would be nice to play all its levels .

zimon 2010-11-17 16:25

Re: an idea to fix the preenv games multitouch problem .
 
This could be useful for this kind of use also.
It is doable.

natedog400 2010-12-09 00:12

Re: an idea to fix the preenv games multitouch problem .
 
Multitouch is a must!

zdanee 2010-12-23 16:23

Re: an idea to fix the preenv games multitouch problem .
 
You could use the proximity sensor too, most of the time the missing feature is a fire button. Also it could be configured to "hold" first finger position, and track the touchscreen input as second finger when "touched". If this feature is implemented not in game but preenv level, multitouch is given in all games. there could be a controlpanel config app to set the "fire button" position in every game or custom positions or configs. Secondary camera could also track slight motion (like half covered in different ways).

James_Littler 2010-12-24 11:20

Re: an idea to fix the preenv games multitouch problem .
 
Quote:

Originally Posted by aligoodidea (Post 903384)
Please don't suggest any multitouch ways, Sony's TouchScreen LCD driver is closed sourced on maemo and any editions done to it will be illegal,and immoral.So I suggest you to announce this forum in an open sourced OS(Like NITDroid or Meego.)

This has nothing to do with the touchscreen driver.

retsaw 2010-12-24 11:44

Re: an idea to fix the preenv games multitouch problem .
 
Quote:

Originally Posted by aligoodidea (Post 903384)
Please don't suggest any multitouch ways, Sony's TouchScreen LCD driver is closed sourced on maemo and any editions done to it will be illegal,and immoral.So I suggest you to announce this forum in an open sourced OS(Like NITDroid or Meego.)

You have no idea what you are talking about. For a start no-one is talking about modifying the driver. Secondly modifying a closed source driver is not illegal (at least in most jurisdictions), just difficult, however distributing the changes may be depending on how it is done, but if all that is distributed was a patch file of the changes and not the whole driver it should be legal. Thirdly, if you think modifying something you own is immoral you need to re-evaluate your morals, most people wouldn't consider modifying something they had come into possession of legitimately immoral. Finally, the touchscreen driver isn't owned or made by Sony or even closed source,

retsaw 2010-12-24 12:50

Re: an idea to fix the preenv games multitouch problem .
 
Quote:

Originally Posted by aligoodidea (Post 903406)
Sadly I should say it is owned by sony,Second,you should read Maemo software copyright again(please do it),I already had an idea of sending the first touch (and so on) turn by turn,note them each and delay them as long as the proximity sensor held. then send the noted coordinates all at once, using the gift procedure to bypass the X-Server and directly send them to the preenv application(But it requires a major driver modification).

I'll admit I've only done a cursory search, so I could have missed some details, so if you can provide some sources for what you claim I'll appreciate it. But the touchscreen controller is the Texas Instrument TSC2005, which obviously is made by Texas Instruments, not Sony, and the driver for it was pushed upstream for inclusion with the Linux kernel by Nokia here.

And can you tell me what part of the Maemo licence is relevant to the touchscreen driver that I need to read (preferably with a link). Please bear in mind that it is unlikely that the licence would legally give them more rights to stop modification or reverse engineering than they would have without an explicit licence.

javispedro 2010-12-24 16:49

Re: an idea to fix the preenv games multitouch problem .
 
Quote:

Originally Posted by retsaw (Post 903396)
You have no idea what you are talking about. ,

He hasn't. There's no single part of the input stack that is closed, yet for some reason we have to read the "Maemo software copyright".


Preenv requires some work to be able to simulate multitouch. Namely, Palm uses a partially modified SDL with 1.2 and 1.3 bits, while on the N900 we use a pretty much stock SDL 1.2 In order to get multitouch to work Preenv would need to ship its own SDL, based on cleaning the released bits of the Palm's SDL.

This is not very hard but would complicate maintenance quite a bit, and as you can guess, I do not have time to spare :).

aligoodidea 2010-12-24 18:30

Re: an idea to fix the preenv games multitouch problem .
 
Quote:

Originally Posted by retsaw (Post 903419)
I'll admit I've only done a cursory search, so I could have missed some details, so if you can provide some sources for what you claim I'll appreciate it. But the touchscreen controller is the Texas Instrument TSC2005, which obviously is made by Texas Instruments, not Sony, and the driver for it was pushed upstream for inclusion with the Linux kernel by Nokia here.

And can you tell me what part of the Maemo licence is relevant to the touchscreen driver that I need to read (preferably with a link). Please bear in mind that it is unlikely that the licence would legally give them more rights to stop modification or reverse engineering than they would have without an explicit licence.

I know the touchscreen controller is the Texas Instrument TSC2005
,the thing I do fear is the sony's claim on any modifications done to it(After all, LCD itself belongs to sony).Sony is a little aggressive, and I do fear that.

retsaw 2010-12-25 03:48

Re: an idea to fix the preenv games multitouch problem .
 
Yeah Sony make the LCD, but that gives them absolutely no claim on the touchscreen driver, saying they would is just as ridiculous as claiming they have any rights over the graphics driver on my netbook when I hook it up to a Sony TV.

mattbutsko 2010-12-25 06:51

Re: an idea to fix the preenv games multitouch problem .
 
uh, arent the LCD and touch input module two seperate parts? and i'm 90% sure Sony didnt make it, although i could be wrong.

Edit: TI made the touch module, so what's Sony doing in this thread?

govprog 2010-12-25 07:23

Re: an idea to fix the preenv games multitouch problem .
 
Quote:

Originally Posted by retsaw (Post 903797)
Yeah Sony make the LCD, but that gives them absolutely no claim on the touchscreen driver, saying they would is just as ridiculous as claiming they have any rights over the graphics driver on my netbook when I hook it up to a Sony TV.

I think aligoodidea is right somehow, the CC mark is somewhat powerful in the U.S,and sony may misuse it, afterall,everyone wants a bigger pocket, isn't it? unfortunate but real,even HDMI T.V companies had an argue on adding 3D T.V support to the nvidia's GPU driver!(I meant for games.) for movies there are 3rd party apps supporting it already.

jaimex2 2010-12-25 07:51

Re: an idea to fix the preenv games multitouch problem .
 
Can we ignore aligoodidea and get back on topic? This has nothing to do with what ever gibberish he is on about.

We have applications like the VNC server that pass through emulated single clicks already, would a second touch be impossible to pass through to the system?

If so an application that maps "touch at X , Y" when Key is pressed should not be impossible. We don't need to modify any of the PreEnv games either.

aligoodidea 2010-12-25 12:29

Re: an idea to fix the preenv games multitouch problem .
 
Do you guys mean something like this: (Note,Touchscreen LCD required):
Originally for windows mobile(Windows PC too). link:http://www.windowsphoneme.com/index.php?file=431
P.S:Sorry guys, please delete my replies and your post, sometimes, I do mention things with false words(And worry too much for something that's not needed to worry about).

govprog 2010-12-25 12:33

Re: an idea to fix the preenv games multitouch problem .
 
Thanks, works for me(Winodws mobile 6), but I don't know why so many users what to laugh to you although you helped me on:http://talk.maemo.org/showthread.php?t=67207&page=2

azstunt 2010-12-25 19:59

Re: an idea to fix the preenv games multitouch problem .
 
I have succesfully mapped a key press to a touchscreen action using a combination of cat, a hex editor and xbindkeys doing something like this (as root):
Code:

cat ~/actioninhexcode >> /dev/input/event3
where the file ~/actioninhexcode contains something like this (hex code):
Code:

11 EC 05 4D  2B D2 00 00  03 00 00 00  00 08 00 00
11 EC 05 4D  87 D2 00 00  03 00 01 00  00 08 00 00
11 EC 05 4D  A5 D2 00 00  03 00 18 00  C5 00 00 00
11 EC 05 4D  A5 D2 00 00  01 00 4A 01  01 00 00 00
11 EC 05 4D  A5 D2 00 00  00 00 00 00  00 00 00 00
11 EC 05 4D  D1 73 01 00  03 00 18 00  00 00 00 00
11 EC 05 4D  0E 74 01 00  01 00 4A 01  00 00 00 00
11 EC 05 4D  0E 74 01 00  00 00 00 00  00 00 00 00

where each line has the folloing format:
Code:

struct input_event {
    __u32 tv_sec;
    __u32 tv_usec;
    __u16 type;
    __u16 code;
    __s32 value;
};

The above example will emulate a tap approximately in the middle of the screen (test it with the draw application). If you want to emulate a drag you will need three files and to 'cat' them individually, one with the start coordinates, amount of pressure and the touch event started; the next one with the end coordinates; and the last one with an amount of pressure zero and which also ends the touch.
Then you map any key you want to the above command using xbindkeys.
My point being, if anybody changes the touchscreen driver for a multitouch one and adds multitouch support for the xserver (maybe not needed?), something like the above could be used in combination of normal touchscreen usage (I guess).

jaimex2 2010-12-26 05:02

Re: an idea to fix the preenv games multitouch problem .
 
Quote:

Originally Posted by azstunt (Post 904196)
My point being, if anybody changes the touchscreen driver for a multitouch one and adds multitouch support for the xserver (maybe not needed?), something like the above could be used in combination of normal touchscreen usage (I guess).

Great find, I'll play with that when I get home today. I'm guessing it ignores a second input if a tap is already in progress.

I wonder if quick mili second alternating between two tap locations would pass as multitouch on the games.

azstunt 2010-12-26 06:25

Re: an idea to fix the preenv games multitouch problem .
 
Quote:

Originally Posted by jaimex2 (Post 904382)
Great find, I'll play with that when I get home today. I'm guessing it ignores a second input if a tap is already in progress.

I wonder if quick mili second alternating between two tap locations would pass as multitouch on the games.

It doesn't. Already tried it. If you emulate the start of a touch at x1,y1 (but don't end it) and then physically touch at x2,y2, it is interpreted as something like an 'instant drag' (as in infinite speed movement) between x1,y1 to x2,y2 (test it with the draw app).

javispedro 2010-12-28 12:13

Re: an idea to fix the preenv games multitouch problem .
 
We already know what fake multitouch is, and why it sucks.

ivgalvez 2010-12-28 13:11

Re: an idea to fix the preenv games multitouch problem .
 
Why do I have the impression that allgoodidea and govprog are the same person?

Ah! it's because their lack of politeness.

MaddogG 2010-12-28 13:42

Re: an idea to fix the preenv games multitouch problem .
 
@govprog

Do you know what you are talking about? :p
The files you have posted are C# classes: they are pretty useless. They could be used to develop C# or Mono multitouch applications, but they will not help anyone to satisfy our desire to have multitouch emulation in preenv games.

As I said in another thread, if we want multitouch emulation we need multi-point support from X server. Once we will obtain that, we could take in consideration azstunt idea (emulation with hardware keyboard). Until then: no way!

I tried to write a little application to emulate multitouch using Qt, but
  • It's difficult
  • Results are not satisfactory
  • We can't achieve system-wide emulation without X multitouch support (we have to insert emulation directly in the code of every program)

If we really want multitouch emulation, we need to start talking about porting multitouch support in X server (http://www.fooishbar.org/blog/tech/x...-17-18-22.html).

Regards :)

govprog 2010-12-28 13:46

Re: an idea to fix the preenv games multitouch problem .
 
Quote:

Originally Posted by ivgalvez (Post 905975)
Why do I have the impression that allgoodidea and govprog are the same person?

Ah! it's because their lack of politeness.

The only proof I have that I am not someone else is my IP. And please tell me how it was not polite, and I will change it if it's bothering you.(And I don't want to bother a great programmer like javispedro, because it is both some kind of forum violation and unfair.) and finally, don't look at my posts in the bad way please, this may happen because my english is not very good:o

govprog 2010-12-28 13:55

Re: an idea to fix the preenv games multitouch problem .
 
Quote:

Originally Posted by MaddogG (Post 905995)
@govprog

Do you know what you are talking about? :p
The files you have posted are C# classes: they are pretty useless. They could be used to develop C# or Mono multitouch applications, but they will not help anyone to satisfy our desire to have multitouch emulation in preenv games.

As I said in another thread, if we want multitouch emulation we need multi-point support from X server. Once we will obtain that, we could take in consideration azstunt idea (emulation with hardware keyboard). Until then: no way!

I tried to write a little application to emulate multitouch using Qt, but
  • It's difficult
  • Results are not satisfactory
  • We can't achieve system-wide emulation without X multitouch support (we have to insert emulation directly in the code of every program)

If we really want multitouch emulation, we need to start talking about porting multitouch support in X server (http://www.fooishbar.org/blog/tech/x...-17-18-22.html).

Regards :)

The files are C# because they were taken from windows SDK,and they are not mine. I have a question. can we port the C# code to the X-Server and compile them for it?

MaddogG 2010-12-28 13:59

Re: an idea to fix the preenv games multitouch problem .
 
Quote:

Originally Posted by govprog (Post 906011)
The files are C# because they were taken from windows SDK,and they are not mine.

I know that :)
The problem is that they are for Windows, we can't directly use them.

Quote:

I have a question. can't we port the C# code to the X-Server and compile them for it?
If you mean translate that code in C and include it in X server, well...to be honest, I don't know if this is possible, but it woud be cool :cool:

marmistrz 2012-06-07 14:09

Re: [REQUEST] HW Keyboard -> Multitouch emulation
 
And is something like that possible: the microb zoom gesture triggers the multitouch zoom gesture?
It's nice to be able to zoom stuff. I've got one app from MeeGo that's barely useable without zooming.

rainisto 2012-06-07 14:36

Re: [REQUEST] HW Keyboard -> Multitouch emulation
 
FYI, I already did fake multitouch thingie to N810 few years back when we were playing with webkit multitouch API's on single touch devices. AFAIK same code works in N900.

http://keymouse.berlios.de/

qwazix 2012-06-07 15:39

Re: [REQUEST] HW Keyboard -> Multitouch emulation
 
I tried "multitouch" on ubuntu with two attached mice a couple of years ago and it seemed to work ok. There was not so much support back then from applications, but you could drag two windows simultaneously. I also asked on the N9 anticipation thread and somebody pointed out that harmattan uses a normal X server. So why are we talking about X server an multitouch when it already works? Is the maemo X server so outdated?

marmistrz 2012-06-07 18:42

Re: [REQUEST] HW Keyboard -> Multitouch emulation
 
Quote:

Originally Posted by qwazix (Post 1218983)
I tried "multitouch" on ubuntu with two attached mice a couple of years ago and it seemed to work ok. There was not so much support back then from applications, but you could drag two windows simultaneously. I also asked on the N9 anticipation thread and somebody pointed out that harmattan uses a normal X server. So why are we talking about X server an multitouch when it already works? Is the maemo X server so outdated?

But the main cause is to have it intuitive. It's not nice to move the finger from the center while still pressing the key :P


All times are GMT. The time now is 07:24.

vBulletin® Version 3.8.8