예제 #1
0
파일: polyplay.c 프로젝트: ef1105/mameplus
INPUT_PORTS_END


WRITE8_MEMBER(polyplay_state::polyplay_sound_channel)
{
	switch(offset) {
	case 0x00:
		if (m_channel1_const) {
			if (data <= 1) {
				polyplay_set_channel1(machine(), 0);
			}
			m_channel1_const = 0;
			polyplay_play_channel1(machine(), data*m_prescale1);

		}
		else {
			m_prescale1 = (data & 0x20) ? 16 : 1;
			if (data & 0x04) {
				polyplay_set_channel1(machine(), 1);
				m_channel1_const = 1;
			}
			if ((data == 0x41) || (data == 0x65) || (data == 0x45)) {
				polyplay_set_channel1(machine(), 0);
				polyplay_play_channel1(machine(), 0);
			}
		}
		break;
	case 0x01:
		if (m_channel2_const) {
			if (data <= 1) {
				polyplay_set_channel2(machine(), 0);
			}
			m_channel2_const = 0;
			polyplay_play_channel2(machine(), data*m_prescale2);

		}
		else {
			m_prescale2 = (data & 0x20) ? 16 : 1;
			if (data & 0x04) {
				polyplay_set_channel2(machine(), 1);
				m_channel2_const = 1;
			}
			if ((data == 0x41) || (data == 0x65) || (data == 0x45)) {
				polyplay_set_channel2(machine(), 0);
				polyplay_play_channel2(machine(), 0);
			}
		}
		break;
	}
}
예제 #2
0
INPUT_PORTS_END


static WRITE8_HANDLER( polyplay_sound_channel )
{
	switch(offset) {
	case 0x00:
		if (channel1_const) {
			if (data <= 1) {
				polyplay_set_channel1(0);
			}
			channel1_const = 0;
			polyplay_play_channel1(data*prescale1);

		}
		else {
			prescale1 = (data & 0x20) ? 16 : 1;
			if (data & 0x04) {
				polyplay_set_channel1(1);
				channel1_const = 1;
			}
			if ((data == 0x41) || (data == 0x65) || (data == 0x45)) {
				polyplay_set_channel1(0);
				polyplay_play_channel1(0);
			}
		}
		break;
	case 0x01:
		if (channel2_const) {
			if (data <= 1) {
				polyplay_set_channel2(0);
			}
			channel2_const = 0;
			polyplay_play_channel2(data*prescale2);

		}
		else {
			prescale2 = (data & 0x20) ? 16 : 1;
			if (data & 0x04) {
				polyplay_set_channel2(1);
				channel2_const = 1;
			}
			if ((data == 0x41) || (data == 0x65) || (data == 0x45)) {
				polyplay_set_channel2(0);
				polyplay_play_channel2(0);
			}
		}
		break;
	}
}
예제 #3
0
파일: polyplay.c 프로젝트: ef1105/mameplus
void polyplay_state::machine_reset()
{
	m_channel1_active = 0;
	m_channel1_const = 0;
	m_channel2_active = 0;
	m_channel2_const = 0;

	polyplay_set_channel1(machine(), 0);
	polyplay_play_channel1(machine(), 0);
	polyplay_set_channel2(machine(), 0);
	polyplay_play_channel2(machine(), 0);

	m_timer = machine().device<timer_device>("timer");
}
예제 #4
0
static MACHINE_RESET( polyplay )
{
	channel1_active = 0;
	channel1_const = 0;
	channel2_active = 0;
	channel2_const = 0;

	polyplay_set_channel1(0);
	polyplay_play_channel1(0);
	polyplay_set_channel2(0);
	polyplay_play_channel2(0);

	polyplay_timer = timer_alloc(polyplay_timer_callback, NULL);
}
예제 #5
0
파일: polyplay.c 프로젝트: j4y4r/j4ymame
static MACHINE_RESET( polyplay )
{
	polyplay_state *state = machine.driver_data<polyplay_state>();
	state->m_channel1_active = 0;
	state->m_channel1_const = 0;
	state->m_channel2_active = 0;
	state->m_channel2_const = 0;

	polyplay_set_channel1(machine, 0);
	polyplay_play_channel1(machine, 0);
	polyplay_set_channel2(machine, 0);
	polyplay_play_channel2(machine, 0);

	state->m_timer = machine.device<timer_device>("timer");
}