Reicast (Dreamcast) Emulator Not Playing !
-
Hi @Hyell
1- Doesn't work = emulator don't run. Since I changed the reicast.sh file, the emulator don't start. I selected a game or Systemmanager, and then return to main screen. This is now my priority. I can't go to the date/hour screen!
2 - I can't move the cursor.
I made some config files with and without spaces:
(I put "/" for keep the text together in the quote)
[emulator]
mapping_name = Ultimarc IPAC 2 Ultimarc IPAC 2
emu_btn_escape = 45
/
[dreamcast]
btn_a = 56
btn_b = 42
btn_x = 29
btn_y = 57
btn_start = 44
btn_dpad1_left = 105
btn_dpad1_right = 106
btn_dpad1_up = 103
btn_dpad1_down = 108
/
[compat]
btn_trigger_left = 2
btn_trigger_right = 6This is the emu.cfg (I put "/" for keep the text together in the quote)
[audio]
backend = oss
disable = 0
/
[config]
Debug.SerialConsoleEnabled = 0
Dreamcast.Broadcast = 4
Dreamcast.Cable = 3
Dreamcast.RTC = 2097339897
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/dreamcast/mappings/controller_Ultimarc_IPAC_2_Ultimarc_IPAC_2.cfg
joystick_device_id = -1
/
[reios]
ElfFile =
/
[validate]
OpenGlChecks = 03 - This is how looks like my /dev/input/ It's ok?
Now I see the input list... maybe I have to rename the config file to "Ultimarc_IPAC_2_Ultimarc_IPAC_2_9" ???
Anyway, I can't run the emulator!!
Thanks for your help :-)
-
@krlitosmtnez
Ok.
Can you copy here your reicast.sh file please? We will see why reicast don't start.And we will check your controller after.
-
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.
-
@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
-
-
@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
-
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=
-
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:
-
@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
-
-
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)
-
@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 "
-
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
-
@krlitosmtnez
Ok.
You can try to add quote on emu.cfgevdev_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. -
No way. Still without controls...
-
@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?
-
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!
-
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.
-
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.
-
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.cfgYou just have to put the same name file on emu.cfg
Have you test with a file named without blank?
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.