mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
cleanups. nw.
This commit is contained in:
parent
f9a0330e1b
commit
abeba8a9a5
@ -198,20 +198,6 @@ static S3C2440_INTERFACE( gizmondo_s3c2440_intf )
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
VIDEO_START( gizmondo )
|
||||
{
|
||||
gizmondo_state *state = machine.driver_data<gizmondo_state>();
|
||||
machine.primary_screen->register_screen_bitmap(state->m_bitmap);
|
||||
}
|
||||
|
||||
SCREEN_UPDATE_RGB32( gizmondo )
|
||||
{
|
||||
gizmondo_state *state = screen.machine().driver_data<gizmondo_state>();
|
||||
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)
|
||||
|
@ -1630,17 +1630,6 @@ static const pc_lpt_interface ip22_lpt_config =
|
||||
};
|
||||
|
||||
|
||||
SCREEN_UPDATE_RGB32( ip22 )
|
||||
{
|
||||
ip22_state *state = screen.machine().driver_data<ip22_state>();
|
||||
|
||||
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)
|
||||
|
||||
|
@ -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 )
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user