CPU/CodeCache: Fix page error when rewinding

This commit is contained in:
Stenzek 2023-12-19 22:38:27 +10:00
parent 05b42f34eb
commit 21bbe5c76c
No known key found for this signature in database
1 changed files with 9 additions and 0 deletions

View File

@ -689,7 +689,16 @@ void CPU::CodeCache::InvalidateAllRAMBlocks()
for (Block* block : s_blocks)
{
if (AddressInRAM(block->pc))
{
InvalidateBlock(block, BlockState::Invalidated);
block->next_block_in_page = nullptr;
}
}
for (PageProtectionInfo& ppi : s_page_protection)
{
ppi.first_block_in_page = nullptr;
ppi.last_block_in_page = nullptr;
}
MemMap::EndCodeWrite();