mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
Merge pull request #5689 from cam900/sunsoft_5b
ay8910.cpp : Device-fied sunsoft 5B sound hardware
This commit is contained in:
commit
92f079726e
@ -616,5 +616,5 @@ void nes_sunsoft_5_device::device_add_mconfig(machine_config &config)
|
||||
|
||||
// TODO: this is not how Sunsoft 5B clock signaling works!
|
||||
// The board uses the CLK pin in reality, not hardcoded NTSC values!
|
||||
YM2149(config, m_ym2149, (XTAL(21'477'272)/12)/2).add_route(ALL_OUTPUTS, "addon", 0.50); // divide by 2 for the internal divider
|
||||
SUNSOFT_5B_SOUND(config, m_ym2149, XTAL(21'477'272)/12).add_route(ALL_OUTPUTS, "addon", 0.50);
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user