mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-19 08:31:11 +00:00
Corrected interrupt mode 2: was both failing properly to load the vector address, and failing to read from it.
This commit is contained in:
parent
db743c90d8
commit
45f442ea63
@ -104,7 +104,7 @@ struct MachineCycle {
|
|||||||
#define OutputWait(addr, val, f) {MachineCycle::Output, MachineCycle::Phase::Wait, 1, &addr.full, &val, f}
|
#define OutputWait(addr, val, f) {MachineCycle::Output, MachineCycle::Phase::Wait, 1, &addr.full, &val, f}
|
||||||
#define OutputEnd(addr, val) {MachineCycle::Output, MachineCycle::Phase::End, 1, &addr.full, &val}
|
#define OutputEnd(addr, val) {MachineCycle::Output, MachineCycle::Phase::End, 1, &addr.full, &val}
|
||||||
|
|
||||||
#define IntAck(length) {MachineCycle::Operation::Interrupt, MachineCycle::Phase::End, length, nullptr, &operation_}
|
#define IntAck(length, val) {MachineCycle::Operation::Interrupt, MachineCycle::Phase::End, length, nullptr, &val}
|
||||||
|
|
||||||
// A wrapper to express a bus operation as a micro-op
|
// A wrapper to express a bus operation as a micro-op
|
||||||
#define BusOp(op) {MicroOp::BusOperation, nullptr, nullptr, op}
|
#define BusOp(op) {MicroOp::BusOperation, nullptr, nullptr, op}
|
||||||
@ -790,12 +790,12 @@ template <class T> class Processor {
|
|||||||
};
|
};
|
||||||
MicroOp irq_mode0_program[] = {
|
MicroOp irq_mode0_program[] = {
|
||||||
{ MicroOp::BeginIRQMode0 },
|
{ MicroOp::BeginIRQMode0 },
|
||||||
BusOp(IntAck(4)),
|
BusOp(IntAck(4, operation_)),
|
||||||
{ MicroOp::DecodeOperationNoRChange }
|
{ MicroOp::DecodeOperationNoRChange }
|
||||||
};
|
};
|
||||||
MicroOp irq_mode1_program[] = {
|
MicroOp irq_mode1_program[] = {
|
||||||
{ MicroOp::BeginIRQ },
|
{ MicroOp::BeginIRQ },
|
||||||
BusOp(IntAck(5)),
|
BusOp(IntAck(5, operation_)),
|
||||||
BusOp(Refresh(2)),
|
BusOp(Refresh(2)),
|
||||||
Push(pc_),
|
Push(pc_),
|
||||||
{ MicroOp::Move16, &temp16_.full, &pc_.full },
|
{ MicroOp::Move16, &temp16_.full, &pc_.full },
|
||||||
@ -803,11 +803,11 @@ template <class T> class Processor {
|
|||||||
};
|
};
|
||||||
MicroOp irq_mode2_program[] = {
|
MicroOp irq_mode2_program[] = {
|
||||||
{ MicroOp::BeginIRQ },
|
{ MicroOp::BeginIRQ },
|
||||||
BusOp(IntAck(5)),
|
BusOp(IntAck(5, temp16_.bytes.low)),
|
||||||
BusOp(Refresh(2)),
|
BusOp(Refresh(2)),
|
||||||
Push(pc_),
|
Push(pc_),
|
||||||
{ MicroOp::Move8, &ir_.bytes.high, &temp16_.bytes.high },
|
{ MicroOp::Move8, &ir_.bytes.high, &temp16_.bytes.high },
|
||||||
Read16(pc_, temp16_),
|
Read16(temp16_, pc_),
|
||||||
{ MicroOp::MoveToNextProgram }
|
{ MicroOp::MoveToNextProgram }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user