key settings problem in DAPHNE with Xin-Mo
-
anyone can help me? :(
severals test... and I arrived here:
[KEYBOARD]
KEY_UP = 273 114 2
KEY_DOWN = 274 102 2
KEY_LEFT = 276 100 1
KEY_RIGHT = 275 103 1
KEY_BUTTON1 = 306 97 3
KEY_BUTTON2 = 308 115 1
KEY_BUTTON3 = 32 113 1
KEY_START1 = 49 0 9
KEY_START2 = 50 0 0
KEY_COIN1 = 53 0 2
KEY_COIN2 = 54 0 0
KEY_SKILL1 = 304 119 0
KEY_SKILL2 = 122 105 0
KEY_SKILL3 = 120 107 0
KEY_SERVICE = 57 0 0
KEY_TEST = 283 0 0
KEY_RESET = 284 0 0
KEY_SCREENSHOT = 293 0 0
KEY_QUIT = 27 113 4
ENDnow something is available...
but i have a problem...
the jostick movement up,dw,left,right are oppositesi need help... i hope... :)
-
I don't have a perfect answer for you, but you basically have to map certain keyboard keys to buttons on your controller. I've been meaning to research this but haven't gotten around it. Basically you'll need to map (taken from the RetroPie Daphne github) these keys to your controller:
ESC Quit the game
5 and 6 Insert Coin (coin chutes)
1 Player 1 Start (and "FEET" in Cliffhanger)
2 Player 2 Start (and "FEET" in Cliffhanger)
Arrow Keys Directional Movement
CTRL or Space Bar Button #1 (Primary fire and/or Sword)
Left ALT Button #2 (Alternate fire, used in Bega's Battle, Cobra Command, etc)
Left Shift Button #3 (used in a few games like Road Blaster, if memory serves)There's a couple others but that's the important ones. I think this page may be what you're after. It uses the 'xboxdrv' driver which allows you to map keyboard keys to certain buttons of any controller using xboxdrv. It also shows you how to make any controller use the xboxdrv so you can use these special features of that driver.
If you get it working please post what you did so I can totally copy off you and save myself the work ;)
-
From the wiki: https://github.com/retropie/retropie-setup/wiki/Daphne
" The third number is the joystick button code (or 0 for "none")
Since 0 is reserved for special meaning, joystick button 0 is identified as 1 here. Button 1 is identified as 2, and so on."So basically what you do is map your joystick buttons using jstest so you know the values when you press a button.
Then you look at the value in the third column of the daphnie.ini file. That's the input number. Since input 0 is reserved in Daphne, button zero on your joystick is input 1 in daphne, and so on. You then change the value in the third column to be the value of the controller input you want +1.
Make sense?
-
i will try to add "+1" to identify button. ;)
-
This post is deleted! -
Let me know how it goes. I understand the need for Dragon's Lair. :)
-
@andrea_ita said in key settings problem in DAPHNE with Xin-Mo:
my file dapinput.ini in /opt/retropie/configs/daphne/
#value found by vtest js1
#button 1 - 10
#button 2 - 11
#button 3 - 12
#button 4 - 13
#select 19
#start 18I mainly use a 360 controller but maybe something will help. I think the first two columns are SDL keyboard inputs. The 3rd column is joystick inputs from values using
jstest /dev/input/js0
. Use these values in the 3rd column.I am not completely sure but I think the required joystick for play is js0. It automatically maps the analog controls for up, down, left & right but you also have the option to change those settings to an actual joystick button.
This part I never quite understood as it seems you can't map the analog sticks at all but only keyboard and joystick values (buttons only) in the dapinput.ini.
You need to increment all values by 1 as 0 (zero) is a nul key value if you want to leave a button unassigned.
This seems incorrect as you're using the same value for up & down (2). Also the same for left & right (1) but I never changed those values from default as the analog stick on a 360 controller worked out of the box fine. To reiterate I think the 3rd column value is for button only values from the joystick and not for analog ones.
[KEYBOARD]
KEY_UP = 273 114 2
KEY_DOWN = 274 102 2
KEY_LEFT = 276 100 1
KEY_RIGHT = 275 103 1Action buttons 2 & 3 are mapped to the same value. KEY_BUTTON2 = 1 & KEY_BUTTON3 = 1 (3rd column). This could cause some issues.
KEY_BUTTON2 = 308 115 1
KEY_BUTTON3 = 32 113 1Coin button 1 is mapped to 2 which is the same as your up & down buttons.
KEY_COIN1 = 53 0 2
Look at the default keyboard controls here from the Wiki and use that as a guide to plan your joystick button layout. It has descriptions of each button used in the ini file.
-
hello,
I coming back for several test.-in these days a did a new image for rpi3.
-reconfigure xin-mo for a better configurationsremain to fix daphne...
my test with jstest /dev/input/js1
START – 8
SELECT – 9
BT 1 - 0
BT 2 – 1
BT 3 – 2
BT 4 - 3======
my DAPINPUT.INI
[KEYBOARD]
KEY_UP = 273 114 2
KEY_DOWN = 274 102 2
KEY_LEFT = 276 100 1
KEY_RIGHT = 275 103 1
KEY_BUTTON1 = 306 97 1
KEY_BUTTON2 = 308 115 1
KEY_BUTTON3 = 32 113 1
KEY_START1 = 49 0 9
KEY_START2 = 50 0 0
KEY_COIN1 = 53 0 10
KEY_COIN2 = 54 0 0
KEY_SKILL1 = 304 119 0
KEY_SKILL2 = 122 105 0
KEY_SKILL3 = 120 107 0
KEY_SERVICE = 57 0 0
KEY_TEST = 283 0 0
KEY_RESET = 284 0 0
KEY_SCREENSHOT = 293 0 0
KEY_QUIT = 27 113 4
ENDi test in several times... now i have a matter only with "buttons" for "action".. or "sword" for play dragon's lair..
i noticed that if i change the KEY_QUIT... and set "1" corresponds correctly to button 1.. because, my button 1 value is "0"... so for daphne.. "+1" is "1"...
but if i set KEY_BUTTON1 = 306 97 1
not does not work.today i was at the home of italian record man for dragon's lair... and he tests it, with me... but without results... (this is not a joke... I really know him ;) )
any help would be valued.
thanks in advance! -
First, you need to run your joystick test on js0, not js1, and use those values for the dapinput.ini file.
Once you do, your dapinput.ini file should not have the same button value for multiple sections.
Here is mine as an example and I had to edit it manually as well. Where I left a 0 value I did not assign a control to that action.
KEY_UP = 273 114 1
KEY_DOWN = 274 102 1
KEY_LEFT = 276 100 1
KEY_RIGHT = 275 103 1
KEY_BUTTON1 = 306 97 1
KEY_BUTTON2 = 308 115 2
KEY_BUTTON3 = 32 113 4
KEY_START1 = 49 0 12
KEY_START2 = 50 0 0
KEY_COIN1 = 53 0 5
KEY_COIN2 = 54 0 0
KEY_SKILL1 = 304 119 0
KEY_SKILL2 = 122 105 0
KEY_SKILL3 = 120 107 0
KEY_SERVICE = 57 0 0
KEY_TEST = 283 0 0
KEY_RESET = 284 0 0
KEY_SCREENSHOT = 293 0 0
KEY_QUIT = 27 113 11 -
@batesman said in key settings problem in DAPHNE with Xin-Mo:
First, you need to run your joystick test on js0, not js1, and use those values for the dapinput.ini file.
ok, i plug joystick in usb port 0
but if i run jstest... in js0 always i have keyboard
and in js1 is joystick
all emulators are available, except the Daphnecould you tell me how i can set js1 to js0 ?
thanks in advance ! -
I think this will do the trick.
-
@andrea_ita said in key settings problem in DAPHNE with Xin-Mo:
could you tell me how i can set js1 to js0 ?
Daphne is very inflexible in how it assigns a joystick. It is possible to rearrange the jsX assignments, but unfortunately Daphne actually calls out to the first joystick event rather than js0. Also, the joystick event order is set at the system level and to my knowledge cannot be rearranged. If this is the only controller being plugged in and it's still not being read as the first joystick event, then there's really nothing to be done outside of key-mapping the controller so that Daphne reads it as standard keyboard input.
-
@batesman said in key settings problem in DAPHNE with Xin-Mo:
I think this will do the trick.
i just followed the procedure above.
i used the new menu in emulationstation
i set my joystick xin-mo like "unique" and joystick "0"i try to things...
1- jstest... same address JS1... not changed.
2- try to play... movement is perfect like before... the button 1,2,3... are unavailable like before.unique buttons configurable are
-start / select/ button 4 (for quit)any solutions? i m a little disappointed... a lot of time spent.. many tests done... :( no results...
you have did a great program retropie... unique... but i hope that someone fix joystick for all... (necessary)
Regards
-
Alright, dude...I'm not sure how much more I can help, but let's do one more thing.
Show me the full output of your js test please. Give me all the directions and buttons in a layout similar to below.
up - 0
down - 1
left - 2
a or button 1 - 4
b or button 2 - 5 -
@batesman said in key settings problem in DAPHNE with Xin-Mo:
Alright, dude...I'm not sure how much more I can help, but let's do one more thing.
Show me the full output of your js test please. Give me all the directions and buttons in a layout similar to below.
up - 0
down - 1
left - 2
a or button 1 - 4
b or button 2 - 5just attached
-
button 1 - 0
button 2 - 1
button 3 - 2
button 4 - 4
select 9
start 8normally with the config below.....
only button 4 (quit) - select - start are available...but if i simply try to change button 4 (quit)... for use it like "sword or action button"... (button 1) not works :(
it's very strange, because all the other emulators work well... snes, genesis, mame, all atari, amiga, c64, n64, psx, psp..[KEYBOARD]
KEY_UP = 273 114 2
KEY_DOWN = 274 102 2
KEY_LEFT = 276 100 1
KEY_RIGHT = 275 103 1
KEY_BUTTON1 = 306 97 1
KEY_BUTTON2 = 308 115 1
KEY_BUTTON3 = 32 113 1
KEY_START1 = 49 0 9
KEY_START2 = 50 0 0
KEY_COIN1 = 53 0 10
KEY_COIN2 = 54 0 0
KEY_SKILL1 = 304 119 0
KEY_SKILL2 = 122 105 0
KEY_SKILL3 = 120 107 0
KEY_SERVICE = 57 0 0
KEY_TEST = 283 0 0
KEY_RESET = 284 0 0
KEY_SCREENSHOT = 293 0 0
KEY_QUIT = 27 113 4
END -
Sorry if I was unclear. Can you send me ALL the jtest values for movements and buttons?
Your dapinput file looks wrong to me, but I will go through that once I have your list of input commands.
-
@batesman said in key settings problem in DAPHNE with Xin-Mo:
Sorry if I was unclear. Can you send me ALL the jtest values for movements and buttons?
ok, how i can print the values ? ;)
there is method to print of the result in a file?
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.