RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    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

    X-Box One S Pad - Neverending Problems - Reicast Edition

    Scheduled Pinned Locked Moved Help and Support
    x-box one sreicastgamepad config
    1 Posts 1 Posters 253 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Angry_Bucket
      last edited by Angry_Bucket

      Pi Model 3B+
      Power Supply used: official
      RetroPie Version 4.4
      Built From: retropie-4.4-rpi2_rpi3.img
      USB Devices connected: Logitech K400+, X-Box One S controller, Logitech Ergo (mouse)
      Controller used: X-Box One S controller
      Error messages received: NONE
      Log found in /dev/shm/runcommand.log (if relevant):
      Parameters:
      Executing: bash "/home/pi/RetroPie/roms/dreamcast/+Start Reicast.sh"
      OMX: creating 3 buffers
      OMX: audio output to 'hdmi'
      OMX: underrun occurred
      OMX: underrun occurred

      ("OMX: underrun ocurred" this repeats to 960 lines)

      Guide used:

      https://github.com/RetroPie/RetroPie-Setup/wiki/Dreamcast
      https://www.reddit.com/r/RetroPie/comments/3ye3f0/cant_manage_to_configure_dreamcast_controls/

      File:
      /opt/retropie/configs/dreamcast/mappings/controller_MicrosoftX-BoxOneSpad.cfg

      [emulator]
      mapping_name = Microsoft X-Box One S pad
      btn_escape = 316

      [dreamcast]
      btn_a = 305
      btn_b = 304
      btn_c = 311
      btn_d = 310
      btn_x = 308
      btn_y = 307
      btn_z = 314
      btn_start = 315
      axis_x = 0
      axis_y = 1

      [compat]
      axis_dpad1_x = 16
      axis_dpad1_x_inverted = no
      axis_dpad1_y = 17
      axis_dpad1_y_inverted = no
      btn_trigger_left = 312
      btn_trigger_right = 313
      axis_x_inverted = no
      axis_y_inverted = no

      ===========================================

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

      [audio]
      backend = auto
      disable = 0

      [config]
      Debug.SerialConsoleEnabled = 0
      Dreamcast.Broadcast = 4
      Dreamcast.Cable = 3
      Dreamcast.RTC = -2128832150
      Dreamcast.Region = 3
      Dynarec.Enabled = 1
      Dynarec.idleskip = 1
      Dynarec.unstable-opt = 0
      aica.LimitFPS = 1
      aica.NoBatch = 0
      aica.NoSound = 0
      bios.UseReios = 0
      pvr.MaxThreads = 3
      pvr.Subdivide = 0
      pvr.SynchronousRendering = 0
      pvr.rend = 0
      rend.UseMipmaps = 1
      rend.WideScreen = 0
      ta.skip = 0

      [dispmanx]
      height = 480
      maintain_aspect = yes
      width = 640

      [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_MicrosoftX-BoxOneSpad.cfg
      joystick_device_id = -1

      [omx]
      audio_hdmi = yes
      audio_latency = 100

      [reios]
      ElfFile =

      [testing]
      ta.HashCheckFile =
      ta.HashLogFile =

      [validate]
      OpenGlChecks = 0

      ===========================================
      /opt/retropie/emulators/reicast/bin/reicast.sh

      #!/usr/bin/env bash

      This file is part of The RetroPie Project

      The RetroPie Project is the legal property of its developers, whose names are

      too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.

      See the LICENSE.md file at the top-level directory of this distribution and

      at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md

      AUDIO="$1"
      ROM="$2"
      rootdir="/opt/retropie"
      configdir="$rootdir/configs"

      source "$rootdir/lib/inifuncs.sh"

      function mapInput() {
      local js_device
      local js_device_num
      local ev_device
      local ev_devices
      local ev_device_num
      local device_counter
      local conf="$configdir/dreamcast/emu.cfg"
      local params=""

      # get a list of all present js device numbers and device names
      # and device count
      for js_device in /dev/input/js*; do
          js_device_num=${js_device/\/dev\/input\/js/}
          for ev_device in /dev/input/event*; do
              ev_device_num=${ev_device/\/dev\/input\/event/}
              if [[ -d "/sys/class/input/event${ev_device_num}/device/js${js_device_num}" ]]; then
                  file[$ev_device_num]=$(grep --exclude=*.bak -rl "$configdir/dreamcast/mappings/" -e "= $(</sys/class/input/event${ev_device_num}/device/name)")
                  if [[ -f "${file[$ev_device_num]}" ]]; then
                      #file[$ev_device_num]="${file[$ev_device_num]##*/}"
                      ev_devices[$ev_device_num]=$(</sys/class/input/event${ev_device_num}/device/name)
                      device_counter=$(($device_counter+1))
                  fi
              fi
          done
      done
      
      # emu.cfg: store up to four event devices and mapping files
      if [[ "$device_counter" -gt "0" ]]; then
          # reicast supports max 4 event devices
          if [[ "$device_counter" -gt "4" ]]; then
              device_counter="4"
          fi
          local counter=0
          for ev_device_num in "${!ev_devices[@]}"; do
              if [[ "$counter" -lt "$device_counter" ]]; then
                  counter=$(($counter+1))
                  params+="-config input:evdev_device_id_$counter=$ev_device_num "
                  params+="-config input:evdev_mapping_$counter=${file[$ev_device_num]} "
              fi
          done
          while [[ "$counter" -lt "4" ]]; do
              counter=$(($counter+1))
              params+="-config input:evdev_device_id_$counter=-1 "
              params+="-config input:evdev_mapping_$counter=-1 "
          done
      else
          # fallback to keyboard setup
          params+="-config input:evdev_device_id_1=0 "
          device_counter=1
      fi
      params+="-config input:joystick_device_id=-1 "
      params+="-config players:nb=$device_counter "
      echo "$params"
      

      }

      if [[ ! -f "$HOME/RetroPie/BIOS/dc_boot.bin" ]]; then
      dialog --no-cancel --pause "You need to copy the Dreamcast BIOS files (dc_boot.bin and dc_flash.bin) to the folder $biosdir to boot the Dreamcast emulator." 22 76 15
      exit 1
      fi

      params=(-config config:homedir=$HOME -config x11:fullscreen=1)
      getAutoConf reicast_input && params+=($(mapInput))
      [[ -n "$AUDIO" ]] && params+=(-config audio:backend=$AUDIO -config audio:disable=0)
      [[ -n "$ROM" ]] && params+=(-config config:image="$ROM")
      if [[ "$AUDIO" == "oss" ]]; then
      aoss "$rootdir/emulators/reicast/bin/reicast" "${params[@]}" >/dev/null
      else
      "$rootdir/emulators/reicast/bin/reicast" "${params[@]}" >/dev/null
      fi

      ===========================================

      I also used the NullDC trick to try and fix the clock issue. (It edits dc_flash and makes a copy, which you rename and place in the BIOS folder)

      reicast_input = "1" in /opt/retropie/configs/all/autoconf.cfg

      Emulator: Reicast

      How to replicate the problem: I ran the joystick config via command line (reicast-joyconfig) and the joystick was still functional. It was only the joystick, no buttons worked. I had a working joystick until I ran the autoconfig in RETROPIE SETUP.

      I've confirmed my controller is at event0. At this point all I can guess is that this controller is just not supported. The config file looks quite a bit like a 360 controller's config provided on the wiki.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      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.