summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2018-01-27 17:52:50 +0000
committer smf- <smf-@users.noreply.github.com>2018-01-27 17:53:47 +0000
commit663e08afd958a4bf9f142655bade58c50a1baea6 (patch)
tree80f7a5ecd656c7a88e93232fca96df8da8668069
parentdf32deeb6a34428463c57b3f54d3bf3838e9ac6a (diff)
I still don't know where it is, but I know where it's not (nw)
-rw-r--r--src/mame/video/popeye.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/mame/video/popeye.cpp b/src/mame/video/popeye.cpp
index b42279fecd6..1df286bc195 100644
--- a/src/mame/video/popeye.cpp
+++ b/src/mame/video/popeye.cpp
@@ -451,16 +451,19 @@ uint32_t popeye_state::screen_update_tnx1(screen_device &screen, bitmap_ind16 &b
sy ^= 0x1ff;
sy -= 0x200 - (2 * m_background_pos[1]);
- if (sy < 0)
- sy = 0; // TODO: find out exactly where the data is fetched from
for (int x = cliprect.min_x; x <= cliprect.max_x; x++)
{
- // TODO: confirm the memory layout
- int sx = x + (2 * (m_background_pos[0] | ((m_background_pos[2] & 1) << 8))) + 0x70;
- int shift = (sx & 0x200) / 0x80;
+ if (sy < 0)
+ bitmap.pix16(y, x) = m_bitmapram[0x3f] & 0xf; // TODO: find out exactly where the data is fetched from
+ else
+ {
+ // TODO: confirm the memory layout
+ int sx = x + (2 * (m_background_pos[0] | ((m_background_pos[2] & 1) << 8))) + 0x70;
+ int shift = (sx & 0x200) / 0x80;
- bitmap.pix16(y, x) = (m_bitmapram[((sx / 8) & 0x3f) + ((sy / 8) * 0x40)] >> shift) & 0xf;
+ bitmap.pix16(y, x) = (m_bitmapram[((sx / 8) & 0x3f) + ((sy / 8) * 0x40)] >> shift) & 0xf;
+ }
}
}
@@ -483,16 +486,19 @@ uint32_t popeye_state::screen_update_tpp1(screen_device &screen, bitmap_ind16 &b
sy ^= 0x1ff;
sy -= 0x200 - (2 * m_background_pos[1]);
- if (sy < 0)
- sy = 0; // TODO: find out exactly where the data is fetched from
for (int x = cliprect.min_x; x <= cliprect.max_x; x++)
{
- // TODO: confirm the memory layout
- int sx = x + (2 * m_background_pos[0]) + 0x70;
- int shift = (sy & 4);
+ if (sy < 0)
+ bitmap.pix16(y, x) = m_bitmapram[0x3f] & 0xf; // TODO: find out exactly where the data is fetched from
+ else
+ {
+ // TODO: confirm the memory layout
+ int sx = x + (2 * m_background_pos[0]) + 0x70;
+ int shift = (sy & 4);
- bitmap.pix16(y, x) = (m_bitmapram[((sx / 8) & 0x3f) + ((sy / 8) * 0x40)] >> shift) & 0xf;
+ bitmap.pix16(y, x) = (m_bitmapram[((sx / 8) & 0x3f) + ((sy / 8) * 0x40)] >> shift) & 0xf;
+ }
}
}