1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-17 21:30:14 +00:00

Fix downward block data transfers.

This commit is contained in:
Thomas Harte 2024-03-14 21:09:51 -04:00
parent 19fa0b8945
commit bc27e3998d
2 changed files with 8 additions and 4 deletions

View File

@ -380,7 +380,11 @@ struct Executor {
uint32_t final_address;
if constexpr (!flags.add_offset()) {
final_address = address + total * 4;
// Decrementing mode; final_address is the value the base register should
// have after this operation if writeback is enabled, so it's below
// the original address. But also writes always occur from lowest address
// to highest, so push the current address to the bottom.
final_address = address - total * 4;
address = final_address;
} else {
final_address = address + total * 4;

View File

@ -261,7 +261,7 @@ struct Interrupts {
// IRQ A.
case 0x3200010 & AddressMask:
value = irq_a_.status;
logger.error().append("IRQ A status is %02x", value);
// logger.error().append("IRQ A status is %02x", value);
return true;
case 0x3200014 & AddressMask:
value = irq_a_.request();
@ -275,7 +275,7 @@ struct Interrupts {
// IRQ B.
case 0x3200020 & AddressMask:
value = irq_b_.status;
logger.error().append("IRQ B status is %02x", value);
// logger.error().append("IRQ B status is %02x", value);
return true;
case 0x3200024 & AddressMask:
value = irq_b_.request();
@ -905,7 +905,7 @@ class ConcreteMachine:
static bool log = false;
// if(executor_.pc() == 0x0380214c) {
// if(executor_.pc() == 0x03810398) {
// printf("");
// }
// log |= (executor_.pc() > 0x02000000 && executor_.pc() < 0x02000078);