mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-19 08:31:11 +00:00
Adds a new assert: I think this is the issue getting into GS/OS.
This commit is contained in:
parent
d35def4bbc
commit
c72bdd776e
@ -419,6 +419,9 @@ template <typename BusHandler, bool uses_ready_line> void Processor<BusHandler,
|
|||||||
pending_exceptions_ &= ~NMI;
|
pending_exceptions_ &= ~NMI;
|
||||||
data_address_ = registers_.emulation_flag ? 0xfffa : 0xffea;
|
data_address_ = registers_.emulation_flag ? 0xfffa : 0xffea;
|
||||||
} else if(pending_exceptions_ & IRQ & registers_.flags.inverse_interrupt) {
|
} else if(pending_exceptions_ & IRQ & registers_.flags.inverse_interrupt) {
|
||||||
|
// TODO: this isn't a correct way to handle usurption, I think;
|
||||||
|
// if an IRQ was selected for servicing I think it'll now be servied
|
||||||
|
// even if the IRQ line has gone low in the interim.
|
||||||
pending_exceptions_ &= ~IRQ;
|
pending_exceptions_ &= ~IRQ;
|
||||||
data_address_ = registers_.emulation_flag ? 0xfffe : 0xffee;
|
data_address_ = registers_.emulation_flag ? 0xfffe : 0xffee;
|
||||||
} else if(pending_exceptions_ & Abort) {
|
} else if(pending_exceptions_ & Abort) {
|
||||||
@ -428,6 +431,9 @@ template <typename BusHandler, bool uses_ready_line> void Processor<BusHandler,
|
|||||||
pending_exceptions_ &= ~Abort;
|
pending_exceptions_ &= ~Abort;
|
||||||
data_address_ = registers_.emulation_flag ? 0xfff8 : 0xffe8;;
|
data_address_ = registers_.emulation_flag ? 0xfff8 : 0xffe8;;
|
||||||
} else {
|
} else {
|
||||||
|
// Test that this really is BRK or COP.
|
||||||
|
assert((active_instruction_ == instructions) || (active_instruction_ == &instructions[0x02]));
|
||||||
|
|
||||||
is_brk = active_instruction_ == instructions; // Given that BRK has opcode 00.
|
is_brk = active_instruction_ == instructions; // Given that BRK has opcode 00.
|
||||||
if(is_brk) {
|
if(is_brk) {
|
||||||
data_address_ = registers_.emulation_flag ? 0xfffe : 0xffe6;
|
data_address_ = registers_.emulation_flag ? 0xfffe : 0xffe6;
|
||||||
|
Loading…
Reference in New Issue
Block a user