1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-23 20:29:42 +00:00

Add assert.

This commit is contained in:
Thomas Harte 2024-01-04 11:11:26 -05:00
parent dae80217bc
commit 386f572e9a

View File

@ -71,6 +71,7 @@ class MemoryMap {
bool is_shadowed(const Region &region, uint32_t address) const { bool is_shadowed(const Region &region, uint32_t address) const {
const auto physical = physical_address(region, address); const auto physical = physical_address(region, address);
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];
} }
void write(const Region &region, uint32_t address, uint8_t value) { void write(const Region &region, uint32_t address, uint8_t value) {