duet16: fix graphics (nw)

This commit is contained in:
cracyc 2018-02-23 19:50:42 -06:00
parent b718c5b447
commit 11e249ba8f

View File

@ -190,7 +190,7 @@ MC6845_UPDATE_ROW(duet16_state::crtc_update_row)
for(int i = 0; i < x_count; i++) for(int i = 0; i < x_count; i++)
{ {
u16 coffset = (ma + i) & 0x07ff; u16 coffset = (ma + i) & 0x07ff;
u16 goffset = ((coffset * 16) + ra) & 0x7fff; u16 goffset = (((ma * 16) + (ra * 80) + i) & 0x7fff) ^ 1;
u8 g2 = gvram[goffset]; u8 g2 = gvram[goffset];
u8 g1 = gvram[goffset + 0x08000]; u8 g1 = gvram[goffset + 0x08000];
u8 g0 = gvram[goffset + 0x10000]; u8 g0 = gvram[goffset + 0x10000];
@ -224,7 +224,7 @@ MC6845_UPDATE_ROW(duet16_state::crtc_update_row)
if((data & (0x80 >> xi)) && BIT(m_dispctrl, 1)) if((data & (0x80 >> xi)) && BIT(m_dispctrl, 1))
color = fg; color = fg;
else if(BIT(m_dispctrl, 0)) else if(BIT(m_dispctrl, 0))
color = m_pal->pen_color((BIT(g2, xi) << 2) | (BIT(g1, xi) << 1) | BIT(g0, xi)); color = m_pal->pen_color((BIT(g2, 7 - xi) << 2) | (BIT(g1, 7 - xi) << 1) | BIT(g0, 7 - xi));
else else
color = 0; color = 0;
bitmap.pix32(y, (i * 8) + xi) = color; bitmap.pix32(y, (i * 8) + xi) = color;