From fb7e26b7cf70f73217babc4afc1420fe6d60eb6d Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Tue, 15 May 2012 22:34:57 +0000 Subject: [PATCH] -ok I revert the thing about protection, we dont have proper mem1 things even anymore so its useless :P --- source/loader/apploader.c | 9 ++++----- source/memory/mem2.cpp | 3 --- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/source/loader/apploader.c b/source/loader/apploader.c index 150ee687..f8202c15 100644 --- a/source/loader/apploader.c +++ b/source/loader/apploader.c @@ -17,6 +17,9 @@ typedef int (*app_main)(void **dst, int *size, int *offset); typedef void (*app_init)(void (*report)(const char *fmt, ...)); typedef void *(*app_final)(); typedef void (*app_entry)(void (**init)(void (*report)(const char *fmt, ...)), int (**main)(), void *(**final)()); + +/* Apploader pointers */ +static u8 *appldr = (u8 *) 0x81200000; /* Constants */ #define APPLDR_OFFSET 0x2440 @@ -47,14 +50,10 @@ s32 Apploader_Run(entry_point *entry, u8 vidMode, GXRModeObj *vmode, bool vipatc /* Calculate apploader length */ appldr_len = buffer[5] + buffer[6]; - SYS_SetArena1Hi(APPLOADER_END); - /* Read apploader code */ - ret = WDVD_Read(APPLOADER_START, appldr_len, APPLDR_OFFSET + 0x20); + ret = WDVD_Read(appldr, appldr_len, APPLDR_OFFSET + 0x20); if (ret < 0) return ret; - - DCFlushRange(APPLOADER_START, appldr_len); /* Set apploader entry function */ app_entry appldr_entry = (app_entry)buffer[4]; diff --git a/source/memory/mem2.cpp b/source/memory/mem2.cpp index 4ee2dccd..6f31612e 100644 --- a/source/memory/mem2.cpp +++ b/source/memory/mem2.cpp @@ -48,9 +48,6 @@ void MEM2_init(unsigned int mem2Size) { g_mem2gp.init(mem2Size); g_mem2gp.clear(); - - /* Protect space reserved for apploader */ - SYS_SetArena1Hi(APPLOADER_START); } void MEM2_cleanup(void)