Daemonbite Double Button Assignment

Discussion of keyboards, gamepads, joysticks and other input related peripherals.
jhartley111
Posts: 2
Joined: Thu Oct 07, 2021 6:50 pm
Has thanked: 1 time

Daemonbite Double Button Assignment

Unread post by jhartley111 »

I just built a daemonbite arcade stick and everything seems to work perfectly when plugged into Windows to test it's functionality as a joystick. But in Mister, when "defining joystick buttons" I get some odd behavior.

All buttons and directions seem to be assigning correctly as I go through the sequence of assigning them one by one. However, when I am assigning a button to "Start" and "Menu", when I press the button, it gets assigned to the correct assignment, but then Mister moves to the next assignable and when I release the button it gets assigned to that. So a single button press gets assigned to "Start" and the following command, "Mouse Move Right". And when I try to assign a button to "Menu", it also gets assigned to "Menu: OK"

For all other commands, the assignment doesn't happen until I release the button, nothing happens when I initially press the button. But on Start and OSD the assignment happens on the initial press, and then again on the button release.

I have tried assigning it to different buttons on my arcade stick and the problem only happens on Start and OSD, independent from which physical button I assign it to.

Tests with another gamepad I had laying around worked fine, no "double assignments"

I have tried to manually edit the "map" file but I have no idea what format it's in.

Thanks
gamesfan
Posts: 65
Joined: Mon Jun 07, 2021 7:15 pm
Has thanked: 2 times
Been thanked: 10 times

Re: Daemonbite Double Button Assignment

Unread post by gamesfan »

I had this happen to me as well, I "thought" it may be the fact I use some 30mm Sanwa buttons for my regular controls and then some smaller (maybe 24) from some other company and figured the button may have a double action as in the actual press is one and the release is the second making it go to the next.
So what I ended up doing was just shorting the connections where I was going to put the buttons on the Pro Micro board..
It still seemed very sensitive but after 1000 or so tries I finally got it.
caad
Posts: 81
Joined: Sun Oct 03, 2021 4:37 pm
Has thanked: 2 times
Been thanked: 19 times

Re: Daemonbite Double Button Assignment

Unread post by caad »

You should rebuild the Daemonbite firmware with debouncing enabled.
jhartley111
Posts: 2
Joined: Thu Oct 07, 2021 6:50 pm
Has thanked: 1 time

Re: Daemonbite Double Button Assignment

Unread post by jhartley111 »

Thanks! Enabling Debouncing totally fixed the issue.

Prior to uploading the firmware to the Arduino, edit the following line from "0" to "1":

#define DEBOUNCE 0 // 1=Diddly-squat-Delay-Debouncing™ activated, 0=Debounce deactivated
gamesfan
Posts: 65
Joined: Mon Jun 07, 2021 7:15 pm
Has thanked: 2 times
Been thanked: 10 times

Re: Daemonbite Double Button Assignment

Unread post by gamesfan »

Debouncing? I will look into that, I didnt see anything on it before. Thanks for the tip!

Didnt see any info in the readme about debouncing on github, but it seems easy to enable and disable..

#include "Gamepad.h"

//#define PS3 // PS3 (ScpToolkit) compatibility (Comment out for joystick=X/Y-Axis and B11/B12 as normal buttons)
//#define NEOGEO

#define DEBOUNCE 1 // 1=Diddly-squat-Delay-Debouncing™ activated, 0=Debounce deactivated
#define DEBOUNCE_TIME 10 // Debounce time in milliseconds
//#define DEBUG // Enables debugging (sends debug data to usb serial)
User avatar
aberu
Core Developer
Posts: 1144
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

Re: Daemonbite Double Button Assignment

Unread post by aberu »

https://twitter.com/misteraddons/status ... 3410392064

Some explanation of debouncing from MiSTerAddons.com's twitter. If you notice that pressing down in a script's menu moves more than one slot, this is also the reason.

10 ms for debounce is excessively fast. This is time between presses, if someone can press two buttons in well under a frame, they would be superhuman.
birdybro~
gamesfan
Posts: 65
Joined: Mon Jun 07, 2021 7:15 pm
Has thanked: 2 times
Been thanked: 10 times

Re: Daemonbite Double Button Assignment

Unread post by gamesfan »

Thanks for the link and your advise!!!
Post Reply