From 19f9cd36fcaf85cb689b361fdd1a3a804aa5dbee Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 31 Jan 2009 04:47:23 +0000 Subject: [PATCH] fix: [ 2550645 ] Super Princess Peach: crash when starting a puzzle --- desmume/ChangeLog | 21 ++++++++++++++------- desmume/src/MMU.cpp | 8 +++++++- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/desmume/ChangeLog b/desmume/ChangeLog index 614a2e52f..88a79fe95 100644 --- a/desmume/ChangeLog +++ b/desmume/ChangeLog @@ -1,18 +1,25 @@ -0.9+ +0.9 -> 0/10 +General/Core: + bug: SF [ 2550645 ] Super Princess Peach: crash when starting a puzzle [zeromus] + bug: win32: fix spu wav file writer (regression from 0.8) [zeromus] + bug: More variables added to savestate. Savestates probably invalidated. + Graphics: bug: Fix some errors in rendering 512 tall BG [zeromus,CrazyMax] (still not fully resolved) bug: 3d compositing integrated into GPU engine (more precision and speed in cases where no compositing needed) [luigi__] bug: Add optional fragment shading pipeline (more precision) [luigi__] - bug: fix texture mapping across texture banks [zeromus] + bug: fix texture mapping across texture and palette banks [zeromus] bug: fix texture handling for texels with MSB set (fixes some texture corruption) [zeromus] - bug: fix thumb ROR [zeromus] - bug: win32: fix spu wav file writer (regression from 0.8) [zeromus] - enh: dont memcmp for texcache validity when the texture banks arent unmapping [zeromus] - + bug: fix arm/thumb ROR [zeromus] + bug: fix texture coordinate generation from normal (fixes environment mapping) [zeromus] + bug: fix display capturing from 2d+3d source when display mode is display-vram [zeromus] + bug: more correct mosaic effects [zeromus] + enh: dont memcmp for texcache validity when the texture banks arent unmapping (speedup) [zeromus] + Mac OS X Port: bug: left key setting no longer gets confused with the right key [jeff] enh: more keys can be mapped - + 0.8 -> 0.9 There have been so many changes that this list can hardly be considered complete. For this release, we have formatted the list into a high level overview of big changes and bad bugs relative to the previous release. Hopefully what you're interested in. diff --git a/desmume/src/MMU.cpp b/desmume/src/MMU.cpp index 46d9e702f..b11ac78a2 100644 --- a/desmume/src/MMU.cpp +++ b/desmume/src/MMU.cpp @@ -536,6 +536,12 @@ u8 *MMU_RenderMapToLCD(u32 vram_addr) static FORCEINLINE u32 MMU_LCDmap(u32 addr) { + //handle LCD memory mirroring + if ((addr < 0x07000000) && (addr>=0x068A4000)) + return 0x06800000 + + //(addr%0xA4000); //yuck!! is this even how it mirrors? but we have to keep from overrunning the buffer somehow + (addr&0x80000); //just as likely to be right (I have no clue how it should work) but faster. + if ((addr < 0x6000000)) return addr; if ((addr > 0x661FFFF)) return addr; // Engine BOBJ max 128KB @@ -921,7 +927,7 @@ void FASTCALL MMU_doDMA(u32 num) /* word count */ - taille = (MMU.DMACrt[PROCNUM][num]&0xFFFF); + taille = (MMU.DMACrt[PROCNUM][num]&0x1FFFF); // If we are in "Main memory display" mode just copy an entire // screen (256x192 pixels).