maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   ScummVM on N900 (https://talk.maemo.org/showthread.php?t=33126)

hopbeat 2009-12-13 15:22

Re: ScummVM on N900
 
@Helmuth, nicely written :)

There is only me and @hqh on this at the moment (we actually need to get down to some real work this week, mine exams are over).
I was thinking recently about separating a pure proximity sensor daemon from the shortcut application.

I'm thinking about having a proximity sensor daemon, polling the sensor and sending a dbus signal whenever the change in the sensor state is registered (also support reading on demand). This way we would have a nicely behaving dbus architecture, consistent with the rest of the system (why the hell proximity sensor is not connected to dbus by default?!).

This will be used in our shortcut application, but can be also easily used by different application. Then, our application functions can be modified by exposed dbus calls, so your app can explicitly request turning off shortcut handler. Plus, second option, our app can act as a middle-level abstraction and emit dbus 'short-press', 'long-press' (or just emulate key-presses), or handle 'keyboard-locked-don't-emit' functions.

This way, you can either access the sensor directly, telling the shortcut daemon to turn-off, or access the sensor with an abstraction of key-presses (including camera key, those two options require modification in your code) or just request given key (combination) to be simulated (this doesn't require changes in the code of your application).

Thoughts about this?

rapante 2009-12-13 16:31

Re: ScummVM on N900
 
Quote:

Originally Posted by fanoush (Post 425026)
OK, here is scummvm that works a bit better on N900
http://fanoush.wz.cz/maemo/scummvm_1.0.0-2_armel.deb

- volume keys are taken, works same as N810 now (mostly right click and some additional action or game menu)
- shift+backspace is mapped to Escape key
- shift+enter mapped to 770/N8x0 Menu key (mostly brings up game menu)
- optified to save space in internal flash, main binary is moved to /opt/scummvm/bin/

great stuff fanoush!

menu and everything work like a charm

only thing I've noticed by starting up the dig and saving the game is, that I wasn't able to type numbers for the savegame, somehow the fn key does not work here

Helmuth 2009-12-13 16:33

Re: ScummVM on N900
 
Quote:

Originally Posted by hopbeat (Post 425707)
@Helmuth, nicely written :)

Thankyou. :-)

[...]
Quote:

Originally Posted by hopbeat (Post 425707)
Thoughts about this?

Hmm... I'm not sure. But I guess there are more shortcuts needed by ScummVM than could provided thru your daemon. And only send a "short pressed" or "long Button press" is not enought to provide a posibility to enable right mouse click during holding the camera button down.

A "Button_pressed" and a "Button_released" event from your daemon could provide something like this. :)
I think we wait for a comment and some thoughts from fanoush. He have done the last modifications on the ScummVM and he knows the Code behind even better than me. I have only seen a short quote here in maemo talk. ;) :D

I would love a self-explanatory solution. Even simple simple simple.
We have a touchscreen. We should try to avoid keeping a list of shourtcuts with us. :rolleyes:

DaSilva 2009-12-14 06:52

Re: ScummVM on N900
 
Isn't it possible to contact the developers of ScummVM (I don't mean the port for Maemo here) and ask them what or if they could do something for portable devices like the N900? Maybe they know a good solution...

fanoush 2009-12-14 08:18

Re: ScummVM on N900
 
Quote:

Originally Posted by DaSilva (Post 426734)
Isn't it possible to contact the developers of ScummVM (I don't mean the port for Maemo here) and ask them what or if they could do something for portable devices like the N900? Maybe they know a good solution...

You are already talking to one of them :-) Well, actually, I am currently the only one (ScummVM porter to Maemo). No problem if someone wants to join. ScummVM project knows about these problems, see http://wiki.scummvm.org/index.php/Small_Devices_Backend Last time I checked it was not ready yet but maybe it is about time to check it again.

fanoush 2009-12-14 08:24

Re: ScummVM on N900
 
Quote:

Originally Posted by rapante (Post 425771)
t I wasn't able to type numbers for the savegame, somehow the fn key does not work here

Works for me. You need to hold fn, it is not sticky in most/all games based on SDL. The sticky shift and fn feature is implemented on much higher level of Maemo so it is not available to SDL (and all pure X11?) applications.

fanoush 2009-12-14 08:47

Re: ScummVM on N900
 
Quote:

Originally Posted by Helmuth (Post 425774)
I think we wait for a comment and some thoughts from fanoush.

Just quick comments. ScummVM for Maemo is currently using SDL library. d-bus etc is not available to SDL. The easiest in current state is to get ordinary events (key presses, mouse events).

Maybe in future I can try to start another thread from inside scummvm and initialize glib etc. and listen to d-bus events in parallel to SDL event loop (mainly to support power management better) but it is not trivial. Actually in that case maybe abandoning SDL and starting from scratch would be easier and allowed more flexibility. It is a lot of work though. Also I like current state where all Maemo devices running OS2006,7,8,maemo5 can run same scummvm binary compiled from same source code. Supporting each device and each Maemo version separately is more work too.

On-screen buttons/switches/virtual keyboard is likely once ScummVM engine itself allows me to do that without writing all the code myself (reinventing the wheel). As for various device sensors etc. doing it outside of scummvm means other SDL game ports can use it too.

dread123 2009-12-14 08:47

Re: ScummVM on N900
 
great work :) where do i install the games too? which directory? cheers

hopbeat 2009-12-14 09:09

Re: ScummVM on N900
 
@fanoush, thanks, key/mouse event it will be for ScummVM :)

Helmuth 2009-12-14 13:45

Re: ScummVM on N900
 
[...]
Quote:

Originally Posted by fanoush (Post 426825)
On-screen buttons/switches/virtual keyboard is likely once ScummVM engine itself allows me to do that without writing all the code myself (reinventing the wheel). As for various device sensors etc. doing it outside of scummvm means other SDL game ports can use it too.

Hmm... I can understand what you're talking about. It's not so easy and a lot of ungrateful work. :(

So my second suggestion in post #90 could work without changes in a easy enought way?
Or are there limitations avoiding something like this?

I think about a menu tat appears like the Menu when you press the power Button on the N900 once. Only click a Button and send the needed keycode to the running scummVM without changes on the scumm code. Everything we need is covered with keycodes.

The Menu from the Power Button is also not from a running programm, it appears from a background working daemon or service. (Sorry, I'm not sure with the correct linux term)

So there could run the same OS2006,7,8,maemo5 binary and with a additional daemon like the one from hopbeat or with exactly this we could have such a feature on the N900.

Am I right or totally wrong? :confused:


All times are GMT. The time now is 13:02.

vBulletin® Version 3.8.8