diff options
author | David Haywood <28625134+DavidHaywood@users.noreply.github.com> | 2020-05-30 16:59:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-30 11:59:57 -0400 |
commit | 673a9020b2e670a5d8be336c88f9863a9cafd466 (patch) | |
tree | 683c98f93a4cf443c8d837a9cac15465f62f7a29 /src/devices/machine | |
parent | bd329bc16a7be9c0eec1c17edb3ecfdb410ca960 (diff) |
missed this behavior too while rewriting things, documented where it's needed (nw) (#6767)
Diffstat (limited to 'src/devices/machine')
-rw-r--r-- | src/devices/machine/spg2xx_video.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/devices/machine/spg2xx_video.cpp b/src/devices/machine/spg2xx_video.cpp index 24b5b45cf59..2b74571fd12 100644 --- a/src/devices/machine/spg2xx_video.cpp +++ b/src/devices/machine/spg2xx_video.cpp @@ -331,7 +331,8 @@ void spg2xx_video_device::draw_page(const rectangle &cliprect, uint32_t* dst, ui int realxscroll = xscroll; if (row_scroll) { - realxscroll += (int16_t)m_scrollram[scanline & 0xff]; + // Tennis in My Wireless Sports confirms the need to add the scroll value here rather than rowscroll being screen-aligned + realxscroll += (int16_t)m_scrollram[(scanline+yscroll) & 0xff]; } for (uint32_t x0 = 0; x0 < (320+tile_w)/tile_w; x0++) @@ -417,7 +418,12 @@ void spg2xx_video_device::draw_sprite(const rectangle& cliprect, uint32_t* dst, const uint32_t words_per_tile = bits_per_row * tile_h; bool flip_y = (attr & 0x0008); - const uint32_t palette_offset = (attr & 0x0f00) >> 4; + uint32_t palette_offset = (attr & 0x0f00) >> 4; + + // the Circuit Racing game in PDC100 needs this or some graphics have bad colours at the edges when turning as it leaves stray lower bits set + palette_offset >>= nc_bpp; + palette_offset <<= nc_bpp; + if (firstline < lastline) { |