Skip to content

Commit

Permalink
SMS: Fixed broken sprites on the left side of the screen when first 8…
Browse files Browse the repository at this point in the history
…-pixel column is hidden
  • Loading branch information
SourMesen committed Nov 24, 2024
1 parent c956eea commit 3903845
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Core/SMS/SmsVdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ bool SmsVdp::IsZoomedSpriteAllowed(int spriteIndex)

uint16_t SmsVdp::GetPixelColor()
{
if(_state.Cycle < _minDrawCycle) {
if(!_state.RenderingEnabled || _state.Cycle < SmsVdp::SmsVdpLeftBorder) {
return _internalPaletteRam[0x10 | _state.BackgroundColorIndex];
}

Expand Down Expand Up @@ -787,6 +787,10 @@ uint16_t SmsVdp::GetPixelColor()
}
}

if(_state.Cycle < _minDrawCycle) {
return _internalPaletteRam[0x10 | _state.BackgroundColorIndex];
}

uint8_t color = (
((_bgShifters[0] >> 23) & 0x01) |
((_bgShifters[1] >> 22) & 0x02) |
Expand Down

0 comments on commit 3903845

Please sign in to comment.