From 3e14c835e0731c394d9331a08560cebd10a26ed9 Mon Sep 17 00:00:00 2001 From: cracyc Date: Wed, 7 Oct 2015 12:37:03 -0500 Subject: [PATCH] pcd: correct background color in inverse mode (nw) --- src/mame/video/pcd.c | 14 +++++++++----- 1 file 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); } }