mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-25 16:31:42 +00:00
Corrects effect of pc_is_outside_bios.
This commit is contained in:
parent
dcf313a833
commit
f02989649c
@ -26,11 +26,15 @@ class ASCII16kbROMSlotHandler: public ROMSlotHandler {
|
||||
confidence_counter_.add_miss();
|
||||
break;
|
||||
case 0xc:
|
||||
if(pc_is_outside_bios && address == 0x6000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0x6000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
map_.map(slot_, value * 0x4000, 0x4000, 0x4000);
|
||||
break;
|
||||
case 0xe:
|
||||
if(pc_is_outside_bios && (address == 0x7000 || address == 0x77ff)) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0x7000 || address == 0x77ff) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
map_.map(slot_, value * 0x4000, 0x8000, 0x4000);
|
||||
break;
|
||||
}
|
||||
|
@ -26,19 +26,27 @@ class ASCII8kbROMSlotHandler: public ROMSlotHandler {
|
||||
confidence_counter_.add_miss();
|
||||
break;
|
||||
case 0xc:
|
||||
if(pc_is_outside_bios && (address == 0x6000 || address == 0x60ff)) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0x6000 || address == 0x60ff) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
map_.map(slot_, value * 0x2000, 0x4000, 0x2000);
|
||||
break;
|
||||
case 0xd:
|
||||
if(pc_is_outside_bios && (address == 0x6800 || address == 0x68ff)) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0x6800 || address == 0x68ff) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
map_.map(slot_, value * 0x2000, 0x6000, 0x2000);
|
||||
break;
|
||||
case 0xe:
|
||||
if(pc_is_outside_bios && (address == 0x7000 || address == 0x70ff)) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0x7000 || address == 0x70ff) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
map_.map(slot_, value * 0x2000, 0x8000, 0x2000);
|
||||
break;
|
||||
case 0xf:
|
||||
if(pc_is_outside_bios && (address == 0x7800 || address == 0x78ff)) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0x7800 || address == 0x78ff) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
map_.map(slot_, value * 0x2000, 0xa000, 0x2000);
|
||||
break;
|
||||
}
|
||||
|
@ -20,21 +20,27 @@ class KonamiROMSlotHandler: public ROMSlotHandler {
|
||||
map_(map), slot_(slot) {}
|
||||
|
||||
void write(uint16_t address, uint8_t value, bool pc_is_outside_bios) override {
|
||||
// printf("K %04x[%c] ", address, pc_is_outside_bios ? '.' : '+');
|
||||
// printf("K %04x[%c]\n", address, pc_is_outside_bios ? '.' : '+');
|
||||
switch(address >> 13) {
|
||||
default:
|
||||
if(pc_is_outside_bios) confidence_counter_.add_miss();
|
||||
break;
|
||||
case 3:
|
||||
if(pc_is_outside_bios && address == 0x6000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0x6000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
map_.map(slot_, value * 0x2000, 0x6000, 0x2000);
|
||||
break;
|
||||
case 4:
|
||||
if(pc_is_outside_bios && address == 0x8000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0x8000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
map_.map(slot_, value * 0x2000, 0x8000, 0x2000);
|
||||
break;
|
||||
case 5:
|
||||
if(pc_is_outside_bios && address == 0xa000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0xa000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
map_.map(slot_, value * 0x2000, 0xa000, 0x2000);
|
||||
break;
|
||||
}
|
||||
|
@ -27,15 +27,21 @@ class KonamiWithSCCROMSlotHandler: public ROMSlotHandler {
|
||||
if(pc_is_outside_bios) confidence_counter_.add_miss();
|
||||
break;
|
||||
case 0x0a:
|
||||
if(pc_is_outside_bios && address == 0x5000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0x5000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
map_.map(slot_, value * 0x2000, 0x4000, 0x2000);
|
||||
break;
|
||||
case 0x0e:
|
||||
if(pc_is_outside_bios && address == 0x7000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0x7000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
map_.map(slot_, value * 0x2000, 0x6000, 0x2000);
|
||||
break;
|
||||
case 0x12:
|
||||
if(pc_is_outside_bios && address == 0x9000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0x9000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
if((value&0x3f) == 0x3f) {
|
||||
scc_is_visible_ = true;
|
||||
map_.unmap(slot_, 0x8000, 0x2000);
|
||||
@ -53,7 +59,9 @@ class KonamiWithSCCROMSlotHandler: public ROMSlotHandler {
|
||||
}
|
||||
break;
|
||||
case 0x16:
|
||||
if(pc_is_outside_bios && address == 0xb000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
if(pc_is_outside_bios) {
|
||||
if(address == 0xb000) confidence_counter_.add_hit(); else confidence_counter_.add_equivocal();
|
||||
}
|
||||
map_.map(slot_, value * 0x2000, 0xa000, 0x2000);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user