ScummVM with arrow keys

Post tips/tricks or get help with configuring RetroPie
Post Reply
smoki86
Posts: 97
Joined: Sat Jul 30, 2016 7:45 am
Has thanked: 12 times
Been thanked: 47 times

ScummVM with arrow keys

Post by smoki86 » Mon Aug 22, 2016 12:21 pm

Hi :)

I have installed pretty much every compatible rom and port by now and now got to the ScummVM games.
I would love to play Monkey Island again on my gbz.
Is it possible to emulate a mouse or configure ScummVM to move the mouse cursor, push mouse buttons with the keys?

I use the keyboard simulator tool with the PI GPIOS (arrow keys, default for a,b,x,y and esc,enter for l,r)
Thanks!

uke
Posts: 41
Joined: Mon May 09, 2016 9:05 am
Has thanked: 2 times
Been thanked: 6 times

Re: ScummVM with arrow keys

Post by uke » Mon Aug 22, 2016 2:19 pm

I'm also VERY interested to know.

smoki86
Posts: 97
Joined: Sat Jul 30, 2016 7:45 am
Has thanked: 12 times
Been thanked: 47 times

Re: ScummVM with arrow keys

Post by smoki86 » Tue Aug 23, 2016 10:31 am

Ok, time to learn a bit of python on the weekend :)

I found this:
https://github.com/cpswan/Python/blob/m ... io-jstk.py

The idea: ScummVM can be started with --joystick parameter, so I guess that could work.
For the missing keys I would map them to the other GPIOs (F5..).
Or maybe the same approach works for the mouse instead of joystick (BTN_MOUSE in uinput?).

No idea if the Pins are even accessible when retrogame is already running, if both would simulate joystick as well as a key,
if only one works or nothing.
So as a workaround I could put a script on startup that, after starting retrogame, looks for a key for a second or
before startkng it looks for a Pin.

Depending on the result I could start ScummVM and the joystick emulator or retrogame and emulationstation.

Another approach then would be to quit retrogame and run the joystick/mouse emulator in the ScummVM.sh script and
quit it and restart retrogame on exit.

I will research on the weekend :)

edit:
http://pastebin.com/Du463RdR
Driver for gpio mouse... but no idea how to modify this :)

http://www.newsdownload.co.uk/pages/RPi ... river.html
This looks interesting too and maybe can be configured to accomplish this

smoki86
Posts: 97
Joined: Sat Jul 30, 2016 7:45 am
Has thanked: 12 times
Been thanked: 47 times

Re: ScummVM with arrow keys

Post by smoki86 » Wed Aug 24, 2016 5:05 am

Ok, I tried to expand the python code above an came up with this:

http://codepad.org/gyYJh7KU

You can map the pins for Left,Right,Up,Down,A,B,X,Y,L,R,Start,Select to the PI,
then map the corresponding keys for keyboard, mouse and joystick mode.

There is a extra pin to change the mode while running (that will not work right now, the missing mouse/joystick events are only
being setup on program start. I want to search all key mappings for distinct events and set all of them up on start later)

It *should* simulate a keyboard (like retrogame), a mouse or a joystick.

No idea if it works tough :) I wrote it in notepad on my brake. I will test on the weekend :)

edit:
http://codepad.org/UGCQlmdN

maybe that works for the mode selection, I add all possible events for key, mouse and joystick mode into a set and then back to a list

dezent
Posts: 15
Joined: Tue Aug 30, 2016 6:10 pm
Been thanked: 12 times

Re: ScummVM with arrow keys

Post by dezent » Wed Nov 16, 2016 7:39 am

I have added a blackberry trackball to the teensy. works fine ;-)

http://www.sudomod.com/forum/viewtopic. ... rry#p19009

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest