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

    Reicast (Dreamcast) Emulator Not Playing !

    Scheduled Pinned Locked Moved Help and Support
    56 Posts 17 Posters 72.3k 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.
    • K
      krlitosmtnez @Hyell
      last edited by krlitosmtnez

      @Hyell

      I downloaded the file that you put above. I put at /opt/retropie/emulators/reicast/bin/

      https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/emulators/reicast/reicast.sh you can try with this one

      Anyway, this is the content:

      #!/usr/bin/env bash
      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 "
      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
      params="-config config:homedir=$HOME -config x11:fullscreen=1 "
      getAutoConf reicast_input || params+=$(mapInput)
      if [[ "$AUDIO" == "OSS" ]]; then
          params+=" -config audio:backend=oss -config audio:disable=0 "
          aoss "$rootdir/emulators/reicast/bin/reicast" $params -config config:image="$ROM" >> /dev/null
      else
          params+=" -config audio:backend=alsa -config audio:disable=0"
          "$rootdir/emulators/reicast/bin/reicast" $params -config config:image="$ROM" >> /dev/null
      fi
      else
      dialog --msgbox "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
      fi
      

      Thanks again.

      H 1 Reply Last reply Reply Quote 0
      • H
        Hyell @krlitosmtnez
        last edited by

        @krlitosmtnez
        Can you add some log to see what param value is use?

        for example, add :
        echo "$params" > /home/pi/testReicast.log
        before :
        if [[ "$AUDIO" == "OSS" ]]; then

        Launch reicast and open /home/pi/testReicast.log. it's look like pablo issue

        1 Reply Last reply Reply Quote 0
        • K
          krlitosmtnez
          last edited by krlitosmtnez

          @Hyell

          Here we go:

          config config:homedir=/home/pi -config x11:fullscreen=1 -config input:evdev_de$
          
          H 1 Reply Last reply Reply Quote 0
          • H
            Hyell @krlitosmtnez
            last edited by

            @krlitosmtnez
            Ok, this part is not correct. You got an issue with your mapInput() function.
            I think this part don't work with your controller :

            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
            

            Can you add more logs? We will see if all file of your controller is OK.
            (I think this code is OK) :

            for js_device in /dev/input/js*; do
                    js_device_num=${js_device/\/dev\/input\/js/}
            		echo "$js_device_num = $js_device_num" > /home/pi/testReicast.log
                    for ev_device in /dev/input/event*; do
                        ev_device_num=${ev_device/\/dev\/input\/event/}
            			echo "ev_device_num = $ev_device_num" > /home/pi/testReicast.log
            			echo "check if this exist : /sys/class/input/event$ev_device_num/device/js$js_device_num"
                        if [[ -d "/sys/class/input/event${ev_device_num}/device/js${js_device_num}" ]]; then
            				echo "Now check if this exist : /sys/class/input/event$ev_device_num/device/name"
                            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)
            					echo "Add for controller : /sys/class/input/event$ev_device_num/device/name"
                                device_counter=$(($device_counter+1))
                            fi
                        fi
                    done
                done
            
            K 1 Reply Last reply Reply Quote 0
            • K
              krlitosmtnez @Hyell
              last edited by

              @Hyell

              More close...

              -config config:homedir=/home/pi -config x11:fullscreen=1 check if this exist : /sys/class/input/event0/device/js0
              check if this exist : /sys/class/input/event1/device/js0
              check if this exist : /sys/class/input/event2/device/js0
              Now check if this exist : /sys/class/input/event2/device/name
              check if this exist : /sys/class/input/event3/device/js0
              check if this exist : /sys/class/input/event4/device/js0
              check if this exist : /sys/class/input/event5/device/js0
              check if this exist : /sys/class/input/event6/device/js0
              check if this exist : /sys/class/input/event7/device/js0
              -config input:evdev_device_id_1=0 -config input:joystick_device_id=-1 -config players:nb=
              
              1 Reply Last reply Reply Quote 0
              • K
                krlitosmtnez
                last edited by

                One more thing. In case you see more devices (I don't know), this is because I reconnect the trackball to the Raspberri Pi 3.

                Now the input list is:

                alt text

                H 1 Reply Last reply Reply Quote 0
                • H
                  Hyell @krlitosmtnez
                  last edited by

                  @krlitosmtnez
                  Can you type :
                  cat /sys/class/input/event2/device/name on raspberry console please?

                  I think issue is on this part :

                  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
                  
                  K 2 Replies Last reply Reply Quote 0
                  • K
                    krlitosmtnez @Hyell
                    last edited by

                    @Hyell

                    Result:

                    Ultimarc IPAC 2 Ultimarc IPAC 2

                    1 Reply Last reply Reply Quote 0
                    • K
                      krlitosmtnez @Hyell
                      last edited by

                      @Hyell

                      FYI, reicast-joyconfig give me this values:

                      0: Barcode Reader  (/dev/input/event0, usb-3f980000.usb-1.2/input0)
                      1: Barcode Reader  (/dev/input/event1, usb-3f980000.usb-1.2/input1)
                      2: Ultimarc IPAC 2 Ultimarc IPAC 2 (/dev/input/event2, usb-3f980000.usb-1.5/input0)
                      3: Ultimarc IPAC 2 Ultimarc IPAC 2 (/dev/input/event3, usb-3f980000.usb-1.5/input1)
                      4: Ultimarc IPAC 2 Ultimarc IPAC 2 (/dev/input/event4, usb-3f980000.usb-1.5/input2)
                      5: Ultimarc IPAC 2 Ultimarc IPAC 2 (/dev/input/event5, usb-3f980000.usb-1.5/input3)
                      6: Apple, Inc Apple Keyboard (/dev/input/event6, usb-3f980000.usb-1.4.2/input0)
                      7: Apple, Inc Apple Keyboard (/dev/input/event7, usb-3f980000.usb-1.4.2/input1)
                      

                      I checked that ID number 3 is the good one for use my controls (joystick and buttons)

                      H 1 Reply Last reply Reply Quote 0
                      • H
                        Hyell @krlitosmtnez
                        last edited by

                        @krlitosmtnez
                        reicast.sh don't count correclty your device.
                        Maybe it's because of space on your name device.
                        you have create a "Controller_Ultimarc IPAC 2 Ultimarc IPAC 2.cfg" file
                        but script never found the good file.

                        so he never add a controller

                        can you try to change these line :

                        params+="-config input:joystick_device_id=-1 "
                        params+="-config players:nb=$device_counter "
                        

                        By

                        params+="-config input:evdev_device_id_1=3 "
                        params+="-config input:joystick_device_id=-1 "
                        params+="-config players:nb=1 "
                        
                        K 1 Reply Last reply Reply Quote 0
                        • K
                          krlitosmtnez @Hyell
                          last edited by

                          @Hyell

                          It's works!!!!! Thanks you so much!!!

                          Now I have the controller problem. I have the config file created, but I can't do anything at the Date & Time Screen.

                          controller_Ultimarc IPAC 2 Ultimarc IPAC 2.cfg (values from reicast-joyconfig)

                          [emulator]
                          mapping_name = Ultimarc IPAC 2 Ultimarc IPAC 2
                          btn_escape = 44
                          
                          [dreamcast]
                          btn_a = 56
                          btn_b = 42
                          btn_x = 29
                          btn_y = 57
                          btn_start = 45
                          btn_dpad1_left = 105
                          btn_dpad1_right = 106
                          btn_dpad1_up = 103
                          btn_dpad1_down = 108
                          
                          [compat]
                          btn_trigger_left = 2
                          btn_trigger_right = 6
                          

                          emu.cfg

                          [config]
                          Debug.SerialConsoleEnabled = 0
                          Dreamcast.Broadcast = 4
                          Dreamcast.Cable = 3
                          Dreamcast.RTC = 2097425117
                          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
                          
                          [input]
                          evdev_device_id_1 = 3
                          evdev_device_id_2 = -1
                          evdev_device_id_3 = -1
                          evdev_device_id_4 = -1
                          evdev_mapping_1 = /opt/retropie/configs/dreamcast/mappings/controller_Ultimarc IPAC 2 Ultimarc IPAC 2.cfg
                          joystick_device_id = -1
                          
                          [players]
                          nb = 1
                          
                          [reios]
                          ElfFile =
                          
                          [validate]
                          OpenGlChecks = 0
                          
                          H 1 Reply Last reply Reply Quote 0
                          • H
                            Hyell @krlitosmtnez
                            last edited by

                            @krlitosmtnez
                            Ok.
                            You can try to add quote on emu.cfg

                            evdev_mapping_1 = "/opt/retropie/configs/dreamcast/mappings/controller_Ultimarc IPAC 2 Ultimarc IPAC 2.cfg"
                            If it's a blank issue it can be better.

                            K 1 Reply Last reply Reply Quote 0
                            • K
                              krlitosmtnez @Hyell
                              last edited by

                              @Hyell

                              No way. Still without controls...

                              H 1 Reply Last reply Reply Quote 0
                              • H
                                Hyell @krlitosmtnez
                                last edited by

                                @krlitosmtnez
                                if you use 'evtest' commande can you use your controller with ID 3?
                                And is ti the correct value on your controller.cfg file?

                                In a second time, can you test with ID 2 when you launch reicast?

                                K 1 Reply Last reply Reply Quote 0
                                • K
                                  krlitosmtnez @Hyell
                                  last edited by krlitosmtnez

                                  @Hyell

                                  I used the values from reicast-joyconfig

                                  Yes, I can use evtest with ID 3. I recibe this when I push A button:

                                  Event: time 1466183037.124242, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e2
                                  Event: time 1466183037.124242, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 0
                                  

                                  As you can see, is the same code from reicast-joyconfig

                                  [dreamcast]
                                  btn_a = 56
                                  

                                  ID 2 don't work in reicast-joyconfig. Neither evtest!

                                  H 1 Reply Last reply Reply Quote 0
                                  • H
                                    Hyell @krlitosmtnez
                                    last edited by

                                    @krlitosmtnez

                                    Hum, can you change emu.cfg to use another config file for your controller? A file without blank?
                                    Or maybe try with another controller, just to validate one configuration?
                                    I must admit that I have no more ideas :/

                                    I will check my own configuration to see if we have miss something.

                                    K 1 Reply Last reply Reply Quote 0
                                    • K
                                      krlitosmtnez @Hyell
                                      last edited by krlitosmtnez

                                      @Hyell

                                      Thank you for help, I will check again everything.

                                      If the file is "controller_NAMECONTROLLER.cfg"

                                      This "NAMECONTROLLER" is the same name that "Mapping Name" inside the file? And the ID of the controller?

                                      For example, can I name it "controller_pad.cfg"?

                                      So inside controller_pad.cfg :

                                      [emulator]
                                      mapping_name = Ultimarc IPAC 2 Ultimarc IPAC 2
                                      

                                      or

                                      [emulator]
                                      mapping_name = pad
                                      

                                      Thanks again.

                                      H 1 Reply Last reply Reply Quote 0
                                      • H
                                        Hyell @krlitosmtnez
                                        last edited by

                                        @krlitosmtnez

                                        It's the name of the pad :

                                        mapping_name = Ultimarc IPAC 2 Ultimarc IPAC 2
                                        

                                        and you can have blank.

                                        but the name of the file is not really important.
                                        If you have a file named :
                                        controller_test.cfg

                                        You just have to put the same name file on emu.cfg

                                        Have you test with a file named without blank?

                                        K 1 Reply Last reply Reply Quote 0
                                        • K
                                          krlitosmtnez @Hyell
                                          last edited by

                                          @Hyell

                                          Yes, I used "controller_Ultimarc.cfg" and nothing.

                                          Maybe this could help?

                                          @JoargTheBard said in Every time I play dreamcast, displays the setting screen time/date:

                                          the controller config part of my emu.cfg looks like this

                                          [input]
                                          evdev_device_id_1 = 2
                                          evdev_device_id_2 = 3
                                          evdev_device_id_3 = -1
                                          evdev_device_id_4 = -1
                                          evdev_mapping_1 = /opt/retropie/configs/dreamcast/mappings/controller_8BitdoNES30Pro.cfg
                                          evdev_mapping_2 = /opt/retropie/configs/dreamcast/mappings/controller_8BitdoNES30Pro.cfg
                                          joystick_device_id = -1

                                          @caver01 said in Every time I play dreamcast, displays the setting screen time/date:

                                          @JoargTheBard said in Every time I play dreamcast, displays the setting screen time/date:

                                          evdev_mapping_1 = /opt/retropie/configs/dreamcast/mappings/controller_8BitdoNES30Pro.cfg
                                          evdev_mapping_2 = /opt/retropie/configs/dreamcast/mappings/controller_8BitdoNES30Pro.cfg

                                          Wow. I can't believe it. I made it work. I took the spaces out of my mapping file and replaced them with underscores, then commented out the automap line in the .sh file as you instructed. Then I updated my emu.cfg adding this:

                                          [input]
                                          evdev_device_id_1 = 4
                                          evdev_device_id_2 = 5
                                          evdev_device_id_3 = -1
                                          evdev_device_id_4 = -1
                                          evdev_mapping_1 = /opt/retropie/configs/dreamcast/mappings/controller_Ultimarc_I-PAC_Arcade_Control_Interface.cfg
                                          evdev_mapping_2 = /opt/retropie/configs/dreamcast/mappings/controller_Ultimarc_I-PAC_Arcade_Control_Interface.cfg
                                          joystick_device_id = -1
                                          

                                          and it actually works. Crazy taxi has a few audio problems on the P3, but it actually worked. Thanks for your help!

                                          H 1 Reply Last reply Reply Quote 0
                                          • H
                                            Hyell @krlitosmtnez
                                            last edited by

                                            @krlitosmtnez
                                            it's the same test when you use controller_Ultimarc.cfg
                                            can you try to edit your controller_ultimarc.cfg to match with this :

                                            [emulator]
                                            mapping_name = Xbox Gamepad (userspace driver)
                                            btn_escape = 316
                                            
                                            [dreamcast]
                                            btn_a = 304
                                            btn_b = 305
                                            btn_c =
                                            btn_d =
                                            btn_x = 307
                                            btn_y = 308
                                            btn_z =
                                            btn_start = 315
                                            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 = 2
                                            axis_trigger_right = 5
                                            
                                            [compat]
                                            btn_trigger_left = 312
                                            btn_trigger_right = 313 
                                            axis_dpad1_x = 16
                                            axis_dpad1_y = 17
                                            axis_dpad2_x =
                                            axis_dpad2_y =
                                            axis_x_inverted = no
                                            axis_y_inverted = no
                                            axis_trigger_left_inverted = no
                                            axis_trigger_right_inverted = no
                                            axis_dpad1_y_inverted = yes
                                            axis_dpad1_x_inverted = no
                                            
                                            K 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.