mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
Libretro: build the core on PRs too, and ship its info file (#8)
* Libretro: build the core on PRs too, and ship its info file The libretro core build is only wired into nightly_release.yml, so a PR or a push can break pcsx2-libretro while Linux CI stays green -- you find out the next morning. Call the same reusable workflow from linux_build_matrix.yml, so the core is built alongside the Qt and SDL flavours on every PR and push. Also add yaps2_libretro.info. Frontends read it for the core name, extensions, BIOS requirements and feature flags, and it has to sit next to the .so, but it never landed in the repo -- so the nightly ships a core with no info file. Every field comes from pcsx2-libretro/Main.cpp: hw_render/required_hw_api reflect the mandatory Vulkan context sharing (no software or GL fallback toward the frontend), disk_control the .m3u and tray-swap support, and cheats /memory_descriptors/input_descriptors are false because those interfaces are not registered. The same file is proposed for libretro-super in libretro/libretro-super#2013, so the two stay in sync. * Libretro: dithering, trilinear, mipmapping and FXAA core options Fill the graphics-option gap vs the pcee2/lrps2 cores: yaps2_dithering (dithering_ps2 0/1/2), yaps2_trilinear_filtering (TriFilter enum, Automatic=-1), yaps2_mipmapping (hw_mipmap) and yaps2_fxaa (fxaa), defaults matching the base config. Both the v2 table and the legacy variables list carry them.
This commit is contained in:
@@ -2,8 +2,9 @@ name: 🐧 Linux Builds (aarch64)
|
||||
|
||||
# yaps2 fork: we ship for ARM Linux handhelds only, so CI builds a single
|
||||
# platform — native aarch64 — in two flavours:
|
||||
# * yaps2-qt AppImage + tarball (desktop / dev + Rocknix / Batocera, which run Wayland)
|
||||
# * yaps2-sdl handheld tarball (bare-kmsdrm handhelds; VK_KHR_display direct-display)
|
||||
# * yaps2-qt AppImage + tarball (desktop / dev + Rocknix / Batocera, which run Wayland)
|
||||
# * yaps2-sdl handheld tarball (bare-kmsdrm handhelds; VK_KHR_display direct-display)
|
||||
# * yaps2-libretro core .so (RetroArch and other libretro frontends)
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -32,3 +33,11 @@ jobs:
|
||||
jobName: "SDL Handheld Build (arm64)"
|
||||
artifactPrefixName: "yaps2-linux-arm64-sdl"
|
||||
secrets: inherit
|
||||
|
||||
build_linux_libretro:
|
||||
name: "libretro Core"
|
||||
uses: ./.github/workflows/linux_build_libretro.yml
|
||||
with:
|
||||
jobName: "libretro Core Build (arm64)"
|
||||
artifactPrefixName: "yaps2-linux-arm64-libretro"
|
||||
secrets: inherit
|
||||
|
||||
@@ -872,6 +872,20 @@ static struct retro_core_option_v2_definition kOptionDefinitions[] = {
|
||||
nullptr, "video",
|
||||
{{"Minimum", nullptr}, {"Basic", nullptr}, {"Medium", nullptr}, {"High", nullptr},
|
||||
{"Full", nullptr}, {"Maximum", nullptr}, {nullptr, nullptr}}, "Basic"},
|
||||
{"yaps2_dithering", "Dithering", "Dithering",
|
||||
"Unscaled replicates PS2 dithering; Off can reduce banding artifacts at higher internal resolutions.",
|
||||
nullptr, "video",
|
||||
{{"Unscaled", nullptr}, {"Off", nullptr}, {"Scaled", nullptr}, {nullptr, nullptr}}, "Unscaled"},
|
||||
{"yaps2_trilinear_filtering", "Trilinear Filtering", "Trilinear Filtering",
|
||||
nullptr, nullptr, "video",
|
||||
{{"Automatic", nullptr}, {"Off", nullptr}, {"Trilinear (PS2)", nullptr},
|
||||
{"Trilinear (Forced)", nullptr}, {nullptr, nullptr}}, "Automatic"},
|
||||
{"yaps2_mipmapping", "Hardware Mipmapping", "Hardware Mipmapping",
|
||||
nullptr, nullptr, "video",
|
||||
{{"enabled", nullptr}, {"disabled", nullptr}, {nullptr, nullptr}}, "enabled"},
|
||||
{"yaps2_fxaa", "FXAA", "FXAA",
|
||||
"Cheap post-process anti-aliasing.", nullptr, "video",
|
||||
{{"disabled", nullptr}, {"enabled", nullptr}, {nullptr, nullptr}}, "disabled"},
|
||||
{"yaps2_texture_filtering", "Texture Filtering", "Texture Filtering",
|
||||
"Bilinear (PS2) filters as the game requests. Forced filters everything, which smooths textures "
|
||||
"but can blur 2D elements; the sprite-excluding variant protects UI sprites.",
|
||||
@@ -947,6 +961,10 @@ static struct retro_variable kCoreVariables[] = {
|
||||
{"yaps2_no_interlacing_patches", "No-interlacing patches (restart); disabled|enabled"},
|
||||
{"yaps2_widescreen_patches", "Widescreen patches (restart); disabled|enabled"},
|
||||
{"yaps2_blending_accuracy", "Blending accuracy; Basic|Minimum|Medium|High|Full|Maximum"},
|
||||
{"yaps2_dithering", "Dithering; Unscaled|Off|Scaled"},
|
||||
{"yaps2_trilinear_filtering", "Trilinear filtering; Automatic|Off|Trilinear (PS2)|Trilinear (Forced)"},
|
||||
{"yaps2_mipmapping", "Hardware mipmapping; enabled|disabled"},
|
||||
{"yaps2_fxaa", "FXAA; disabled|enabled"},
|
||||
{"yaps2_texture_filtering", "Texture filtering; Bilinear (PS2)|Nearest|Bilinear (Forced)|Bilinear (Forced excluding sprites)"},
|
||||
{"yaps2_anisotropic_filtering", "Anisotropic filtering; 0|2|4|8|16"},
|
||||
{"yaps2_sw_threads", "Software renderer threads; 2|0|1|3|4"},
|
||||
@@ -1097,6 +1115,45 @@ static void ApplyCoreOptions(bool startup)
|
||||
}
|
||||
}
|
||||
|
||||
var = {"yaps2_dithering", nullptr};
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
// Values match the Dithering config field: 0=Off, 1=Scaled, 2=Unscaled.
|
||||
static constexpr std::pair<const char*, int> kDither[] = {{"Off", 0}, {"Scaled", 1}, {"Unscaled", 2}};
|
||||
for (const auto& [name, value] : kDither)
|
||||
{
|
||||
if (!std::strcmp(var.value, name))
|
||||
{
|
||||
s_base_settings->SetIntValue("EmuCore/GS", "dithering_ps2", value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var = {"yaps2_trilinear_filtering", nullptr};
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
// Values match the TriFiltering enum (Automatic=-1).
|
||||
static constexpr std::pair<const char*, int> kTri[] = {
|
||||
{"Automatic", -1}, {"Off", 0}, {"Trilinear (PS2)", 1}, {"Trilinear (Forced)", 2}};
|
||||
for (const auto& [name, value] : kTri)
|
||||
{
|
||||
if (!std::strcmp(var.value, name))
|
||||
{
|
||||
s_base_settings->SetIntValue("EmuCore/GS", "TriFilter", value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var = {"yaps2_mipmapping", nullptr};
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
s_base_settings->SetBoolValue("EmuCore/GS", "hw_mipmap", !std::strcmp(var.value, "enabled"));
|
||||
|
||||
var = {"yaps2_fxaa", nullptr};
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
s_base_settings->SetBoolValue("EmuCore/GS", "fxaa", !std::strcmp(var.value, "enabled"));
|
||||
|
||||
var = {"yaps2_ee_cycle_rate", nullptr};
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
# Software Information
|
||||
display_name = "Sony - PlayStation 2 (yaps2)"
|
||||
authors = "PCSX2 Team|bmdhacks|WizzardSK"
|
||||
supported_extensions = "elf|iso|ciso|chd|cso|zso|bin|mdf|nrg|dump|gz|img|irx|m3u"
|
||||
corename = "yaps2"
|
||||
categories = "Emulator"
|
||||
license = "GPLv3"
|
||||
permissions = ""
|
||||
display_version = "Git"
|
||||
|
||||
# Hardware Information
|
||||
manufacturer = "Sony"
|
||||
systemname = "Sony PlayStation 2"
|
||||
systemid = "playstation2"
|
||||
|
||||
# Libretro Features
|
||||
database = "Sony - PlayStation 2"
|
||||
supports_no_game = "false"
|
||||
savestate = "true"
|
||||
savestate_features = "basic"
|
||||
cheats = "false"
|
||||
input_descriptors = "false"
|
||||
memory_descriptors = "false"
|
||||
libretro_saves = "false"
|
||||
core_options = "true"
|
||||
core_options_version = "2.0"
|
||||
load_subsystem = "false"
|
||||
hw_render = "true"
|
||||
required_hw_api = "Vulkan >= 1.1"
|
||||
needs_fullpath = "true"
|
||||
disk_control = "true"
|
||||
is_experimental = "true"
|
||||
|
||||
# Firmware / BIOS
|
||||
firmware_count = 2
|
||||
firmware0_desc = "'pcsx2/bios' folder (any valid PS2 BIOS dump, e.g. scph39001.bin)"
|
||||
firmware0_path = "pcsx2/bios"
|
||||
firmware0_opt = "false"
|
||||
firmware1_desc = "'pcsx2/resources' folder (shaders, GameIndex.yaml, fonts)"
|
||||
firmware1_path = "pcsx2/resources"
|
||||
firmware1_opt = "false"
|
||||
notes = "[1] This only checks that the folders exist in the correct location.|[2] The core does not require a specific BIOS filename, so this info file|[^] cannot tell you whether the content of your 'bios' folder is correct.|[3] The 'resources' folder must be copied from a matching yaps2/PCSX2 build;|[^] the core will not boot without it.|[4] The core is Vulkan-only: the frontend's Vulkan context is shared with the|[^] emulator through the hardware-render negotiation interface."
|
||||
|
||||
description = "A libretro port of yaps2, a PlayStation 2 emulator forked from PCSX2 and aimed at ARM handhelds (working arm64 recompilers, Adreno fixes). The core renders through the frontend's own Vulkan context -- it takes the VkInstance and VkPhysicalDevice from the hardware-render context-negotiation interface and hands finished frames back through set_image -- so a Vulkan-capable driver is required and no other video driver will work. Place a PS2 BIOS dump in 'system/pcsx2/bios' and a copy of the emulator's 'resources' directory in 'system/pcsx2/resources'. Save states, .m3u disc swapping and the usual renderer/upscale/speedhack core options are implemented. This core is experimental."
|
||||
Reference in New Issue
Block a user