diff --git a/src/apple2.bank.c b/src/apple2.bank.c index 93e8f29..0337f46 100644 --- a/src/apple2.bank.c +++ b/src/apple2.bank.c @@ -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); } diff --git a/src/apple2.dbuf.c b/src/apple2.dbuf.c index 48cbb9d..b6ca996 100644 --- a/src/apple2.dbuf.c +++ b/src/apple2.dbuf.c @@ -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); } diff --git a/src/apple2.mem.c b/src/apple2.mem.c index f8ad095..22ea4d7 100644 --- a/src/apple2.mem.c +++ b/src/apple2.mem.c @@ -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); } diff --git a/src/apple2.pc.c b/src/apple2.pc.c index 4c8114e..91d32f0 100644 --- a/src/apple2.pc.c +++ b/src/apple2.pc.c @@ -187,4 +187,6 @@ SEGMENT_WRITER(apple2_pc_switch_write) mach->memory_mode & ~MEMORY_SLOTCXROM); break; } + + log_critical("; memory_mode = %x", mach->memory_mode); }