Picade controls with Daphne no insert coin

I have a Pi 3 B, I am running a 128 image, I got everything setup
for the controls through emulation station and all buttons are working, for some reason I cannot add credits to any of the Daphne games, I hooked a keyboard up and added credits but no start button either, Maybe no controls working because Picade baord? I see you can go in and map the buttons somehow but I am not familiar with the process of doing that, is there anyone that can help me with this? When using this same image on a regular stand alone raspberry Pi with Snes controller the coins will work, it looks like the Picade runs like a Keyboard emulator… Thank you in advance for any help, I love this little machine!!!

Did you ever figure this out? I’ve recently purchased the Picade and also can’t figure out how to use the Picade controls with Daphne. It sucks to have to plug in a gamepad. Cheers

find the config
/opt/retropie/configs/daphne/dapinput.ini

alter the first column to match the desired key presses.
http://www.daphne-emu.com/mediawiki/index.php/KeyList

Did anyone ever get Daphne controls working on Picade?

I read multiple sites and thought I was close but I still cannot get it to work. I was going to look at output from jstest, but I couldn’t get that to run at the terminal…

I referenced this for the Daphne keymaps: Daphne Keymaps
And this Pimoroni Forum Post: POST

Here are my latest NON-WORKING settings in dapinput.ini:

[KEYBOARD]
KEY_UP = 273 114 5
KEY_DOWN = 274 102 7
KEY_LEFT = 276 100 8
KEY_RIGHT = 275 103 6
KEY_BUTTON1 = 306 97 305 (represents keyboard ctrl)
KEY_BUTTON2 = 308 115 303 (represents keyboard shift)
KEY_BUTTON3 = 32 113 32 (represents keyboard space)
KEY_START1 = 49 0 111 (represents keyboard o)
KEY_START2 = 50 0 0
KEY_COIN1 = 53 0 105 (represents keyboard i)
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 17 (my right side button just worked with this default)
END

Any help would be appreciated!!

I made some progress! I can actually play Dragon’s Lair with this configuration. I am still trying to sort all this out but was able to make this work:

[KEYBOARD]
KEY_UP = 273 114 5
KEY_DOWN = 274 102 7
KEY_LEFT = 276 100 8
KEY_RIGHT = 275 103 6
KEY_BUTTON1 = 306 305 305
KEY_BUTTON2 = 308 303 303
KEY_BUTTON3 = 32 33 32
KEY_START1 = 49 111 111
KEY_START2 = 50 0 0
KEY_COIN1 = 53 105 105
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 17
END

The numbers in the first column (I think) relate to the game’s mappings, the middle numbers relate to the keyboard mappings and the last column relates to joystick button mappings. I figured the hat is doing keyboard mappings so I put the numbers in the middle column and it works!! I hope this will help others!

After spending hours on this I was able to figure out the way the mappings work!

Here is a screenshot of my notes/mappings:

Here are my settings:
[KEYBOARD]
KEY_UP = 273 114 5
KEY_DOWN = 274 102 7
KEY_LEFT = 276 100 8
KEY_RIGHT = 275 103 6
KEY_BUTTON1 = 304 32 0
KEY_BUTTON2 = 122 308 0
KEY_BUTTON3 = 120 304 0
KEY_START1 = 49 111 0
KEY_START2 = 50 0 0
KEY_COIN1 = 53 105 0
KEY_COIN2 = 54 0 0
KEY_SKILL1 = 304 0 0
KEY_SKILL2 = 122 0 0
KEY_SKILL3 = 120 0 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 0
END

You only need to define the following:
KEY_BUTTON1 = 304 32 0
KEY_BUTTON2 = 122 308 0
KEY_BUTTON3 = 120 304 0
KEY_START1 = 49 111 0
KEY_COIN1 = 53 105 0
KEY_QUIT = 27 113 0

**Your buttons may not be mapped like mine so you may need to play with dapinput.ini and change the first number in the mapping, launch Astron, test buttons, repeat!

I hope it helps!!

I had a bit of trouble with the shared key map. There were one or two repeated entries that conflict. This lead to the keys getting mapped where they shouldn’t on my build.

It took me a while to understand what, exactly, this file was doing. I mean, I understand what it is for, but the fact that there were two keyboard codes for each entry… I was over complicating it for a while thinking it was mapping one to the other. One being the keyboard itself and the other being what the game expects.

Well, that turned out to be totally wrong.

What it actually does is much simpler. It allows two key codes and a joystick button to be mapped to the very same function in the game. For example, the default file maps the KEY_UP, what the game will consider upward movement of the joystick to the up arrow of the keyboard AND the letter “r” AND the joystick up direction. That way, of your keyboard doesn’t have arrow keys, as strange as it may sound, the letter “r” can be used instead. And if you have a joystick, it will work as well.

So, with enlightenment came these notes toward getting the mapping I desired:

The Picade (X-Hat driver, actually) maps the physical joystick and buttons to keyboard codes. So, basically, you can ignore the third number on each line. You just need to make sure the corresponding keyboard codes end up in at least one of the first two number positions of each line.

And this is the resulting mapping file:

[KEYBOARD]
KEY_UP = 273 114 5
KEY_DOWN = 274 102 7
KEY_LEFT = 276 100 8
KEY_RIGHT = 275 103 6
KEY_BUTTON1 = 120 97 14
KEY_BUTTON2 = 122 115 15
KEY_BUTTON3 = 304 113 16
KEY_START1 = 111 0 4
KEY_START2 = 13 0 0
KEY_COIN1 = 105 0 1
KEY_COIN2 = 54 0 0
KEY_SKILL1 = 306 119 0
KEY_SKILL2 = 308 0 0
KEY_SKILL3 = 32 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 17
END

How this is changed from the original? (On my build…)

Essentially, this maps the lower three buttons on the Picade to the three main buttons of the game, KEY_BUTTON1, KEY_BUTTON2, and KEY_BUTTON3. It maps the start and coin buttons, KEY_START1 and KEY_COIN1, to the two front buttons on the Picade. It also maps the two player start button, KEY_START2, to the enter key, the button on the right side of the console. The top three buttons are mapped to the skill level buttons, KEY_SKILL1, KEY_SKILL2, and KEY_SKILL3.

Also, I removed the previously defined “i” assignment to KEY_SKILL2 as it conflicted with the one now being mapped to KEY_COIN1.

Everything else remains as it was. So, if you ever attach an actual keyboard or game controller you should be able to make use of those mappings as well.

Cheers.

Thanks for your suggestions.
One question: how did you map the Picade X-Hat controls? jstest from the terminal doesn’t work …