fmtowns: correct scrolling in 16-bit color mode

Final fix for scrolling / positioning issues (hopefully). Fixes Psychic Detective Vol. 5.
This commit is contained in:
r09 2017-12-03 22:18:35 +01:00 committed by GitHub
parent f2ae8efce0
commit 4859006081
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -959,7 +959,7 @@ void towns_state::towns_crtc_draw_scan_layer_hicolour(bitmap_rgb32 &bitmap,const
off += scroll; off += scroll;
} }
hzoom = ((m_video.towns_crtc_reg[27] & 0x0f00) >> 8) + 1; hzoom = ((m_video.towns_crtc_reg[27] & 0x0f00) >> 8) + 1;
off += (m_video.towns_crtc_reg[11] - m_video.towns_crtc_reg[22]) / hzoom; off += (m_video.towns_crtc_reg[11] - m_video.towns_crtc_reg[22]) * (hzoom * 2);
} }
else else
{ {
@ -971,7 +971,7 @@ void towns_state::towns_crtc_draw_scan_layer_hicolour(bitmap_rgb32 &bitmap,const
off += scroll; off += scroll;
} }
hzoom = (m_video.towns_crtc_reg[27] & 0x000f) + 1; hzoom = (m_video.towns_crtc_reg[27] & 0x000f) + 1;
off += (m_video.towns_crtc_reg[9] - m_video.towns_crtc_reg[18]) / hzoom; off += (m_video.towns_crtc_reg[9] - m_video.towns_crtc_reg[18]) * (hzoom * 2);
} }
off += line * linesize; off += line * linesize;