mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-26 09:29:45 +00:00
Adds hsync and vsync interrupts.
This commit is contained in:
parent
872897029e
commit
2207638287
@ -563,8 +563,8 @@ class ConcreteMachine:
|
|||||||
video_ += cycles_until_video_event_;
|
video_ += cycles_until_video_event_;
|
||||||
cycles_until_video_event_ = video_->get_next_sequence_point();
|
cycles_until_video_event_ = video_->get_next_sequence_point();
|
||||||
|
|
||||||
// TODO: push v/hsync/display_enable elsewhere.
|
|
||||||
mfp_->set_timer_event_input(1, video_->display_enabled());
|
mfp_->set_timer_event_input(1, video_->display_enabled());
|
||||||
|
update_interrupt_input();
|
||||||
}
|
}
|
||||||
cycles_until_video_event_ -= length;
|
cycles_until_video_event_ -= length;
|
||||||
video_ += length;
|
video_ += length;
|
||||||
@ -641,6 +641,10 @@ class ConcreteMachine:
|
|||||||
void update_interrupt_input() {
|
void update_interrupt_input() {
|
||||||
if(mfp_->get_interrupt_line()) {
|
if(mfp_->get_interrupt_line()) {
|
||||||
mc68000_.set_interrupt_level(6);
|
mc68000_.set_interrupt_level(6);
|
||||||
|
} else if(video_->vsync()) {
|
||||||
|
mc68000_.set_interrupt_level(4);
|
||||||
|
} else if(video_->hsync()) {
|
||||||
|
mc68000_.set_interrupt_level(2);
|
||||||
} else {
|
} else {
|
||||||
mc68000_.set_interrupt_level(0);
|
mc68000_.set_interrupt_level(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user