From 71241be76e0698c0350ba3dc20b41d73e6921435 Mon Sep 17 00:00:00 2001 From: Ivan V Date: Wed, 18 Feb 2026 15:47:41 +0000 Subject: [PATCH 1/3] patcher: patch DVD key check to fix master disc detection (fixes #21) --- patcher/include/patterns_fmcb.h | 12 +++++++++++- patcher/src/patches_fmcb.c | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/patcher/include/patterns_fmcb.h b/patcher/include/patterns_fmcb.h index a9ef2d9..a04f3c5 100644 --- a/patcher/include/patterns_fmcb.h +++ b/patcher/include/patterns_fmcb.h @@ -117,7 +117,7 @@ static uint32_t patternDrawButtonPanel_3[] = { static uint32_t patternDrawButtonPanel_3_mask[] = {0xffffffff, 0xffffffff, 0xffffff00, 0xff00ffff, 0xffff0000, // 0xfc000000, 0xffffffff}; -// Patterns for patching the ExecuteDisc function to override the disc launch handlers +// Pattern for patching the ExecuteDisc function to override the disc launch handlers static uint32_t patternExecuteDisc[] = { // ExecuteDisc function 0x27bdfff0, // addiu sp, sp, $fff0 @@ -136,6 +136,16 @@ static uint32_t patternExecuteDisc[] = { static uint32_t patternExecuteDisc_mask[] = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffff0, 0xfffffff0, // 0xffffff00, 0x00000000, 0xffffffff, 0xfffffff0, 0xffffff00, 0xffff0000}; +// Pattern for patching DVD key check to always return 0 on ROM 1.60+ +// Used only for fixing master disc detecton on MechaPwn-patched consoles +static uint32_t patternCheckDVDKey[] = { + 0xae020000, // sw v0, 0x00??, s0 + 0x0c000000, // jal checkDVDKey <- patch target, replace with storing 0 into v0 + 0x00000000, // nop + 0xae000000, // sw zero, 0x00??, s0 +}; +static uint32_t patternCheckDVDKey_mask[] = {0xffffff00, 0xff000000, 0xffffffff, 0xffffff00}; + #ifndef HOSD // OSDMenu patterns for patching the disc detection to bypass automatic disc launch static uint32_t patternDetectDisc[] = { diff --git a/patcher/src/patches_fmcb.c b/patcher/src/patches_fmcb.c index ebdb99d..af800a0 100644 --- a/patcher/src/patches_fmcb.c +++ b/patcher/src/patches_fmcb.c @@ -543,6 +543,12 @@ void patchDiscLaunch(uint8_t *osd) { #ifdef HOSD discLaunchHandlers[7] = (uint32_t)launchHDDApplication; // Overwrite HDD application function pointer #endif + + // Patch DVD key check on ROM 1.60+ + ptr = findPatternWithMask(osd, 0x100000, (uint8_t *)patternCheckDVDKey, (uint8_t *)patternCheckDVDKey_mask, sizeof(patternCheckDVDKey)); + if (!ptr) + return; + _sw(0x24020000, (uint32_t)ptr + 4); // patch the function call to return 0 instead } // Patches automatic disc launch for OSDMenu From db2a7624cb998bbfeb73a548f3fd8dbe15ee48b0 Mon Sep 17 00:00:00 2001 From: Ivan V Date: Wed, 18 Feb 2026 15:53:44 +0000 Subject: [PATCH 2/3] utils/loader: always reset IOP for PS2LOGO --- utils/loader/src/loader.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utils/loader/src/loader.c b/utils/loader/src/loader.c index 734069b..72dee74 100644 --- a/utils/loader/src/loader.c +++ b/utils/loader/src/loader.c @@ -326,9 +326,12 @@ int loadELFFromFile(int argc, char *argv[]) { shutdownDEV9(dev9ShutdownType); if (!strcmp(argv[0], "rom0:PS2LOGO")) { - // Apply PS2LOGO patch, keep libcdvd initialized for PS2LOGO + // Apply PS2LOGO patch and force IOP reset patchPS2LOGO(elfdata.epc); - } else if (!strncmp(argv[0], "cdrom", 5)) + sceCdInit(SCECdEXIT); + doIOPReset = 1; + } + if (!strncmp(argv[0], "cdrom", 5)) // Deinit libcdvd if argv[0] points to cdrom sceCdInit(SCECdEXIT); From 3b50779b1c774b93bbc7c44904edf329e49e5693 Mon Sep 17 00:00:00 2001 From: Ivan V Date: Wed, 18 Feb 2026 16:17:40 +0000 Subject: [PATCH 3/3] README: document MechaPwn enhancements and PS2LOGO limitations --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b99043..a6cdffa 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ The release archive contains the following files: See the launcher [README](launcher/README.md) for more details. -## Key differences from FMCB 1.8: +## Key differences from FMCB 1.8 - All OSD initialization code is removed - USB support is dropped from the patcher, so only memory cards are checked for `OSDMENU.CNF` - No ESR support @@ -67,6 +67,9 @@ See the launcher [README](launcher/README.md) for more details. - ELF paths are not checked by the patcher, so every named entry from FMCB config file is displayed in hacked OSDSYS menu - Support for launching applications from MMCE, MX4SIO and APA- and exFAT-formatted HDDs - CD/DVD support was extended to support skipping PS2LOGO, mounting VMCs on MMCE devices, showing visual GameID for PixelFX devices and booting DKWDRV for PS1 discs +- Enhanced support for MechaPwn-patched systems: + - PS2LOGO is patched to always use the disc region + - OSDSYS disc key check is patched out to fix DVD master discs being detected as "invalid" - Integrated Neutrino GSM for disc games and applications - "Unlimited" number of paths for each entry - Support for 1080i and 480p (as line-doubled 240p) video modes @@ -102,6 +105,11 @@ See the MBR [README](mbr/README.md) for more details. OSDMenu comes with the fully-featured launcher that supports running applications from all devices supported by homebrew drivers. See the launcher [README](launcher/README.md) for more details. +## Known issues that will not be fixed + +- For master discs, `PS2LOGO` may appear "inverted". + This issue does not occur when using pressed retail copies. + ## Credits - Everyone involved in developing the original Free MC Boot and OSDSYS patches, especially Neme and jimmikaelkael