1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-08-19 17:29:34 +00:00

Better logging

This commit is contained in:
Peter Evans 2018-01-22 21:42:30 -06:00
parent 56433e2ebe
commit e0b4fd27e8
4 changed files with 22 additions and 12 deletions

View File

@ -164,44 +164,44 @@ 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);
return 0;
break;
case 0xC081:
if (last_addr == addr) {
apple2_set_bank_switch(mach, BANK_WRITE | BANK_RAM2);
}
return 0;
break;
case 0xC082:
apple2_set_bank_switch(mach, BANK_RAM2);
return 0;
break;
case 0xC083:
if (last_addr == addr) {
apple2_set_bank_switch(mach, BANK_RAM | BANK_WRITE | BANK_RAM2);
}
return 0;
break;
// Conversely, the $C088 - $C08B range control memory access
// while using bank 1 RAM.
case 0xC088:
apple2_set_bank_switch(mach, BANK_RAM);
return 0;
break;
case 0xC089:
if (last_addr == addr) {
apple2_set_bank_switch(mach, BANK_WRITE);
}
return 0;
break;
case 0xC08A:
apple2_set_bank_switch(mach, BANK_DEFAULT);
return 0;
break;
case 0xC08B:
if (last_addr == addr) {
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
case 0xC011:
@ -223,7 +223,7 @@ SEGMENT_READER(apple2_bank_switch_read)
: 0x00;
}
log_critical("Bank switch read mapper called with an unexpected address: %x", addr);
log_critical("; bank_switch = %x", mach->bank_switch);
return 0;
}
@ -240,14 +240,14 @@ SEGMENT_WRITER(apple2_bank_switch_write)
case 0xC008:
apple2_set_bank_switch(mach,
mach->bank_switch | BANK_ALTZP);
return;
break;
// Disable auxiliary memory for zero page + stack
case 0xC009:
apple2_set_bank_switch(mach,
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);
}

View File

@ -213,6 +213,8 @@ SEGMENT_READER(apple2_dbuf_switch_read)
break;
}
log_critical("; display_mode = %x", mach->display_mode);
// ???
return 0;
}
@ -286,4 +288,6 @@ SEGMENT_WRITER(apple2_dbuf_switch_write)
mach->display_mode & ~DISPLAY_DHIRES);
break;
}
log_critical("; display_mode = %x", mach->display_mode);
}

View File

@ -214,6 +214,8 @@ SEGMENT_READER(apple2_mem_switch_read)
break;
}
log_critical("; memory_mode = %x", mach->memory_mode);
// ???
return 0;
}
@ -284,4 +286,6 @@ SEGMENT_WRITER(apple2_mem_switch_write)
break;
}
log_critical("; memory_mode = %x", mach->memory_mode);
}

View File

@ -187,4 +187,6 @@ SEGMENT_WRITER(apple2_pc_switch_write)
mach->memory_mode & ~MEMORY_SLOTCXROM);
break;
}
log_critical("; memory_mode = %x", mach->memory_mode);
}