Previous 199869 Revisions Next

r40060 Wednesday 29th July, 2015 at 19:57:42 UTC by Dirk Best
lola8a: use standard 3-bit brg palette
[src/mess/drivers]lola8a.c

trunk/src/mess/drivers/lola8a.c
r248571r248572
4242
4343   required_device<cpu_device> m_maincpu;
4444
45   DECLARE_PALETTE_INIT(lola8a);
4645   virtual void machine_reset() { m_maincpu->set_pc(0x8000); }
4746
4847   DECLARE_READ8_MEMBER(lola8a_port_a_r);
r248571r248572
187186   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL)
188187INPUT_PORTS_END
189188
190
191PALETTE_INIT_MEMBER(lola8a_state, lola8a)
192{
193   int i;
194
195   for(i=0;i<8;i++) {
196      palette.set_pen_color(i, pal1bit(i >> 1),pal1bit(i >> 2),pal1bit(i >> 0));
197   }
198}
199
200189MC6845_UPDATE_ROW( lola8a_state::crtc_update_row )
201190{
202191   address_space &program = m_maincpu->space(AS_PROGRAM);
203   const rgb_t *palette = m_palette->palette()->entry_list_raw();
204192
205193   for (int sx = 0; sx < x_count; sx++)
206194   {
r248571r248572
211199      {
212200         int color = BIT(code, 7-x) ? 7 : 0;
213201         if (cursor_x==sx) color = 7;
214         bitmap.pix32(y, x + sx*8) = palette[color];
202         bitmap.pix32(y, x + sx*8) = m_palette->pen_color(color);
215203      }
216204   }
217205}
r248571r248572
285273   MCFG_MC6845_UPDATE_ROW_CB(lola8a_state, crtc_update_row)
286274   MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(lola8a_state, crtc_vsync))
287275
288   MCFG_PALETTE_ADD("palette", 8)
289   MCFG_PALETTE_INIT_OWNER(lola8a_state, lola8a)
276   MCFG_PALETTE_ADD_3BIT_BRG("palette")
290277
291278   /* Cassette */
292279   MCFG_CASSETTE_ADD( "cassette" )


Previous 199869 Revisions Next


© 1997-2024 The MAME Team