From d849bf11dbd2f8ba414bdca7d963e233ce40448b Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 25 Aug 2011 20:31:19 +0000 Subject: [PATCH] remove memory randomization for homebrew. this ended up being a bad idea for a number of reasons. it wont return until it is made optional. --- desmume/src/NDSSystem.cpp | 50 ++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index 6a6ca4b75..63dd58f44 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -43,6 +43,7 @@ #include "path.h" +//int xxctr=0; //#define LOG_ARM9 //#define LOG_ARM7 //bool dolog = false; @@ -2084,29 +2085,34 @@ void NDS_Reset() MMU_Reset(); - //put garbage in vram for homebrew games, to help mimic the situation where libnds does not clear out junk + //put random garbage in vram for homebrew games, to help mimic the situation where libnds does not clear out junk //which the card's launcher may or may not have left behind - if(gameInfo.isHomebrew) - { - u32 w=100000,x=99,y=117,z=19382173; - CTASSERT(sizeof(MMU.ARM9_LCD) < sizeof(MMU.MAIN_MEM)); - CTASSERT(sizeof(MMU.ARM9_VMEM) < sizeof(MMU.MAIN_MEM)); - CTASSERT(sizeof(MMU.ARM9_ITCM) < sizeof(MMU.MAIN_MEM)); - CTASSERT(sizeof(MMU.ARM9_DTCM) < sizeof(MMU.MAIN_MEM)); - for(int i=0;i>19))^(t^(t>>8))); - MMU.MAIN_MEM[i] = t; - if (i>19))^(t^(t>>8))); + // //MMU.MAIN_MEM[i] = t; + // if (i