UINT32 tutankhm_state::screen_update_tutankhm(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { int xorx = m_flip_x ? 255 : 0; int xory = m_flip_y ? 255 : 0; pen_t pens[NUM_PENS]; int x, y; get_pens(machine(), pens); for (y = cliprect.min_y; y <= cliprect.max_y; y++) { UINT32 *dst = &bitmap.pix32(y); for (x = cliprect.min_x; x <= cliprect.max_x; x++) { UINT8 effx = x ^ xorx; UINT8 yscroll = (effx < 192) ? *m_scroll : 0; UINT8 effy = (y ^ xory) + yscroll; UINT8 vrambyte = m_videoram[effy * 128 + effx / 2]; UINT8 shifted = vrambyte >> (4 * (effx % 2)); dst[x] = pens[shifted & 0x0f]; } } return 0; }
static MC6845_BEGIN_UPDATE( begin_update ) { tapatune_state *state = device->machine().driver_data<tapatune_state>(); /* create the pens */ get_pens(state); return state->m_pens; }