Esempio n. 1
0
static void tecmo_adpcm_int()
{
#if 0
	static int adpcm_data = -1;

	if (adpcm_pos >= adpcm_end ||
				adpcm_pos >= get_region_size(REGION_SOUND1))
		MSM5205_reset_w(0,1);
	else if (adpcm_data != -1)
	{
	  MSM5205_data_w(0,adpcm_data & 0x0f);
	  adpcm_data = -1;
	}
	else
	{
	  unsigned char *ROM = load_region[REGION_SOUND1];

	  adpcm_data = ROM[adpcm_pos++];
	  MSM5205_data_w(0,adpcm_data >> 4);
	}
#else
	if (adpcm_end > adpcm_pos) {
	  live_msm_decode(adpcm_pos,adpcm_end-adpcm_pos-1);
	  adpcm_pos++;
	}
#endif
}
Esempio n. 2
0
static void goal92_adpcm_int(int data)
{
	static int toggle = 0;

	MSM5205_data_w (0,msm5205next);
	msm5205next>>=4;

	toggle ^= 1;
	if(toggle)
		cpunum_set_input_line(1, INPUT_LINE_NMI, PULSE_LINE);
}
Esempio n. 3
0
static void toki_adpcm_int (int data)
{
	static int toggle=0;

	MSM5205_data_w (0,msm5205next);
	msm5205next>>=4;

	toggle ^= 1;
	if (toggle)
		cpu_set_nmi_line(1, PULSE_LINE);
}
Esempio n. 4
0
void toki_adpcm_int (int data)
{
	static int toggle=0;

	MSM5205_data_w (0,msm5205next);
	msm5205next>>=4;

	toggle ^= 1;
	if (toggle)
		cpu_cause_interrupt(1,Z80_NMI_INT);
}
Esempio n. 5
0
static void topspeed_msm5205_vck(int chip)
{
	static int adpcm_data = -1;

	if (adpcm_data != -1)
	{
		MSM5205_data_w(0, adpcm_data & 0x0f);
		adpcm_data = -1;
	}
	else
	{
		adpcm_data = memory_region(REGION_SOUND1)[adpcm_pos];
		adpcm_pos = (adpcm_pos + 1) & 0x1ffff;
		MSM5205_data_w(0, adpcm_data >> 4);
	}
}
Esempio n. 6
0
static void opwolf_msm5205_vck(int chip)
{
	static int adpcm_data[2] = { -1, -1 };

	if (adpcm_data[chip] != -1)
	{
		MSM5205_data_w(chip, adpcm_data[chip] & 0x0f);
		adpcm_data[chip] = -1;
		if (adpcm_pos[chip] == adpcm_end[chip])
			MSM5205_reset_w(chip, 1);
	}
	else
	{
		adpcm_data[chip] = memory_region(REGION_SOUND1)[adpcm_pos[chip]];
		adpcm_pos[chip] = (adpcm_pos[chip] + 1) & 0x7ffff;
		MSM5205_data_w(chip, adpcm_data[chip] >> 4);
	}
}
Esempio n. 7
0
static void tecmo_adpcm_int(int num)
{
	static int adpcm_data = -1;

	if (adpcm_pos >= adpcm_end ||
				adpcm_pos >= memory_region_length(REGION_SOUND1))
		MSM5205_reset_w(0,1);
	else if (adpcm_data != -1)
	{
		MSM5205_data_w(0,adpcm_data & 0x0f);
		adpcm_data = -1;
	}
	else
	{
		unsigned char *ROM = memory_region(REGION_SOUND1);

		adpcm_data = ROM[adpcm_pos++];
		MSM5205_data_w(0,adpcm_data >> 4);
	}
}
Esempio n. 8
0
static void idsoccer_adpcm_int(int chip)
{
	static int adpcm_data = -1;

	if (adpcm_pos >= memory_region_length(REGION_SOUND1))
	{
		adpcm_idle = 1;
		MSM5205_reset_w(0, 1);
	}
	else if (adpcm_data != -1)
	{
		MSM5205_data_w(0, adpcm_data & 0x0f);
		adpcm_data = -1;
	}
	else
	{
		adpcm_data = memory_region(REGION_SOUND1)[adpcm_pos++];
		MSM5205_data_w(0, adpcm_data >> 4);
	}
}
Esempio n. 9
0
static void tbowl_adpcm_int(int num)
{
	static int adpcm_data[2] = { -1, -1 };

	if (adpcm_pos[num] >= adpcm_end[num] ||
				adpcm_pos[num] >= memory_region_length(REGION_SOUND1)/2)
		MSM5205_reset_w(num,1);
	else if (adpcm_data[num] != -1)
	{
		MSM5205_data_w(num,adpcm_data[num] & 0x0f);
		adpcm_data[num] = -1;
	}
	else
	{
		unsigned char *ROM = memory_region(REGION_SOUND1) + 0x10000 * num;

		adpcm_data[num] = ROM[adpcm_pos[num]++];
		MSM5205_data_w(num,adpcm_data[num] >> 4);
	}
}
Esempio n. 10
0
static void dd_adpcm_int(int chip)
{
	static int adpcm_data[2] = { -1, -1 };

	if (adpcm_pos[chip] >= adpcm_end[chip] || adpcm_pos[chip] >= 0x10000)
	{
		adpcm_idle[chip] = 1;
		MSM5205_reset_w(chip,1);
	}
	else if (adpcm_data[chip] != -1)
	{
		MSM5205_data_w(chip,adpcm_data[chip] & 0x0f);
		adpcm_data[chip] = -1;
	}
	else
	{
		unsigned char *ROM = memory_region(REGION_SOUND1) + 0x10000 * chip;

		adpcm_data[chip] = ROM[adpcm_pos[chip]++];
		MSM5205_data_w(chip,adpcm_data[chip] >> 4);
	}
}
Esempio n. 11
0
static WRITE8_HANDLER( adpcm_data_w )
{
	MSM5205_data_w(0, data & 0xf);
	MSM5205_data_w(0, data>>4);
}
Esempio n. 12
0
void gsword_adpcm_data_w(int offset, int data)
{
	MSM5205_data_w (0,data & 0x0f); /* bit 0..3 */
	MSM5205_reset_w(0,(data>>5)&1); /* bit 5    */
	MSM5205_vclk_w(0,(data>>4)&1);  /* bit 4    */
}
Esempio n. 13
0
static WRITE8_HANDLER( adpcm_data_w )
{
	MSM5205_data_w(0,data);
}