Skip to content

Commit

Permalink
PCE: Fixed SGX games video issue caused by another recent fix
Browse files Browse the repository at this point in the history
Row buffer for VDC2 was being cleared too early, causing the 2nd layer to always be empty
  • Loading branch information
SourMesen committed Oct 30, 2023
1 parent c0ea124 commit 7a29277
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion Core/PCE/PceVdc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,6 @@ 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
3 changes: 3 additions & 0 deletions Core/PCE/PceVpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,13 @@ void PceVpc::ProcessScanlineEnd(PceVdc* vdc, uint16_t scanline, uint16_t* rowBuf

if(_vdc2) {
ProcessScanline();
memset(_vdc1->GetRowBuffer(), 0, PceConstants::MaxScreenWidth * sizeof(uint16_t));
memset(_vdc2->GetRowBuffer(), 0, PceConstants::MaxScreenWidth * sizeof(uint16_t));
} else {
//PC Engine, display VDC1's data
uint32_t offset = (scanline - 14) * PceConstants::MaxScreenWidth;
memcpy(_currentOutBuffer + offset, rowBuffer, PceConstants::MaxScreenWidth * sizeof(uint16_t));
memset(rowBuffer, 0, PceConstants::MaxScreenWidth * sizeof(uint16_t));
}
}

Expand Down

0 comments on commit 7a29277

Please sign in to comment.