Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Reicast - Mapping controllers??? (2020 version). Stuck.



  • Hardware: Raspberry Pi 3
    Power supply: Canakit supplied power supply
    RetroPie 4.5.9
    EmulationStation v2.9.0RP
    Built From: Raspian GNU/Linux 9.4 Stretch
    USB Connected devices: Rii keyboard, Logitech F 710 controller, Micron Tek Joysticks/Buttons (x2)

    Hi all. Doing a fresh build, everything went smoothly (retroarch, yay) but I am stuck with reicast.... I've tried everything I could researching these forums and other sources. I cannot solve how to map my controller. Spent all day Sat and Sun like a zombie, and I just can't anymore. Please help.

    I've tried the following methods to map my controller:

    1. Resetting and re-configuring the controller on ES so it autoconfigs reicast
    2. Mapped the controller using the Reicast mapping configuration in RetroPie Setup
    3. Used sudo /opt/retropie/emulators/reicast/bin/reicast-joyconfig and copied and pasted the results to the .cfg in /opt/retropie/configs/dreamcast/mappings/evdev_Logitech Gamepad F710.cfg

    I would get identical mapping for the .cfg posted below for methods #2 and #3. Only btn_escape = 316 seems to work; I can successfully exit the emulator, and if I change this value, it stops working. For mapping, I only inputted a,b,x,y, start, exit/escape, L trigger, R trigger, and analog stick.

    In the script, I get the following:

    0:   mini keyboard (/dev/input/event0, usb-3f980000.usb-1.5/input0)
    1:   mini keyboard (/dev/input/event1, usb-3f980000.usb-1.5/input1)
    2: Microntek              USB Joystick           (/dev/input/event2, usb-3f980000.usb-1.2/input0)
    3: Microntek              USB Joystick           (/dev/input/event3, usb-3f980000.usb-1.4/input0)
    4: Logitech Gamepad F710 (/dev/input/event4, usb-3f980000.usb-1.3/input0)
    

    ^---My end goal is to successfully map 2 & 3 but I read that I need an analog controller to enter Settings in +Start Reicast, hence why I am using the Logitech F710 first.

    /opt/retropie/configs/dreamcast/mappings/evdev_Logitech Gamepad F710.cfg

    [emulator]
    mapping_name = Logitech Gamepad F710
    btn_escape = 316
    
    [dreamcast]
    btn_a = 304
    btn_b = 305
    btn_x = 307
    btn_y = 308
    btn_start = 315
    axis_x = 0
    axis_y = 1
    
    [compat]
    btn_trigger_left = 310
    btn_trigger_right = 311
    axis_x_inverted = no
    axis_y_inverted = no
    
    

    /opt/retropie/configs/dreamcast/emu.cfg

    [audio]
    backend = oss
    disable = 0
    
    [config]
    Debug.SerialConsoleEnabled = no
    Dreamcast.Broadcast = 4
    Dreamcast.Cable = 3
    Dreamcast.ContentPath = 
    Dreamcast.FullMMU = no
    Dreamcast.Language = 6
    Dreamcast.RTC = 1543276800
    Dreamcast.Region = 3
    Dynarec.Enabled = yes
    Dynarec.SmcCheckLevel = 0
    Dynarec.idleskip = yes
    Dynarec.safe-mode = yes
    Dynarec.unstable-opt = no
    Social.HideCallToAction = no
    aica.LimitFPS = yes
    aica.NoBatch = no
    aica.NoSound = no
    bios.UseReios = 0
    pvr.MaxThreads = 3
    pvr.Subdivide = 0
    pvr.SynchronousRendering = no
    pvr.rend = 0
    rend.Clipping = yes
    rend.CustomTextures = no
    rend.DumpTextures = no
    rend.FloatVMUs = no
    rend.Fog = yes
    rend.MaxFilteredTextureSize = 256
    rend.ModifierVolumes = yes
    rend.RenderToTextureBuffer = no
    rend.RenderToTextureUpscale = 1
    rend.Rotate90 = no
    rend.ScreenScaling = 100
    rend.ScreenStretching = 100
    rend.ShowFPS = no
    rend.TextureUpscale = 1
    rend.UseMipmaps = 1
    rend.WideScreen = no
    ta.skip = 0
    
    [dispmanx]
    height = 480
    maintain_aspect = yes
    width = 640
    
    [input]
    MouseSensitivity = 100
    VirtualGamepadVibration = 20
    device1 = 0
    device1.1 = 1
    device1.2 = 1
    device2 = 8
    device2.1 = 8
    device2.2 = 8
    device3 = 8
    device3.1 = 8
    device3.2 = 8
    device4 = 8
    device4.1 = 8
    device4.2 = 8
    evdev_device_id_1 = 4
    evdev_device_id_2 = -1
    evdev_device_id_3 = -1
    evdev_device_id_4 = -1
    maple_/dev/input/event2 = 0
    maple_/dev/input/event3 = 2
    maple_/dev/input/event4 = 1
    
    [omx]
    audio_hdmi = yes
    audio_latency = 100
    
    [validate]
    OpenGlChecks = 0
    

    I used the following as references:
    https://retropie.org.uk/forum/topic/22491/can-t-get-controller-working-in-reicast
    https://retropie.org.uk/forum/topic/22442/dreamcast-reicast-not-starting/48
    https://github.com/retropie/retropie-setup/wiki/Dreamcast

    Any guidance would be much appreciated. Honestly, I did my best. The last couple days felt like work days.



  • Gave it another shot lately after a break. Pretty damn determined and perhaps stubborn at this point. I managed to get player 1 to work with this emu.cfg and mapping:

    However, beforehand I updated the Retropie script to 4.5.10 and deleted and reinstalled Reicast.

    [audio]
    backend = oss
    disable = 0
    
    [config]
    Debug.SerialConsoleEnabled = no
    Dreamcast.Broadcast = 4
    Dreamcast.Cable = 3
    Dreamcast.ContentPath = 
    Dreamcast.FullMMU = no
    Dreamcast.Language = 6
    Dreamcast.Region = 3
    Dynarec.Enabled = yes
    Dynarec.SmcCheckLevel = 0
    Dynarec.idleskip = yes
    Dynarec.safe-mode = yes
    Dynarec.unstable-opt = no
    Social.HideCallToAction = no
    aica.LimitFPS = no
    aica.NoBatch = no
    aica.NoSound = no
    pvr.MaxThreads = 3
    pvr.SynchronousRendering = yes
    pvr.rend = 0
    rend.Clipping = yes
    rend.CustomTextures = no
    rend.DumpTextures = no
    rend.FloatVMUs = no
    rend.Fog = yes
    rend.MaxFilteredTextureSize = 256
    rend.ModifierVolumes = yes
    rend.RenderToTextureBuffer = no
    rend.RenderToTextureUpscale = 1
    rend.Rotate90 = no
    rend.ScreenScaling = 100
    rend.ScreenStretching = 100
    rend.ShowFPS = yes
    rend.TextureUpscale = 1
    rend.WideScreen = no
    ta.skip = 0
    
    [input]
    MouseSensitivity = 100
    VirtualGamepadVibration = 20
    device1 = 0
    device1.1 = 1
    device1.2 = 1
    device2 = 8
    device2.1 = 8
    device2.2 = 8
    device3 = 8
    device3.1 = 8
    device3.2 = 8
    device4 = 8
    device4.1 = 8
    device4.2 = 8
    maple_/dev/input/event0 = 0
    maple_/dev/input/event1 = 1
    maple_/dev/input/event2 = 0
    maple_/dev/input/event3 = 1
    maple_/dev/input/event4 = 2
    
    [players]
    nb = 2
    

    I just want to add that with or without evdev_device_id......it magically works. How???

    evdev_device_id_1 = 4
    evdev_device_id_2 = -1
    evdev_device_id_3 = -1
    evdev_device_id_4 = -1
    

    evdev_Microntek USB Joystick.cfg Player 1 WORKING 100%. Just not player two (only the escape button works for player two)

    [emulator]
    mapping_name = Microntek              USB Joystick          
    btn_escape = 296
    
    [dreamcast]
    btn_a = 288
    btn_b = 289
    btn_c =
    btn_d =
    btn_x = 290
    btn_y = 291
    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 =
    

    As mentioned above, Player 1 works. For Player 2 (same Micron tek joystick/button setup...this is on a arcade cabinet) ONLY the "escape" button works where it just exits the emulator.

    I tried to use the SAME usb port with a Logitech F310 (on Dinput mode) generated by the script:

    evdev_Logitech Logitech Dual Action.cfg NOT WORKING. Only the escape button works.

    [emulator]
    mapping_name = Logitech Logitech Dual Action 
    btn_escape = 296
    
    [dreamcast]
    btn_a = 289
    btn_b = 290
    btn_x = 288
    btn_y = 291
    btn_start = 297
    axis_x = 0
    axis_y = 1
    
    [compat]
    btn_trigger_left = 294
    btn_trigger_right = 295
    axis_x_inverted = no
    axis_y_inverted = no
    
    

    With no response. ONLY the "escape" button works where it just exits the emulator. Reason why I am trying have the logitech f310 to work is to enter settings...I think that's the key here I think.

    For the sake of providing more information...here is /dev/input and contents of the subfolders:

    3.png 2.png 1.png

    Very exhausted now, and out of ideas.

    @joelkolb - Tried your suggestion but that didn't work. :(

    @Efriim - You seem like the guru for these issues. I'd appreciate any guidance.



  • @Plex7

    For reference, I've struggled getting 2 controllers to work with reicast, but my current configuration is working (and I'm not touching it for a good while, as I'd like to actually enjoy some games). So I'm happy to share my config files and explain what I did.

    I'm using bluetooth 8bitdo SN30 Pro controllers. These were originally configured in ES. After my initial installation of reicast, one of my controllers worked, but the button mapping was obviously wrong. But the controller was recognized by reicast out-of-the-box... I didn't do any manual configuration. For reference, I first installed reicast 3 days ago (and first installed retropie on my Rpi about 1 month ago).

    To fix the button mapping issue, I ran ~/RetroPie-Setup/retropie_setup.sh, and went to:
    Configuration / tools > reicast > configure input devices for reicast

    After that, I rebooted the pi and the buttons were mapped correctly. Then I moved on to attempting to configure my second controller. I updated retropie core packages and the reicast package (via retropie_setup.sh).

    Then I replaced the following line in /opt/retropie/configs/all/autoconf.cfg..

    reicast_input = "1"
    

    ..to:

    reicast_input = "0"
    

    Then I deleted my existing ~/.reicast/emu.cfg.

    Then I ran /opt/retropie/emulators/reicast/bin/reicast-joyconfig on both controllers and rebooted.

    Then in ES, I click on +START REICAST under the Dreamcast games list view. This brings me to a screen where I can select GAMES, Settings, Join our Discord Server, or Dreamcast BIOS. I select 'Settings'. This brings me to a Settings screen which has a 'Controls' tab.

    Under the Controls tab, there's a 'Dreamcast Devices' section. I set Device A and B to 'Sega Controller' with 'Sega VMU'. Originally, only Device A was configured. I honestly don't know if this step is needed, but that's what I did first. The other step I took here was under the 'Physical Devices' section, where I set the 'Port' for my evdev 8bitdo SN30 Pro device to 'A'. Then I selected 'None' for all remaining devices (like keyboard and mouse). Here's a screenshot:
    IMG_4077.jpg
    Then I clicked 'Done', exited using the Select button on my controller, and restarted emulationstation.

    Finally, I just initialized the VMUs for both controllers by running +START REICAST, and selecting 'Dreamcast BIOS' on the screen that comes up.

    For reference, my resulting auto-generated emu.cfg is as follows:

    [audio]
    backend = alsa
    disable = 0
    
    [config]
    Debug.SerialConsoleEnabled = no
    Dreamcast.Broadcast = 4
    Dreamcast.Cable = 3
    Dreamcast.ContentPath = 
    Dreamcast.FullMMU = no
    Dreamcast.Language = 6
    Dreamcast.Region = 3
    Dynarec.Enabled = yes
    Dynarec.SmcCheckLevel = 0
    Dynarec.idleskip = yes
    Dynarec.safe-mode = yes
    Dynarec.unstable-opt = no
    Social.HideCallToAction = no
    aica.LimitFPS = yes
    aica.NoBatch = no
    aica.NoSound = no
    pvr.MaxThreads = 3
    pvr.SynchronousRendering = yes
    pvr.rend = 0
    rend.Clipping = yes
    rend.CustomTextures = no
    rend.DumpTextures = no
    rend.FloatVMUs = no
    rend.Fog = yes
    rend.MaxFilteredTextureSize = 256
    rend.ModifierVolumes = yes
    rend.RenderToTextureBuffer = no
    rend.RenderToTextureUpscale = 1
    rend.Rotate90 = no
    rend.ScreenScaling = 100
    rend.ScreenStretching = 100
    rend.ShowFPS = no
    rend.TextureUpscale = 1
    rend.WideScreen = no
    ta.skip = 0
    
    [input]
    MouseSensitivity = 100
    VirtualGamepadVibration = 20
    device1 = 0
    device1.1 = 1
    device1.2 = 1
    device2 = 0
    device2.1 = 1
    device2.2 = 1
    device3 = 8
    device3.1 = 8
    device3.2 = 8
    device4 = 8
    device4.1 = 8
    device4.2 = 8
    maple_/dev/input/event3 = 0
    maple_/dev/input/event4 = 1
    maple_05000000c82d00000161000000010000 = -1
    maple_sdl_keyboard = -1
    maple_sdl_mouse = -1
    

    Hope this helps. If you don't see the above config screen, you might have to update retropie core packages and the reicast package through retropie_setup.sh. If you do that and you find games no longer run (as I did!), let me know. I can probably help you fix that issue if it comes up.



  • @rejesterd I believe all you need to do now is use the +startreicast option and map your controllers there. I don't think modifying any of those other configs is necessary if you are using an up to date version of reicast.



  • @quicksilver Thanks, but I don't see any options to map controller buttons using +start reicast (unless we're talking about different commands.. I'm talking about the option shown in ES if you go to your roms list for Dreamcast). There, I only see options for configuring the VMUs. But I could never see a second controller in the BIOS ui until I changed the settings shown in my screenshot. But I can't verify how much of what I did was necessary.



  • @rejesterd try updating the retropie setup script then update reicast from source. Once it is updated then try launching +startreicast



  • @quicksilver I'll give that a try going forward, but for now, I'm going to keep the system as-is, since I have 2 controllers working well enough with reicast. I'll go through another round of learning-all-the-levers after I enjoy some games :P

    Hoping the reicast folks update their User Guide soon, as it has zero supplemental screenshots to clarify what things like the "Paths screen" and "Input screen" are. I might write my own once I play with it some more.



  • Hi,

    I registered just now because I too am having this issue. It certainly started a few months ago but all the fixes mentioned everywhere I've tried with no luck. The one thing I cannot do is get into the Settings menu of +Start Reicast. Neither keyboard nor the 4 button Buffalo Super NES controller that's always worked can get me into that menu. I always have to CTRL-C to exit the +Start Reicast screen. I'm running fully updated Retropie on a Pi 3B, built Reicast from source, removed it, re-installed it, done the manual controller config. Controller works fine in all other emulators.



  • @Nunyahpi As I understand, this is how it works:

    When you click +START REICAST in Emulation Station, that triggers the start script to run (under /opt/retropie/emulators/reicast/bin/reicast.sh). That script looks in ~/.reicast/emu.cfg to see what input devices are mapped. Here is the input section of my emu.cfg:

    [input]
    MouseSensitivity = 100
    VirtualGamepadVibration = 20
    device1 = 0
    device1.1 = 1
    device1.2 = 1
    device2 = 0
    device2.1 = 1
    device2.2 = 1
    device3 = 8
    device3.1 = 8
    device3.2 = 8
    device4 = 8
    device4.1 = 8
    device4.2 = 8
    maple_/dev/input/event0 = 0
    maple_/dev/input/event1 = 1
    maple_/dev/input/event3 = 1
    maple_/dev/input/event4 = 0
    maple_/dev/input/event5 = 1
    maple_05000000c82d00000161000000010000 = 1
    maple_sdl_keyboard = 0
    maple_sdl_mouse = 0
    

    For reference, I've configured 2 8Bitdo controllers, which are shown by 'maple_/dev/input/event0' and 'maple_/dev/input/event1' above. I know this, because I can check it..

    $ evtest /dev/input/event0 | less
    
    Input driver version is 1.0.1
    Input device ID: bus 0x5 vendor 0x2dc8 product 0x6101 version 0x100
    Input device name: "8Bitdo SN30 Pro"
    ...
    $ evtest /dev/input/event1 | less
    
    Input driver version is 1.0.1
    Input device ID: bus 0x5 vendor 0x2dc8 product 0x6101 version 0x100
    Input device name: "8Bitdo SN30 Pro"
    ...
    

    If you don't already have it, you can install evtest using the command:

    sudo apt-get install evtest

    For each /dev/input/event<n>, there should be a corresponding /dev/input/js<n>. The reicast.sh script checks these details, which are under /sys/class/input/. Again, you can confirm which ones are your controllers..

    $ cat /sys/class/input/event0/device/js0/device/name
    8Bitdo SN30 Pro
    
    $ cat /sys/class/input/event0/device/name
    8Bitdo SN30 Pro
    
    $ cat /sys/class/input/event1/device/js1/device/name
    8Bitdo SN30 Pro
    
    $ cat /sys/class/input/event1/device/name
    8Bitdo SN30 Pro
    

    Reicast searches for the name '8Bitdo SN30 Pro' in all config files under ~/.reicast/mappings/. You can perform this search manually..

    $ grep -r '8Bitdo SN30 Pro' ~/.reicast/mappings/
    /home/pi/.reicast/mappings/controller_8BitdoSN30Pro.cfg:mapping_name = 8Bitdo SN30 Pro
    

    So 'controller_8BitdoSN30Pro.cfg' is the config file that reicast should look to if 'reicast_input' is set to 0 in /opt/retropie/configs/all/autoconf.cfg. I have it set to 0 in case you were wondering.

    So I would first see if the auto-config is disabled, then determine which .cfg file reicast is looking for, and check the mappings in there. If those are right, it should work.

    You can also add a debug line to your reicast.sh to spit out what config parameters are being passed to reicast when you launch a game. Here is the last section of my reicast.sh:

    params=(-config config:homedir=$HOME -config x11:fullscreen=1)
    #[[ -n "$XRES" ]] && params+=(-config x11:width=$XRES -config x11:height=$YRES)
    getAutoConf reicast_input && params+=($(mapInput))
    [[ -n "$AUDIO" ]] && params+=(-config audio:backend=$AUDIO -config audio:disable=0)
    [[ -n "$ROM" ]] && params+=(-config config:image="$ROM")
    #add line to create a debug log that shows the value of $params being passed to reicast
    echo "${params[@]}" > /home/pi/reidebug.log
    if [[ "$AUDIO" == "oss" ]]; then
        aoss "$rootdir/emulators/reicast/bin/reicast" "${params[@]}"
    else
        "$rootdir/emulators/reicast/bin/reicast" "${params[@]}"
    fi
    

    After I launch a game, I can see what config options were passed..

    $ cat ~/reidebug.log 
    -config config:homedir=/home/pi -config x11:fullscreen=1 -config audio:backend=alsa -config audio:disable=0 -config config:image=/home/pi/RetroPie/roms/dreamcast/Soul Calibur.chd
    

    That might help with other issues going forward. Also, I'm not saying what I've written here is the preferred approach to resolving this (others with more experience probably know better than me). The auto-config may work very well and might be much easier.. I just found that it didn't set up multiple controllers out-of-the-box, so I disabled the auto-config.

    Good luck.

    Edit: Forgot to mention that running /opt/retropie/emulators/reicast/bin/reicast-joyconfig should spit out the text you need to add to your controller's .cfg file. So try that if you haven't as well. I've found that to be the best way to configure them.



  • And you know.. in looking at this further, I realized that reicast isn't using the file I put under the .reicast/mappings/ directory. I'm not sure where it's getting the value from, but in looking at my own debug output, I can see that none of the '-config input' params are being passed. I didn't notice this before because I've been playing all my games in flycast (which has the expected mapping for dreamcast set properly). So I'll dig into this some more..

    Edit: After looking into it more, I can see the debug line in reicast.sh just needs to include the mapInput..

    params=(-config config:homedir=$HOME -config x11:fullscreen=1)
    #[[ -n "$XRES" ]] && params+=(-config x11:width=$XRES -config x11:height=$YRES)
    getAutoConf reicast_input && params+=($(mapInput))
    #echo "$(mapInput)" > /home/pi/reidebug.log
    [[ -n "$AUDIO" ]] && params+=(-config audio:backend=$AUDIO -config audio:disable=0)
    [[ -n "$ROM" ]] && params+=(-config config:image="$ROM")
    #add line to create a debug log that shows the value of $params being passed to reicast
    echo "${params[@]}" + "$(mapInput)" > /home/pi/reidebug.log
    if [[ "$AUDIO" == "oss" ]]; then
        aoss "$rootdir/emulators/reicast/bin/reicast" "${params[@]}"
    else
        "$rootdir/emulators/reicast/bin/reicast" "${params[@]}"
    fi
    

    That gives me:

    $ cat reidebug.log 
    -config config:homedir=/home/pi -config x11:fullscreen=1 -config audio:backend=alsa -config audio:disable=0 -config config:image=/home/pi/RetroPie/roms/dreamcast/Soul Calibur.chd + -config input:evdev_device_id_1=0 -config input:evdev_mapping_1=/opt/retropie/configs/dreamcast/mappings/controller_8BitdoSN30Pro.cfg -config input:evdev_device_id_2=1 -config input:evdev_mapping_2=/opt/retropie/configs/dreamcast/mappings/controller_8BitdoSN30Pro.cfg -config input:evdev_device_id_3=-1 -config input:evdev_mapping_3=-1 -config input:evdev_device_id_4=-1 -config input:evdev_mapping_4=-1 -config input:joystick_device_id=-1 -config players:nb=2 
    

    But it's still not correct, because the mapping is definitely different when I launch a game in flycast (which has the correct, expected mapping) vs. reicast. Any advice on that is welcome.



  • Did something in base Retropie change when Flycast was added or is it possible Reicast did something on their end?



  • @Nunyahpi Not that I know of. I just know that when I launch games in flycast, I have the expected mapping for both controllers, which is taken from:

    /home/pi/.config/retroarch/autoconfig/8Bitdo\ SN30\ Pro.cfg

    But when I launch the game in reicast, the mapping is definitely different. I'm just not sure where reicast is ultimately taking the mapping from. I've even tried manually changing the conroller cfg file in ~/.reicast/mappings/, but it seems like reicast isn't even looking at that file. Hm.



  • @Nunyahpi Ok, I figured it out finally. For whatever reason, I am only able to re-map controllers for reicast using the 'Settings' option after clicking +START REICAST. I know you can't move around on that screen, but I think this info will still be useful for you.

    After I re-mapped the buttons in the 'Settings' editor on-screen, that created a new .cfg file under ~/.reicast/mappings/ named 'evdev_8Bitdo SN30 Pro.cfg'. That config file looks essentially the same as the output I get when I run /opt/retropie/emulators/reicast/bin/reicast-joyconfig.

    This new config file is now the one reicast uses when I launch games. So I think if you can determine the event ID for your controller (with evtest as I mentioned earlier), you can do the following:

    1. Run reicast-joyconfig to get the proper mapping configuration.
    2. Copy the output text from the command line window and paste it into a new file named 'evdev_<YourControllerConfigName>.cfg' (where <YourControllerConfigName> is the name you get from /sys/class/input/event0/device/name. In my case, that is '8Bitdo SN30 Pro.cfg'. Then place the .cfg file in ~/.reicast/mappings/, and try it.

    Hope this helps.

    As a workaround, maybe just try flycast instead lol. That's been less fussy for me, for sure.

    Edit: One more tidbit.. When I run reicast-joyconfig, it sets the 'mapping_name' property (under the [emulator] section) to "8Bitdo SN30 Pro". Whereas my auto-generated 'evdev_8Bitdo SN30 Pro.cfg' file sets 'mapping_name' to "8Bitdo SN30 Pro mapping". So it seems like reicast will, by default, find your controller's event ID name (again, which you can obtain from running evtest), and look for a mapping file under ~/.reicast/mappings/evdev_<YourEventIDName>.cfg which contains the line:

    mapping_name = <YourEventIDName> mapping



  • Ok! Either I did something to mess up the reicast.sh script, or it has a bug. I realized that my debug line to get the parameters being passed to reicast was correct from the start (before I added the output from mapInput()). But it simply looks like reicast.sh was not adding the mapInput() result to the params array. When I modify the script, it works as expected, and my '-config input' parameters get passed successfully (and reicast now looks in ~/.reicast/mappings/ for my controller *.cfg file).

    I don't want to break any forum rules, so I'll ask @mitu to say 'yay' or 'nay' to me posting this modification publicly. But I'm surprised that others aren't seeing this issue, so I think I will just make a new rpi-clone, then uninstall reicast, update core packages, then reinstall reicast.. maybe that will fix things without any manual intervention.

    Edit: gah..forget the modification, as after further testing, I can't get reicast to recognize any name other than 'evdev_8Bitdo SN30 Pro.cfg' in the ~/.reicast/mappings/ folder. I still don't know why that is, but that's the result I'm seeing.


  • Global Moderator

    @rejesterd Thanks for testing - you can post any modifications you make to the script (use pastebin.com for large posts) - but from my testing way back, when issues where reported for the input configuration in Reicast, the startup script (reicast.sh) was working fine and the configurations were also correctly generated - it looked to me like something changed inside reicast that modified the input handling behavior.



  • @mitu I agree, I think the script is generally ok. But I uninstalled and re-installed reicast (after syncing a new rpi-clone), and I found the same behavior. My conclusion is that reicast does indeed look in ~/.reicast/mappings/ for a controller config file. But the *.cfg filename must be either 'controller_generic.cfg' or 'evdev_<YourControllerEventName>.cfg', where <YourConrollerEventName> is what you get when you run..

    $ cat /sys/class/input/event<ID_number>/device/name
    

    In my case, that outputs the name "8Bitdo SN30 Pro". As long as the controller config under ~/.reicast/mappings/ is named exactly 'evdev_8Bitdo SN30 Pro.cfg', everything works well. If it doesn't find that filename, it defaults to using ~/.reicast/mappings/controller_generic.cfg. If it doesn't find 'controller_generic.cfg', then you have no control over the game when it loads.

    I confirmed this by pasting my custom controller settings (generated with /opt/retropie/emulators/reicast/bin/reicast-joyconfig) into a file named 'controller_generic.cfg', and removing all the other *.cfg files from ~/.reicast/mappings/. If I do that, the generic_controller.cfg will be used, and I get the same behavior as I do when I have only 'evdev_8Bitdo SN30 Pro.cfg' stored under ~/.reicast/mappings/.

    I also noticed that if I remove ALL config files from ~/.reicast/mappings/, reboot, and then try to launch a dreamcast game from the ES menu, a new 'evdev_8Bitdo SN30 Pro.cfg' will be created automatically under ~/.reicast/mappings/. However, that generated version of the config file doesn't work right. This is, I think, what was throwing me off for most of my initial installation and setup last week.

    Also, it doesn't seem to matter what the 'mapping_name' property in the *.cfg file is set to. I set it to "jajajaja" and it still worked fine, so long as the filename was either 'generic_controller.cfg' or 'evdev_8Bitdo SN30 Pro.cfg'.

    @Nunyahpi let me know if you're still having trouble, and I'll try writing up some exact steps for you to try.



  • Just trying to be kind to the OP here, as I know I wrote a ton here (and it was not well-organized, and some of it is definitely incorrect).

    @Plex7 said in Reicast - Mapping controllers??? (2020 version). Stuck.:

    I just want to add that with or without evdev_device_id......it magically works. How???

    Because reicast is ignoring those evdev* settings that you added, and instead looks at the device.# entries (which are all added automatically). As of recent versions (within the last week, at least), it appears that emu.cfg is meant to be completely auto-generated (and not manually edited). I have 2 controllers working, and I have not edited this file at all. When I first install reicast, I only have one controller configured. So my initial emu.cfg looks like this..

    [input]
    MouseSensitivity = 100
    VirtualGamepadVibration = 20
    device1 = 0
    device1.1 = 1
    device1.2 = 1
    device2 = 8
    device2.1 = 8
    device2.2 = 8
    device3 = 8
    device3.1 = 8
    device3.2 = 8
    device4 = 8
    device4.1 = 8
    device4.2 = 8
    maple_/dev/input/event0 = 0
    maple_/dev/input/event1 = 1
    maple_sdl_keyboard = 0
    maple_sdl_mouse = 0
    

    After I select +START REICAST in the Emulation Station menu, go the the Settings screen and add a second controller (as I showed in my first post on this thread with that screenshot of my tv), the emu.cfg gets updated as follows:

    [input]
    MouseSensitivity = 100
    VirtualGamepadVibration = 20
    device1 = 0
    device1.1 = 1
    device1.2 = 1
    device2 = 0
    device2.1 = 1
    device2.2 = 1
    device3 = 8
    device3.1 = 8
    device3.2 = 8
    device4 = 8
    device4.1 = 8
    device4.2 = 8
    maple_/dev/input/event0 = 0
    maple_/dev/input/event1 = 1
    maple_05000000c82d00000161000000010000 = 1
    maple_sdl_keyboard = 0
    maple_sdl_mouse = 0
    

    You can see that the values for device2.* have changed, and they now mirror the values for device1.* (since these controllers are identical models). Again, it seems that emu.cfg is meant to be auto-generated, but it seems there's no issue if I go in and manually make the above changes in emu.cfg.

    I would move your current copy of emu.cfg to a temp location that's completely outside the path for reicast (for example, you can move it to /tmp/), then load a game, and let reicast rebuild emu.cfg from scratch. Assuming the first controller it finds can let you navigate to the Settings menu, just add the second controller from there on the screen. Another option is to take the values in emu.cfg for device1.* and manually modify the values for device2.* in emu.cfg so that they match the values for device1.

    Another thing to keep in mind is that reicast will only look for and add up to 4 devices. It seems like you have 3 controllers, 2 keyboards and a mouse. So that might be part of your issue as well. I would try moving emu.cfg to a temp location, and disconnect the keyboard and mouse, then launch a game with reicast. That might help with the emu.cfg auto-generation accuracy.

    Feel free to message me if you're still having trouble after reading this.

    Edit: ..and one more important thing: After I add the second controller under +START REICAST > Settings > Controls, I also (for unknown reasons at this time) have to change the port on one controller from B to A, then re-launch +START REICAST, and change it back to B. For some reason, just adding the second controller isn't enough. If you only go that far, you will probably find that both controllers are now recognized by reicast, but they control the same character on whatever game you're playing. So you have to take the extra step of changing the port and then changing it back it its original values. After doing this, I find a new entry in my emu.cfg [input] section:

    maple_05000000c82d00000161000000010000 = 1
    

    That ID number (05000000c82d00000161000000010000) comes from the ES config file:

     $ grep -r 05000000c82d00000161000000010000 /opt/retropie/
    /opt/retropie/configs/all/emulationstation/es_input.cfg.bak:  <inputConfig type="joystick" deviceName="8Bitdo SN30 Pro" deviceGUID="05000000c82d00000161000000010000">
    /opt/retropie/configs/all/emulationstation/es_input.cfg:  <inputConfig type="joystick" deviceName="8Bitdo SN30 Pro" deviceGUID="05000000c82d00000161000000010000">
    /opt/retropie/configs/all/emulationstation/es_temporaryinput.cfg:	<inputConfig type="joystick" deviceName="8Bitdo SN30 Pro" deviceGUID="05000000c82d00000161000000010000">
    /opt/retropie/configs/dreamcast/emu.cfg:maple_05000000c82d00000161000000010000 = 1
    

    So if you can configure your controllers in ES first in es_input.cfg, you can also try manually adding the above "maple_<deviceGUIDFromESConfig> = 1" line. That should work, and you won't have to go the Settings screen at all.

    WHEW! Reicast is tough, but it works great for sure.



  • @Plex7 Trying to save you some reading here, in case you do eventually come back to this. Going back to the settings shown in your very first post, here's how you map your Microntek USB Joystick controllers (i.e. evdev devices #2 and #3, as shown in your reicast-joyconfig output):

    Step 1: Uninstall and re-install reicast.

    Step 2: If you haven't done so, map the Microntek controllers in Emulation Station.

    Step 3: Run reicast-joyconfig for one of the controllers, and save the output to ~/.reicast/mappings/evdev_Microntek USB Joystick.cfg. Make sure the file is named EXACTLY 'evdev_Microntek USB Joystick.cfg' with the spaces.

    Step 4: Search for 'Microntek' in /opt/retropie/configs/all/emulationstation/es_input.cfg

    $ grep -i 'Microntek' /opt/retropie/configs/all/emulationstation/es_input.cfg
    

    This will spit out an <inputConfig> element that contains a property called 'deviceGUID'. This deviceGUID corresponds to your deviceName. It will be a long string with letters and numbers like..

    deviceGUID="05000000c82d00000161000000010000"
    

    Step 5: Modify the [input] section in ~/.reicast/emu.cfg as follows:

    [input]
    MouseSensitivity = 100
    VirtualGamepadVibration = 20
    device1 = 0
    device1.1 = 1
    device1.2 = 1
    device2 = 0
    device2.1 = 1
    device2.2 = 1
    device3 = 8
    device3.1 = 8
    device3.2 = 8
    device4 = 8
    device4.1 = 8
    device4.2 = 8
    maple_/dev/input/event2 = 0
    maple_/dev/input/event3 = 1
    maple_/dev/input/event4 = -1
    maple_<YourDeviceGUID> = -1
    

    ..where <YourDeviceGUID> is the string you obtained in the previous step above.

    Step 6: Also in ~/.reicast/emu.cfg, remove the [players] section you added previously. It's not needed.

    Step 7: Reboot and give it a try.

    Edit: If you see any other maple_* devices show up in emu.cfg after rebooting, set their values to -1 (which means reicast should ignore them).

    And for anyone else who is curious about the [input] device settings..

    device1 = 0  # controller 1 is of type 'Sega Controller' (0)
    device1.1 = 1 # controller 1's primary vmu is of type 'Sega VMU' (1), and is stored in ~/.reicast/vm_save_A1.bin
    device1.2 = 1 # controller 1's secondary vmu is of type 'Sega VMU' (1), and is stored in ~/.reicast/vm_save_A2.bin
    device2 = 0  # controller 2 is of type 'Sega Controller' (0)
    device2.1 = 1 # controller 2's primary vmu is of type 'Sega VMU' (1), and is stored in ~/.reicast/vm_save_B1.bin
    device2.2 = 1 # controller 2's secondary vmu is of type 'Sega VMU' (1), and is stored in ~/.reicast/vm_save_B2.bin
    device3 = 8 # controller 3 is not configured
    ....
    device4 = 8 # controller 4 is not configured
    ....
    maple_/dev/input/event2 = 0 # /dev/input/event2 (Microntek USB Joystick) is controller 1
    maple_/dev/input/event3 = 1 # /dev/input/event3 (Microntek USB Joystick) is controller 2
    maple_/dev/input/event4 = -1 # ingore the Logitech Gamepad F710
    maple_<YourDeviceGUID> = -1 # ignore the configuration for Microntek USB Joystick that is set in /opt/retropie/configs/all/emulationstation/es_input.cfg
    


  • I uninstalled it, I could never get it to map my controls.



  • @tackett1980 I built a bartop and installed the following two controllers there:
    https://www.amazon.de/EG-STARTS-Verzögerung-Drucktasten-Raspberry/dp/B077J2WGKT/ref=sr_1_9?__mk_de_DE=ÅMÅŽÕÑ&keywords=arcade+controllers&qid=1582141216&sr=8-9

    The controllers work without problems in the emulation station, but no button or joypad worked in reicast. Then I did the following to get the controllers working with reicast:

    1. Update reicast from source

    2. After the update I replaced the following line in /opt/retropie/configs/all/autoconf.cfg..
      reicast_input = "1"
      to
      reicast_input = "0"

    3. Then I ran
      sudo /opt/retropie/emulators/reicast/bin/reicast-joyconfig
      which generated the controller config file "controller_DragonRiseInc.GenericUSBJoystick.cfg" in the directory /opt/retropie/configs/dreamcast/mappings
      config_1.JPG

    4. Then I copied the content into the controller_generic.cfg file:
      config_2.JPG

    5. And finally, I modified the /opt/retropie/configs/dreamcast/emu.cfg file for controller 2:
      config_3.JPG

    That’s it. Now I can finally play Dreamcast games



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.