From f4bc146cd7403b0361c7cc1e064c90ebaf1607b1 Mon Sep 17 00:00:00 2001 From: "crediar@rypp.net" Date: Fri, 20 Jul 2012 12:48:34 +0000 Subject: [PATCH] We are still looking for competent contributors (JPN and 480p results especially) for our compatibility list ( http://crediar.no-ip.com/gc ) Please come to #DM on efnet if you want to help! *Added a new DVDLowRead pattern (fixes Luigi's Mansion USA and maybe other games) *Made the DVDGetDriveStatus patch optional via a config since it broke some games (DML_CFG_NODISC) (fixes Prince of Persia:Sands of Time, Goblin Commander, King Kong, ... ) git-svn-id: svn://localhost/Users/andi/Downloads/code/trunk@21 be6c1b03-d731-4111-a574-e37d80d43941 --- Config.h | 1 + Patches.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Config.h b/Config.h index 860407e..4d5fd97 100644 --- a/Config.h +++ b/Config.h @@ -65,6 +65,7 @@ enum dmlconfig DML_CFG_FORCE_WIDE = (1<<9), DML_CFG_BOOT_DISC = (1<<10), DML_CFG_BOOT_DISC2 = (1<<11), + DML_CFG_NODISC = (1<<12), }; enum dmlvideomode diff --git a/Patches.c b/Patches.c index 2912a4e..07a1a5f 100644 --- a/Patches.c +++ b/Patches.c @@ -115,7 +115,7 @@ u8 GXMObjects[][0x3C] = }; u32 DVDGetDriveStatus[] = { - 0x38600000, // li r3, 0 + 0x38600000, // li r3, 0 0x4E800020 }; @@ -128,6 +128,8 @@ FuncPattern FPatterns[] = { 0x10C, 30, 18, 5, 2, 3, (u8*)NULL, 0xdead0002, "DVDLowRead A", 0, 0 }, { 0xDC, 23, 18, 3, 2, 4, (u8*)NULL, 0xdead0002, "DVDLowRead B", 0, 0 }, + { 0x104, 29, 17, 5, 2, 3, (u8*)NULL, 0xdead0002, "DVDLowRead C", 0, 0 }, + { 0xCC, 3, 3, 1, 0, 3, (u8*)NULL, 0xdead000C, "C_MTXPerspective", 0, 0 }, @@ -883,6 +885,12 @@ void DoPatches( char *ptr, u32 size, u32 SectionOffset ) break; } + if( FPatterns[j].Patch == (u8*)DVDGetDriveStatus ) + { + if( !ConfigGetConfig( DML_CFG_BOOT_NODISC ) ) + break; + } + if( (FPatterns[j].Length >> 16) == 0xdead ) { dbgprintf("DIP:Unhandled dead case:%08X\n", FPatterns[j].Length );