From 8db2c0622d1945d114a9310af62a32869ef33498 Mon Sep 17 00:00:00 2001 From: kostyaff Date: Thu, 16 Jul 2026 16:07:21 +0300 Subject: [PATCH] [VideoOut] Implement sceVideoOutIsOutputSupported stub (fixes #257) (#270) Quake (PPSA01880, Kex Engine) crashes at startup because sceVideoOutIsOutputSupported (NID Nv8c-Kb+DUM) is unimplemented. The game calls it to check video output capabilities before initializing rendering. Add HLE export stub: returns 1 (supported) for SceVideoOutBusTypeMain, 0 otherwise. The emulator renders via Vulkan and supports any pixel format or aspect ratio on the main bus. NID verified via Ps5Nid.Compute SHA1 algorithm. Export name confirmed in scripts/ps5_names.txt. --- src/SharpEmu.Libs/VideoOut/VideoOutExports.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/SharpEmu.Libs/VideoOut/VideoOutExports.cs b/src/SharpEmu.Libs/VideoOut/VideoOutExports.cs index f01f8f24..7efc47d5 100644 --- a/src/SharpEmu.Libs/VideoOut/VideoOutExports.cs +++ b/src/SharpEmu.Libs/VideoOut/VideoOutExports.cs @@ -259,6 +259,22 @@ public static class VideoOutExports } } + [SysAbiExport( + Nid = "Nv8c-Kb+DUM", + ExportName = "sceVideoOutIsOutputSupported", + Target = Generation.Gen4 | Generation.Gen5, + LibraryName = "libSceVideoOut")] + public static int VideoOutIsOutputSupported(CpuContext ctx) + { + var busType = unchecked((int)ctx[CpuRegister.Rdi]); + _ = ctx[CpuRegister.Rsi]; // pixelFormat + _ = ctx[CpuRegister.Rdx]; // aspectRatio + + // The emulator supports any output configuration on the main bus. + // Return 1 (supported) for SceVideoOutBusTypeMain, 0 otherwise. + return busType == SceVideoOutBusTypeMain ? 1 : 0; + } + [SysAbiExport( Nid = "uquVH4-Du78", ExportName = "sceVideoOutClose",