Can't get controller working in Reicast
-
I know the issue of controller configuration in Reicast has come up before but none of the the information I've found has helped in my case. First the prerequisites.
Pi model: 3B+
Power supply: Argon ONE (5.25V, 3A)
RetroPie version: 4.4.14
Built from: retropie-4.4-rpi2_rpi3.img
USB devices connected: Game controller
Controller used: RetroFlag Wired Controller (SNES version, Dinput mode)
Error messages received: N/A
Guide used: https://github.com/RetroPie/RetroPie-Setup/wiki/Dreamcast
Emulator: Reicast
How to replicate the problem: Run Dreamcast game with ReicastThe problem in short is that my game controller does not work at all in Reicast but it works in RetroArch and the rest of the system. As soon as I launch a Dreamcast game and get past the run screen no more input seems to be received from my controller.
I've been working on a build based on the official 4.4 for the Pi 2/3 image from the website. I've done a lot of customization already when I started trying to get Reicast up and running. When I ran into trouble I flashed clean flashed a new micro SD card, also with the official 4.4 Pi 2/3 image to rule out any issues from my customizations and my issue is replicated.
I've tried installing Reicast straight after the first boot without updating, performing a full system update to 4.4.14 and updating from binary, and also updating from source, all with the same result.
The only changes I've made from the default configuration is to add Reicast, perform updates, add the Dreamcast BIOS files, and add a few games for Dreamcast and other systems that use Libretro cores to compare results with the controller between RetroArch and Reicast.
I've tried making the following edits to config files:
/opt/retropie/configs/all/autoconf.cfg
reicast_input = "0"
/home/pi/.reicast/emu.cfg
[input] evdev_device_id_1 = 0 evdev_device_id_2 = -1 evdev_device_id_3 = -1 evdev_device_id_4 = -1 evdev_mapping_1 = /opt/retropie/configs/dreamcast/mappings/controller_RetroFlagWiredController.cfg joystick_device_id = -1
I've also tried running reicast-joyconfig in conjunction with the above edits and I've also tried running "Clear/Reset Emulation Station input configuration" in RetroPie Setup and re-mapping my controls again after rebooting.
At this point I'm at a loss. I really hope someone here can help.
-
I've also posted recently about Reicast. I created a new image last weekend and since I did that it's not worked at all. No controls work or anything. Plus the bios takes me to some weird screen saying Dreamcast Games & Settings. As if my previous working bios does not work now.
Think it might be a Reicast issue itself as it used to work perfectly.
-
@joelkolb
I think you will have to edit this file. Have you used SSH and Samba network share to access the Pi both respectively?/opt/retropie/configs/dreamcast/mappings/controller_RetroFlagWiredController.cfg
This file can be accessed from the RetroPie samba network share on a local network. Typing \\Retropie\ or \\pi.ip.add.res\ into the Windows explorer address bar with the device connected locally will give you access to the \configs\dreamcast\mappings\ folder.
Let me know and I will explain how to use SSH and the rest of the steps to get the controller working.
-
@Efriim I am familiar with SSH and how to use it and enable it in RetroPie and Raspbian as well as how to access RetroPie's samba shares. I hadn't enabled SSH on this clean install build that I've been testing with just because I'd been making as few changes as possible from the clean install state. However I just turned it on a few minutes ago in order to look at /dev/shm/runcommand.log to see if there was anything odd in there. Anyway, please tell me what changes I should make to controller_RetroFlagWiredController.cfg. For reference, the current contents are as follows.
[emulator] mapping_name = RetroFlag Wired Controller btn_escape = 294 [dreamcast] btn_a = 289 btn_b = 288 btn_c = btn_d = btn_x = 291 btn_y = 290 btn_z = btn_start = 295 btn_dpad1_left = btn_dpad1_right = btn_dpad1_up = btn_dpad1_down = btn_dpad2_left = btn_dpad2_right = btn_dpad2_up = btn_dpad2_down = axis_x = 0 axis_y = 1 axis_trigger_left = axis_trigger_right = [compat] btn_trigger_left = 292 btn_trigger_right = 293 axis_dpad1_x = axis_dpad1_y = axis_dpad2_x = axis_dpad2_y = axis_x_inverted = no axis_y_inverted = no axis_trigger_left_inverted = axis_trigger_right_inverted =
-
@joelkolb
use this script located here and answer all the inputs when it is done it will give a nice output that reflects what the configuration should look like (why it doesn't just save the configuration, I think it is maybe old or a source branch mismatch for retropies configs)anyway this is the script that will help, make sure your controller is connected first you will be using it.
/opt/retropie/emulators/reicast/bin/reicast-joyconfig
I think the order of the inputs it asks for are [Exit emulator][A,B,C,D,X,Y,Z,Start][Dpad1-L,R,U,D][Dpad2-L,R,U,D][LeftTrigger][RightTrigger][Analog-x,y]open the controller_RetroFlagWiredController.cfg in samba with your text editor. Make sure it is the right controller config if not you paste the contents into any of the other configs and then deduce which one it is when it is working.. since they probably aren't set up either.
-
@Efriim thanks for the reply. I did mention towards the end of my original post that I had already tried running reicast-joyconfig. The contents of controller_RetroFlagWiredController.cfg that I posted above were generated from that script.
I'm pretty sure it is the correct controller config because it is the only one that isn't there by default. The contents of the directory /opt/retropie/configs/dreamcast/mappings are as follows.
-rw-r--r-- 1 pi pi 248 Jun 8 04:28 controller_gcwz.cfg -rw-r--r-- 1 pi pi 545 Jun 8 04:28 controller_generic.cfg -rw-r--r-- 1 pi pi 281 Jun 8 04:28 controller_pandora.cfg -rw-r--r-- 1 pi pi 587 Jun 8 03:27 controller_RetroFlagWiredController.cfg -rw-r--r-- 1 pi pi 350 Jun 8 04:28 controller_xboxdrv.cfg -rw-r--r-- 1 pi pi 433 Jun 8 04:28 controller_xpad.cfg -rw-r--r-- 1 pi pi 310 Jun 8 04:28 keyboard.cfg
Are you suggesting that I should copy the contents of controller_RetroFlagWiredController.cfg to the other controller config files under the suspicion that one of those is being used by Reicast instead of the one for my controller? If that is case case, why wouldn't the edits I made to autoconf.cfg and emu.cfg that I mentioned in the original post force Reicast to use my controller config. It seems like an issue with a newer build of Reicast. I'm willing to try anything though.
-
@joelkolb
That was accidentally suggested as a stray from my frame of reference, but I was referencing both Sony Dualshock controllers which have multiple aliases, and 8bitdo controllers that have multiple aliases as well. No that should be the correct config, and none of the others. -
@joelkolb
I'm sorry that hasn't worked for you. Are you making the edits using windows notepad, nano, or a notepad+?Windows notepad I think would not save the line break that unix uses.
-
@Efriim I strictly use Notepad++ because it handles the end of line characters correctly.
-
@joelkolb
try this
cp /opt/retropie/configs/dreamcast/mappings/controller_RetroFlagWiredController.cfg /home/pi/.local/share/reicast/mappings/RetroFlag\ Wired\ Controller.cfg
or list this directory to see if there is a already a config here first.
ls ~/.local/share/reicast/mappings/
Oh yes, and if you use the configure input in emulationstation it rewrites the configuration with the one that you had previously, from wherever it gets that I don't know.
-
@Efriim /home/pi/.local/share is empty for me. There is no reicast subdirectory. As far as the "Configure input" option in Emulation Station, my understanding is that it takes the node it creates in /opt/retropie/configs/all/emulationstation/es_input.cfg for the controller you just set up and converts it into the format for a Reicast controller config file and saves it to /opt/retropie/configs/dreamcast/mappings/. And yes it will overwrite any previous existing file with the name for that config.
-
@joelkolb
try
sudo /opt/retropie/emulators/reicast/bin/reicast-joyconfig
and
ls -la ~/.local/share/reicast/mappings/
that folder has normal permissions and is owned by user if you want to create it. -
I figured it out and the solution seems kind of nutty and definitely, IMHO, indicates there is a bug in reicast-joyconfig. To solve the problem you must have a controller with an analog stick.
tl;dr: You must use a controller with an analog stick to run "+Start Reicast" to navigate the Reicast menu and go to Settings/Controls and then remap your buttons on the controller without an analog stick. reicast-joyconfig incorrectly maps exit and start to clicking on the analog sticks. This will cause you to get stuck once you launch a game using a controller without an analog stick. Remapping your buttons in this interface will fix this and get your analog-stick-less controller working in Reicast.
The long, detailed explanation:
So the controller that I was using (RetroFlag Wired Controller) has no analog sticks since it is a SNES style controller. This all started with a build I'm making for a friend who only has this controller and I was setting him up with a few Dreamcast games that run well in RetroPie and also don't require analog input (e.g. Capcom vs. SNK, Marvel vs. Capcom, Power Stone, etc.). The problem comes into play because reicast-joyconfig and Emulation station's configure input option both map the exit and start buttons incorrectly. I said earlier I think the bug is in reicast-joyconfig because Emulation Station will map those buttons exactly the same as reicast-joyconfig in the controller config files they both generate so Emulation Station seems to just be following suit with reicast-joyconfig. Actually, I don't know this for sure but rather than mapping es_input.cfg to a Reicast controller config on it's own, it could be possible that after setting up a cconroller in Emulation Station, it could actually run reicast-joyconfig in the cackground, feeding it parameters for the button/stick mappings based on what was just saved in es_input.cfg. This to me would even more strongly indicate that there is a bug in reicast-joyconfig.Sorry for the tangent, back to the solution. So the controller I had been using has no analog sticks. On a hunch I set up another controller that does have analog sticks (8BitDo SN30 Pro). After launching a Dreamcast game with this controller and fumbling with the controller for a bit I discovered that the exit and start buttons were incorrectly mapped to clicking down on the left and right analog sticks. Since my RetroFlag Wired Controller has no analog sticks it effectively was mapped with no select or exit buttons. So when a game launches and gets to the title screen or a screen where it prompts you to set up a save slot and you are required to press start to proceed you will be stuck and you can't start the game or exit Reicast back to Emulation Station.
When I run +Start Reicast I found that even though it is navigated with the D-pad, I could only navigate it using the D-pad on my controller that also has an analog stick. I think this is due to some further weirdness with how the analog stick and D-pad are mapped by reicast-joyconfig. More on that later.
Once in the Reicast menu, when I go to Settings there is a Controls sub-menu with a Physical Devices section at the bottom with both of my controllers listed and the option to map the buttons and sticks on those controllers. When I went to re-map my 8BitDo controller I found that all the button numbers that were assigned in this interface were totally different from what they were previously listed as (and I assume it got those previous values from the config file generated by reicast-joyconfig). But the most significant of those incorrect mappings were the exit and start buttons. Both before and after remapping, the controller still worked and all the controls worked as expected except for the exit and select buttons.
So, I then remapped my RetroFlag controller. I experienced the same situation were the the values for all the buttons were different when mapping here. Also odd was that I could not remap the D-pad here. It simply did not recognize any input from it. However, after saving those new values and loading games my RetroFlag controller worked perfectly, now that start and exit were no longer mapped to non-existent analog sticks.
Also interesting is that performing these remaps in Reicast created the following files.
evdev_Pro Controller.cfg
evdev_RetroFlag Wired Controller.cfgThe previous files:
controller_ProController.cfg
controller_RetroFlagWiredController.cfg
are no longer used and can be deleted.Unfortunately, all this means that if you want to use Reicast with a controller that does not have an analog stick, you must first use a controller that does have an analog stick to get the other controller properly configured in Reicast. Fortunately, this is an option for me but may not be an option for others. And either way it seems like a bit of an unnecessary hassle.
Anyway, I hope this helps someone.
-
@joelkolb said in Can't get controller working in Reicast:
I figured it out and the solution seems kind of nutty and definitely, IMHO, indicates there is a bug in reicast-joyconfig. To solve the problem you must have a controller with an analog stick.
...Emulationstation does run a script to generate a controller config once you've set up a controller, so you don't have to set it up again by starting
+Start Reicast.sh
. If there is a bug somewhere, then can you please attach thees_input.cfg
and the - faulty - generatedevdev_RetroFlag Wired Controller.cfg
? -
@joelkolb
I didn't know there was an option in the reicast menu to change from analog. I didn't know there was a reicast menu, other than the DC bios.There are input settings in the \config\dreamcast\emu.cfg that can point to any mapper file but I've never had to change them, they are somewhat automatic.
Though that was confusing. Even if you edited out the analog sticks, it still needed something to point to the mapper file. We could have investigated the emu.cfg maybe reicast just needed a proper shutdown to set the configuration automatically.
The default mapper I always get for my DS3 is what would work if I were using the playstation3 sixad driver. The mapped numbers are key events in the 300+ range unlike the button definition in the es_input. I don't know where it gets this file from, or the difference between key events and js events.
-
@Efriim The ability to go into the Reicast menu seems to have been added with a more recent build. Previously +Start Reicast would just take you to the Dreamcast BIOS. Now it takes you to the Reicast menu where there is the option to boot to the BIOS and many other configuration options.
The mapped numbers for both my 8BitDo and RetroFlag controllers were also in the +300 range and far different from what's in es_input.cfg which are single and double digit numbers. However, when remapping my RetroFlag controller in the Reicast menu the numbers changed to the 200+ range.
@mitu Sure thing, I will upload the files soon. It might take a few hours though. It's very late where I am and this issue has been keeping me up but now that I've got it licked I really need some sleep. But I definitely want to help figure out if there's a bug in whatever way I can.
-
@joelkolb
That is really cool, I had to update to check it out. I saw it earlier in another post but I thought it was Attract Mode front end or something. -
@mitu OK, decided to stay up a little longer to get this done. I am getting a message from the forum when I try to attach the files saying that I don't have enough privileges so I'm embedding their contents below. I hope that's OK.
es_input.cfg
<?xml version="1.0"?> <inputList> <inputAction type="onfinish"> <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command> </inputAction> <inputConfig type="joystick" deviceName="RetroFlag Wired Controller" deviceGUID="03000000830500006020000010010000"> <input name="pageup" type="button" id="4" value="1"/> <input name="start" type="button" id="7" value="1"/> <input name="down" type="axis" id="1" value="1"/> <input name="pagedown" type="button" id="5" value="1"/> <input name="right" type="axis" id="0" value="1"/> <input name="select" type="button" id="6" value="1"/> <input name="left" type="axis" id="0" value="-1"/> <input name="up" type="axis" id="1" value="-1"/> <input name="a" type="button" id="0" value="1"/> <input name="b" type="button" id="1" value="1"/> <input name="x" type="button" id="2" value="1"/> <input name="y" type="button" id="3" value="1"/> </inputConfig> <inputConfig type="joystick" deviceName="Pro Controller" deviceGUID="050000007e0500000920000001000000"> <input name="rightanalogdown" type="axis" id="3" value="1"/> <input name="rightanalogleft" type="axis" id="2" value="-1"/> <input name="pageup" type="button" id="4" value="1"/> <input name="start" type="button" id="9" value="1"/> <input name="rightanalogup" type="axis" id="3" value="-1"/> <input name="down" type="hat" id="0" value="4"/> <input name="leftanalogright" type="axis" id="0" value="1"/> <input name="pagedown" type="button" id="5" value="1"/> <input name="right" type="hat" id="0" value="2"/> <input name="select" type="button" id="8" value="1"/> <input name="left" type="hat" id="0" value="8"/> <input name="leftanalogup" type="axis" id="1" value="-1"/> <input name="up" type="hat" id="0" value="1"/> <input name="a" type="button" id="1" value="1"/> <input name="b" type="button" id="0" value="1"/> <input name="leftanalogdown" type="axis" id="1" value="1"/> <input name="x" type="button" id="3" value="1"/> <input name="leftanalogleft" type="axis" id="0" value="-1"/> <input name="y" type="button" id="2" value="1"/> <input name="rightanalogright" type="axis" id="2" value="1"/> </inputConfig> </inputList>
Below are the faulty files generated by Emulation Station that did not work properly.
controller_ProController.cfg[emulator] mapping_name = Pro Controller btn_escape = 296 [dreamcast] btn_a = 288 btn_b = 289 btn_c = btn_d = btn_x = 290 btn_y = 291 btn_z = btn_start = 297 btn_dpad1_left = btn_dpad1_right = btn_dpad1_up = btn_dpad1_down = btn_dpad2_left = btn_dpad2_right = btn_dpad2_up = btn_dpad2_down = axis_x = 0 axis_y = 1 axis_trigger_left = axis_trigger_right = [compat] btn_trigger_left = 292 btn_trigger_right = 293 axis_dpad1_x = 2 axis_dpad1_y = 3 axis_dpad2_x = axis_dpad2_y = axis_x_inverted = no axis_y_inverted = no axis_trigger_left_inverted = axis_trigger_right_inverted = axis_dpad1_y_inverted = no axis_dpad1_x_inverted = no
controller_RetroFlagWiredController.cfg
[emulator] mapping_name = RetroFlag Wired Controller btn_escape = 294 [dreamcast] btn_a = 289 btn_b = 288 btn_c = btn_d = btn_x = 291 btn_y = 290 btn_z = btn_start = 295 btn_dpad1_left = btn_dpad1_right = btn_dpad1_up = btn_dpad1_down = btn_dpad2_left = btn_dpad2_right = btn_dpad2_up = btn_dpad2_down = axis_x = 0 axis_y = 1 axis_trigger_left = axis_trigger_right = [compat] btn_trigger_left = 292 btn_trigger_right = 293 axis_dpad1_x = axis_dpad1_y = axis_dpad2_x = axis_dpad2_y = axis_x_inverted = no axis_y_inverted = no axis_trigger_left_inverted = axis_trigger_right_inverted =
Below are the good files generated in Reicast that did work properly
evdev_Pro Controller.cfg[compat] axis_dpad1_x = 16 axis_dpad1_x_inverted = no axis_dpad1_y = 17 axis_dpad1_y_inverted = no axis_dpad2_x = 18 axis_dpad2_x_inverted = no axis_trigger_left_inverted = no axis_trigger_right_inverted = no axis_x_inverted = no axis_y_inverted = no btn_trigger_left = 308 btn_trigger_right = 309 [dreamcast] axis_trigger_left = 2 axis_trigger_right = 5 axis_x = 0 axis_y = 1 btn_a = 305 btn_b = 304 btn_d = 317 btn_dpad1_down = 547 btn_dpad1_left = 544 btn_dpad1_right = 545 btn_dpad1_up = 546 btn_start = 313 btn_x = 307 btn_y = 306 [emulator] btn_escape = 312 mapping_name = Pro Controller mapping
evdev_RetroFlag Wired Controller.cfg
[compat] axis_dpad1_x = 16 axis_dpad1_x_inverted = no axis_dpad1_y = 17 axis_dpad1_y_inverted = no axis_dpad2_x = 18 axis_dpad2_x_inverted = no axis_trigger_left_inverted = no axis_trigger_right_inverted = no axis_x_inverted = no axis_y_inverted = no btn_trigger_left = 292 btn_trigger_right = 293 [dreamcast] axis_trigger_left = 2 axis_trigger_right = 5 axis_x = 0 axis_y = 1 btn_a = 288 btn_b = 289 btn_c = 306 btn_d = 317 btn_dpad1_down = 547 btn_dpad1_left = 544 btn_dpad1_right = 545 btn_dpad1_up = 546 btn_start = 295 btn_x = 290 btn_y = 291 btn_z = 309 [emulator] btn_escape = 294 mapping_name = RetroFlag Wired Controller mapping
I hope that is helpful.
-
@joelkolb The ones that don't work are really similar to mine that don't work, with only the x and y or a and b being swapped. I tried the gui, it is really good, and the new mapping works alright.
-
@mitu I never heard back from you. Is what I posted good? Is there anything more I should add?
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.