From 3077ef87d37914ed49ec27d373d615ad064c255d Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 23 Oct 2026 16:28:02 +0200 Subject: [PATCH] feat: add the MesenCE librashader runtime The standalone now loads librashader.dll or librashader.so for shader presets and ships it in Dependencies.zip (librashader_ld.h:45-88). Standalone pin to 4b8a196, Mesen2 to b9fa69d. SGB1's UseSgb2 ref names the standalone line, the notes name the libretro tree. --- emulators/mesence.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/emulators/mesence.yml b/emulators/mesence.yml index 0ea80bc6..d3d981bf 100644 --- a/emulators/mesence.yml +++ b/emulators/mesence.yml @@ -7,9 +7,9 @@ source: upstream: "https://github.com/SourMesen/Mesen2" profiled_date: "2026-09-17" source_commit: - standalone: "20f497c9620a7f4e55b7752e1d22734f9d7492fa" + standalone: "4b8a196e299b3de297b204fd1208d2981562c89b" libretro: "4c4e069f16a8ad6ed79e046046c56d51558c7daf" -upstream_commit: "fabc9a62174f8734a113df6d244f5539ef6b8fcf" +upstream_commit: "b9fa69ddc6d0a331fb103fdb5eef6904305703c2" core_version: standalone: "2.2.1" libretro: "2.0.0" @@ -49,7 +49,7 @@ notes: | Core/Shared/FirmwareHelper.h, so both builds read the same names with the same size checks. The buildbot publishes it as mesen2_libretro, and the port announces library_version 2.0.0 (Libretro/libretro.cpp:2803) while the - compiled core reports 2.2.1 (Core/Shared/EmuSettings.cpp:165-168). + compiled core reports 2.2.1 (libretro tree, Core/Shared/EmuSettings.cpp:162-169). Firmware folder. Standalone reads /Firmware/ (Utilities/FolderUtilities.cpp:81-91). The libretro port sets the home folder to the frontend system directory @@ -78,8 +78,8 @@ notes: | (Core/Gameboy/GbBootRom.h:8,49,99), and the external files override them. Super Game Boy mode falls back to the plain GB core when the SNES-side ROM is missing (Core/SNES/BaseCartridge.cpp:698-716). GameboyConfig - keeps UseSgb2 at true and no core option changes it - (Core/Shared/SettingTypes.h:433), so the libretro build only ever asks + keeps UseSgb2 at true and no core option changes it (libretro tree, + Core/Shared/SettingTypes.h:433), so the libretro build only ever asks for SGB2.sfc and sgb2_boot.bin. SGB1.sfc and sgb_boot.bin are standalone reads. The libretro port also offers a "Super Game Boy" subsystem taking a GB ROM plus an SNES-side ROM (Libretro/libretro.cpp:1041-1052): the @@ -406,7 +406,7 @@ files: validation: [size] sha256: "bba9c269273bedb9b38bd5eb23bfaa6e509b8decc7cb80bb5513905af04f4ceb,c6c4daab5c899b69900c460787de6089edabe94b760f96d9f583d30cc0a5bb30,a75160f7b89b1f0e20fd2f6441bb86285c7378db5035ef6885485eaff6059376" note: "Super Game Boy SNES-side ROM (Rev 0/1/2), read when the UseSgb2 setting is off. Without it, GB games run on the plain GB core instead of SGB mode. The libretro build keeps UseSgb2 on and never opens this name." - source_ref: "source Core/SNES/BaseCartridge.cpp:698-716, source Core/Shared/FirmwareHelper.h:208-228, source Core/Shared/SettingTypes.h:433, upstream UI/Interop/FirmwareTypeExtensions.cs:40-47" + source_ref: "source Core/SNES/BaseCartridge.cpp:698-716, source Core/Shared/FirmwareHelper.h:208-228, source Core/Shared/SettingTypes.h:455, upstream UI/Interop/FirmwareTypeExtensions.cs:40-47" - name: "SGB2.sfc" path: "SGB2.sfc" @@ -777,6 +777,20 @@ files: note: "Satellaview data stream for channel 0124. The application extracts it from its embedded Dependencies.zip into /Satellaview/ at startup and preserves user replacements." source_ref: "source Core/SNES/Coprocessors/BSX/BsxStream.cpp:68-74, source UI/Utilities/DependencyHelper.cs:44-48" + # ------------------------------------------------------- + # Shader runtime (auto-deployed by the standalone UI) + # ------------------------------------------------------- + - name: "librashader.dll" + aliases: ["librashader.so"] + standalone_path: "librashader.dll" + mode: standalone + category: game_data + required: false + bundled: true + description: "librashader runtime for RetroArch-format shader presets" + note: "Opened from the working directory, which the UI sets to the home folder, by LoadLibraryW on Windows and dlopen on Linux. The Windows and Linux builds embed it in Dependencies.zip and extract it there at startup, the macOS build ships none. Without it every librashader call is a no-op and shader presets are unavailable." + source_ref: "source Utilities/Video/librashader_ld.h:45-88, 1615-1632, source Utilities/Video/LibrashaderUtilities.h:36-62, source UI/Program.cs:53-57, source UI/Utilities/DependencyHelper.cs:14-64, source .github/workflows/build.yml:43-48, 106-111" + platform_details: firmware_folder: standalone: "Firmware/"