mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
fixed more faulty PALETTE_INIT modernizations (nw)
This commit is contained in:
parent
3a6092fee1
commit
624ff85a3b
@ -119,7 +119,7 @@ PALETTE_INIT_MEMBER(sega315_5124_device, sega315_5124)
|
||||
}
|
||||
|
||||
|
||||
PALETTE_INIT_MEMBER(sega315_5124_device, sega315_5378)
|
||||
PALETTE_INIT_MEMBER(sega315_5378_device, sega315_5378)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 4096; i++)
|
||||
@ -1796,9 +1796,37 @@ void sega315_5124_device::device_reset()
|
||||
memset(m_line_buffer, 0, 256 * 5 * sizeof(int));
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( sega315_5124 )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(sega315_5124_device, sega315_5124)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor sega315_5124_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( sega315_5124 );
|
||||
}
|
||||
|
||||
|
||||
void sega315_5378_device::device_reset()
|
||||
{
|
||||
sega315_5124_device::device_reset();
|
||||
m_draw_time = DRAW_TIME_GG;
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( sega315_5378 )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(sega315_5378_device, sega315_5378)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor sega315_5378_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( sega315_5378 );
|
||||
}
|
||||
|
@ -78,7 +78,6 @@ public:
|
||||
DECLARE_READ8_MEMBER( hcount_read );
|
||||
|
||||
DECLARE_PALETTE_INIT( sega315_5124 );
|
||||
DECLARE_PALETTE_INIT( sega315_5378 );
|
||||
|
||||
void hcount_latch() { hcount_latch_at_hpos( m_screen->hpos() ); };
|
||||
void hcount_latch_at_hpos( int hpos );
|
||||
@ -110,6 +109,7 @@ protected:
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_0) ? &m_space_config : NULL; }
|
||||
|
||||
@ -184,11 +184,14 @@ class sega315_5378_device : public sega315_5124_device
|
||||
public:
|
||||
sega315_5378_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
virtual void device_reset();
|
||||
DECLARE_PALETTE_INIT( sega315_5378 );
|
||||
|
||||
virtual void set_sega315_5124_compatibility_mode( bool sega315_5124_compatibility_mode );
|
||||
|
||||
protected:
|
||||
virtual void device_reset();
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
virtual void update_palette();
|
||||
virtual void draw_scanline( int pixel_offset_x, int pixel_plot_y, int line );
|
||||
virtual UINT16 get_name_table_address();
|
||||
|
@ -292,3 +292,17 @@ void huc6260_device::device_reset()
|
||||
m_last_h = m_screen->hpos();
|
||||
m_timer->adjust( m_screen->time_until_pos( ( m_screen->vpos() + 1 ) % 263, 0 ) );
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( huc6260 )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(huc6260_device, huc6260)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor huc6260_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( huc6260 );
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ protected:
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
private:
|
||||
int m_last_h;
|
||||
|
@ -265,7 +265,7 @@ to emulate this. Also it keeps the palette a reasonable size. :)
|
||||
|
||||
UINT16 *v99x8_device::s_pal_indYJK;
|
||||
|
||||
PALETTE_INIT_MEMBER(v99x8_device, v9958)
|
||||
PALETTE_INIT_MEMBER(v9958_device, v9958)
|
||||
{
|
||||
int r,g,b,y,j,k,i,k0,j0,n;
|
||||
UINT8 pal[19268*3];
|
||||
@ -3193,3 +3193,31 @@ void v99x8_device::update_command()
|
||||
if(m_vdp_engine) (this->*m_vdp_engine)();
|
||||
}
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( v9938 )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9938_device, v9938)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor v9938_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( v9938 );
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( v9958 )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9958_device, v9958)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor v9958_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( v9958 );
|
||||
}
|
||||
|
@ -79,8 +79,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
|
||||
DECLARE_PALETTE_INIT(v9938);
|
||||
DECLARE_PALETTE_INIT(v9958);
|
||||
|
||||
|
||||
UINT8 vram_r();
|
||||
UINT8 status_r();
|
||||
void palette_w(UINT8 data);
|
||||
@ -237,6 +236,7 @@ private:
|
||||
} ;
|
||||
static const v99x8_mode s_modes[];
|
||||
|
||||
protected:
|
||||
static UINT16 *s_pal_indYJK;
|
||||
};
|
||||
|
||||
@ -245,12 +245,20 @@ class v9938_device : public v99x8_device
|
||||
{
|
||||
public:
|
||||
v9938_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
protected:
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
};
|
||||
|
||||
class v9958_device : public v99x8_device
|
||||
{
|
||||
public:
|
||||
v9958_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_PALETTE_INIT(v9958);
|
||||
|
||||
protected:
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
};
|
||||
|
||||
|
||||
|
@ -267,7 +267,6 @@ static MACHINE_CONFIG_START( big10, big10_state )
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 512 + 32 - 1, 0, (212 + 28) * 2 - 1)
|
||||
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9938_device, v9938)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
@ -664,7 +664,6 @@ static MACHINE_CONFIG_START( csplayh5, csplayh5_state )
|
||||
MCFG_SCREEN_UPDATE_DEVICE("v9958", v9958_device, screen_update)
|
||||
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9958_device, v9958)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
@ -270,7 +270,6 @@ static MACHINE_CONFIG_START( ggconnie, ggconnie_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER( ggconnie_state, screen_update )
|
||||
|
||||
MCFG_PALETTE_LENGTH( HUC6260_PALETTE_SIZE )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(huc6260_device, huc6260);
|
||||
|
||||
MCFG_HUC6260_ADD( "huc6260", PCE_MAIN_CLOCK/3, sgx_huc6260_config )
|
||||
MCFG_HUC6270_ADD( "huc6270_0", sgx_huc6270_0_config )
|
||||
|
@ -799,7 +799,6 @@ static MACHINE_CONFIG_START( kas89, kas89_state )
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 544 - 1, 0, 480 - 1)
|
||||
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9938_device, v9938)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
@ -589,7 +589,6 @@ static MACHINE_CONFIG_START( kurukuru, kurukuru_state )
|
||||
MCFG_SCREEN_UPDATE_DEVICE("v9938", v9938_device, screen_update)
|
||||
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9938_device, v9938)
|
||||
|
||||
MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW )
|
||||
|
||||
|
@ -531,7 +531,6 @@ static MACHINE_CONFIG_START( megatech, mtech_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(mtech_state, screen_update_megatech_menu)
|
||||
|
||||
MCFG_PALETTE_LENGTH(SEGA315_5124_PALETTE_SIZE)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(sega315_5124_device, sega315_5124)
|
||||
|
||||
MCFG_SEGA315_5246_ADD("vdp1", _vdp_intf)
|
||||
MCFG_SEGA315_5246_SET_SCREEN("menu")
|
||||
|
@ -1256,7 +1256,6 @@ static MACHINE_CONFIG_START( meritm_crt250, meritm_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(meritm_state, screen_update_meritm)
|
||||
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9938_device, v9938)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
@ -443,7 +443,6 @@ static MACHINE_CONFIG_START( pzlestar, sangho_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(sangho_state,pzlestar)
|
||||
|
||||
MCFG_PALETTE_LENGTH(19268)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9958_device, v9958)
|
||||
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD("ymsnd", YM2413, 3580000)
|
||||
@ -474,7 +473,6 @@ static MACHINE_CONFIG_START( sexyboom, sangho_state )
|
||||
MCFG_MACHINE_RESET_OVERRIDE(sangho_state,sexyboom)
|
||||
|
||||
MCFG_PALETTE_LENGTH(19268)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9958_device, v9958)
|
||||
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD("ymsnd", YM2413, 3580000)
|
||||
|
@ -1118,7 +1118,6 @@ static MACHINE_CONFIG_START( systeme, systeme_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(systeme_state, screen_update_systeme)
|
||||
|
||||
MCFG_PALETTE_LENGTH(SEGA315_5124_PALETTE_SIZE)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(sega315_5124_device, sega315_5124)
|
||||
|
||||
MCFG_SEGA315_5124_ADD("vdp1", _315_5124_1_intf)
|
||||
MCFG_DEVICE_ADDRESS_MAP(AS_0, vdp1_map)
|
||||
|
@ -497,7 +497,6 @@ static MACHINE_CONFIG_START( sfkick, sfkick_state )
|
||||
MCFG_SCREEN_VISIBLE_AREA(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1)
|
||||
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9938_device, v9938)
|
||||
|
||||
MCFG_I8255A_ADD( "ppi8255", ppi8255_intf )
|
||||
|
||||
|
@ -390,7 +390,6 @@ static MACHINE_CONFIG_START( sothello, sothello_state )
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 512 + 32 - 1, 0, (212 + 28) * 2 - 1)
|
||||
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9938_device, v9938)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
@ -282,7 +282,6 @@ static MACHINE_CONFIG_START( tonton, tonton_state )
|
||||
MCFG_SCREEN_UPDATE_DEVICE("v9938", v9938_device, screen_update)
|
||||
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9938_device, v9938)
|
||||
|
||||
MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW )
|
||||
|
||||
|
@ -181,14 +181,13 @@ static MACHINE_CONFIG_START( tourtabl, tourtabl_state )
|
||||
MCFG_RIOT6532_ADD("riot1", MASTER_CLOCK / 3, r6532_interface_0)
|
||||
MCFG_RIOT6532_ADD("riot2", MASTER_CLOCK / 3, r6532_interface_1)
|
||||
|
||||
MCFG_TIA_VIDEO_ADD("tia_video", tourtabl_tia_interface)
|
||||
MCFG_TIA_NTSC_VIDEO_ADD("tia_video", tourtabl_tia_interface)
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS( MASTER_CLOCK, 228, 34, 34 + 160, 262, 46, 46 + 200 )
|
||||
MCFG_SCREEN_UPDATE_DEVICE("tia_video", tia_video_device, screen_update)
|
||||
|
||||
MCFG_PALETTE_LENGTH(TIA_PALETTE_LENGTH)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(tia_video_device, tia_ntsc)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
@ -45,7 +45,7 @@ static void extend_palette(running_machine &machine) {
|
||||
}
|
||||
}
|
||||
|
||||
PALETTE_INIT_MEMBER(tia_video_device, tia_ntsc)
|
||||
PALETTE_INIT_MEMBER(tia_ntsc_video_device, tia_ntsc)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
@ -104,7 +104,7 @@ PALETTE_INIT_MEMBER(tia_video_device, tia_ntsc)
|
||||
}
|
||||
|
||||
|
||||
PALETTE_INIT_MEMBER(tia_video_device, tia_pal)
|
||||
PALETTE_INIT_MEMBER(tia_pal_video_device, tia_pal)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
@ -162,19 +162,63 @@ PALETTE_INIT_MEMBER(tia_video_device, tia_pal)
|
||||
extend_palette( machine() );
|
||||
}
|
||||
|
||||
// device type definition
|
||||
const device_type TIA_VIDEO = &device_creator<tia_video_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// tia_video_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
tia_video_device::tia_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, TIA_VIDEO, "TIA Video", tag, owner, clock, "tia_video", __FILE__),
|
||||
tia_video_device::tia_video_device(const machine_config &mconfig, device_type type, const char *name, const char *shortname, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__),
|
||||
device_video_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
// device type definition
|
||||
const device_type TIA_PAL_VIDEO = &device_creator<tia_pal_video_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// tia_pal_video_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
tia_pal_video_device::tia_pal_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tia_video_device(mconfig, TIA_PAL_VIDEO, "TIA Video (PAL)", "tia_pal_video", tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( tia_pal )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(tia_pal_video_device, tia_pal)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor tia_pal_video_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( tia_pal );
|
||||
}
|
||||
|
||||
// device type definition
|
||||
const device_type TIA_NTSC_VIDEO = &device_creator<tia_ntsc_video_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// tia_ntsc_video_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
tia_ntsc_video_device::tia_ntsc_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: tia_video_device(mconfig, TIA_NTSC_VIDEO, "TIA Video (NTSC)", "tia_ntsc_video", tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( tia_ntsc )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(tia_ntsc_video_device, tia_ntsc)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor tia_ntsc_video_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( tia_ntsc );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
|
@ -28,8 +28,12 @@ struct player_gfx {
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_TIA_VIDEO_ADD(_tag, _config) \
|
||||
MCFG_DEVICE_ADD(_tag, TIA_VIDEO, 0) \
|
||||
#define MCFG_TIA_PAL_VIDEO_ADD(_tag, _config) \
|
||||
MCFG_DEVICE_ADD(_tag, TIA_PAL_VIDEO, 0) \
|
||||
MCFG_DEVICE_CONFIG(_config)
|
||||
|
||||
#define MCFG_TIA_NTSC_VIDEO_ADD(_tag, _config) \
|
||||
MCFG_DEVICE_ADD(_tag, TIA_NTSC_VIDEO, 0) \
|
||||
MCFG_DEVICE_CONFIG(_config)
|
||||
|
||||
//**************************************************************************
|
||||
@ -53,18 +57,15 @@ class tia_video_device : public device_t,
|
||||
public tia_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
tia_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
|
||||
DECLARE_PALETTE_INIT(tia_ntsc);
|
||||
DECLARE_PALETTE_INIT(tia_pal);
|
||||
|
||||
protected:
|
||||
// construction/destruction
|
||||
tia_video_device(const machine_config &mconfig, device_type type, const char *name, const char *shortname, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
virtual void device_start();
|
||||
@ -204,11 +205,33 @@ private:
|
||||
bitmap_ind16 *helper[3];
|
||||
|
||||
UINT16 screen_height;
|
||||
};
|
||||
|
||||
class tia_pal_video_device : public tia_video_device
|
||||
{
|
||||
public:
|
||||
tia_pal_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_PALETTE_INIT(tia_pal);
|
||||
|
||||
protected:
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
};
|
||||
|
||||
class tia_ntsc_video_device : public tia_video_device
|
||||
{
|
||||
public:
|
||||
tia_ntsc_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_PALETTE_INIT(tia_ntsc);
|
||||
|
||||
protected:
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type TIA_VIDEO;
|
||||
extern const device_type TIA_PAL_VIDEO;
|
||||
extern const device_type TIA_NTSC_VIDEO;
|
||||
|
||||
#endif /* _VIDEO_TIA_H_ */
|
||||
|
@ -1934,14 +1934,13 @@ static MACHINE_CONFIG_START( a2600, a2600_state )
|
||||
MCFG_MACHINE_START_OVERRIDE(a2600_state,a2600)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_TIA_VIDEO_ADD("tia_video", a2600_tia_interface)
|
||||
MCFG_TIA_NTSC_VIDEO_ADD("tia_video", a2600_tia_interface)
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS( MASTER_CLOCK_NTSC, 228, 26, 26 + 160 + 16, 262, 24 , 24 + 192 + 31 )
|
||||
MCFG_SCREEN_UPDATE_DEVICE("tia_video", tia_video_device, screen_update)
|
||||
|
||||
MCFG_PALETTE_LENGTH( TIA_PALETTE_LENGTH )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(tia_video_device, tia_ntsc)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
@ -1971,14 +1970,13 @@ static MACHINE_CONFIG_START( a2600p, a2600_state )
|
||||
MCFG_MACHINE_START_OVERRIDE(a2600_state,a2600)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_TIA_VIDEO_ADD("tia_video", a2600_tia_interface_pal)
|
||||
MCFG_TIA_PAL_VIDEO_ADD("tia_video", a2600_tia_interface_pal)
|
||||
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS( MASTER_CLOCK_PAL, 228, 26, 26 + 160 + 16, 312, 32, 32 + 228 + 31 )
|
||||
MCFG_SCREEN_UPDATE_DEVICE("tia_video", tia_video_device, screen_update)
|
||||
|
||||
MCFG_PALETTE_LENGTH( TIA_PALETTE_LENGTH )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(tia_video_device, tia_pal)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
@ -1169,7 +1169,6 @@ static MACHINE_CONFIG_START( msx2, msx_state )
|
||||
MCFG_SCREEN_VISIBLE_AREA(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1)
|
||||
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9938_device, v9938)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
@ -843,7 +843,6 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( ngp, ngp_common )
|
||||
|
||||
MCFG_PALETTE_LENGTH( 8 )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(k1ge_device, k1ge)
|
||||
|
||||
MCFG_K1GE_ADD( "k1ge", XTAL_6_144MHz, "screen", WRITELINE( ngp_state, ngp_vblank_pin_w ), WRITELINE( ngp_state, ngp_hblank_pin_w ) )
|
||||
|
||||
@ -863,7 +862,6 @@ MACHINE_CONFIG_END
|
||||
static MACHINE_CONFIG_DERIVED( ngpc, ngp_common )
|
||||
|
||||
MCFG_PALETTE_LENGTH( 4096 )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(k2ge_device, k2ge)
|
||||
|
||||
MCFG_K2GE_ADD( "k1ge", XTAL_6_144MHz, "screen", WRITELINE( ngp_state, ngp_vblank_pin_w ), WRITELINE( ngp_state, ngp_hblank_pin_w ) )
|
||||
|
||||
|
@ -380,7 +380,6 @@ static MACHINE_CONFIG_START( pce_common, pce_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER( pce_state, screen_update )
|
||||
|
||||
MCFG_PALETTE_LENGTH( HUC6260_PALETTE_SIZE )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(huc6260_device, huc6260);
|
||||
|
||||
MCFG_HUC6260_ADD( "huc6260", MAIN_CLOCK, pce_huc6260_config )
|
||||
MCFG_HUC6270_ADD( "huc6270", pce_huc6270_config )
|
||||
@ -425,7 +424,6 @@ static MACHINE_CONFIG_START( sgx, pce_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER( pce_state, screen_update )
|
||||
|
||||
MCFG_PALETTE_LENGTH( HUC6260_PALETTE_SIZE )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(huc6260_device, huc6260);
|
||||
|
||||
MCFG_HUC6260_ADD( "huc6260", MAIN_CLOCK, sgx_huc6260_config )
|
||||
MCFG_HUC6270_ADD( "huc6270_0", sgx_huc6270_0_config )
|
||||
|
@ -527,7 +527,6 @@ static MACHINE_CONFIG_DERIVED( sms2_ntsc, sms_ntsc_base )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(sms_state, screen_update_sms)
|
||||
|
||||
MCFG_PALETTE_LENGTH(SEGA315_5124_PALETTE_SIZE)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(sega315_5124_device, sega315_5124)
|
||||
|
||||
MCFG_SEGA315_5246_ADD("sms_vdp", _315_5124_ntsc_intf)
|
||||
MCFG_SEGA315_5246_SET_SCREEN("screen")
|
||||
@ -563,7 +562,6 @@ static MACHINE_CONFIG_DERIVED( sms1_ntsc, sms_ntsc_base )
|
||||
MCFG_DEFAULT_LAYOUT(layout_sms1)
|
||||
|
||||
MCFG_PALETTE_LENGTH(SEGA315_5124_PALETTE_SIZE)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(sega315_5124_device, sega315_5124)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(sms_state,sms1)
|
||||
MCFG_VIDEO_RESET_OVERRIDE(sms_state,sms1)
|
||||
@ -601,7 +599,6 @@ static MACHINE_CONFIG_START( sms_sdisp, smssdisp_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(sms_state, screen_update_sms)
|
||||
|
||||
MCFG_PALETTE_LENGTH(SEGA315_5124_PALETTE_SIZE)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(sega315_5124_device, sega315_5124)
|
||||
|
||||
MCFG_SEGA315_5246_ADD("sms_vdp", sms_store_intf)
|
||||
MCFG_SEGA315_5246_SET_SCREEN("screen")
|
||||
@ -696,7 +693,6 @@ static MACHINE_CONFIG_DERIVED( sms2_pal, sms_pal_base )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(sms_state, screen_update_sms)
|
||||
|
||||
MCFG_PALETTE_LENGTH(SEGA315_5124_PALETTE_SIZE)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(sega315_5124_device, sega315_5124)
|
||||
|
||||
MCFG_SEGA315_5246_ADD("sms_vdp", _315_5124_pal_intf)
|
||||
MCFG_SEGA315_5246_SET_SCREEN("screen")
|
||||
@ -732,7 +728,6 @@ static MACHINE_CONFIG_DERIVED( sms1_pal, sms_pal_base )
|
||||
MCFG_DEFAULT_LAYOUT(layout_sms1)
|
||||
|
||||
MCFG_PALETTE_LENGTH(SEGA315_5124_PALETTE_SIZE)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(sega315_5124_device, sega315_5124)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(sms_state,sms1)
|
||||
MCFG_VIDEO_RESET_OVERRIDE(sms_state,sms1)
|
||||
@ -785,7 +780,6 @@ static MACHINE_CONFIG_START( gamegear, sms_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(sms_state, screen_update_gamegear)
|
||||
|
||||
MCFG_PALETTE_LENGTH(SEGA315_5378_PALETTE_SIZE)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(sega315_5378_device, sega315_5378)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(sms_state,gamegear)
|
||||
|
||||
|
@ -232,7 +232,6 @@ static MACHINE_CONFIG_START( ti990_10, ti990_10_state )
|
||||
|
||||
MCFG_GFXDECODE(vdt911)
|
||||
MCFG_PALETTE_LENGTH(8)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(vdt911_device, vdt911)
|
||||
|
||||
MCFG_VDT911_VIDEO_ADD("vdt911", vdt911_intf)
|
||||
|
||||
|
@ -264,11 +264,9 @@ static MACHINE_CONFIG_START( ti990_4, ti990_4_state )
|
||||
#if VIDEO_911
|
||||
MCFG_GFXDECODE(vdt911)
|
||||
MCFG_PALETTE_LENGTH(8)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(vdt911_device, vdt911)
|
||||
#else
|
||||
MCFG_GFXDECODE(asr733)
|
||||
MCFG_PALETTE_LENGTH(2)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(asr733_device, asr733)
|
||||
#endif
|
||||
|
||||
#if VIDEO_911
|
||||
|
@ -167,8 +167,7 @@ protected:
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(_blank)) \
|
||||
MCFG_SCREEN_SIZE(_x, _y) \
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, _x - 1, 0, _y - 1) \
|
||||
MCFG_PALETTE_LENGTH(512) \
|
||||
MCFG_PALETTE_INIT_OVERRIDE(v9938_device, v9938)
|
||||
MCFG_PALETTE_LENGTH(512)
|
||||
|
||||
#define MCFG_TI_SOUND_94624_ADD(_tag, _conf) \
|
||||
MCFG_DEVICE_ADD(_tag, TISOUND_94624, 0) \
|
||||
|
@ -763,3 +763,17 @@ void asr733_keyboard(device_t *device)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( asr733 )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(asr733_device, asr733)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor asr733_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( asr733 );
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ protected:
|
||||
virtual void device_config_complete();
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
private:
|
||||
// internal state
|
||||
void *m_token;
|
||||
|
@ -708,3 +708,17 @@ void vdt911_keyboard(device_t *device)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( vdt911 )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(vdt911_device, vdt911)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor vdt911_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( vdt911 );
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_config_complete();
|
||||
virtual void device_start();
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
private:
|
||||
// internal state
|
||||
void *m_token;
|
||||
|
@ -887,6 +887,20 @@ k1ge_device::k1ge_device(const machine_config &mconfig, device_type type, const
|
||||
{
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( k1ge )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(k1ge_device, k1ge)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor k1ge_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( k1ge );
|
||||
}
|
||||
|
||||
|
||||
const device_type K2GE = &device_creator<k2ge_device>;
|
||||
|
||||
@ -894,3 +908,17 @@ k2ge_device::k2ge_device(const machine_config &mconfig, const char *tag, device_
|
||||
: k1ge_device(mconfig, K2GE, "K2GE Color Graphics + LCD", tag, owner, clock, "k2ge", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( k2ge )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(k2ge_device, k2ge)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor k2ge_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( k2ge );
|
||||
}
|
||||
|
@ -40,7 +40,8 @@ public:
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
virtual void device_reset();
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
devcb2_write_line m_vblank_pin_w;
|
||||
devcb2_write_line m_hblank_pin_w;
|
||||
@ -68,6 +69,8 @@ public:
|
||||
|
||||
DECLARE_PALETTE_INIT(k2ge);
|
||||
protected:
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
virtual void draw(int line);
|
||||
|
||||
void draw_scroll_plane( UINT16 *p, UINT16 base, int line, int scroll_x, int scroll_y, UINT16 pal_base );
|
||||
|
Loading…
Reference in New Issue
Block a user