summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author MooglyGuy <therealmogminer@gmail.com>2019-05-29 17:46:39 +0200
committer MooglyGuy <therealmogminer@gmail.com>2019-05-29 17:46:51 +0200
commite0ff1d29a08287914f9c3a564369918bc83aebbd (patch)
tree900db0a37b1eb91d52230dede3dfd1e99fbe4a1f
parenta902ee8e0f6848df8ea5e21f7f42ec4a33116898 (diff)
-newport: Fixed source buffer shift when blending is enabled. [Ryan Holtz]
-rw-r--r--src/devices/bus/gio64/newport.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/devices/bus/gio64/newport.cpp b/src/devices/bus/gio64/newport.cpp
index c75c5093dfd..6a564fb11cd 100644
--- a/src/devices/bus/gio64/newport.cpp
+++ b/src/devices/bus/gio64/newport.cpp
@@ -1986,7 +1986,7 @@ void newport_base_device::blend_pixel(uint32_t *dest_buf, uint32_t src)
}
else
{
- const uint32_t dstc = (dst >> m_rex3.m_store_shift) & 0xfff;
+ const uint32_t dstc = dst & 0xfff;
dr = (((dstc >> 8) & 15) * 0x11) / 255.0f;
dg = (((dstc >> 4) & 15) * 0x11) / 255.0f;
db = (((dstc >> 0) & 15) * 0x11) / 255.0f;
@@ -2229,7 +2229,8 @@ uint32_t newport_base_device::get_rgb_color(int16_t x, int16_t y)
if (dg > 3) dg = 3;
if (db > 1) db = 1;
- return (db << 3) | (dg << 1) | dr;
+ uint32_t color = (db << 3) | (dg << 1) | dr;
+ return (color << 4) | color;
}
case 1: // 8bpp
@@ -2271,7 +2272,8 @@ uint32_t newport_base_device::get_rgb_color(int16_t x, int16_t y)
if (dg > 15) dg = 15;
if (db > 15) db = 15;
- return (db << 8) | (dg << 4) | dr;
+ uint32_t color = (db << 8) | (dg << 4) | dr;
+ return (color << 12) | color;
}
case 3: // 24bpp