Skip to content

Commit

Permalink
PCE: Supergrafx - Tweaked window position based on hardware test resu…
Browse files Browse the repository at this point in the history
…lt (for 7mhz clock)
  • Loading branch information
SourMesen committed Sep 22, 2023
1 parent f4b0d01 commit 20148e8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Core/PCE/PceVpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,8 @@ void PceVpc::ProcessScanline()
uint16_t* rowBuffer = _vdc1->GetRowBuffer();
uint16_t* rowBufferVdc2 = _vdc2->GetRowBuffer();

int windowOffset = (_vce->GetClockDivider() == 3 ? 8 : -16);
uint16_t wnd1 = std::max(0, (int16_t)_state.Window1 + windowOffset);
uint16_t wnd2 = std::max(0, (int16_t)_state.Window2 + windowOffset);
uint16_t wnd1 = std::max(0, (int16_t)_state.Window1 - 16);
uint16_t wnd2 = std::max(0, (int16_t)_state.Window2 - 16);
for(uint32_t i = _xStart; i < xMax; i++) {
PceVpcPixelWindow wndType = (PceVpcPixelWindow)((i < wnd1) | ((i < wnd2) << 1));
PceVpcPriorityConfig& cfg = _state.WindowCfg[(int)wndType];
Expand Down

0 comments on commit 20148e8

Please sign in to comment.