mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-19 08:31:11 +00:00
Adds the ability for the 68901 to decline an interrupt acknowledgement.
This commit is contained in:
parent
5309ac7c30
commit
a5bbf54a27
@ -321,7 +321,11 @@ bool MFP68901::get_interrupt_line() {
|
|||||||
return interrupt_line_;
|
return interrupt_line_;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t MFP68901::acknowledge_interrupt() {
|
int MFP68901::acknowledge_interrupt() {
|
||||||
|
if(!(interrupt_pending_ & interrupt_mask_)) {
|
||||||
|
return NoAcknowledgement;
|
||||||
|
}
|
||||||
|
|
||||||
const int selected = fls(interrupt_pending_ & interrupt_mask_) - 1;
|
const int selected = fls(interrupt_pending_ & interrupt_mask_) - 1;
|
||||||
const int mask = 1 << selected;
|
const int mask = 1 << selected;
|
||||||
|
|
||||||
|
@ -36,7 +36,9 @@ class MFP68901: public ClockingHint::Source {
|
|||||||
uint8_t get_port_output();
|
uint8_t get_port_output();
|
||||||
|
|
||||||
bool get_interrupt_line();
|
bool get_interrupt_line();
|
||||||
uint8_t acknowledge_interrupt();
|
|
||||||
|
const int NoAcknowledgement = 0x100;
|
||||||
|
int acknowledge_interrupt();
|
||||||
|
|
||||||
struct InterruptDelegate {
|
struct InterruptDelegate {
|
||||||
virtual void mfp68901_did_change_interrupt_status(MFP68901 *) = 0;
|
virtual void mfp68901_did_change_interrupt_status(MFP68901 *) = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user