Beispiel #1
0
void tc8830f_device::device_post_load()
{
	device_clock_changed();
}
Beispiel #2
0
void tc8830f_device::write_p(UINT8 data)
{
	m_stream->update();
	data &= 0xf;

	if (m_cmd_rw == 0)
	{
		// select command
		m_command = data;
		switch (m_command)
		{
			// immediate commands
			case 0x1:
				break;

			case 0x2:
				m_playing = true;
				break;

			case 0x3:
				m_playing = false;
				break;

			// multi-nibble commands
			case 0x4: case 0x5: case 0x6: case 0x7:
				m_cmd_rw = 1;
				break;

			case 0x8: case 0x9: case 0xa: case 0xb:
				logerror("tc8830f: Unemulated command %X\n", m_command);
				break;

			default:
				logerror("tc8830f: Invalid command %X\n", m_command);
				break;
		}
	}

	else
	{
		// write command
		switch (m_command)
		{
			case 0x4:
				// ADLD1: set address counter
				m_address = (m_address & ~(0xf << (m_cmd_rw*4))) | (data << (m_cmd_rw*4));
				if (m_cmd_rw == 5)
				{
					m_address &= m_mem_mask;
					m_bitcount = 0;
					m_cmd_rw = -1;
				}
				break;

			case 0x5:
				// ADLD2: set address stop
				m_stop_address = (m_stop_address & ~(0xf << (m_cmd_rw*4))) | (data << (m_cmd_rw*4));
				if (m_cmd_rw == 5)
				{
					m_stop_address &= m_mem_mask;
					m_cmd_rw = -1;
				}
				break;

			case 0x6:
				// CNDT: d0-d1: bitrate, d2: enable overflow
				m_bitrate = data & 3;
				device_clock_changed();
				m_cmd_rw = -1;
				break;

			case 0x7:
				// LABEL: set phrase
				if (m_cmd_rw == 1)
				{
					m_phrase = (m_phrase & 0x30) | data;
				}
				else
				{
					m_phrase = (m_phrase & 0x0f) | (data << 4 & 0x30);

					// update addresses and start
					UINT8 offs = m_phrase * 4;
					m_address = (m_mem_base[offs] | m_mem_base[offs|1]<<8 | m_mem_base[offs|2]<<16) & m_mem_mask;
					offs += 4;
					m_stop_address = (m_mem_base[offs] | m_mem_base[offs|1]<<8 | m_mem_base[offs|2]<<16) & m_mem_mask;

					m_bitcount = 0;
					m_prevbits = 0;
					m_delta = 1;
					m_output = 0;
					m_playing = true;
					m_cmd_rw = -1;
				}
				break;

			default:
				m_cmd_rw = -1;
				break;
		}
		m_cmd_rw++;
	}
}
Beispiel #3
0
void okim6295_device::device_post_load()
{
	set_bank_base(m_bank_offs, true);
	device_clock_changed();
}
Beispiel #4
0
void okim6295_device::set_pin7(int pin7)
{
	m_pin7_state = pin7;
	device_clock_changed();
}
Beispiel #5
0
void okim6295_device::device_post_load()
{
	device_clock_changed();
}