summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/sspeedr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/sspeedr.cpp')
-rw-r--r--src/mame/drivers/sspeedr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mame/drivers/sspeedr.cpp b/src/mame/drivers/sspeedr.cpp
index c4aa2e021cb..204e9f66eb7 100644
--- a/src/mame/drivers/sspeedr.cpp
+++ b/src/mame/drivers/sspeedr.cpp
@@ -51,7 +51,7 @@ WRITE8_MEMBER(sspeedr_state::sspeedr_lamp_w)
/* uses a 7447A, which is equivalent to an LS47/48 */
-static const UINT8 ls48_map[16] =
+static const uint8_t ls48_map[16] =
{ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67,0x58,0x4c,0x62,0x69,0x78,0x00 };
WRITE8_MEMBER(sspeedr_state::sspeedr_time_w)
='n83' href='#n83'>83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
/*************************************************************************

    Williams/Midway Y/Z-unit system

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

#include "cpu/tms34010/tms34010.h"
#include "audio/williams.h"
#include "machine/nvram.h"
#include "sound/okim6295.h"

/* protection data types */
struct protection_data
{
	UINT16  reset_sequence[3];
	UINT16  data_sequence[100];
};

struct dma_state_t
{
	UINT32      offset;         /* source offset, in bits */
	INT32       rowbytes;       /* source bytes to skip each row */
	INT32       xpos;           /* x position, clipped */
	INT32       ypos;           /* y position, clipped */
	INT32       width;          /* horizontal pixel count */
	INT32       height;         /* vertical pixel count */
	UINT16      palette;        /* palette base */
	UINT16      color;          /* current foreground color with palette */
};


class midyunit_state : public driver_device
{
public:
	enum
	{
		TIMER_DMA,
		TIMER_AUTOERASE_LINE
	};

	midyunit_state(const machine_config &mconfig, device_type type, const char *tag)
		: driver_device(mconfig, type, tag),
			m_maincpu(*this, "maincpu"),
			m_audiocpu(*this, "audiocpu"),
			m_oki(*this, "oki"),
			m_palette(*this, "palette"),
			m_narc_sound(*this, "narcsnd"),
			m_cvsd_sound(*this, "cvsd"),
			m_adpcm_sound(*this, "adpcm"),
			m_generic_paletteram_16(*this, "paletteram"),
			m_gfx_rom(*this, "gfx_rom", 16) { }

	required_device<cpu_device> m_maincpu;
	optional_device<cpu_device> m_audiocpu;
	optional_device<okim6295_device> m_oki;
	required_device<palette_device> m_palette;
	optional_device<williams_narc_sound_device> m_narc_sound;
	optional_device<williams_cvsd_sound_device> m_cvsd_sound;
	optional_device<williams_adpcm_sound_device> m_adpcm_sound;
	
	required_shared_ptr<UINT16> m_generic_paletteram_16;
	optional_shared_ptr<UINT8> m_gfx_rom;

	UINT16 *m_cmos_ram;
	UINT32 m_cmos_page;
	UINT16 m_prot_result;
	UINT16 m_prot_sequence[3];
	UINT8 m_prot_index;
	UINT8 m_term2_analog_select;
	const struct protection_data *m_prot_data;
	UINT8 m_cmos_w_enable;
	UINT8 m_chip_type;
	UINT16 *m_t2_hack_mem;
	UINT8 *m_cvsd_protection_base;
	UINT8 m_autoerase_enable;
	UINT32 m_palette_mask;
	pen_t * m_pen_map;
	UINT16 *    m_local_videoram;
	UINT8 m_videobank_select;
	UINT8 m_yawdim_dma;
	UINT16 m_dma_register[16];
	dma_state_t m_dma_state;
	DECLARE_WRITE16_MEMBER(midyunit_cmos_w);
	DECLARE_READ16_MEMBER(midyunit_cmos_r);
	DECLARE_WRITE16_MEMBER(midyunit_cmos_enable_w);
	DECLARE_READ16_MEMBER(midyunit_protection_r);
	DECLARE_READ16_MEMBER(midyunit_input_r);
	DECLARE_WRITE16_MEMBER(midyunit_sound_w);
	DECLARE_READ16_MEMBER(term2_input_r);
	DECLARE_WRITE16_MEMBER(term2_sound_w);
	DECLARE_WRITE16_MEMBER(term2_hack_w);
	DECLARE_WRITE16_MEMBER(term2la3_hack_w);
	DECLARE_WRITE16_MEMBER(term2la2_hack_w);
	DECLARE_WRITE16_MEMBER(term2la1_hack_w);
	DECLARE_WRITE8_MEMBER(cvsd_protection_w);
	DECLARE_READ16_MEMBER(mkturbo_prot_r);
	DECLARE_READ16_MEMBER(midyunit_gfxrom_r);
	DECLARE_WRITE16_MEMBER(midyunit_vram_w);
	DECLARE_READ16_MEMBER(midyunit_vram_r);
	DECLARE_WRITE16_MEMBER(midyunit_control_w);
	DECLARE_WRITE16_MEMBER(midyunit_paletteram_w);
	DECLARE_READ16_MEMBER(midyunit_dma_r);
	DECLARE_WRITE16_MEMBER(midyunit_dma_w);
	DECLARE_CUSTOM_INPUT_MEMBER(narc_talkback_strobe_r);
	DECLARE_CUSTOM_INPUT_MEMBER(narc_talkback_data_r);
	DECLARE_CUSTOM_INPUT_MEMBER(adpcm_irq_state_r);
	DECLARE_WRITE8_MEMBER(yawdim_oki_bank_w);
	TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg);
	TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg);
	TMS340X0_SCANLINE_IND16_CB_MEMBER(scanline_update);
	DECLARE_DRIVER_INIT(smashtv);
	DECLARE_DRIVER_INIT(strkforc);
	DECLARE_DRIVER_INIT(narc);
	DECLARE_DRIVER_INIT(term2);
	DECLARE_DRIVER_INIT(term2la1);
	DECLARE_DRIVER_INIT(term2la3);
	DECLARE_DRIVER_INIT(mkyunit);
	DECLARE_DRIVER_INIT(trog);
	DECLARE_DRIVER_INIT(totcarn);
	DECLARE_DRIVER_INIT(mkyawdim);
	DECLARE_DRIVER_INIT(shimpact);
	DECLARE_DRIVER_INIT(hiimpact);
	DECLARE_DRIVER_INIT(mkyturbo);
	DECLARE_DRIVER_INIT(term2la2);
	DECLARE_MACHINE_RESET(midyunit);
	DECLARE_VIDEO_START(midzunit);
	DECLARE_VIDEO_START(midyunit_4bit);
	DECLARE_VIDEO_START(midyunit_6bit);
	DECLARE_VIDEO_START(mkyawdim);
	DECLARE_VIDEO_START(common);
	TIMER_CALLBACK_MEMBER(dma_callback);
	TIMER_CALLBACK_MEMBER(autoerase_line);
	
protected:
	virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
	void dma_draw(UINT16 command);
};