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

    Dreamcast mvc2 crashing at stage 2

    Scheduled Pinned Locked Moved Help and Support
    reicastmvc2crashingstage 2
    128 Posts 6 Posters 14.5k 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.
    • T
      tackett1980 @rejesterd
      last edited by

      @rejesterd

      Alright friend. I thank you for all this hard work with me.

      I did this, and it does come up in the select emulators, but it won’t boot. Just crashes back to the emulation station rom select screen.

      I probably screwed something up somewhere

      1 Reply Last reply Reply Quote 0
      • R
        rejesterd
        last edited by

        hm.

        cat /dev/shm/runcommand.log
        

        Take a look at the log. Then launch the game with your default reicast emulator (reicast-audio-omx, and we can compare the logs.

        T 1 Reply Last reply Reply Quote 0
        • T
          tackett1980 @rejesterd
          last edited by

          @rejesterd

          OK,

          here is the runcommand with the default reicast.

          Parameters: 
          Executing: /opt/retropie/emulators/reicast/bin/reicast.sh oss "/home/pi/RetroPie/roms/dreamcast/Marvel vs. Capcom 2 (USA).gdi"
          glGetError 0x500
          Config dir is: /home/pi/.reicast/
          Data dir is:   /home/pi/.reicast/
          Personality: 00C00000
          Updated personality: 00800000
          found libbcm_host
          rpi2: bcm_init
          ARM VFP-Run Fast (NFP) enabled !
          Linux paging: 4096 00001000 00000FFF
          Info: nvmem is enabled, with addr space of size 512MB
          Info: p_sh4rcb: 0x4f9f0000 virt_ram_base: 0x53af0000
          Virtual cfg config:homedir=/home/pi
          Virtual cfg x11:fullscreen=1
          Virtual cfg input:evdev_device_id_1=0
          Virtual cfg input:evdev_mapping_1=/opt/retropie/configs/dreamcast/mappings/controller_DragonRiseInc.GenericUSBJoystick.cfg
          Virtual cfg input:evdev_device_id_2=1
          Virtual cfg input:evdev_mapping_2=/opt/retropie/configs/dreamcast/mappings/controller_DragonRiseInc.GenericUSBJoystick.cfg
          Virtual cfg input:evdev_device_id_3=-1
          Virtual cfg input:evdev_mapping_3=-1
          Virtual cfg input:evdev_device_id_4=-1
          Virtual cfg input:evdev_mapping_4=-1
          Virtual cfg input:joystick_device_id=-1
          Virtual cfg players:nb=2
          Virtual cfg audio:backend=oss
          Virtual cfg audio:disable=0
          Virtual cfg config:image=/home/pi/RetroPie/roms/dreamcast/Marvel vs. Capcom 2 (USA).gdi
          
          evdev: Opened device 'DragonRise Inc.   Generic   USB  Joystick  ' using custom mapping 'DragonRise Inc.   Generic   USB  Joystick   mapping'
          evdev: Opened device 'DragonRise Inc.   Generic   USB  Joystick  ' using custom mapping 'DragonRise Inc.   Generic   USB  Joystick   mapping'
          EGL config: 0x1, 0x1, 0x1 640x480
          OpenGL version: OpenGL ES 2.0
          Packed depth/stencil not supported: no modifier volumes when rendering to a texture
          Screen DPI is 96, size 640 x 480. Scaling by 1.00
          Loaded /home/pi/.reicast/data/dc_boot.bin as bootrom
          
          Loaded /home/pi/.reicast/data/dc_flash.bin as nvram
          
          chd: chd_open failed for file /home/pi/RetroPie/roms/dreamcast/Marvel vs. Capcom 2 (USA).gdi: 5
          
          GDI : 3 tracks
          file[1] "Marvel vs. Capcom 2 (USA) (Track 1).bin": FAD:0, CTRL:4, SSIZE:2352, OFFSET:0
          file[2] "Marvel vs. Capcom 2 (USA) (Track 2).bin": FAD:300, CTRL:0, SSIZE:2352, OFFSET:0
          file[3] "Marvel vs. Capcom 2 (USA) (Track 3).bin": FAD:45000, CTRL:4, SSIZE:2352, OFFSET:0
          gdrom: Opened image "/home/pi/RetroPie/roms/dreamcast/Marvel vs. Capcom 2 (USA).gdi"
          
          	 ARM7_TCB addr: 0x4b000 | from: 0x4ad3c | addr here: 0x4a620
          Game ID is [T1212N]
          recSh4 Init
          @@	ngen_ResetBlocks()
          Initializing the ARM32 dynarec
          readm helpers: up to 00271250
          @@	ngen_ResetBlocks()
          Using Recompiler
          Sh4 Reset
          Initializing audio backend "oss" (Open Sound System)...
          sound enabled, dsp opened for write
          set Frequency to 44100, return 0 (rate=44100)
          set dsp to stereo (2 => 0)
          set dsp to 16bits signed audio (16/16 => 0)
          Using Recompiler
          cntx // fpcb offset: -68157440 // pc offset: -184 // pc A0000000
          @@	ngen_ResetBlocks()
          recSh4:Dynarec Cache clear at 8C0000DE
          Invalid GD-DMA start, SB_GDEN=0.Ingoring it.
          MODEM Reset
          VREG = 00 ARMRST 00
          VREG = 00 ARMRST 01
          VREG = 00 ARMRST 00
          Invalid GD-DMA start, SB_GDEN=0.Ingoring it.
          VREG = 00 ARMRST 00
          VREG = 00 ARMRST 01
          VREG = 00 ARMRST 01
          VREG = 00 ARMRST 00
          Status: reicast git/n - 11.71 - 85.37 - V: 51.18 (3.32, VGA480p59.94) R: 4.47+10.93 VTX: 0.00 , MIPS: 0.00
          Status: reicast git/n - 4.99 - 200.03 - V: 119.90 (1.00, VGA480p59.94) R: 59.95+59.95 VTX: 0.00 , MIPS: 0.00
          Status: reicast git/n - 4.63 - 215.79 - V: 129.35 (1.09, VGA480p59.94) R: 59.93+58.43 VTX: 0.00 , MIPS: 0.00
          @@	ngen_ResetBlocks()
          recSh4:Dynarec Cache clear at AC0082FE
          VREG = 00 ARMRST 00
          @@	ngen_ResetBlocks()
          recSh4:Dynarec Cache clear at AC00FFFE
          VREG = 00 ARMRST 01
          VREG = 00 ARMRST 01
          VREG = 00 ARMRST 00
          Status: reicast git/n - 4.58 - 218.14 - V: 130.76 (6.71, VGA480p59.94) R: 14.47+4.99 VTX: 0.00 , MIPS: 0.00
          Status: reicast git/n - 8.19 - 122.01 - V: 73.14 (1.54, VGA480p59.94) R: 44.28+2.98 VTX: 0.00 , MIPS: 0.00
          Status: reicast git/n - 8.50 - 117.54 - V: 70.46 (1.52, VGA480p59.94) R: 46.14+0.00 VTX: 0.00 , MIPS: 0.00
          Status: reicast git/n - 10.32 - 96.86 - V: 58.06 (1.00, VGA480p59.94) R: 58.06+0.00 VTX: 0.00 , MIPS: 0.00
          Status: reicast git/n - 10.24 - 97.59 - V: 58.50 (1.00, VGA480p59.94) R: 58.00+0.49 VTX: 0.00 , MIPS: 0.00
          Status: reicast git/n - 10.06 - 99.31 - V: 59.53 (1.00, VGA480p59.94) R: 59.03/opt/retropie/emulators/reicast/bin/reicast.sh: line 92:  1832 Trace/breakpoint trap   aoss "$rootdir/emulators/reicast/bin/reicast" "${params[@]}"
          
          

          Here is the crashy one we just built:

          Parameters: 
          Executing: 
          
          

          actually its blank, geez I screwed something up.

          R 1 Reply Last reply Reply Quote 0
          • R
            rejesterd @tackett1980
            last edited by

            @tackett1980 - Probably worth taking a look at the modified files..

            cat /opt/retropie/emulators/reicast/bin/reicast_49046ae.sh
            
            cat /opt/retropie/configs/dreamcast/emulators.cfg
            

            ..just to make sure they look right. Also..

            ls -al /opt/retropie/emulators/reicast/bin/
            

            ..would confirm that the new binary is there, and it's not 0 bytes in size.

            T 1 Reply Last reply Reply Quote 0
            • T
              tackett1980 @rejesterd
              last edited by tackett1980

              @rejesterd said in Dreamcast mvc2 crashing at stage 2:

              @tackett1980 - Probably worth taking a look at the modified files..

              cat /opt/retropie/emulators/reicast/bin/reicast_49046ae.sh
              
              cat /opt/retropie/configs/dreamcast/emulators.cfg
              

              ..just to make sure they look right. Also..

              ls -al /opt/retropie/emulators/reicast/bin/
              

              ..would confirm that the new binary is there, and it's not 0 bytes in size.

              Ok this is the issue, the reicast_49046ae.sh is 0 bytes.

              LOL what did i do wrong?

              1 Reply Last reply Reply Quote 0
              • R
                rejesterd
                last edited by

                Maybe the reicast.elf wasn't built..

                ls -al ~/reicast-emulator/reicast/linux/
                

                If you don't see it there (or it's also 0 bytes in size), then try the build again (i.e. the steps up to, and including, 'make -j4'). When it finishes, scroll up in the terminal window and look for ERROR or WARN messages.

                T 1 Reply Last reply Reply Quote 0
                • T
                  tackett1980 @rejesterd
                  last edited by

                  @rejesterd said in Dreamcast mvc2 crashing at stage 2:

                  Maybe the reicast.elf wasn't built..

                  ls -al ~/reicast-emulator/reicast/linux/
                  

                  If you don't see it there (or it's also 0 bytes in size), then try the build again (i.e. the steps up to, and including, 'make -j4'). When it finishes, scroll up in the terminal window and look for ERROR or WARN messages.

                  ok I will run it again. The elf file is indeed there and it is about 50mb.

                  1 Reply Last reply Reply Quote 0
                  • R
                    rejesterd
                    last edited by

                    @tackett1980 said in Dreamcast mvc2 crashing at stage 2:

                    ok I will run it again. The elf file is indeed there and it is about 50mb.

                    Yeah, 50MB is in the ballpark.. as long as it's not zero. Mine is about 60MB, for reference.

                    When the new build finishes, try these steps to copy it to the reicast bin folder instead:

                    cd ~/reicast-emulator/reicast/linux/
                    
                    cp reicast.elf reicast_49046ae
                    
                    chmod +x reicast_49046ae
                    
                    sudo mv reicast_49046ae /opt/retropie/emulators/reicast/bin/
                    
                    ls -al /opt/retropie/emulators/reicast/bin/
                    

                    After you run that last 'ls -al' command, the output should look like this:

                    $ ls -al /opt/retropie/emulators/reicast/bin/
                    total 120972
                    drwxr-xr-x 2 root root     4096 Feb 26 09:43 .
                    drwxr-xr-x 4 root root     4096 Feb 25 14:34 ..
                    -rwxr-xr-x 1 root root 61917760 Feb 25 15:37 reicast
                    -rwxr-xr-x 1 root root 61918028 Feb 25 16:59 reicast_49046ae
                    -rwxr-xr-x 1 root root     1263 Feb 26 09:43 reicast_49046ae.sh
                    -rwxr-xr-x 1 root root    10956 Feb 25 14:34 reicast-joyconfig
                    -rwxr-xr-x 1 root root     1247 Feb 25 14:34 reicast.sh
                    

                    The 'reicast' and 'reicast_49046ae' files should have the same permissions (-rwxr-xr-x), and be approximately the same size.

                    I'll check up on this tomorrow. Welcome to the wild west.

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      tackett1980 @rejesterd
                      last edited by

                      @rejesterd

                      Thanks for all your help, I am also going to hit the sack for the night.

                      I have two questions:

                      1: would this be easier to accomplish some of this in winscp when possible rather than doing it all with terminal commands?

                      2: would it also be easier to just uninstall the reicast entirely and build this one as the soul emulator? If I cant get the game working I will likely just delete the entire thing anyway so it doesn't really matter. I have no other dreamcast games Im interested in.

                      Again, I cant thank you enough for your help. You deserve like a fruit basket or something. If this forum had a rep feature or something Id be repping you into oblivion at this point.

                      1 Reply Last reply Reply Quote 0
                      • R
                        rejesterd
                        last edited by rejesterd

                        No prob. Thanks for reporting it, because I've leared a lot. This game has issues in all 3 dc emulators. I still need to write up a report for the flycast folks to review.

                        1. Oh yeah, if you have winscp, you can just copy the emulators.cfg and reicast_49046ae.sh to your windows machine, edit the files there in Notepad++ (or whatever text editor you use), and then scp them back to the pi. I'm listing the terminal commands for my own benefit, as I'll likely refer back to these steps at some point.

                        2. I doubt your existing reicast installation is causing the issue you're having now. It just seems like you have different permissions than me, which didn't allow you to copy the reicast.elf to a new name (or to a location that's owned by the root user). So maybe just try the new steps I mentioned in my previous post.

                        T 2 Replies Last reply Reply Quote 0
                        • T
                          tackett1980 @rejesterd
                          last edited by

                          @rejesterd

                          Ok I will give this all another shot when I get home.

                          1 Reply Last reply Reply Quote 0
                          • T
                            tackett1980 @rejesterd
                            last edited by tackett1980

                            @rejesterd

                            Ok, I think I’m just to stupid to do this correctly.

                            My permissions look the same, all the files are there and nothing is zero bytes anymore except now when I boot up to select emulators there are like 3 “reicast for mvc2” emulators to choose from and all 3 of them load no information according to the run command log.

                            I think I may just give up and uninstall the Dreamcast emulator all together.

                            Edit:
                            Hell with it, the original reicast won’t load either just crashes back to emulation station.

                            1 Reply Last reply Reply Quote 0
                            • R
                              rejesterd
                              last edited by rejesterd

                              @tackett1980 - hm.. the 3 mvc2 emulator options is wrong, for sure. Based on what you posted before, I think your files need to look like this:

                              /opt/retropie/emulators/reicast/bin/reicast_49046ae.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"
                              XRES="$3"
                              YRES="$4"
                              rootdir="/opt/retropie"
                              configdir="$rootdir/configs"
                              biosdir="$HOME/RetroPie/BIOS/dc"
                              
                              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 -m 1 "$configdir/dreamcast/mappings/" -e "= $(</sys/class/input/event${ev_device_num}/device/name)" | tail -n 1)
                                              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 "$biosdir/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)
                              [[ -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")
                              if [[ "$AUDIO" == "oss" ]]; then
                                  aoss "$rootdir/emulators/reicast/bin/reicast_49046ae" "${params[@]}"
                              else
                                  "$rootdir/emulators/reicast/bin/reicast_49046ae" "${params[@]}"
                              fi
                              

                              /opt/retropie/configs/dreamcast/emulators.cfg:

                              reicast-for-mvc2 = "/opt/retropie/emulators/reicast/bin/reicast_49046ae.sh oss %ROM%"
                              reicast-audio-omx = "/opt/retropie/emulators/reicast/bin/reicast.sh omx %ROM%"
                              reicast-audio-oss = "/opt/retropie/emulators/reicast/bin/reicast.sh oss %ROM%"
                              default = "reicast-audio-omx"
                              

                              I would at least try those before quitting, because the resulting runcommand.log indicates that the reicast command isn't even being executed. Probably not you.. more likely a typo by me from earlier.

                              1 Reply Last reply Reply Quote 0
                              • R
                                rejesterd
                                last edited by

                                Also, if it still doesn't work after matching your .sh and .cfg files to the ones I just posted, maybe just try running the command right from the terminal on the pi:

                                /opt/retropie/emulators/reicast/bin/reicast_49046ae.sh oss "/home/pi/RetroPie/roms/dreamcast/Marvel vs. Capcom 2 (USA).gdi"
                                

                                ..and see what you get.

                                1 Reply Last reply Reply Quote 0
                                • R
                                  rejesterd
                                  last edited by rejesterd

                                  @tackett1980 - Gah.. another typo in my previous post.. please look at my latest output for reicast_49046ae.sh. That should be correct. The last 5 lines is really all you need to look at.

                                  T 1 Reply Last reply Reply Quote 0
                                  • T
                                    tackett1980 @rejesterd
                                    last edited by

                                    @rejesterd

                                    Ok I’ll Go back and give it a shot. I actually deleted everything already but that’s Ok might make it better to just start from scratch again.

                                    R 1 Reply Last reply Reply Quote 0
                                    • R
                                      rejesterd @tackett1980
                                      last edited by

                                      @tackett1980 Hope it'll be worth the effort this time, as the hard part is typically getting the .elf to build (and you were able to do that). Just seems like a config issue now.

                                      T 1 Reply Last reply Reply Quote 0
                                      • T
                                        tackett1980 @rejesterd
                                        last edited by

                                        @rejesterd

                                        Roger that. Do I need to reinstall the standard reicast or just start manually building again like we were?

                                        R 1 Reply Last reply Reply Quote 0
                                        • R
                                          rejesterd @tackett1980
                                          last edited by

                                          @tackett1980 Yeah, reinstall reicast from the retropie setup script first. There are other files/links that still need to be there for the custom-built binary to work.

                                          T 2 Replies Last reply Reply Quote 0
                                          • T
                                            tackett1980 @rejesterd
                                            last edited by

                                            @rejesterd

                                            Ok will do.

                                            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.