mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Corrects read/write access to auxiliary soft switches.
This commit is contained in:
parent
ddd84db510
commit
726b5f62bb
@ -598,13 +598,13 @@ template <Analyser::Static::AppleII::Target::Model model> 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;
|
||||
|
||||
|
@ -104,41 +104,51 @@ template <typename Machine> 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:
|
||||
|
Loading…
Reference in New Issue
Block a user