diff --git a/Machines/Apple/AppleII/AppleII.cpp b/Machines/Apple/AppleII/AppleII.cpp index 3a342452c..190b22182 100644 --- a/Machines/Apple/AppleII/AppleII.cpp +++ b/Machines/Apple/AppleII/AppleII.cpp @@ -598,13 +598,13 @@ template class ConcreteMachine: case 0xc054: case 0xc055: update_video(); - video_.set_page2(!!(address&1)); + video_.set_page2(address&1); auxiliary_switches_.access(address, isReadOperation(operation)); break; case 0xc056: case 0xc057: update_video(); - video_.set_high_resolution(!!(address&1)); + video_.set_high_resolution(address&1); auxiliary_switches_.access(address, isReadOperation(operation)); break; diff --git a/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp b/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp index c3ccd35ab..31835584d 100644 --- a/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp +++ b/Machines/Apple/AppleII/AuxiliaryMemorySwitches.hpp @@ -104,41 +104,51 @@ template class AuxiliaryMemorySwitches { return; } - if(is_read) return; + if(address < 0xc000 || address >= 0xc058) return; switch(address) { default: break; case 0xc000: case 0xc001: - switches_.store_80 = address & 1; - set_main_paging(); + if(!is_read) { + switches_.store_80 = address & 1; + set_main_paging(); + } break; case 0xc002: case 0xc003: - switches_.read_auxiliary_memory = address & 1; - set_main_paging(); + if(!is_read) { + switches_.read_auxiliary_memory = address & 1; + set_main_paging(); + } break; case 0xc004: case 0xc005: - switches_.write_auxiliary_memory = address & 1; - set_main_paging(); + if(!is_read) { + switches_.write_auxiliary_memory = address & 1; + set_main_paging(); + } break; case 0xc006: case 0xc007: - switches_.internal_CX_rom = address & 1; - set_card_paging(); + if(!is_read) { + switches_.internal_CX_rom = address & 1; + set_card_paging(); + } break; case 0xc008: case 0xc009: - if(switches_.alternative_zero_page != bool(address & 1)) { + if(!is_read && switches_.alternative_zero_page != bool(address & 1)) { switches_.alternative_zero_page = address & 1; set_zero_page_paging(); } break; case 0xc00a: case 0xc00b: - switches_.slot_C3_rom = address & 1; - set_card_paging(); + if(!is_read) { + switches_.slot_C3_rom = address & 1; + set_card_paging(); + } break; case 0xc054: case 0xc055: