1
0
mirror of https://github.com/pevans/erc-c.git synced 2025-01-17 19:30:13 +00:00

Return bit 7 high if we set a flag on

This commit is contained in:
Peter Evans 2018-03-10 22:21:03 -06:00
parent 550eab742e
commit ce6f3c5835
3 changed files with 27 additions and 20 deletions

View File

@ -175,44 +175,49 @@ SEGMENT_READER(apple2_bank_switch_read)
// but simply to change the bank switch mode.
case 0xC080:
apple2_set_bank_switch(mach, BANK_RAM | BANK_RAM2);
break;
return 0x80;
case 0xC081:
if (last_addr == addr) {
apple2_set_bank_switch(mach, BANK_WRITE | BANK_RAM2);
return 0x80;
}
break;
return 0x00;
case 0xC082:
apple2_set_bank_switch(mach, BANK_RAM2);
break;
return 0x80;
case 0xC083:
if (last_addr == addr) {
apple2_set_bank_switch(mach, BANK_RAM | BANK_WRITE | BANK_RAM2);
return 0x80;
}
break;
return 0x00;
// Conversely, the $C088 - $C08B range control memory access
// while using bank 1 RAM.
case 0xC088:
apple2_set_bank_switch(mach, BANK_RAM);
break;
return 0x80;
case 0xC089:
if (last_addr == addr) {
apple2_set_bank_switch(mach, BANK_WRITE);
return 0x80;
}
break;
return 0x00;
case 0xC08A:
apple2_set_bank_switch(mach, BANK_DEFAULT);
break;
return 0x80;
case 0xC08B:
if (last_addr == addr) {
apple2_set_bank_switch(mach, BANK_RAM | BANK_WRITE);
return 0x80;
}
break;
return 0x00;
// Return high on the 7th bit if we're using bank 2 memory
case 0xC011:

View File

@ -192,40 +192,42 @@ SEGMENT_READER(apple2_dbuf_switch_read)
case 0xC050:
apple2_set_display(mach,
mach->display_mode & ~DISPLAY_TEXT);
break;
return 0x00;
case 0xC051:
apple2_set_display(mach,
mach->display_mode | DISPLAY_TEXT);
break;
return 0x80;
case 0xC052:
apple2_set_display(mach,
mach->display_mode & ~DISPLAY_MIXED);
break;
return 0x00;
case 0xC053:
apple2_set_display(mach,
mach->display_mode | DISPLAY_MIXED);
break;
return 0x80;
case 0xC05E:
if (mach->display_mode & DISPLAY_IOUDIS) {
apple2_set_display(mach,
mach->display_mode | DISPLAY_DHIRES);
return 0x80;
}
break;
return 0x00;
case 0xC05F:
if (mach->display_mode & DISPLAY_IOUDIS) {
apple2_set_display(mach,
mach->display_mode & ~DISPLAY_DHIRES);
return 0x80;
}
break;
return 0x00;
}
// ???
return 0;
return 0x00;
}
/*

View File

@ -204,27 +204,27 @@ SEGMENT_READER(apple2_mem_switch_read)
case 0xC055:
apple2_set_memory_mode(mach,
mach->memory_mode | MEMORY_PAGE2);
break;
return 0x80;
case 0xC054:
apple2_set_memory_mode(mach,
mach->memory_mode & ~MEMORY_PAGE2);
break;
return 0x00;
case 0xC059:
case 0xC057:
apple2_set_memory_mode(mach,
mach->memory_mode | MEMORY_HIRES);
break;
return 0x80;
case 0xC056:
apple2_set_memory_mode(mach,
mach->memory_mode & ~MEMORY_HIRES);
break;
return 0x00;
}
// ???
return 0;
return 0x00;
}
/*