/*************************************************************************

    invaders.h

*************************************************************************/

#define INVADERS_MASTER_CLOCK			(19968000)
#define INVADERS_CPU_CLOCK			(INVADERS_MASTER_CLOCK / 10)
#define INVADERS_PIXEL_CLOCK			(INVADERS_MASTER_CLOCK / 4)
#define INVADERS_HTOTAL				(0x140)
#define INVADERS_HBEND				(0x000)
#define INVADERS_HBSTART			(0x100)
#define INVADERS_VTOTAL				(0x106)
#define INVADERS_VBEND				(0x000)
#define INVADERS_VBSTART			(0x0e0)
#define INVADERS_VCOUNTER_START_NO_VBLANK	(0x020)
#define INVADERS_VCOUNTER_START_VBLANK		(0x0da)
#define INVADERS_INT_TRIGGER_COUNT_1		(0x080)
#define INVADERS_INT_TRIGGER_VBLANK_1		(0)
#define INVADERS_INT_TRIGGER_COUNT_2		INVADERS_VCOUNTER_START_VBLANK
#define INVADERS_INT_TRIGGER_VBLANK_2		(1)

/* +4 is added to HBSTART because the hardware displays that many pixels after
   setting HBLANK */
#define INVADERS_HPIXCOUNT			(INVADERS_HBSTART + 4)


	/* Dummy port for cocktail mode - equivalent of the jumpers etc on the real machine */
#define INVADERS_CAB(cbit) \
	PORT_START("CAB") \
	PORT_CONFNAME( cbit, 0x00, DEF_STR( Cabinet ) ) \
	PORT_CONFSETTING(    0x00, DEF_STR( Upright ) ) \
	PORT_CONFSETTING(    cbit, DEF_STR( Cocktail ) )

/*----------- defined in drivers/invaders.c -----------*/

extern UINT8 *invaders_colorram;
extern UINT8 *invaders_ram;
extern size_t invaders_ram_size;
extern UINT8 flipscreen;
extern UINT8 color_map;
extern UINT8 screen_red;
extern UINT8 player;
extern UINT8 port_1_last;
extern UINT8 port_2_last;
extern UINT8 fleet_step;

READ8_HANDLER( invaders_02_r );
ADDRESS_MAP_EXTERN( invaders_map, 8 );
MACHINE_DRIVER_EXTERN( invaders_samples_audio );


/*----------- defined in machine/invaders.c -----------*/

MACHINE_START( invaders_common );
MACHINE_RESET( invaders_common );
MACHINE_START( invaders );
MACHINE_START( beaminv );
MACHINE_RESET( beaminv );
SOUND_START( samples );


/*----------- defined in audio/invaders.c -----------*/



/*----------- defined in video/invaders.c -----------*/

VIDEO_UPDATE( invaders );
VIDEO_UPDATE( invadpt2 );
VIDEO_UPDATE( invbw );
VIDEO_UPDATE( beaminv );
VIDEO_UPDATE( rollingc );
VIDEO_UPDATE( rotaryf );
VIDEO_UPDATE( shuttlei );
VIDEO_UPDATE( sstrangr );
VIDEO_UPDATE( sstrngr2 );
