1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
// license:BSD-3-Clause
// copyright-holders:Aaron Giles
#include "emu.h"
#include "ymopm.h"
//*********************************************************
// YM2151 DEVICE
//*********************************************************
DEFINE_DEVICE_TYPE(YM2151, ym2151_device, "ym2151", "YM2151 OPM")
//-------------------------------------------------
// ym2151_device - constructor
//-------------------------------------------------
ym2151_device::ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ym2151>(mconfig, tag, owner, clock, YM2151),
m_reset_state(1)
{
}
//-------------------------------------------------
// write/register_w/data_w - write access
//-------------------------------------------------
void ym2151_device::write(offs_t offset, u8 data)
{
if (m_reset_state == 0)
return;
parent::write(offset, data);
}
void ym2151_device::address_w(u8 data)
{
if (m_reset_state == 0)
return;
parent::address_w(data);
}
void ym2151_device::data_w(u8 data)
{
if (m_reset_state == 0)
return;
parent::data_w(data);
}
//-------------------------------------------------
// reset_w - reset line, active LOW
//-------------------------------------------------
WRITE_LINE_MEMBER(ym2151_device::reset_w)
{
if (state != m_reset_state)
{
m_stream->update();
m_reset_state = state;
if (state != 0)
m_chip.reset();
}
}
//*********************************************************
// YM2164 DEVICE
//*********************************************************
DEFINE_DEVICE_TYPE(YM2164, ym2164_device, "ym2164", "YM2164 OPP")
//-------------------------------------------------
// ym2164_device - constructor
//-------------------------------------------------
ym2164_device::ym2164_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ym2164>(mconfig, tag, owner, clock, YM2164)
{
}
|