1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-24 12:30:17 +00:00

Fixed: paging is based directly on the access, independent of the read/write line (since it isn't actually exposed to catridges).

This commit is contained in:
Thomas Harte 2015-08-13 15:04:30 +01:00
parent 59c872ada6
commit 323aa27e13

View File

@ -269,9 +269,7 @@ int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t add
if(operation != CPU6502::BusOperation::Ready) {
// check for a ROM or paging access
if ((address&0x1000) && isReadOperation(operation)) {
// check for a paging access
if(_rom_size > 4096 && ((address & 0x1f00) == 0x1f00)) {
uint8_t *base_ptr = _romPages[0];
uint8_t first_paging_register = 0xf8 - (_rom_size >> 14)*2;
@ -292,6 +290,8 @@ int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t add
}
}
// check for a ROM read
if ((address&0x1000) && isReadOperation(operation)) {
returnValue &= _romPages[(address >> 10)&3][address&1023];
}