From: <mta...@us...> - 2008-12-08 10:18:54
|
Revision: 1186 http://desmume.svn.sourceforge.net/desmume/?rev=1186&view=rev Author: mtabachenko Date: 2008-12-08 10:18:50 +0000 (Mon, 08 Dec 2008) Log Message: ----------- - exclude check address range in VRAM (may crash in some games :( ); Modified Paths: -------------- trunk/desmume/src/MMU.cpp Modified: trunk/desmume/src/MMU.cpp =================================================================== --- trunk/desmume/src/MMU.cpp 2008-12-08 09:15:40 UTC (rev 1185) +++ trunk/desmume/src/MMU.cpp 2008-12-08 10:18:50 UTC (rev 1186) @@ -408,6 +408,7 @@ u8 engine = (vram_addr >> 21); vram_addr &= 0x01FFFFF; u8 engine_offset = (vram_addr >> 14); + if (engine_offset > 31) return NULL; u8 block = MMU.VRAM_MAP[engine][engine_offset]; if (block == 7) return NULL; vram_addr -= MMU.LCD_VRAM_ADDR[block]; @@ -452,11 +453,13 @@ addr -= MMU.LCD_VRAM_ADDR[block]; addr += LCDdata[block][0]; +#if 0 if ((addr < 0x6800000) || (addr> 0x68A3FFF)) // FIXME: this is hack { - //LOG("Address is out range 0x%X in block %i\n", addr, block); + LOG("Address is out range 0x%X in block %i\n", addr, block); addr = save_addr; } +#endif } return (addr); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |