1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-01 22:41:32 +00:00

Adjust IRQ/FIQ return addresses.

This commit is contained in:
Thomas Harte 2024-03-15 21:59:38 -04:00
parent 1979d2e5ba
commit 1c1d2891c7
2 changed files with 9 additions and 4 deletions

View File

@ -149,12 +149,12 @@ struct Registers {
void exception() {
switch(type) {
case Exception::IRQ: {
const auto r14 = pc_status(8);
const auto r14 = pc_status(0);
set_mode(Mode::IRQ);
active_[14] = r14;
} break;
case Exception::FIQ: {
const auto r14 = pc_status(8);
const auto r14 = pc_status(0);
set_mode(Mode::FIQ);
active_[14] = r14;
} break;
@ -169,7 +169,6 @@ struct Registers {
if constexpr (type == Exception::Reset || type == Exception::FIQ) {
interrupt_flags_ |= ConditionCode::FIQDisable;
}
set_pc(uint32_t(type));
}

View File

@ -160,7 +160,13 @@ struct Keyboard {
serial_.output(KeyboardParty, input);
break;
default: break;
case RQID:
serial_.output(KeyboardParty, 0x81); // TODO: what keyboard type?
break;
default:
printf("Keyboard declines to respond to %02x\n", input);
break;
}
}
}