From 5217f4b05623647c1475e99740f3884e7192b519 Mon Sep 17 00:00:00 2001 From: StapleButter Date: Wed, 26 Apr 2017 16:17:03 +0200 Subject: [PATCH] =?UTF-8?q?set=20POSTFLG=20to=201=20upon=20direct=20boot.?= =?UTF-8?q?=20fixes=20Pok=C3=A9mon=20White=20among=20others.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ARM.cpp | 3 --- src/NDS.cpp | 11 +++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ARM.cpp b/src/ARM.cpp index 73e94a0d..bbfb7f77 100644 --- a/src/ARM.cpp +++ b/src/ARM.cpp @@ -174,9 +174,6 @@ void ARM::JumpTo(u32 addr, bool restorecpsr) // aging cart debug crap //if (addr == 0x0201764C) printf("capture test %d: R1=%08X\n", R[6], R[1]); //if (addr == 0x020175D8) printf("capture test %d: res=%08X\n", R[6], R[0]); - //if (addr == 0x37FF234 && R[15]!=0x37FF23C) printf("poké infinite loop %08X, %08X\n", R[15], DataRead32(0x380FFC8)); - // 37FD4BC. if R0=0, inf. loop - // 38098AC -> R0 if (addr & 0x1) { diff --git a/src/NDS.cpp b/src/NDS.cpp index d22288f3..1329f6ca 100644 --- a/src/NDS.cpp +++ b/src/NDS.cpp @@ -218,6 +218,9 @@ void SetupDirectBoot() ARM9->JumpTo(bootparams[1]); ARM7->JumpTo(bootparams[5]); + PostFlag9 = 0x01; + PostFlag7 = 0x01; + PowerControl9 = 0x820F; GPU::DisplaySwap(PowerControl9); @@ -826,6 +829,14 @@ void debug(u32 param) //for (int i = 0; i < 9; i++) // printf("VRAM %c: %02X\n", 'A'+i, GPU::VRAMCNT[i]); + + /*FILE* shit = fopen("debug/poke7.bin", "wb"); + for (u32 i = 0x02000000; i < 0x03810000; i+=4) + { + u32 val = ARM7Read32(i); + fwrite(&val, 4, 1, shit); + } + fclose(shit);*/ }