Always apply map masks

fixes libretro issue where loading rom will only show white screen
This commit is contained in:
retro-wertz 2018-06-04 18:10:20 +08:00
parent ff4f1235aa
commit b0982ac8e1
1 changed files with 5 additions and 8 deletions

View File

@ -1470,7 +1470,7 @@ void CPUCleanUp()
emulating = 0; emulating = 0;
} }
#ifndef __LIBRETRO__
void SetMapMasks() void SetMapMasks()
{ {
map[0].mask = 0x3FFF; map[0].mask = 0x3FFF;
@ -1486,6 +1486,7 @@ void SetMapMasks()
map[12].mask = 0x1FFFFFF; map[12].mask = 0x1FFFFFF;
map[14].mask = 0xFFFF; map[14].mask = 0xFFFF;
#ifdef BKPT_SUPPORT
for (int i = 0; i < 16; i++) { for (int i = 0; i < 16; i++) {
map[i].size = map[i].mask + 1; map[i].size = map[i].mask + 1;
if (map[i].size > 0) { if (map[i].size > 0) {
@ -1504,8 +1505,9 @@ void SetMapMasks()
} }
} }
clearBreakRegList(); clearBreakRegList();
}
#endif #endif
}
int CPULoadRom(const char* szFile) int CPULoadRom(const char* szFile)
{ {
romSize = 0x2000000; romSize = 0x2000000;
@ -1728,10 +1730,6 @@ int CPULoadRomData(const char* data, int size)
CPUUpdateRenderBuffers(true); CPUUpdateRenderBuffers(true);
#ifdef BKPT_SUPPORT
SetMapMasks();
#endif
return romSize; return romSize;
} }
@ -3666,9 +3664,8 @@ void CPUReset()
map[12].address = rom; map[12].address = rom;
map[14].address = flashSaveMemory; map[14].address = flashSaveMemory;
#ifndef __LIBRETRO__
SetMapMasks(); SetMapMasks();
#endif
soundReset(); soundReset();
CPUUpdateWindow0(); CPUUpdateWindow0();