diff --git a/src/mess/drivers/gizmondo.c b/src/mess/drivers/gizmondo.c index a8523b59ae3..9bfc632d0c8 100644 --- a/src/mess/drivers/gizmondo.c +++ b/src/mess/drivers/gizmondo.c @@ -198,20 +198,6 @@ static S3C2440_INTERFACE( gizmondo_s3c2440_intf ) { 0 } }; -VIDEO_START( gizmondo ) -{ - gizmondo_state *state = machine.driver_data(); - machine.primary_screen->register_screen_bitmap(state->m_bitmap); -} - -SCREEN_UPDATE_RGB32( gizmondo ) -{ - gizmondo_state *state = screen.machine().driver_data(); - state->m_gf4500->render_screen(state->m_bitmap); - copybitmap(bitmap, state->m_bitmap, 0, 0, 0, 0, cliprect); - return 0; -} - static MACHINE_CONFIG_START( gizmondo, gizmondo_state ) MCFG_CPU_ADD("maincpu", ARM9, 40000000) MCFG_CPU_PROGRAM_MAP(gizmondo_map) @@ -223,12 +209,10 @@ static MACHINE_CONFIG_START( gizmondo, gizmondo_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(320, 240) MCFG_SCREEN_VISIBLE_AREA(0, 320 - 1, 0, 240 - 1) - MCFG_SCREEN_UPDATE_STATIC(gizmondo) + MCFG_SCREEN_UPDATE_DEVICE("gf4500", gf4500_device, screen_update) MCFG_DEFAULT_LAYOUT(layout_lcd) - MCFG_VIDEO_START(gizmondo) - MCFG_GF4500_ADD("gf4500") MCFG_S3C2440_ADD("s3c2440", 12000000, gizmondo_s3c2440_intf) diff --git a/src/mess/drivers/ip22.c b/src/mess/drivers/ip22.c index 7b80c07e8b0..f94406e6483 100644 --- a/src/mess/drivers/ip22.c +++ b/src/mess/drivers/ip22.c @@ -1630,17 +1630,6 @@ static const pc_lpt_interface ip22_lpt_config = }; -SCREEN_UPDATE_RGB32( ip22 ) -{ - ip22_state *state = screen.machine().driver_data(); - - bitmap.fill(get_black_pen(screen.machine()), cliprect); - state->m_newport->render_screen(bitmap, cliprect); - - return 0; -} - - static MACHINE_CONFIG_START( ip225015, ip22_state ) MCFG_CPU_ADD( "maincpu", R5000BE, 50000000*3 ) MCFG_CPU_CONFIG( config ) @@ -1659,7 +1648,7 @@ static MACHINE_CONFIG_START( ip225015, ip22_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ MCFG_SCREEN_SIZE(1280+64, 1024+64) MCFG_SCREEN_VISIBLE_AREA(0, 1279, 0, 1023) - MCFG_SCREEN_UPDATE_STATIC( ip22 ) + MCFG_SCREEN_UPDATE_DEVICE("newport", newport_video_device, screen_update) MCFG_PALETTE_LENGTH(65536) diff --git a/src/mess/video/gf4500.c b/src/mess/video/gf4500.c index 900e780b7c9..a8619ea7cc6 100644 --- a/src/mess/video/gf4500.c +++ b/src/mess/video/gf4500.c @@ -96,7 +96,7 @@ static rgb_t gf4500_get_color_16( UINT16 data ) return MAKE_RGB(r, g, b); } -void gf4500_device::render_screen( bitmap_rgb32 &bitmap ) +UINT32 gf4500_device::screen_update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect) { UINT16 *vram = (UINT16 *)(m_data + GF4500_FRAMEBUF_OFFSET / 4); int x, y; @@ -109,6 +109,7 @@ void gf4500_device::render_screen( bitmap_rgb32 &bitmap ) } vram += 1; } + return 0; } READ32_MEMBER( gf4500_device::read ) diff --git a/src/mess/video/gf4500.h b/src/mess/video/gf4500.h index 9b0cdfe78c9..0a4e3299f7e 100644 --- a/src/mess/video/gf4500.h +++ b/src/mess/video/gf4500.h @@ -20,7 +20,7 @@ public: DECLARE_READ32_MEMBER( read ); DECLARE_WRITE32_MEMBER( write ); - void render_screen(bitmap_rgb32 &bitmap); + UINT32 screen_update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: // device-level overrides diff --git a/src/mess/video/newport.c b/src/mess/video/newport.c index 4582bbfdcd7..4f32d6400fb 100644 --- a/src/mess/video/newport.c +++ b/src/mess/video/newport.c @@ -207,20 +207,21 @@ void newport_video_device::device_reset() } -void newport_video_device::render_screen( bitmap_rgb32 &bitmap, const rectangle &cliprect ) +UINT32 newport_video_device::screen_update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect) { /* loop over rows and copy to the destination */ - for (int y = cliprect.min_y; y <= cliprect.max_y; y++ ) + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { UINT32 *src = &m_base[1344 * y]; UINT32 *dest = &bitmap.pix32(y, cliprect.min_x); /* loop over columns */ - for (int x = cliprect.min_x; x < cliprect.max_x; x++ ) + for (int x = cliprect.min_x; x < cliprect.max_x; x++) { *dest++ = (*src++) & 0x00f8f8f8; } } + return 0; } diff --git a/src/mess/video/newport.h b/src/mess/video/newport.h index 5c3df48958e..4df773e0ac4 100644 --- a/src/mess/video/newport.h +++ b/src/mess/video/newport.h @@ -121,7 +121,7 @@ public: DECLARE_READ32_MEMBER( rex3_r ); DECLARE_WRITE32_MEMBER( rex3_w ); - void render_screen(bitmap_rgb32 &bitmap, const rectangle &cliprect); + UINT32 screen_update(screen_device &device, bitmap_rgb32 &bitmap, const rectangle &cliprect); protected: // device-level overrides