mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
-added re-enabling mem2 protection after patching out AHBPROT
This commit is contained in:
parent
eba8ab8398
commit
6639e1977c
@ -1045,17 +1045,29 @@ void Nand::Init_ISFS()
|
||||
ISFS_Initialize();
|
||||
if(*HW_AHBPROT == 0xFFFFFFFF) //AHBPROT patched out
|
||||
{
|
||||
// Disable memory protection
|
||||
write16(MEM_PROT, 0);
|
||||
// Do patches
|
||||
PatchAHB();
|
||||
MagicPatches(1);
|
||||
// Enable memory protection
|
||||
write16(MEM_PROT, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void Nand::DeInit_ISFS()
|
||||
{
|
||||
gprintf("Deinit ISFS\n");
|
||||
ISFS_Deinitialize();
|
||||
if(*HW_AHBPROT == 0xFFFFFFFF) //AHBPROT patched out
|
||||
{
|
||||
// Disable memory protection
|
||||
write16(MEM_PROT, 0);
|
||||
// Do patches
|
||||
MagicPatches(0);
|
||||
// Enable memory protection
|
||||
write16(MEM_PROT, 1);
|
||||
}
|
||||
ISFS_Deinitialize();
|
||||
}
|
||||
|
||||
/* Thanks to postloader for that patch */
|
||||
@ -1072,8 +1084,6 @@ static const u16 ticket_check[] = {
|
||||
|
||||
void Nand::PatchAHB()
|
||||
{
|
||||
// Disable memory protection
|
||||
write16(MEM_PROT, 2);
|
||||
for(u16 *patchme = ES_MODULE_START; patchme < ES_MODULE_START + 0x4000; patchme++)
|
||||
{
|
||||
if(!memcmp(patchme, ticket_check, sizeof(ticket_check)))
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "external_booter.hpp"
|
||||
#include "cios.h"
|
||||
#include "fst.h"
|
||||
#include "channel/nand.hpp"
|
||||
#include "homebrew/homebrew.h"
|
||||
|
||||
/* External WiiFlow Game Booter */
|
||||
@ -89,6 +90,7 @@ void WiiFlow_ExternalBooter(u8 vidMode, bool vipatch, bool countryString, u8 pat
|
||||
memcpy((void *)0x90000000, &normalCFG, sizeof(the_CFG));
|
||||
DCFlushRange((void *)(0x90000000), sizeof(the_CFG));
|
||||
|
||||
Nand::Instance()->DeInit_ISFS();
|
||||
memcpy(EXECUTE_ADDR, wii_game_booter_dol, wii_game_booter_dol_size);
|
||||
DCFlushRange(EXECUTE_ADDR, wii_game_booter_dol_size);
|
||||
BootHomebrew();
|
||||
|
Loading…
Reference in New Issue
Block a user