mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
-added sneek video patch, as soon as you set "Patch video modes" to "normal" or higher, wiiflow will also apply the sneek patch (should fix quite a good amount of wii game black screens when using video patching)
This commit is contained in:
parent
8f66b05995
commit
ce732fd058
@ -119,6 +119,8 @@ void maindolpatches(void *dst, int len, u8 vidMode, GXRModeObj *vmode, bool vipa
|
|||||||
if(hooktype != 0 && hookpatched == false)
|
if(hooktype != 0 && hookpatched == false)
|
||||||
hookpatched = dogamehooks(dst, len, false);
|
hookpatched = dogamehooks(dst, len, false);
|
||||||
patchVideoModes(dst, len, vidMode, vmode, patchVidModes);
|
patchVideoModes(dst, len, vidMode, vmode, patchVidModes);
|
||||||
|
if(patchVidModes > 0)
|
||||||
|
PatchVideoSneek(dst, len);
|
||||||
if(vipatch)
|
if(vipatch)
|
||||||
vidolpatcher(dst, len);
|
vidolpatcher(dst, len);
|
||||||
if(configbytes[0] != 0xCD)
|
if(configbytes[0] != 0xCD)
|
||||||
|
@ -245,6 +245,22 @@ void vidolpatcher(void *addr, u32 len)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PatchVideoSneek(void *addr, u32 len)
|
||||||
|
{
|
||||||
|
u8 *addr_start = addr;
|
||||||
|
u8 *addr_end = addr+len;
|
||||||
|
|
||||||
|
while(addr_start < addr_end)
|
||||||
|
{
|
||||||
|
if(*(vu32*)(addr_start) == 0x3C608000)
|
||||||
|
{
|
||||||
|
if(((*(vu32*)(addr_start+4) & 0xFC1FFFFF ) == 0x800300CC) && ((*(vu32*)(addr_start+8) >> 24) == 0x54))
|
||||||
|
*(vu32*)(addr_start+4) = 0x5400F0BE | ((*(vu32*)(addr_start+4) & 0x3E00000) >> 5);
|
||||||
|
}
|
||||||
|
addr_start += 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//giantpune's magic super patch to return to channels
|
//giantpune's magic super patch to return to channels
|
||||||
|
|
||||||
static u32 ad[ 4 ] = { 0, 0, 0, 0 };//these variables are global on the off chance the different parts needed
|
static u32 ad[ 4 ] = { 0, 0, 0, 0 };//these variables are global on the off chance the different parts needed
|
||||||
|
@ -33,6 +33,7 @@ extern u8 configbytes[2];
|
|||||||
bool dogamehooks(void *addr, u32 len, bool channel);
|
bool dogamehooks(void *addr, u32 len, bool channel);
|
||||||
void langpatcher(void *addr, u32 len);
|
void langpatcher(void *addr, u32 len);
|
||||||
void vidolpatcher(void *addr, u32 len);
|
void vidolpatcher(void *addr, u32 len);
|
||||||
|
void PatchVideoSneek(void *addr, u32 len);
|
||||||
void PatchCountryStrings(void *Address, int Size);
|
void PatchCountryStrings(void *Address, int Size);
|
||||||
void PatchAspectRatio(void *addr, u32 len, u8 aspect);
|
void PatchAspectRatio(void *addr, u32 len, u8 aspect);
|
||||||
bool PatchReturnTo(void *Address, int Size, u32 id);
|
bool PatchReturnTo(void *Address, int Size, u32 id);
|
||||||
|
Loading…
Reference in New Issue
Block a user