From 2e7ea2767ecab1112994631f2a2a85b6329a1fff Mon Sep 17 00:00:00 2001 From: shashclp Date: Sun, 18 Feb 2007 00:14:53 +0000 Subject: [PATCH] - Fixed bugs reported by masscat here: http://sourceforge.net/tracker/index.php?func=detail&aid=1661684&group_id=164579&atid=832291 and here: http://sourceforge.net/tracker/index.php?func=detail&aid=1661661&group_id=164579&atid=832291 It fixes homebrew Tetris and probably a lot of others --- desmume/src/NDSSystem.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/desmume/src/NDSSystem.h b/desmume/src/NDSSystem.h index b939dd914..663a5da5f 100644 --- a/desmume/src/NDSSystem.h +++ b/desmume/src/NDSSystem.h @@ -241,14 +241,16 @@ int NDS_CreateDummyFirmware(void); { if(!nds.lignerendu) { + T1WriteWord(ARM9Mem.ARM9_REG, 4, T1ReadWord(ARM9Mem.ARM9_REG, 4) | 2); + T1WriteWord(MMU.ARM7_REG, 4, T1ReadWord(MMU.ARM7_REG, 4) | 2); + NDS_ARM9HBlankInt(); + NDS_ARM7HBlankInt(); + if(nds.VCount<192) { GPU_ligne(&MainScreen, nds.VCount); GPU_ligne(&SubScreen, nds.VCount); - T1WriteWord(ARM9Mem.ARM9_REG, 4, T1ReadWord(ARM9Mem.ARM9_REG, 4) | 2); - T1WriteWord(MMU.ARM7_REG, 4, T1ReadWord(MMU.ARM7_REG, 4) | 2); - NDS_ARM9HBlankInt(); - NDS_ARM7HBlankInt(); + if(MMU.DMAStartTime[0][0] == 2) MMU_doDMA(0, 0); if(MMU.DMAStartTime[0][1] == 2) @@ -322,7 +324,7 @@ int NDS_CreateDummyFirmware(void); } nds.lignerendu = FALSE; - if(nds.VCount==193) + if(nds.VCount==192) { T1WriteWord(ARM9Mem.ARM9_REG, 4, T1ReadWord(ARM9Mem.ARM9_REG, 4) | 1); T1WriteWord(MMU.ARM7_REG, 4, T1ReadWord(MMU.ARM7_REG, 4) | 1);