Example #1
0
UINT32 faceoffh_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
{
	// NMI on coin-in?
	UINT8 coin = (~ioport("INPUTS")->read()) & 0x03;
	m_audiocpu->set_input_line(INPUT_LINE_NMI, coin ? ASSERT_LINE : CLEAR_LINE);

	// Play the digitalker samples (it's not hooked up yet)
	static UINT8 sample = 0, bank = 0;

	if (screen.machine().input().code_pressed_once(KEYCODE_Q))
		--bank;
	if (screen.machine().input().code_pressed_once(KEYCODE_W))
		++bank;
	bank %= 3;
	digitalker_set_bank(bank);

	if (screen.machine().input().code_pressed_once(KEYCODE_A))
		--sample;
	if (screen.machine().input().code_pressed_once(KEYCODE_S))
		++sample;

	if (screen.machine().input().code_pressed_once(KEYCODE_Z))
	{
		m_digitalker->digitalker_0_cms_w(CLEAR_LINE);
		m_digitalker->digitalker_0_cs_w(CLEAR_LINE);

		address_space &space = m_audiocpu->space(AS_PROGRAM);
		m_digitalker->digitalker_data_w(space, 0, sample, 0xff);

		m_digitalker->digitalker_0_wr_w(ASSERT_LINE);
		m_digitalker->digitalker_0_wr_w(CLEAR_LINE);
		m_digitalker->digitalker_0_wr_w(ASSERT_LINE);
	}	

	popmessage("COIN: %02X VIAB: %02X\nCOUNT: %02X %02X LEDS: %02X\nSAMPLE: %02X (B%X)",
				m_coin, m_port_b,
				(m_shift >> 16) & 0xff, (m_shift >> 8) & 0xff, (m_shift >> 0) & 0xff,	// 2 x 7-seg, 3 leds
				sample, bank
	);
	return 0;
}
Example #2
0
void chexx_state::machine_reset()
{
	m_bank = -1;
	digitalker_set_bank(0);
}
Example #3
0
void faceoffh_state::machine_reset()
{
	m_bank = -1;
	digitalker_set_bank(0);
}