summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2015-10-07 12:37:03 -0500
committer cracyc <cracyc@users.noreply.github.com>2015-10-07 12:37:03 -0500
commit3e14c835e0731c394d9331a08560cebd10a26ed9 (patch)
tree291cceee8e200f168fa900fd9ab21fae9e44cd66
parent762c8355ca520de02e745a2cbc522739406fe008 (diff)
pcd: correct background color in inverse mode (nw)
-rw-r--r--src/mame/video/pcd.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mame/video/pcd.c b/src/mame/video/pcd.c
index 85f282eb4e4..a5d55a21c99 100644
--- a/src/mame/video/pcd.c
+++ b/src/mame/video/pcd.c
@@ -189,21 +189,25 @@ SCN2674_DRAW_CHARACTER_MEMBER(pcd_video_device::display_pixels)
else
{
UINT8 data, attr;
- int bgnd = 0;
+ int bgnd = 0, fgnd = 1;
data = m_charram[m_vram[address] * 16 + linecount];
attr = m_vram[address + 1];
if(cursor && blink)
data = 0xff;
if(ul && (attr & 0x20))
data = 0xff;
- if(attr & 8)
- bgnd = 2;
+
if(attr & 0x10)
data = ~data;
if(m_p2 & 8)
- data = ~data;
+ {
+ fgnd = 0;
+ bgnd = (attr & 8) ? 2 : 1;
+ }
+ else if(attr & 8)
+ bgnd = 2;
for(int i = 0; i < 8; i++)
- bitmap.pix32(y, x + i) = m_palette->pen((data & (1 << (7 - i))) ? 1 : bgnd);
+ bitmap.pix32(y, x + i) = m_palette->pen((data & (1 << (7 - i))) ? fgnd : bgnd);
}
}