mirror of
https://github.com/holub/mame
synced 2025-04-20 15:32:45 +03:00
s3c24xx: placed video start and screen update into device (no whatsnew)
This commit is contained in:
parent
6808b92f3c
commit
13988f7ad1
@ -31,16 +31,9 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level,
|
||||
#include "machine/s3c24xx.c"
|
||||
#undef DEVICE_S3C2400
|
||||
|
||||
VIDEO_START( s3c2400 )
|
||||
UINT32 s3c2400_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
device_t *device = machine.device( S3C2400_TAG);
|
||||
s3c24xx_video_start( device, machine);
|
||||
}
|
||||
|
||||
SCREEN_UPDATE_RGB32( s3c2400 )
|
||||
{
|
||||
device_t *device = screen.machine().device( S3C2400_TAG);
|
||||
return s3c24xx_video_update( device, screen, bitmap, cliprect);
|
||||
return s3c24xx_video_update( this, screen, bitmap, cliprect);
|
||||
}
|
||||
|
||||
DEVICE_START( s3c2400 )
|
||||
@ -69,6 +62,8 @@ DEVICE_START( s3c2400 )
|
||||
space->install_legacy_readwrite_handler( *device, 0x15800000, 0x15800007, FUNC(s3c24xx_adc_r), FUNC(s3c24xx_adc_w));
|
||||
space->install_legacy_readwrite_handler( *device, 0x15900000, 0x15900017, FUNC(s3c24xx_spi_0_r), FUNC(s3c24xx_spi_0_w));
|
||||
space->install_legacy_readwrite_handler( *device, 0x15a00000, 0x15a0003f, FUNC(s3c24xx_mmc_r), FUNC(s3c24xx_mmc_w));
|
||||
|
||||
s3c24xx_video_start( device, device->machine());
|
||||
}
|
||||
|
||||
DEVICE_GET_INFO( s3c2400 )
|
||||
@ -89,4 +84,9 @@ void s3c2400_uart_fifo_w( device_t *device, int uart, UINT8 data)
|
||||
s3c24xx_uart_fifo_w( device, uart, data);
|
||||
}
|
||||
|
||||
DEFINE_LEGACY_DEVICE(S3C2400, s3c2400);
|
||||
s3c2400_device::s3c2400_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock)
|
||||
: legacy_device_base(mconfig, type, tag, owner, clock, DEVICE_GET_INFO_NAME(s3c2400))
|
||||
{
|
||||
}
|
||||
|
||||
const device_type S3C2400 = &legacy_device_creator<s3c2400_device>;
|
||||
|
@ -33,7 +33,17 @@ enum
|
||||
S3C2400_GPIO_PORT_G
|
||||
};
|
||||
|
||||
DECLARE_LEGACY_DEVICE(S3C2400, s3c2400);
|
||||
DEVICE_GET_INFO( s3c2400 );
|
||||
|
||||
class s3c2400_device : public legacy_device_base
|
||||
{
|
||||
public:
|
||||
s3c2400_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
};
|
||||
|
||||
extern const device_type S3C2400;
|
||||
|
||||
/*******************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
@ -100,11 +110,6 @@ struct _s3c2400_interface
|
||||
PROTOTYPES
|
||||
*******************************************************************************/
|
||||
|
||||
DEVICE_GET_INFO( s3c2400 );
|
||||
|
||||
VIDEO_START( s3c2400 );
|
||||
SCREEN_UPDATE_RGB32( s3c2400 );
|
||||
|
||||
void s3c2400_uart_fifo_w( device_t *device, int uart, UINT8 data);
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -31,16 +31,9 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level,
|
||||
#include "machine/s3c24xx.c"
|
||||
#undef DEVICE_S3C2410
|
||||
|
||||
VIDEO_START( s3c2410 )
|
||||
UINT32 s3c2410_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
device_t *device = machine.device( S3C2410_TAG);
|
||||
s3c24xx_video_start( device, machine);
|
||||
}
|
||||
|
||||
SCREEN_UPDATE_RGB32( s3c2410 )
|
||||
{
|
||||
device_t *device = screen.machine().device( S3C2410_TAG);
|
||||
return s3c24xx_video_update( device, screen, bitmap, cliprect);
|
||||
return s3c24xx_video_update( this, screen, bitmap, cliprect);
|
||||
}
|
||||
|
||||
DEVICE_START( s3c2410 )
|
||||
@ -72,6 +65,8 @@ DEVICE_START( s3c2410 )
|
||||
space->install_legacy_readwrite_handler( *device, 0x59000000, 0x59000017, FUNC(s3c24xx_spi_0_r), FUNC(s3c24xx_spi_0_w));
|
||||
space->install_legacy_readwrite_handler( *device, 0x59000020, 0x59000037, FUNC(s3c24xx_spi_1_r), FUNC(s3c24xx_spi_1_w));
|
||||
space->install_legacy_readwrite_handler( *device, 0x5a000000, 0x5a000043, FUNC(s3c24xx_sdi_r), FUNC(s3c24xx_sdi_w));
|
||||
|
||||
s3c24xx_video_start( device, device->machine());
|
||||
}
|
||||
|
||||
DEVICE_GET_INFO( s3c2410 )
|
||||
@ -113,4 +108,9 @@ void s3c2410_request_eint( device_t *device, UINT32 number)
|
||||
s3c24xx_request_eint( device, number);
|
||||
}
|
||||
|
||||
DEFINE_LEGACY_DEVICE(S3C2410, s3c2410);
|
||||
s3c2410_device::s3c2410_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock)
|
||||
: legacy_device_base(mconfig, type, tag, owner, clock, DEVICE_GET_INFO_NAME(s3c2410))
|
||||
{
|
||||
}
|
||||
|
||||
const device_type S3C2410 = &legacy_device_creator<s3c2410_device>;
|
||||
|
@ -41,7 +41,18 @@ enum
|
||||
S3C2410_CORE_PIN_OM1
|
||||
};
|
||||
|
||||
DECLARE_LEGACY_DEVICE(S3C2410, s3c2410);
|
||||
DEVICE_GET_INFO( s3c2410 );
|
||||
|
||||
class s3c2410_device : public legacy_device_base
|
||||
{
|
||||
public:
|
||||
s3c2410_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
};
|
||||
|
||||
extern const device_type S3C2410;
|
||||
|
||||
|
||||
READ32_DEVICE_HANDLER( s3c2410_lcd_r );
|
||||
|
||||
@ -120,11 +131,6 @@ struct _s3c2410_interface
|
||||
PROTOTYPES
|
||||
*******************************************************************************/
|
||||
|
||||
DEVICE_GET_INFO( s3c2410 );
|
||||
|
||||
VIDEO_START( s3c2410 );
|
||||
SCREEN_UPDATE_RGB32( s3c2410 );
|
||||
|
||||
void s3c2410_uart_fifo_w( device_t *device, int uart, UINT8 data);
|
||||
void s3c2410_touch_screen( device_t *device, int state);
|
||||
void s3c2410_request_eint( device_t *device, UINT32 number);
|
||||
|
@ -31,16 +31,9 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level,
|
||||
#include "machine/s3c24xx.c"
|
||||
#undef DEVICE_S3C2440
|
||||
|
||||
VIDEO_START( s3c2440 )
|
||||
UINT32 s3c2440_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
device_t *device = machine.device( S3C2440_TAG);
|
||||
s3c24xx_video_start( device, machine);
|
||||
}
|
||||
|
||||
SCREEN_UPDATE_RGB32( s3c2440 )
|
||||
{
|
||||
device_t *device = screen.machine().device( S3C2440_TAG);
|
||||
return s3c24xx_video_update( device, screen, bitmap, cliprect);
|
||||
return s3c24xx_video_update( this, screen, bitmap, cliprect);
|
||||
}
|
||||
|
||||
DEVICE_START( s3c2440 )
|
||||
@ -74,6 +67,8 @@ DEVICE_START( s3c2440 )
|
||||
space->install_legacy_readwrite_handler( *device, 0x5a000000, 0x5a000043, FUNC(s3c24xx_sdi_r), FUNC(s3c24xx_sdi_w));
|
||||
space->install_legacy_readwrite_handler( *device, 0x5b000000, 0x5b00001f, FUNC(s3c24xx_ac97_r), FUNC(s3c24xx_ac97_w));
|
||||
DEVICE_START_CALL(s3c24xx);
|
||||
|
||||
s3c24xx_video_start( device, device->machine());
|
||||
}
|
||||
|
||||
DEVICE_GET_INFO( s3c2440 )
|
||||
@ -114,4 +109,9 @@ WRITE_LINE_DEVICE_HANDLER( s3c2440_pin_frnb_w )
|
||||
s3c24xx_pin_frnb_w( device, state);
|
||||
}
|
||||
|
||||
DEFINE_LEGACY_DEVICE(S3C2440, s3c2440);
|
||||
s3c2440_device::s3c2440_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock)
|
||||
: legacy_device_base(mconfig, type, tag, owner, clock, DEVICE_GET_INFO_NAME(s3c2440))
|
||||
{
|
||||
}
|
||||
|
||||
const device_type S3C2440 = &legacy_device_creator<s3c2440_device>;
|
||||
|
@ -40,7 +40,18 @@ enum
|
||||
S3C2440_CORE_PIN_OM1
|
||||
};
|
||||
|
||||
DECLARE_LEGACY_DEVICE(S3C2440, s3c2440);
|
||||
DEVICE_GET_INFO( s3c2440 );
|
||||
|
||||
class s3c2440_device : public legacy_device_base
|
||||
{
|
||||
public:
|
||||
s3c2440_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
};
|
||||
|
||||
extern const device_type S3C2440;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
@ -117,11 +128,6 @@ struct _s3c2440_interface
|
||||
PROTOTYPES
|
||||
*******************************************************************************/
|
||||
|
||||
DEVICE_GET_INFO( s3c2440 );
|
||||
|
||||
VIDEO_START( s3c2440 );
|
||||
SCREEN_UPDATE_RGB32( s3c2440 );
|
||||
|
||||
void s3c2440_uart_fifo_w( device_t *device, int uart, UINT8 data);
|
||||
void s3c2440_touch_screen( device_t *device, int state);
|
||||
void s3c2440_request_irq( device_t *device, UINT32 int_type);
|
||||
|
@ -595,14 +595,12 @@ static MACHINE_CONFIG_START( ghosteo, ghosteo_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
|
||||
MCFG_SCREEN_SIZE(455, 262)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 256-1)
|
||||
MCFG_SCREEN_UPDATE_STATIC(s3c2410)
|
||||
MCFG_SCREEN_UPDATE_DEVICE("s3c2410", s3c2410_device, screen_update)
|
||||
|
||||
MCFG_PALETTE_LENGTH(256)
|
||||
|
||||
MCFG_MACHINE_RESET( bballoon )
|
||||
|
||||
MCFG_VIDEO_START(s3c2410)
|
||||
|
||||
MCFG_S3C2410_ADD("s3c2410", 12000000, bballoon_s3c2410_intf)
|
||||
|
||||
// MCFG_NAND_ADD("nand", 0xEC, 0x75)
|
||||
|
@ -301,12 +301,10 @@ static MACHINE_CONFIG_START( hp49gp, hp49gp_state )
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
|
||||
MCFG_SCREEN_SIZE(160, 85)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 131 - 1, 0, 80 - 1)
|
||||
MCFG_SCREEN_UPDATE_STATIC(s3c2410)
|
||||
MCFG_SCREEN_UPDATE_DEVICE("s3c2410", s3c2410_device, screen_update)
|
||||
|
||||
MCFG_DEFAULT_LAYOUT(layout_lcd)
|
||||
|
||||
MCFG_VIDEO_START(s3c2410)
|
||||
|
||||
MCFG_MACHINE_START(hp49gp)
|
||||
MCFG_MACHINE_RESET(hp49gp)
|
||||
|
||||
|
@ -234,8 +234,7 @@ static MACHINE_CONFIG_START( mini2440, mini2440_state )
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 239, 0, 319)
|
||||
MCFG_DEFAULT_LAYOUT(layout_lcd)
|
||||
|
||||
MCFG_VIDEO_START(s3c2440)
|
||||
MCFG_SCREEN_UPDATE_STATIC(s3c2440)
|
||||
MCFG_SCREEN_UPDATE_DEVICE("s3c2440", s3c2440_device, screen_update)
|
||||
|
||||
MCFG_MACHINE_START(mini2440)
|
||||
MCFG_MACHINE_RESET(mini2440)
|
||||
|
@ -306,8 +306,7 @@ static MACHINE_CONFIG_START( palmz22, palmz22_state )
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 160 - 1, 0, 160 - 1)
|
||||
MCFG_DEFAULT_LAYOUT(layout_lcd)
|
||||
|
||||
MCFG_VIDEO_START(s3c2410)
|
||||
MCFG_SCREEN_UPDATE_STATIC(s3c2410)
|
||||
MCFG_SCREEN_UPDATE_DEVICE("s3c2410", s3c2410_device, screen_update)
|
||||
|
||||
MCFG_MACHINE_START(palmz22)
|
||||
MCFG_MACHINE_RESET(palmz22)
|
||||
|
Loading…
Reference in New Issue
Block a user