summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound
diff options
context:
space:
mode:
author cam900 <dbtlrchl@naver.com>2019-09-27 13:56:55 +0900
committer cam900 <dbtlrchl@naver.com>2019-09-27 13:56:55 +0900
commit379243808b30e78a94576d82f17b07ee43ed2a3d (patch)
treeef5262b1b8b1cdd61ac39143536c7247423fd1c8 /src/devices/sound
parenta0a1148938c33bb74c3725d3c9ea0c65c5b6f0c1 (diff)
ay8910.cpp : Device-fied sunsoft 5B sound hardware
- it has Yamaha volume parameter, single sound output and internal divider. - Developed by Yamaha
Diffstat (limited to 'src/devices/sound')
-rw-r--r--src/devices/sound/ay8910.cpp10
-rw-r--r--src/devices/sound/ay8910.h13
2 files changed, 20 insertions, 3 deletions
diff --git a/src/devices/sound/ay8910.cpp b/src/devices/sound/ay8910.cpp
index 6ae9518c29e..82d32585290 100644
--- a/src/devices/sound/ay8910.cpp
+++ b/src/devices/sound/ay8910.cpp
@@ -1405,7 +1405,7 @@ void ay8910_device::set_volume(int channel,int volume)
void ay8910_device::ay_set_clock(int clock)
{
// FIXME: this doesn't belong here, it should be an input pin exposed via devcb
- if ((m_feature & PSG_PIN26_IS_CLKSEL) && (m_flags & YM2149_PIN26_LOW))
+ if (((m_feature & PSG_PIN26_IS_CLKSEL) && (m_flags & YM2149_PIN26_LOW)) || (m_feature & PSG_HAS_INTERNAL_DIVIDER))
m_channel->set_sample_rate((m_feature & PSG_HAS_EXPANDED_MODE) ? clock : clock / 16);
else
m_channel->set_sample_rate((m_feature & PSG_HAS_EXPANDED_MODE) ? clock * 2 : clock / 8);
@@ -1742,3 +1742,11 @@ ymz294_device::ymz294_device(const machine_config &mconfig, const char *tag, dev
: ay8910_device(mconfig, YMZ294, tag, owner, clock, PSG_TYPE_YM, 1, 0)
{
}
+
+
+DEFINE_DEVICE_TYPE(SUNSOFT_5B_SOUND, sunsoft_5b_sound_device, "sunsoft_5b_sound", "Sunsoft/Yamaha 5B 6630B (Sound)")
+
+sunsoft_5b_sound_device::sunsoft_5b_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : ay8910_device(mconfig, SUNSOFT_5B_SOUND, tag, owner, clock, PSG_TYPE_YM, 1, 0, PSG_HAS_INTERNAL_DIVIDER)
+{
+}
diff --git a/src/devices/sound/ay8910.h b/src/devices/sound/ay8910.h
index 146c1926522..d9af1b6b86f 100644
--- a/src/devices/sound/ay8910.h
+++ b/src/devices/sound/ay8910.h
@@ -66,8 +66,9 @@ public:
{
PSG_DEFAULT = 0x0,
PSG_PIN26_IS_CLKSEL = 0x1,
- PSG_EXTENDED_ENVELOPE = 0x2,
- PSG_HAS_EXPANDED_MODE = 0x4
+ PSG_HAS_INTERNAL_DIVIDER = 0x2,
+ PSG_EXTENDED_ENVELOPE = 0x4,
+ PSG_HAS_EXPANDED_MODE = 0x8
};
// construction/destruction
@@ -389,5 +390,13 @@ public:
DECLARE_DEVICE_TYPE(YMZ294, ymz294_device)
+class sunsoft_5b_sound_device : public ay8910_device
+{
+public:
+ sunsoft_5b_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+};
+
+DECLARE_DEVICE_TYPE(SUNSOFT_5B_SOUND, sunsoft_5b_sound_device)
+
#endif // MAME_DEVICES_SOUND_AY8910_H