mirror of
https://github.com/TomHarte/CLK.git
synced 2025-07-16 15:24:09 +00:00
ROM is never shadowed; also add assert
.
This commit is contained in:
@@ -70,6 +70,11 @@ class MemoryMap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool is_shadowed(const Region ®ion, uint32_t address) const {
|
bool is_shadowed(const Region ®ion, uint32_t address) const {
|
||||||
|
// ROM is never shadowed.
|
||||||
|
if(!region.write) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const auto physical = physical_address(region, address);
|
const auto physical = physical_address(region, address);
|
||||||
assert(physical >= 0 && physical <= 0xff'ffff);
|
assert(physical >= 0 && physical <= 0xff'ffff);
|
||||||
return shadow_pages_[(physical >> 10) & 127] & shadow_banks_[physical >> 17];
|
return shadow_pages_[(physical >> 10) & 127] & shadow_banks_[physical >> 17];
|
||||||
|
Reference in New Issue
Block a user