trunk/src/mess/drivers/lola8a.c
| r248571 | r248572 | |
| 42 | 42 | |
| 43 | 43 | required_device<cpu_device> m_maincpu; |
| 44 | 44 | |
| 45 | | DECLARE_PALETTE_INIT(lola8a); |
| 46 | 45 | virtual void machine_reset() { m_maincpu->set_pc(0x8000); } |
| 47 | 46 | |
| 48 | 47 | DECLARE_READ8_MEMBER(lola8a_port_a_r); |
| r248571 | r248572 | |
| 187 | 186 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) |
| 188 | 187 | INPUT_PORTS_END |
| 189 | 188 | |
| 190 | | |
| 191 | | PALETTE_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 | | |
| 200 | 189 | MC6845_UPDATE_ROW( lola8a_state::crtc_update_row ) |
| 201 | 190 | { |
| 202 | 191 | address_space &program = m_maincpu->space(AS_PROGRAM); |
| 203 | | const rgb_t *palette = m_palette->palette()->entry_list_raw(); |
| 204 | 192 | |
| 205 | 193 | for (int sx = 0; sx < x_count; sx++) |
| 206 | 194 | { |
| r248571 | r248572 | |
| 211 | 199 | { |
| 212 | 200 | int color = BIT(code, 7-x) ? 7 : 0; |
| 213 | 201 | 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); |
| 215 | 203 | } |
| 216 | 204 | } |
| 217 | 205 | } |
| r248571 | r248572 | |
| 285 | 273 | MCFG_MC6845_UPDATE_ROW_CB(lola8a_state, crtc_update_row) |
| 286 | 274 | MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(lola8a_state, crtc_vsync)) |
| 287 | 275 | |
| 288 | | MCFG_PALETTE_ADD("palette", 8) |
| 289 | | MCFG_PALETTE_INIT_OWNER(lola8a_state, lola8a) |
| 276 | MCFG_PALETTE_ADD_3BIT_BRG("palette") |
| 290 | 277 | |
| 291 | 278 | /* Cassette */ |
| 292 | 279 | MCFG_CASSETTE_ADD( "cassette" ) |