Skip to content

Commit

Permalink
Merge pull request #1412 from TomHarte/CRTCType
Browse files Browse the repository at this point in the history
Specify correct 6845; experiment with vsync.
  • Loading branch information
TomHarte authored Oct 19, 2024
2 parents 53837fe + 72d7917 commit e68129e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Machines/AmstradCPC/AmstradCPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ class InterruptTimer {
}

/// Indicates the leading edge of a new vertical sync.
inline void signal_vsync() {
reset_counter_ = 2;
inline void set_vsync(bool active) {
reset_counter_ = active ? 2 : 0;
}

/// Indicates that an interrupt acknowledge has been received from the Z80.
Expand Down Expand Up @@ -311,8 +311,8 @@ class CRTCBusHandler {

// For the interrupt timer: notify the leading edge of vertical sync and the
// trailing edge of horizontal sync.
if(!was_vsync_ && state.vsync) {
interrupt_timer_.signal_vsync();
if(was_vsync_ != state.vsync) {
interrupt_timer_.set_vsync(state.vsync);
}
if(was_hsync_ && !state.hsync) {
interrupt_timer_.signal_hsync();
Expand Down Expand Up @@ -575,7 +575,7 @@ class CRTCBusHandler {
};
using CRTC = Motorola::CRTC::CRTC6845<
CRTCBusHandler,
Motorola::CRTC::Personality::UM6845R,
Motorola::CRTC::Personality::HD6845S,
Motorola::CRTC::CursorType::None>;

/*!
Expand Down

0 comments on commit e68129e

Please sign in to comment.