fix bug: reading from unmapped vram should return zero

This commit is contained in:
zeromus 2008-10-10 16:36:32 +00:00
parent 82aa8a7d3f
commit a02e215b3e
2 changed files with 2426 additions and 2422 deletions

View File

@ -476,6 +476,10 @@ void MMU_VRAMWriteBackToLCD(u8 block)
if (!destination) return ;
if (!source) return ;
memcpy(destination,source,size) ;
//zero 10/10/08 - if vram is not mapped, then when it is read from, it should be zero
//mimic this by clearing it now.
memset(source,0,size) ;
}
void MMU_VRAMReloadFromLCD(u8 block,u8 VRAMBankCnt)