From 390384576836c5f972c02b2c583868e347f8d026 Mon Sep 17 00:00:00 2001 From: Sour Date: Sun, 24 Nov 2024 12:05:34 +0900 Subject: [PATCH] SMS: Fixed broken sprites on the left side of the screen when first 8-pixel column is hidden --- Core/SMS/SmsVdp.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/SMS/SmsVdp.cpp b/Core/SMS/SmsVdp.cpp index 177f075e..3a86b80b 100644 --- a/Core/SMS/SmsVdp.cpp +++ b/Core/SMS/SmsVdp.cpp @@ -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]; } @@ -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) |