diff options
Diffstat (limited to 'src/mame/video/route16.c')
-rw-r--r-- | src/mame/video/route16.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/mame/video/route16.c b/src/mame/video/route16.c index 86b222e99ff..420dbd7df57 100644 --- a/src/mame/video/route16.c +++ b/src/mame/video/route16.c @@ -68,34 +68,33 @@ static pen_t ttmajng_make_pen(UINT8 color) * a black output. */ -SCREEN_UPDATE_RGB32( route16 ) +UINT32 route16_state::screen_update_route16(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - route16_state *state = screen.machine().driver_data<route16_state>(); offs_t offs; UINT8 *color_prom1 = &screen.machine().root_device().memregion("proms")->base()[0x000]; - UINT8 *color_prom2 = &state->memregion("proms")->base()[0x100]; + UINT8 *color_prom2 = &memregion("proms")->base()[0x100]; - for (offs = 0; offs < state->m_videoram1.bytes(); offs++) + for (offs = 0; offs < m_videoram1.bytes(); offs++) { int i; UINT8 y = offs >> 6; UINT8 x = offs << 2; - UINT8 data1 = state->m_videoram1[offs]; - UINT8 data2 = state->m_videoram2[offs]; + UINT8 data1 = m_videoram1[offs]; + UINT8 data2 = m_videoram2[offs]; for (i = 0; i < 4; i++) { - UINT8 color1 = color_prom1[((state->m_palette_1 << 6) & 0x80) | - (state->m_palette_1 << 2) | + UINT8 color1 = color_prom1[((m_palette_1 << 6) & 0x80) | + (m_palette_1 << 2) | ((data1 >> 3) & 0x02) | ((data1 >> 0) & 0x01)]; /* bit 7 of the 2nd color is the OR of the 1st color bits 0 and 1 - this is a guess */ - UINT8 color2 = color_prom2[((state->m_palette_2 << 6) & 0x80) | (((color1 << 6) & 0x80) | ((color1 << 7) & 0x80)) | - (state->m_palette_2 << 2) | + UINT8 color2 = color_prom2[((m_palette_2 << 6) & 0x80) | (((color1 << 6) & 0x80) | ((color1 << 7) & 0x80)) | + (m_palette_2 << 2) | ((data2 >> 3) & 0x02) | ((data2 >> 0) & 0x01)]; @@ -104,7 +103,7 @@ SCREEN_UPDATE_RGB32( route16 ) pen_t pen = route16_make_pen(final_color); - if (state->m_flipscreen) + if (m_flipscreen) bitmap.pix32(255 - y, 255 - x) = pen; else bitmap.pix32(y, x) = pen; @@ -175,13 +174,13 @@ static int video_update_stratvox_ttmahjng(running_machine &machine, bitmap_rgb32 } -SCREEN_UPDATE_RGB32( stratvox ) +UINT32 route16_state::screen_update_stratvox(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return video_update_stratvox_ttmahjng(screen.machine(), bitmap, cliprect, route16_make_pen); } -SCREEN_UPDATE_RGB32( ttmahjng ) +UINT32 route16_state::screen_update_ttmahjng(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return video_update_stratvox_ttmahjng(screen.machine(), bitmap, cliprect, ttmajng_make_pen); } |