From 4a931fa955fe7fce404c2173008979fa2a4429f4 Mon Sep 17 00:00:00 2001 From: "R. Belmont" Date: Sat, 26 Apr 2014 19:48:06 +0000 Subject: [PATCH] (MESS) fanucspg: Better colors from new reference. [Guru, R. Belmont] nw: If you're bored and can read segmented 16-bit x86 decently, I could use some help figuring out what's happening when it (I think) attempts to boot off the '765 and bring all those other chips into play. (Change test_r to return 0x80 to observe). --- src/mess/drivers/fanucspmg.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/mess/drivers/fanucspmg.c b/src/mess/drivers/fanucspmg.c index 6dbffdbc998..1fb37629ad1 100644 --- a/src/mess/drivers/fanucspmg.c +++ b/src/mess/drivers/fanucspmg.c @@ -716,6 +716,11 @@ static MC6845_UPDATE_ROW( fanuc_update_row ) UINT32 *p = &bitmap.pix32(y); int i; UINT8 *chargen = state->m_chargen->base(); + static const UINT32 palette[8] = + { + // black red green yellow blue purple light blue white + 0x000000, 0xff0000, 0x00ff00, 0xffff00, 0x0000ff, 0xff00ff, 0x99ffff, 0xffffff + }; for ( i = 0; i < x_count; i++ ) { @@ -724,20 +729,13 @@ static MC6845_UPDATE_ROW( fanuc_update_row ) if (state->m_video_ctrl & 0x02) { if (offset <= 0x5ff) - { + { UINT8 chr = state->m_vram[offset + 0x600]; UINT8 attr = state->m_vram[offset]; UINT8 data = chargen[ chr + (ra * 256) ]; - UINT32 fg = 0xffffff; + UINT32 fg = palette[((attr>>5) & 7)]; UINT32 bg = 0; - // colors are black, red, green, yellow, blue, purple, light blue, and white - // attr & 0x70 = 0x60 is green, need more software running to know the others - if (((attr>>4) & 7) == 6) - { - fg = 0x008800; - } - *p++ = ( data & 0x01 ) ? fg : bg; *p++ = ( data & 0x02 ) ? fg : bg; *p++ = ( data & 0x04 ) ? fg : bg;