From 186eb37e50edc21345e4fa8563647ea0cc75eff5 Mon Sep 17 00:00:00 2001 From: Dirk Best Date: Wed, 29 Jul 2015 21:28:47 +0200 Subject: [PATCH] lola8a: use standard 3-bit brg palette --- src/mess/drivers/lola8a.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/mess/drivers/lola8a.c b/src/mess/drivers/lola8a.c index 3e410b1f518..c6f2e9a6c4f 100644 --- a/src/mess/drivers/lola8a.c +++ b/src/mess/drivers/lola8a.c @@ -42,7 +42,6 @@ public: required_device m_maincpu; - DECLARE_PALETTE_INIT(lola8a); virtual void machine_reset() { m_maincpu->set_pc(0x8000); } DECLARE_READ8_MEMBER(lola8a_port_a_r); @@ -187,20 +186,9 @@ static INPUT_PORTS_START( lola8a ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) INPUT_PORTS_END - -PALETTE_INIT_MEMBER(lola8a_state, lola8a) -{ - int i; - - for(i=0;i<8;i++) { - palette.set_pen_color(i, pal1bit(i >> 1),pal1bit(i >> 2),pal1bit(i >> 0)); - } -} - MC6845_UPDATE_ROW( lola8a_state::crtc_update_row ) { address_space &program = m_maincpu->space(AS_PROGRAM); - const rgb_t *palette = m_palette->palette()->entry_list_raw(); for (int sx = 0; sx < x_count; sx++) { @@ -211,7 +199,7 @@ MC6845_UPDATE_ROW( lola8a_state::crtc_update_row ) { int color = BIT(code, 7-x) ? 7 : 0; if (cursor_x==sx) color = 7; - bitmap.pix32(y, x + sx*8) = palette[color]; + bitmap.pix32(y, x + sx*8) = m_palette->pen_color(color); } } } @@ -285,8 +273,7 @@ static MACHINE_CONFIG_START( lola8a, lola8a_state ) MCFG_MC6845_UPDATE_ROW_CB(lola8a_state, crtc_update_row) MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(lola8a_state, crtc_vsync)) - MCFG_PALETTE_ADD("palette", 8) - MCFG_PALETTE_INIT_OWNER(lola8a_state, lola8a) + MCFG_PALETTE_ADD_3BIT_BRG("palette") /* Cassette */ MCFG_CASSETTE_ADD( "cassette" )