Skip to content

Commit

Permalink
Merge pull request #1402 from TomHarte/CPCInterruptTiming
Browse files Browse the repository at this point in the history
Pull CPC interrupt to start of hsync.
  • Loading branch information
TomHarte authored Sep 13, 2024
2 parents 53e7323 + 581454d commit dfcdbe5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Machines/AmstradCPC/AmstradCPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,12 @@ class CRTCBusHandler {
// Per Interrupts in the CPC: "to be confirmed: does gate array count positive or negative edge transitions of HSYNC signal?";
// if you take it as given that display mode is latched as a result of hsync then Pipe Mania seems to imply that the count
// occurs on a leading edge and the mode lock on a trailing.
if(was_hsync_ && !state.hsync) {
if(!was_hsync_ && state.hsync) {
interrupt_timer_.signal_hsync();
}

// Check for a trailing CRTC hsync; if one occurred then that's the trigger potentially to change modes.
if(!was_hsync_ && state.hsync) {
if(was_hsync_ && !state.hsync) {
if(mode_ != next_mode_) {
mode_ = next_mode_;
switch(mode_) {
Expand Down

0 comments on commit dfcdbe5

Please sign in to comment.