mirror of
https://github.com/pevans/erc-c.git
synced 2024-11-23 23:32:45 +00:00
Better logging
This commit is contained in:
parent
56433e2ebe
commit
e0b4fd27e8
@ -164,44 +164,44 @@ SEGMENT_READER(apple2_bank_switch_read)
|
|||||||
// but simply to change the bank switch mode.
|
// but simply to change the bank switch mode.
|
||||||
case 0xC080:
|
case 0xC080:
|
||||||
apple2_set_bank_switch(mach, BANK_RAM | BANK_RAM2);
|
apple2_set_bank_switch(mach, BANK_RAM | BANK_RAM2);
|
||||||
return 0;
|
break;
|
||||||
|
|
||||||
case 0xC081:
|
case 0xC081:
|
||||||
if (last_addr == addr) {
|
if (last_addr == addr) {
|
||||||
apple2_set_bank_switch(mach, BANK_WRITE | BANK_RAM2);
|
apple2_set_bank_switch(mach, BANK_WRITE | BANK_RAM2);
|
||||||
}
|
}
|
||||||
return 0;
|
break;
|
||||||
case 0xC082:
|
case 0xC082:
|
||||||
apple2_set_bank_switch(mach, BANK_RAM2);
|
apple2_set_bank_switch(mach, BANK_RAM2);
|
||||||
return 0;
|
break;
|
||||||
|
|
||||||
case 0xC083:
|
case 0xC083:
|
||||||
if (last_addr == addr) {
|
if (last_addr == addr) {
|
||||||
apple2_set_bank_switch(mach, BANK_RAM | BANK_WRITE | BANK_RAM2);
|
apple2_set_bank_switch(mach, BANK_RAM | BANK_WRITE | BANK_RAM2);
|
||||||
}
|
}
|
||||||
return 0;
|
break;
|
||||||
|
|
||||||
// Conversely, the $C088 - $C08B range control memory access
|
// Conversely, the $C088 - $C08B range control memory access
|
||||||
// while using bank 1 RAM.
|
// while using bank 1 RAM.
|
||||||
case 0xC088:
|
case 0xC088:
|
||||||
apple2_set_bank_switch(mach, BANK_RAM);
|
apple2_set_bank_switch(mach, BANK_RAM);
|
||||||
return 0;
|
break;
|
||||||
|
|
||||||
case 0xC089:
|
case 0xC089:
|
||||||
if (last_addr == addr) {
|
if (last_addr == addr) {
|
||||||
apple2_set_bank_switch(mach, BANK_WRITE);
|
apple2_set_bank_switch(mach, BANK_WRITE);
|
||||||
}
|
}
|
||||||
return 0;
|
break;
|
||||||
|
|
||||||
case 0xC08A:
|
case 0xC08A:
|
||||||
apple2_set_bank_switch(mach, BANK_DEFAULT);
|
apple2_set_bank_switch(mach, BANK_DEFAULT);
|
||||||
return 0;
|
break;
|
||||||
|
|
||||||
case 0xC08B:
|
case 0xC08B:
|
||||||
if (last_addr == addr) {
|
if (last_addr == addr) {
|
||||||
apple2_set_bank_switch(mach, BANK_RAM | BANK_WRITE);
|
apple2_set_bank_switch(mach, BANK_RAM | BANK_WRITE);
|
||||||
}
|
}
|
||||||
return 0;
|
break;
|
||||||
|
|
||||||
// Return high on the 7th bit if we're using bank 2 memory
|
// Return high on the 7th bit if we're using bank 2 memory
|
||||||
case 0xC011:
|
case 0xC011:
|
||||||
@ -223,7 +223,7 @@ SEGMENT_READER(apple2_bank_switch_read)
|
|||||||
: 0x00;
|
: 0x00;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_critical("Bank switch read mapper called with an unexpected address: %x", addr);
|
log_critical("; bank_switch = %x", mach->bank_switch);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,14 +240,14 @@ SEGMENT_WRITER(apple2_bank_switch_write)
|
|||||||
case 0xC008:
|
case 0xC008:
|
||||||
apple2_set_bank_switch(mach,
|
apple2_set_bank_switch(mach,
|
||||||
mach->bank_switch | BANK_ALTZP);
|
mach->bank_switch | BANK_ALTZP);
|
||||||
return;
|
break;
|
||||||
|
|
||||||
// Disable auxiliary memory for zero page + stack
|
// Disable auxiliary memory for zero page + stack
|
||||||
case 0xC009:
|
case 0xC009:
|
||||||
apple2_set_bank_switch(mach,
|
apple2_set_bank_switch(mach,
|
||||||
mach->bank_switch & ~BANK_ALTZP);
|
mach->bank_switch & ~BANK_ALTZP);
|
||||||
return;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_critical("Bank switch write mapper called with an unexpected address: %x", addr);
|
log_critical("; bank_switch = %x", mach->bank_switch);
|
||||||
}
|
}
|
||||||
|
@ -213,6 +213,8 @@ SEGMENT_READER(apple2_dbuf_switch_read)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_critical("; display_mode = %x", mach->display_mode);
|
||||||
|
|
||||||
// ???
|
// ???
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -286,4 +288,6 @@ SEGMENT_WRITER(apple2_dbuf_switch_write)
|
|||||||
mach->display_mode & ~DISPLAY_DHIRES);
|
mach->display_mode & ~DISPLAY_DHIRES);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_critical("; display_mode = %x", mach->display_mode);
|
||||||
}
|
}
|
||||||
|
@ -214,6 +214,8 @@ SEGMENT_READER(apple2_mem_switch_read)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_critical("; memory_mode = %x", mach->memory_mode);
|
||||||
|
|
||||||
// ???
|
// ???
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -284,4 +286,6 @@ SEGMENT_WRITER(apple2_mem_switch_write)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_critical("; memory_mode = %x", mach->memory_mode);
|
||||||
}
|
}
|
||||||
|
@ -187,4 +187,6 @@ SEGMENT_WRITER(apple2_pc_switch_write)
|
|||||||
mach->memory_mode & ~MEMORY_SLOTCXROM);
|
mach->memory_mode & ~MEMORY_SLOTCXROM);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_critical("; memory_mode = %x", mach->memory_mode);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user