mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-27 00:30:26 +00:00
Avoid permitting writes in the Cx00 region after uninhibiting the language card.
This commit is contained in:
parent
22c0b588c4
commit
6abc317986
@ -379,6 +379,7 @@ class MemoryMap {
|
||||
c0_region.flags |= Region::IsIO;
|
||||
|
||||
#define apply_region(flag, region) \
|
||||
region.write = nullptr; \
|
||||
if(flag) { \
|
||||
region.read = rom; \
|
||||
region.flags &= ~Region::IsIO; \
|
||||
|
@ -318,9 +318,13 @@ namespace {
|
||||
// Test read pointers.
|
||||
testMemory(@"read", ^(int logical, int physical, const MemoryMap::Region ®ion) {
|
||||
XCTAssert(region.read != nullptr);
|
||||
const int foundPhysical = physicalOffset(®ion.read[logical << 8]);
|
||||
if(region.read == nullptr) {
|
||||
*stop = YES;
|
||||
return;
|
||||
}
|
||||
|
||||
// Compare to correct value.
|
||||
const int foundPhysical = physicalOffset(®ion.read[logical << 8]);
|
||||
XCTAssert(physical == foundPhysical,
|
||||
@"Logical page %04x should be mapped to read physical %04x; is instead %04x",
|
||||
logical,
|
||||
@ -341,9 +345,13 @@ namespace {
|
||||
}
|
||||
|
||||
XCTAssert(region.write != nullptr);
|
||||
const int foundPhysical = physicalOffset(®ion.write[logical << 8]);
|
||||
if(region.write == nullptr) {
|
||||
*stop = YES;
|
||||
return;
|
||||
}
|
||||
|
||||
// Compare to correct value.
|
||||
const int foundPhysical = physicalOffset(®ion.write[logical << 8]);
|
||||
XCTAssert(physical == foundPhysical,
|
||||
@"Logical page %04x should be mapped to write physical %04x; is instead %04x",
|
||||
logical,
|
||||
|
Loading…
x
Reference in New Issue
Block a user