-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Zero Delay Encoder] Custom hotkey(edit arcade1&2.py) #37
Comments
(See here for the main Zero Decoder Arcade controller thread...) Hi and thanks for trying out McAirpos and good to hear it is mostly working on your arcade! The reason your hotkey is not working for exiting the MakeCode Arcade games is probably because MakeCode is unaware of your controller config in either RetroPie or Recalbox, and instead works and is mapped independently on a much lower level; directly in the raw/Linux Input Subsystem(with some mapping help from uinput-mapper if you did not configure your controller manually). uinput-mapper’s default arcade1.py mapping config file covers many common gamepads’ button mappings, but since there’s a very wide variety, some gamepads work 100%, others only partly and others again incorrectly or not at all without some edits to this file. MakeCode Arcade games features an exit button, a restart button and a menu button, which by default for e.g. the PS3 controller is mapped to its start, select and mode(middle) buttons, respectively: What controller are you using and which button on it would you like to work as the hotkey/exit button? (PS: you could run evtest in the console and press this button to get its EV_KEY code name) |
Working now? |
Nice arcade! Only the one blue button on the left side, or another red button on the right as well? Please run evtest in the console, press the button(s) and take note of the ev_code(s). Then replace
Alternatively, replace it directly with the correct ev scancode number in /sd/arcade.cfg; McAirpos/McAirpos/MakeCode/sd/arcade.cfg Line 15 in df64590
Translation between EV key and number scancodes here: |
What is the brand/designation of the controller(s) in evtest, by the way? And is it connected by usb or GPIO? |
It says DragonRise Inc. Generic USB Joystick. And it is connected by USB. I seem to be having trouble finding the arcade1.py file. Is it supposed to already be on the microSD card when I installed Recalbox and the Makecode arcade ROM? Or am I supposed to add the Zip File from GItHub in there somehow? I'm sorry, I am not experienced at using GitHub and I just need to know where to start. |
Ok, thanks! How about the arcade1.py(and ..2.py) is located under /home/pi/McAirpos/McAirpos/uinput-mapper/configs/ PS: If you give me the |
By the way, many generic joysticks are identified with the DragonRise driver/device name. What was the brand/name of the arcade controller kit that you bought? |
Right! It's called the Reyann Zero Delay Arcade USB Encoder |
Did the scancodes also have a name, like "BTN_Something"? (e.g. BTN_START) |
You need to enter the CLI/console, like you did when you installed McAirpos. You won't find it on the network shared folder, which is in another subdirectory structure away from the root folder /... |
BTN_BASE2 |
Hi again, Please download and replace arcade1.py and arcade2.py in /home/pi/McAirpos/McAirpos/uinput-mapper/configs with these two files in the zip archive and check if the side buttons work as EXIT now: |
I DID IT! Thank you so much for your help! You have no idea how much you have helped me! |
Glad it worked and thanks for your greatful feedback! For future reference, if you want to change other buttons: The clue here was to edit arcade1&2.py of uinput-mapper, which sits and remaps buttons between your controller(s) and the MakeCode Arcade games: ...with the default configuration as shown in this table: ...which in your case was just to change BTN_BASE4 from the default arcade1&2.py files to the value BTN_BASE2 which you got from McAirpos/McAirpos/uinput-mapper/configs/arcade1.py Lines 282 to 285 in 305cd84
...which in the field McAirpos/McAirpos/MakeCode/sd/arcade.cfg Line 15 in df64590
Happy retro games making and playing! ;-) |
Hello again, I am getting my arcade machine working perfectly with your code! I just have one issue though, whenever I play my games, I can't exit out with the HOTKEY like the other games on there. Is there a way to do so that I might not have tried yet?
Thank you.
The text was updated successfully, but these errors were encountered: