diff --git a/CHANGELOG.md b/CHANGELOG.md index e5f627de4014f04a3a9807b1e12605fba47e1cdb..2b222d0fa4c97d20ed2b583ac835a73db4afab24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -947,6 +947,7 @@ All notable changes to this project have been documented in this file since 8.1. - Bump FBNeo - Fix videosnaps on x64 gpus - Bump Retroarch +- Improved retroarch support cd ## [6.1] - Replacement of the neogeo intro video diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 7ee62a4f8c40b8f9a57267d5315f21455b0ab385..3f039e40e8fb32db66d6b71ccd81ade979da0644 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1082,6 +1082,8 @@ as release notes for end user on a Recalbox upgrade. - Bump FBNeo to include latest fixes - Bump Retroarch to 1.8.1 to include latest fixes & optimizations - Bump Doplhin-emu on 5.0-11288 add automatic configuration and netplay compatibility +- Improved retroarch support cd + ### Fixes - Fix Reicast on XU4 and PC platforms and fix wrong flycast entry on Rpi diff --git a/board/recalbox/fsoverlay/etc/udev/rules.d/99-cdrom_autolaunch.rules b/board/recalbox/fsoverlay/etc/udev/rules.d/99-cdrom_autolaunch.rules new file mode 100644 index 0000000000000000000000000000000000000000..ddb68503834fc00381e67e54224d4e79ed5b3d8e --- /dev/null +++ b/board/recalbox/fsoverlay/etc/udev/rules.d/99-cdrom_autolaunch.rules @@ -0,0 +1,2 @@ +KERNEL=="sr[0-9]*", DRIVERS=="sr", SUBSYSTEM=="block", ACTION=="change", ENV{ID_FS_TYPE}=="iso9660", RUN+="/bin/sh -c '/usr/bin/launch_cdrom'" +KERNEL=="sr[0-9]*", DRIVERS=="sr", SUBSYSTEM=="block", ACTION=="change", ENV{DISK_EJECT_REQUEST}=="1", RUN+="/bin/rm -f /tmp/cd.conf" \ No newline at end of file diff --git a/board/recalbox/x86/fsoverlay/usr/bin/launch_cdrom b/board/recalbox/x86/fsoverlay/usr/bin/launch_cdrom new file mode 100755 index 0000000000000000000000000000000000000000..83aaf06e1d0c43a88d35c590d40d7720b80dd604 --- /dev/null +++ b/board/recalbox/x86/fsoverlay/usr/bin/launch_cdrom @@ -0,0 +1,29 @@ +#!/bin/bash + +mount -o remount, rw / + +cdRomLecteur=$(ls /dev/cdrom) ## detect if cdromLecteur exist +hexDumpCdrom=$(hexdump -C /dev/cdrom |head -n 10) ## scan cdrom for identification + +playstationGame=($(echo "${hexDumpCdrom}" | grep "Sony")) +dreamcastGame=($(echo "${hexDumpCdrom}" |grep "SEGA SEGAKATANA")) +saturnGame=($(echo "${hexDumpCdrom}" |grep "SEGA SEGASATURN")) +segaCdGame=($(echo "${hexDumpCdrom}" | grep "SEGA MEGADRIVE")) +panasonicGame=($(echo "${hexDumpCdrom}" | grep "The 3DO")) +pcengineCdGame=($(echo "${hexDumpCdrom}" | grep "PCE")) + +if [ "$cdRomLecteur" ] ; then ## detect platform + if [ "$playstationGame" ]; then + echo "system = psx" >> /tmp/cd.conf + elif [ "$dreamcastGame" ]; then + echo "system = dreamcast" >> /tmp/cd.conf + elif [ "$saturnGame" ]; then + echo "system = saturn" >> /tmp/cd.conf + elif [ "$segaCdGame" ]; then + echo "system = segacd" >> /tmp/cd.conf + elif [ "$panasonicGame" ]; then + echo "system = 3do" >> /tmp/cd.conf + elif [ "$pcengineCdGame" ]; then + echo "system = pcenginecd" >> /tmp/cd.conf + fi +fi \ No newline at end of file