Skip to content

Commit

Permalink
PCE: Fixed data from previous frames sometimes being shown on screen …
Browse files Browse the repository at this point in the history
…when VCE clock changes mid-scanline

Caused flickering line in Order of the Griffon
  • Loading branch information
SourMesen committed Sep 30, 2023
1 parent 2c31b72 commit bb57e13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Core/PCE/PceVdc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,7 @@ void PceVdc::InternalDrawScanline()

if(_state.HClock == 1365) {
_vpc->ProcessScanlineEnd(this, _state.Scanline, _rowBuffer);
memset(_rowBuffer, 0, PceConstants::MaxScreenWidth * sizeof(uint16_t));
}

_xStart = xStart;
Expand Down
2 changes: 1 addition & 1 deletion Core/PCE/PceVpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void PceVpc::ProcessScanlineEnd(PceVdc* vdc, uint16_t scanline, uint16_t* rowBuf
} else {
//PC Engine, display VDC1's data
uint32_t offset = (scanline - 14) * PceConstants::MaxScreenWidth;
memcpy(_currentOutBuffer + offset, rowBuffer, PceConstants::ClockPerScanline / _vce->GetClockDivider() * sizeof(uint16_t));
memcpy(_currentOutBuffer + offset, rowBuffer, PceConstants::MaxScreenWidth * sizeof(uint16_t));
}
}

Expand Down

0 comments on commit bb57e13

Please sign in to comment.