summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound')
-rw-r--r--src/devices/sound/315-5641.cpp2
-rw-r--r--src/devices/sound/315-5641.h2
-rw-r--r--src/devices/sound/ad1848.cpp6
-rw-r--r--src/devices/sound/ad1848.h2
-rw-r--r--src/devices/sound/aica.cpp2
-rw-r--r--src/devices/sound/aica.h2
-rw-r--r--src/devices/sound/asc.cpp2
-rw-r--r--src/devices/sound/asc.h4
-rw-r--r--src/devices/sound/astrocde.cpp2
-rw-r--r--src/devices/sound/astrocde.h2
-rw-r--r--src/devices/sound/awacs.cpp2
-rw-r--r--src/devices/sound/awacs.h2
-rw-r--r--src/devices/sound/ay8910.cpp26
-rw-r--r--src/devices/sound/ay8910.h24
-rw-r--r--src/devices/sound/bbd.cpp12
-rw-r--r--src/devices/sound/bbd.h12
-rw-r--r--src/devices/sound/beep.cpp2
-rw-r--r--src/devices/sound/beep.h2
-rw-r--r--src/devices/sound/bsmt2000.cpp2
-rw-r--r--src/devices/sound/bsmt2000.h2
-rw-r--r--src/devices/sound/c140.cpp6
-rw-r--r--src/devices/sound/c140.h6
-rw-r--r--src/devices/sound/c352.cpp2
-rw-r--r--src/devices/sound/c352.h4
-rw-r--r--src/devices/sound/c6280.cpp2
-rw-r--r--src/devices/sound/c6280.h2
-rw-r--r--src/devices/sound/cdda.cpp2
-rw-r--r--src/devices/sound/cdda.h2
-rw-r--r--src/devices/sound/cdp1863.cpp2
-rw-r--r--src/devices/sound/cdp1863.h2
-rw-r--r--src/devices/sound/cdp1864.cpp2
-rw-r--r--src/devices/sound/cdp1864.h2
-rw-r--r--src/devices/sound/cdp1869.cpp2
-rw-r--r--src/devices/sound/cdp1869.h4
-rw-r--r--src/devices/sound/cem3394.cpp2
-rw-r--r--src/devices/sound/cem3394.h2
-rw-r--r--src/devices/sound/dac.cpp2
-rw-r--r--src/devices/sound/dac.h10
-rw-r--r--src/devices/sound/dac76.cpp2
-rw-r--r--src/devices/sound/dac76.h2
-rw-r--r--src/devices/sound/dave.cpp2
-rw-r--r--src/devices/sound/dave.h2
-rw-r--r--src/devices/sound/digitalk.cpp2
-rw-r--r--src/devices/sound/digitalk.h2
-rw-r--r--src/devices/sound/discrete.cpp4
-rw-r--r--src/devices/sound/discrete.h8
-rw-r--r--src/devices/sound/dmadac.cpp2
-rw-r--r--src/devices/sound/dmadac.h2
-rw-r--r--src/devices/sound/dspv.cpp2
-rw-r--r--src/devices/sound/dspv.h2
-rw-r--r--src/devices/sound/es1373.cpp2
-rw-r--r--src/devices/sound/es1373.h2
-rw-r--r--src/devices/sound/es5503.cpp2
-rw-r--r--src/devices/sound/es5503.h2
-rw-r--r--src/devices/sound/es5506.cpp6
-rw-r--r--src/devices/sound/es5506.h6
-rw-r--r--src/devices/sound/es8712.cpp4
-rw-r--r--src/devices/sound/es8712.h2
-rw-r--r--src/devices/sound/esqpump.cpp2
-rw-r--r--src/devices/sound/esqpump.h2
-rw-r--r--src/devices/sound/flt_biquad.cpp2
-rw-r--r--src/devices/sound/flt_biquad.h2
-rw-r--r--src/devices/sound/flt_rc.cpp2
-rw-r--r--src/devices/sound/flt_rc.h4
-rw-r--r--src/devices/sound/flt_vol.cpp2
-rw-r--r--src/devices/sound/flt_vol.h2
-rw-r--r--src/devices/sound/gaelco.cpp6
-rw-r--r--src/devices/sound/gaelco.h6
-rw-r--r--src/devices/sound/gb.cpp6
-rw-r--r--src/devices/sound/gb.h8
-rw-r--r--src/devices/sound/hc55516.cpp14
-rw-r--r--src/devices/sound/hc55516.h14
-rw-r--r--src/devices/sound/huc6230.cpp2
-rw-r--r--src/devices/sound/huc6230.h2
-rw-r--r--src/devices/sound/i5000.cpp2
-rw-r--r--src/devices/sound/i5000.h2
-rw-r--r--src/devices/sound/ics2115.cpp2
-rw-r--r--src/devices/sound/ics2115.h2
-rw-r--r--src/devices/sound/iopspu.cpp2
-rw-r--r--src/devices/sound/iopspu.h4
-rw-r--r--src/devices/sound/iremga20.cpp2
-rw-r--r--src/devices/sound/iremga20.h2
-rw-r--r--src/devices/sound/k005289.cpp2
-rw-r--r--src/devices/sound/k005289.h2
-rw-r--r--src/devices/sound/k007232.cpp2
-rw-r--r--src/devices/sound/k007232.h2
-rw-r--r--src/devices/sound/k051649.cpp2
-rw-r--r--src/devices/sound/k051649.h2
-rw-r--r--src/devices/sound/k053260.cpp2
-rw-r--r--src/devices/sound/k053260.h2
-rw-r--r--src/devices/sound/k054539.cpp2
-rw-r--r--src/devices/sound/k054539.h2
-rw-r--r--src/devices/sound/k056800.cpp2
-rw-r--r--src/devices/sound/k056800.h2
-rw-r--r--src/devices/sound/ks0164.cpp2
-rw-r--r--src/devices/sound/ks0164.h2
-rw-r--r--src/devices/sound/l7a1045_l6028_dsp_a.cpp2
-rw-r--r--src/devices/sound/l7a1045_l6028_dsp_a.h2
-rw-r--r--src/devices/sound/lc7535.cpp2
-rw-r--r--src/devices/sound/lc7535.h2
-rw-r--r--src/devices/sound/lmc1992.cpp2
-rw-r--r--src/devices/sound/lmc1992.h2
-rw-r--r--src/devices/sound/lynx.cpp6
-rw-r--r--src/devices/sound/lynx.h6
-rw-r--r--src/devices/sound/mas3507d.cpp2
-rw-r--r--src/devices/sound/mas3507d.h2
-rw-r--r--src/devices/sound/mea8000.cpp2
-rw-r--r--src/devices/sound/mea8000.h2
-rw-r--r--src/devices/sound/meg.cpp6
-rw-r--r--src/devices/sound/meg.h6
-rw-r--r--src/devices/sound/mixer.cpp2
-rw-r--r--src/devices/sound/mixer.h2
-rw-r--r--src/devices/sound/mm5837.cpp4
-rw-r--r--src/devices/sound/mm5837.h4
-rw-r--r--src/devices/sound/mos6560.cpp8
-rw-r--r--src/devices/sound/mos6560.h12
-rw-r--r--src/devices/sound/mos6581.cpp6
-rw-r--r--src/devices/sound/mos6581.h6
-rw-r--r--src/devices/sound/mos7360.cpp2
-rw-r--r--src/devices/sound/mos7360.h2
-rw-r--r--src/devices/sound/msm5205.cpp6
-rw-r--r--src/devices/sound/msm5205.h6
-rw-r--r--src/devices/sound/msm5232.cpp2
-rw-r--r--src/devices/sound/msm5232.h4
-rw-r--r--src/devices/sound/multipcm.cpp2
-rw-r--r--src/devices/sound/multipcm.h2
-rw-r--r--src/devices/sound/n63701x.cpp2
-rw-r--r--src/devices/sound/n63701x.h2
-rw-r--r--src/devices/sound/namco.cpp8
-rw-r--r--src/devices/sound/namco.h8
-rw-r--r--src/devices/sound/namco_163.cpp2
-rw-r--r--src/devices/sound/namco_163.h2
-rw-r--r--src/devices/sound/nes_apu.cpp4
-rw-r--r--src/devices/sound/nes_apu.h6
-rw-r--r--src/devices/sound/nes_apu_vt.cpp2
-rw-r--r--src/devices/sound/nes_apu_vt.h2
-rw-r--r--src/devices/sound/okim6258.cpp2
-rw-r--r--src/devices/sound/okim6258.h2
-rw-r--r--src/devices/sound/okim6295.cpp2
-rw-r--r--src/devices/sound/okim6295.h4
-rw-r--r--src/devices/sound/okim6376.cpp6
-rw-r--r--src/devices/sound/okim6376.h6
-rw-r--r--src/devices/sound/okim9810.cpp2
-rw-r--r--src/devices/sound/okim9810.h2
-rw-r--r--src/devices/sound/pcd3311.cpp2
-rw-r--r--src/devices/sound/pcd3311.h2
-rw-r--r--src/devices/sound/pci-ac97.cpp2
-rw-r--r--src/devices/sound/pci-ac97.h4
-rw-r--r--src/devices/sound/pokey.cpp2
-rw-r--r--src/devices/sound/pokey.h4
-rw-r--r--src/devices/sound/qs1000.cpp2
-rw-r--r--src/devices/sound/qs1000.h2
-rw-r--r--src/devices/sound/qsound.cpp2
-rw-r--r--src/devices/sound/qsound.h2
-rw-r--r--src/devices/sound/qsoundhle.cpp2
-rw-r--r--src/devices/sound/qsoundhle.h2
-rw-r--r--src/devices/sound/rf5c400.cpp2
-rw-r--r--src/devices/sound/rf5c400.h2
-rw-r--r--src/devices/sound/rf5c68.cpp6
-rw-r--r--src/devices/sound/rf5c68.h6
-rw-r--r--src/devices/sound/rolandpcm.cpp2
-rw-r--r--src/devices/sound/rolandpcm.h2
-rw-r--r--src/devices/sound/rp2c33_snd.cpp2
-rw-r--r--src/devices/sound/rp2c33_snd.h2
-rw-r--r--src/devices/sound/s14001a.cpp2
-rw-r--r--src/devices/sound/s14001a.h2
-rw-r--r--src/devices/sound/s_dsp.cpp2
-rw-r--r--src/devices/sound/s_dsp.h2
-rw-r--r--src/devices/sound/saa1099.cpp2
-rw-r--r--src/devices/sound/saa1099.h2
-rw-r--r--src/devices/sound/samples.cpp4
-rw-r--r--src/devices/sound/samples.h4
-rw-r--r--src/devices/sound/sb0400.cpp2
-rw-r--r--src/devices/sound/sb0400.h4
-rw-r--r--src/devices/sound/scsp.cpp2
-rw-r--r--src/devices/sound/scsp.h2
-rw-r--r--src/devices/sound/segapcm.cpp2
-rw-r--r--src/devices/sound/segapcm.h2
-rw-r--r--src/devices/sound/setapcm.cpp6
-rw-r--r--src/devices/sound/setapcm.h6
-rw-r--r--src/devices/sound/sn76477.cpp2
-rw-r--r--src/devices/sound/sn76477.h2
-rw-r--r--src/devices/sound/sn76496.cpp20
-rw-r--r--src/devices/sound/sn76496.h22
-rw-r--r--src/devices/sound/snkwave.cpp2
-rw-r--r--src/devices/sound/snkwave.h2
-rw-r--r--src/devices/sound/sp0250.cpp2
-rw-r--r--src/devices/sound/sp0250.h2
-rw-r--r--src/devices/sound/sp0256.cpp2
-rw-r--r--src/devices/sound/sp0256.h2
-rw-r--r--src/devices/sound/spkrdev.cpp2
-rw-r--r--src/devices/sound/spkrdev.h2
-rw-r--r--src/devices/sound/spu.cpp4
-rw-r--r--src/devices/sound/spu.h4
-rw-r--r--src/devices/sound/st0016.cpp2
-rw-r--r--src/devices/sound/st0016.h2
-rw-r--r--src/devices/sound/swp00.cpp2
-rw-r--r--src/devices/sound/swp00.h2
-rw-r--r--src/devices/sound/swp20.cpp2
-rw-r--r--src/devices/sound/swp20.h2
-rw-r--r--src/devices/sound/swp30.cpp2
-rw-r--r--src/devices/sound/swp30.h2
-rw-r--r--src/devices/sound/t6721a.cpp2
-rw-r--r--src/devices/sound/t6721a.h2
-rw-r--r--src/devices/sound/t6w28.cpp2
-rw-r--r--src/devices/sound/t6w28.h2
-rw-r--r--src/devices/sound/ta7630.cpp2
-rw-r--r--src/devices/sound/ta7630.h2
-rw-r--r--src/devices/sound/tc8830f.cpp2
-rw-r--r--src/devices/sound/tc8830f.h2
-rw-r--r--src/devices/sound/tiaintf.cpp2
-rw-r--r--src/devices/sound/tiaintf.h2
-rw-r--r--src/devices/sound/tms3615.cpp2
-rw-r--r--src/devices/sound/tms3615.h2
-rw-r--r--src/devices/sound/tms36xx.cpp2
-rw-r--r--src/devices/sound/tms36xx.h2
-rw-r--r--src/devices/sound/tms5110.cpp22
-rw-r--r--src/devices/sound/tms5110.h22
-rw-r--r--src/devices/sound/tms5220.cpp12
-rw-r--r--src/devices/sound/tms5220.h12
-rw-r--r--src/devices/sound/tt5665.cpp2
-rw-r--r--src/devices/sound/tt5665.h4
-rw-r--r--src/devices/sound/uda1344.cpp2
-rw-r--r--src/devices/sound/uda1344.h2
-rw-r--r--src/devices/sound/upd1771.cpp2
-rw-r--r--src/devices/sound/upd1771.h2
-rw-r--r--src/devices/sound/upd7752.cpp2
-rw-r--r--src/devices/sound/upd7752.h2
-rw-r--r--src/devices/sound/upd7759.cpp10
-rw-r--r--src/devices/sound/upd7759.h12
-rw-r--r--src/devices/sound/upd934g.cpp2
-rw-r--r--src/devices/sound/upd934g.h2
-rw-r--r--src/devices/sound/vgm_visualizer.cpp2
-rw-r--r--src/devices/sound/vgm_visualizer.h6
-rw-r--r--src/devices/sound/vlm5030.cpp2
-rw-r--r--src/devices/sound/vlm5030.h2
-rw-r--r--src/devices/sound/votrax.cpp2
-rw-r--r--src/devices/sound/votrax.h2
-rw-r--r--src/devices/sound/vrc6.cpp2
-rw-r--r--src/devices/sound/vrc6.h2
-rw-r--r--src/devices/sound/vrender0.cpp2
-rw-r--r--src/devices/sound/vrender0.h2
-rw-r--r--src/devices/sound/wave.cpp2
-rw-r--r--src/devices/sound/wave.h4
-rw-r--r--src/devices/sound/x1_010.cpp2
-rw-r--r--src/devices/sound/x1_010.h2
-rw-r--r--src/devices/sound/xt446.cpp2
-rw-r--r--src/devices/sound/xt446.h2
-rw-r--r--src/devices/sound/ym2154.cpp2
-rw-r--r--src/devices/sound/ym2154.h2
-rw-r--r--src/devices/sound/ymf271.cpp2
-rw-r--r--src/devices/sound/ymf271.h2
-rw-r--r--src/devices/sound/ymfm_mame.h10
-rw-r--r--src/devices/sound/ymopl.cpp18
-rw-r--r--src/devices/sound/ymopl.h18
-rw-r--r--src/devices/sound/ymopm.cpp4
-rw-r--r--src/devices/sound/ymopm.h4
-rw-r--r--src/devices/sound/ymopn.cpp16
-rw-r--r--src/devices/sound/ymopn.h16
-rw-r--r--src/devices/sound/ymopq.cpp4
-rw-r--r--src/devices/sound/ymopq.h4
-rw-r--r--src/devices/sound/ymopz.cpp2
-rw-r--r--src/devices/sound/ymopz.h2
-rw-r--r--src/devices/sound/ymz280b.cpp6
-rw-r--r--src/devices/sound/ymz280b.h4
-rw-r--r--src/devices/sound/ymz770.cpp6
-rw-r--r--src/devices/sound/ymz770.h6
-rw-r--r--src/devices/sound/zsg2.cpp2
-rw-r--r--src/devices/sound/zsg2.h2
269 files changed, 508 insertions, 512 deletions
diff --git a/src/devices/sound/315-5641.cpp b/src/devices/sound/315-5641.cpp
index 7b5f06b0d8b..3836794f5f7 100644
--- a/src/devices/sound/315-5641.cpp
+++ b/src/devices/sound/315-5641.cpp
@@ -7,7 +7,7 @@
DEFINE_DEVICE_TYPE(SEGA_315_5641_PCM, sega_315_5641_pcm_device, "315_5641_pcm", "Sega 315-5641 PCM")
-sega_315_5641_pcm_device::sega_315_5641_pcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sega_315_5641_pcm_device::sega_315_5641_pcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: upd7759_device(mconfig, SEGA_315_5641_PCM, tag, owner, clock)
, m_fifocallback(*this)
, m_fifo_read(0)
diff --git a/src/devices/sound/315-5641.h b/src/devices/sound/315-5641.h
index 2f986a912f0..7631a376298 100644
--- a/src/devices/sound/315-5641.h
+++ b/src/devices/sound/315-5641.h
@@ -16,7 +16,7 @@
class sega_315_5641_pcm_device : public upd7759_device
{
public:
- sega_315_5641_pcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sega_315_5641_pcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto fifo_cb() { return m_fifocallback.bind(); }
virtual void port_w(u8 data) override;
diff --git a/src/devices/sound/ad1848.cpp b/src/devices/sound/ad1848.cpp
index 7c62b4912ef..983eede0d5f 100644
--- a/src/devices/sound/ad1848.cpp
+++ b/src/devices/sound/ad1848.cpp
@@ -12,7 +12,7 @@
DEFINE_DEVICE_TYPE(AD1848, ad1848_device, "ad1848", "AD1848 16-bit SoundPort Stereo Codec")
-ad1848_device::ad1848_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ad1848_device::ad1848_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, AD1848, tag, owner, clock),
m_irq_cb(*this),
m_drq_cb(*this),
@@ -25,8 +25,8 @@ void ad1848_device::device_add_mconfig(machine_config &config)
{
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- DAC_16BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC
- DAC_16BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC
+ DAC_16BIT_R2R(config, m_ldac).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC
+ DAC_16BIT_R2R(config, m_rdac).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC
}
diff --git a/src/devices/sound/ad1848.h b/src/devices/sound/ad1848.h
index 1fd354c3427..1524119fde1 100644
--- a/src/devices/sound/ad1848.h
+++ b/src/devices/sound/ad1848.h
@@ -11,7 +11,7 @@
class ad1848_device : public device_t
{
public:
- ad1848_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ad1848_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto irq() { return m_irq_cb.bind(); }
auto drq() { return m_drq_cb.bind(); }
diff --git a/src/devices/sound/aica.cpp b/src/devices/sound/aica.cpp
index a746f80eae0..8fdb58f169f 100644
--- a/src/devices/sound/aica.cpp
+++ b/src/devices/sound/aica.cpp
@@ -1538,7 +1538,7 @@ u8 aica_device::midi_out_r()
DEFINE_DEVICE_TYPE(AICA, aica_device, "aica", "Yamaha AICA")
-aica_device::aica_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+aica_device::aica_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, AICA, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_memory_interface(mconfig, *this)
diff --git a/src/devices/sound/aica.h b/src/devices/sound/aica.h
index 09a042b1aad..01c208e134f 100644
--- a/src/devices/sound/aica.h
+++ b/src/devices/sound/aica.h
@@ -19,7 +19,7 @@ class aica_device : public device_t, public device_sound_interface, public devic
public:
static constexpr feature_type imperfect_features() { return feature::SOUND; }
- aica_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ aica_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto irq() { return m_irq_cb.bind(); }
auto main_irq() { return m_main_irq_cb.bind(); }
diff --git a/src/devices/sound/asc.cpp b/src/devices/sound/asc.cpp
index 2216b38f328..2bb61779166 100644
--- a/src/devices/sound/asc.cpp
+++ b/src/devices/sound/asc.cpp
@@ -49,7 +49,7 @@ DEFINE_DEVICE_TYPE(ASC, asc_device, "asc", "ASC")
// asc_device - constructor
//-------------------------------------------------
-asc_device::asc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+asc_device::asc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, ASC, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, write_irq(*this)
diff --git a/src/devices/sound/asc.h b/src/devices/sound/asc.h
index 591c95d71af..b5bea7e4ca2 100644
--- a/src/devices/sound/asc.h
+++ b/src/devices/sound/asc.h
@@ -36,13 +36,13 @@ public:
ARDBEG = 7 // Subset of ASC included in the Ardbeg ASIC (LC520)
};
- asc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, asc_type type)
+ asc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, asc_type type)
: asc_device(mconfig, tag, owner, clock)
{
set_type(type);
}
- asc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ asc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
static constexpr feature_type imperfect_features() { return feature::SOUND; }
diff --git a/src/devices/sound/astrocde.cpp b/src/devices/sound/astrocde.cpp
index 91d0fdc46b9..27c8303c682 100644
--- a/src/devices/sound/astrocde.cpp
+++ b/src/devices/sound/astrocde.cpp
@@ -69,7 +69,7 @@ DEFINE_DEVICE_TYPE(ASTROCADE_IO, astrocade_io_device, "astrocade_io", "Astrocade
// astrocade_io_device - constructor
//-------------------------------------------------
-astrocade_io_device::astrocade_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+astrocade_io_device::astrocade_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, ASTROCADE_IO, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_stream(nullptr)
diff --git a/src/devices/sound/astrocde.h b/src/devices/sound/astrocde.h
index 387ef7f9ca3..a57f0ddbf86 100644
--- a/src/devices/sound/astrocde.h
+++ b/src/devices/sound/astrocde.h
@@ -44,7 +44,7 @@
class astrocade_io_device : public device_t, public device_sound_interface
{
public:
- astrocade_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ astrocade_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration access
auto si_cb() { return m_si_callback.bind(); }
diff --git a/src/devices/sound/awacs.cpp b/src/devices/sound/awacs.cpp
index 07ec04e4f14..0ca84b66323 100644
--- a/src/devices/sound/awacs.cpp
+++ b/src/devices/sound/awacs.cpp
@@ -27,7 +27,7 @@ const u8 awacs_device::divider[4] = { 16, 12, 8, 16 };
// awacs_device - constructor
//-------------------------------------------------
-awacs_device::awacs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+awacs_device::awacs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, AWACS, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_irq_out_cb(*this)
diff --git a/src/devices/sound/awacs.h b/src/devices/sound/awacs.h
index a1c17f1aa10..656cc7a814e 100644
--- a/src/devices/sound/awacs.h
+++ b/src/devices/sound/awacs.h
@@ -23,7 +23,7 @@ class awacs_device : public device_t, public device_sound_interface
{
public:
// construction/destruction
- awacs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ awacs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto irq_out_cb() { return m_irq_out_cb.bind(); }
auto irq_in_cb() { return m_irq_in_cb.bind(); }
diff --git a/src/devices/sound/ay8910.cpp b/src/devices/sound/ay8910.cpp
index 1f0acab67d7..98e2309adc4 100644
--- a/src/devices/sound/ay8910.cpp
+++ b/src/devices/sound/ay8910.cpp
@@ -1302,7 +1302,7 @@ void ay8910_device::ay8910_statesave()
void ay8910_device::device_start()
{
- const int master_clock = clock();
+ const XTAL master_clock = clock();
if (m_ioports < 1 && !(m_port_a_read_cb.isnull() && m_port_a_write_cb.isnull()))
fatalerror("Device '%s' is a %s and has no port A!", tag(), name());
@@ -1378,7 +1378,7 @@ void ay8910_device::set_volume(int channel,int volume)
set_output_gain(ch, volume / 100.0);
}
-void ay8910_device::ay_set_clock(int clock)
+void ay8910_device::ay_set_clock(const XTAL &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)) || (m_feature & PSG_HAS_INTERNAL_DIVIDER))
@@ -1588,12 +1588,12 @@ void ay8914_device::write(offs_t offset, u8 data)
DEFINE_DEVICE_TYPE(AY8910, ay8910_device, "ay8910", "AY-3-8910A PSG")
-ay8910_device::ay8910_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ay8910_device::ay8910_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: ay8910_device(mconfig, AY8910, tag, owner, clock, PSG_TYPE_AY, 3, 2)
{
}
-ay8910_device::ay8910_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock,
+ay8910_device::ay8910_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock,
psg_type_t psg_type, int streams, int ioports, int feature)
: device_t(mconfig, type, tag, owner, clock),
device_sound_interface(mconfig, *this),
@@ -1658,7 +1658,7 @@ void ay8910_device::set_type(psg_type_t psg_type)
DEFINE_DEVICE_TYPE(AY8912, ay8912_device, "ay8912", "AY-3-8912A PSG")
-ay8912_device::ay8912_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ay8912_device::ay8912_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: ay8910_device(mconfig, AY8912, tag, owner, clock, PSG_TYPE_AY, 3, 1)
{
}
@@ -1666,7 +1666,7 @@ ay8912_device::ay8912_device(const machine_config &mconfig, const char *tag, dev
DEFINE_DEVICE_TYPE(AY8913, ay8913_device, "ay8913", "AY-3-8913 PSG")
-ay8913_device::ay8913_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ay8913_device::ay8913_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: ay8910_device(mconfig, AY8913, tag, owner, clock, PSG_TYPE_AY, 3, 0)
{
}
@@ -1674,7 +1674,7 @@ ay8913_device::ay8913_device(const machine_config &mconfig, const char *tag, dev
DEFINE_DEVICE_TYPE(AY8914, ay8914_device, "ay8914", "AY-3-8914A PSG")
-ay8914_device::ay8914_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ay8914_device::ay8914_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: ay8910_device(mconfig, AY8914, tag, owner, clock, PSG_TYPE_AY, 3, 2, PSG_EXTENDED_ENVELOPE)
{
}
@@ -1682,7 +1682,7 @@ ay8914_device::ay8914_device(const machine_config &mconfig, const char *tag, dev
DEFINE_DEVICE_TYPE(AY8930, ay8930_device, "ay8930", "AY8930 EPSG")
-ay8930_device::ay8930_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ay8930_device::ay8930_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: ay8910_device(mconfig, AY8930, tag, owner, clock, PSG_TYPE_YM, 3, 2, PSG_PIN26_IS_CLKSEL | PSG_HAS_EXPANDED_MODE)
{
}
@@ -1690,7 +1690,7 @@ ay8930_device::ay8930_device(const machine_config &mconfig, const char *tag, dev
DEFINE_DEVICE_TYPE(YM2149, ym2149_device, "ym2149", "YM2149 SSG")
-ym2149_device::ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ym2149_device::ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: ay8910_device(mconfig, YM2149, tag, owner, clock, PSG_TYPE_YM, 3, 2, PSG_PIN26_IS_CLKSEL)
{
}
@@ -1698,7 +1698,7 @@ ym2149_device::ym2149_device(const machine_config &mconfig, const char *tag, dev
DEFINE_DEVICE_TYPE(YM3439, ym3439_device, "ym3439", "YM3439 SSGC")
-ym3439_device::ym3439_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ym3439_device::ym3439_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: ay8910_device(mconfig, YM3439, tag, owner, clock, PSG_TYPE_YM, 3, 2, PSG_PIN26_IS_CLKSEL)
{
}
@@ -1706,7 +1706,7 @@ ym3439_device::ym3439_device(const machine_config &mconfig, const char *tag, dev
DEFINE_DEVICE_TYPE(YMZ284, ymz284_device, "ymz284", "YMZ284 SSGL")
-ymz284_device::ymz284_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ymz284_device::ymz284_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: ay8910_device(mconfig, YMZ284, tag, owner, clock, PSG_TYPE_YM, 1, 0)
{
}
@@ -1714,7 +1714,7 @@ ymz284_device::ymz284_device(const machine_config &mconfig, const char *tag, dev
DEFINE_DEVICE_TYPE(YMZ294, ymz294_device, "ymz294", "YMZ294 SSGLP")
-ymz294_device::ymz294_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ymz294_device::ymz294_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: ay8910_device(mconfig, YMZ294, tag, owner, clock, PSG_TYPE_YM, 1, 0)
{
}
@@ -1722,7 +1722,7 @@ ymz294_device::ymz294_device(const machine_config &mconfig, const char *tag, dev
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)
+sunsoft_5b_sound_device::sunsoft_5b_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &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 e17c5e1f367..8e236896c42 100644
--- a/src/devices/sound/ay8910.h
+++ b/src/devices/sound/ay8910.h
@@ -72,7 +72,7 @@ public:
};
// construction/destruction
- ay8910_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ ay8910_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers
void set_flags(int flags) { m_flags = flags; }
@@ -109,7 +109,7 @@ public:
void write_bc1_bc2(offs_t offset, u8 data);
void set_volume(int channel,int volume);
- void ay_set_clock(int clock);
+ void ay_set_clock(const XTAL &clock);
struct ay_ym_param
{
@@ -132,7 +132,7 @@ public:
protected:
ay8910_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner,
- u32 clock, psg_type_t psg_type, int streams, int ioports, int feature = PSG_DEFAULT);
+ const XTAL &clock, psg_type_t psg_type, int streams, int ioports, int feature = PSG_DEFAULT);
// device-level overrides
virtual void device_start() override;
@@ -341,7 +341,7 @@ DECLARE_DEVICE_TYPE(AY8910, ay8910_device)
class ay8912_device : public ay8910_device
{
public:
- ay8912_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ ay8912_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
DECLARE_DEVICE_TYPE(AY8912, ay8912_device)
@@ -349,7 +349,7 @@ DECLARE_DEVICE_TYPE(AY8912, ay8912_device)
class ay8913_device : public ay8910_device
{
public:
- ay8913_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ ay8913_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
DECLARE_DEVICE_TYPE(AY8913, ay8913_device)
@@ -357,7 +357,7 @@ DECLARE_DEVICE_TYPE(AY8913, ay8913_device)
class ay8914_device : public ay8910_device
{
public:
- ay8914_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ ay8914_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// AY8914 handlers needed due to different register map
u8 read(offs_t offset);
@@ -369,7 +369,7 @@ DECLARE_DEVICE_TYPE(AY8914, ay8914_device)
class ay8930_device : public ay8910_device
{
public:
- ay8930_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ ay8930_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
DECLARE_DEVICE_TYPE(AY8930, ay8930_device)
@@ -377,7 +377,7 @@ DECLARE_DEVICE_TYPE(AY8930, ay8930_device)
class ym2149_device : public ay8910_device
{
public:
- ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ ym2149_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
DECLARE_DEVICE_TYPE(YM2149, ym2149_device)
@@ -385,7 +385,7 @@ DECLARE_DEVICE_TYPE(YM2149, ym2149_device)
class ym3439_device : public ay8910_device
{
public:
- ym3439_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ ym3439_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
DECLARE_DEVICE_TYPE(YM3439, ym3439_device)
@@ -393,7 +393,7 @@ DECLARE_DEVICE_TYPE(YM3439, ym3439_device)
class ymz284_device : public ay8910_device
{
public:
- ymz284_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ ymz284_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
DECLARE_DEVICE_TYPE(YMZ284, ymz284_device)
@@ -401,7 +401,7 @@ DECLARE_DEVICE_TYPE(YMZ284, ymz284_device)
class ymz294_device : public ay8910_device
{
public:
- ymz294_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ ymz294_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
DECLARE_DEVICE_TYPE(YMZ294, ymz294_device)
@@ -409,7 +409,7 @@ 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);
+ sunsoft_5b_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
DECLARE_DEVICE_TYPE(SUNSOFT_5B_SOUND, sunsoft_5b_sound_device)
diff --git a/src/devices/sound/bbd.cpp b/src/devices/sound/bbd.cpp
index e270108b04e..ef5433c49ef 100644
--- a/src/devices/sound/bbd.cpp
+++ b/src/devices/sound/bbd.cpp
@@ -13,7 +13,7 @@
//-------------------------------------------------
template<int Entries, int Outputs>
-bbd_device_base<Entries, Outputs>::bbd_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) :
+bbd_device_base<Entries, Outputs>::bbd_device_base(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type) :
device_t(mconfig, type, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
@@ -37,7 +37,7 @@ void bbd_device_base<Entries, Outputs>::device_start()
if (m_cv_handler.isnull())
m_stream = stream_alloc(1, Outputs, sample_rate());
else
- m_stream = stream_alloc(1, Outputs, SAMPLE_RATE_OUTPUT_ADAPTIVE, STREAM_DISABLE_INPUT_RESAMPLING);
+ m_stream = stream_alloc(1, Outputs, XTAL(), STREAM_DISABLE_INPUT_RESAMPLING, SAMPLE_RATE_OUTPUT_ADAPTIVE);
save_item(NAME(m_buffer));
save_item(NAME(m_curpos));
@@ -120,7 +120,7 @@ void bbd_device_base<Entries, Outputs>::sound_stream_update(sound_stream &stream
// device type definition
DEFINE_DEVICE_TYPE(MN3004, mn3004_device, "mn3004", "MN3004 BBD")
-mn3004_device::mn3004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+mn3004_device::mn3004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
bbd_device_base(mconfig, tag, owner, clock, MN3004)
{
}
@@ -133,7 +133,7 @@ mn3004_device::mn3004_device(const machine_config &mconfig, const char *tag, dev
// device type definition
DEFINE_DEVICE_TYPE(MN3005, mn3005_device, "mn3005", "MN3005 BBD")
-mn3005_device::mn3005_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+mn3005_device::mn3005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
bbd_device_base(mconfig, tag, owner, clock, MN3005)
{
}
@@ -146,7 +146,7 @@ mn3005_device::mn3005_device(const machine_config &mconfig, const char *tag, dev
// device type definition
DEFINE_DEVICE_TYPE(MN3006, mn3006_device, "mn3006", "MN3006 BBD")
-mn3006_device::mn3006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+mn3006_device::mn3006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
bbd_device_base(mconfig, tag, owner, clock, MN3006)
{
}
@@ -159,7 +159,7 @@ mn3006_device::mn3006_device(const machine_config &mconfig, const char *tag, dev
// device type definition
DEFINE_DEVICE_TYPE(MN3204P, mn3204p_device, "mn3204p", "MN3204P BBD")
-mn3204p_device::mn3204p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+mn3204p_device::mn3204p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
bbd_device_base(mconfig, tag, owner, clock, MN3204P)
{
}
diff --git a/src/devices/sound/bbd.h b/src/devices/sound/bbd.h
index f9c84b8d6a6..f2d35f397f4 100644
--- a/src/devices/sound/bbd.h
+++ b/src/devices/sound/bbd.h
@@ -25,7 +25,7 @@ protected:
using cv_delegate = device_delegate<attoseconds_t (attotime const &)>;
// internal constructor
- bbd_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type);
+ bbd_device_base(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type);
// device-level overrides
virtual void device_start() override;
@@ -37,7 +37,7 @@ protected:
protected:
// override to convert clock to sample rate
stream_buffer::sample_t outputval(s32 index) const { return m_buffer[(m_curpos - index) % std::size(m_buffer)]; }
- virtual u32 sample_rate() const { return clock(); }
+ virtual XTAL sample_rate() const { return clock(); }
sound_stream * m_stream;
u32 m_curpos;
@@ -52,7 +52,7 @@ protected:
class mn3004_device : public bbd_device_base<512, 2>
{
public:
- mn3004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ mn3004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
};
DECLARE_DEVICE_TYPE(MN3004, mn3004_device)
@@ -63,7 +63,7 @@ DECLARE_DEVICE_TYPE(MN3004, mn3004_device)
class mn3005_device : public bbd_device_base<4096, 2>
{
public:
- mn3005_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ mn3005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
};
DECLARE_DEVICE_TYPE(MN3005, mn3005_device)
@@ -74,7 +74,7 @@ DECLARE_DEVICE_TYPE(MN3005, mn3005_device)
class mn3006_device : public bbd_device_base<128, 2>
{
public:
- mn3006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ mn3006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
};
DECLARE_DEVICE_TYPE(MN3006, mn3006_device)
@@ -85,7 +85,7 @@ DECLARE_DEVICE_TYPE(MN3006, mn3006_device)
class mn3204p_device : public bbd_device_base<512, 2>
{
public:
- mn3204p_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ mn3204p_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
};
DECLARE_DEVICE_TYPE(MN3204P, mn3204p_device)
diff --git a/src/devices/sound/beep.cpp b/src/devices/sound/beep.cpp
index 47f4701a662..1aac8ade153 100644
--- a/src/devices/sound/beep.cpp
+++ b/src/devices/sound/beep.cpp
@@ -20,7 +20,7 @@
// device type definition
DEFINE_DEVICE_TYPE(BEEP, beep_device, "beep", "Beep")
-beep_device::beep_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+beep_device::beep_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, BEEP, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_stream(nullptr)
diff --git a/src/devices/sound/beep.h b/src/devices/sound/beep.h
index 52943d83465..45642b434cd 100644
--- a/src/devices/sound/beep.h
+++ b/src/devices/sound/beep.h
@@ -21,7 +21,7 @@ class beep_device : public device_t,
public device_sound_interface
{
public:
- beep_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ beep_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
// device-level overrides
diff --git a/src/devices/sound/bsmt2000.cpp b/src/devices/sound/bsmt2000.cpp
index 30b078b6da6..64f9e73d5ba 100644
--- a/src/devices/sound/bsmt2000.cpp
+++ b/src/devices/sound/bsmt2000.cpp
@@ -61,7 +61,7 @@ ROM_END
// bsmt2000_device - constructor
//-------------------------------------------------
-bsmt2000_device::bsmt2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+bsmt2000_device::bsmt2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, BSMT2000, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/bsmt2000.h b/src/devices/sound/bsmt2000.h
index 771ad8f3c64..e81b6f87ca7 100644
--- a/src/devices/sound/bsmt2000.h
+++ b/src/devices/sound/bsmt2000.h
@@ -32,7 +32,7 @@ public:
typedef device_delegate<void ()> ready_callback;
// construction/destruction
- bsmt2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ bsmt2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// inline configuration helpers
template <typename... T> void set_ready_callback(T &&... args) { m_ready_callback.set(std::forward<T>(args)...); }
diff --git a/src/devices/sound/c140.cpp b/src/devices/sound/c140.cpp
index d723e124e35..e785a2f2a17 100644
--- a/src/devices/sound/c140.cpp
+++ b/src/devices/sound/c140.cpp
@@ -81,12 +81,12 @@ DEFINE_DEVICE_TYPE(C219, c219_device, "c219", "Namco C219")
// c140_device - constructor
//-------------------------------------------------
-c140_device::c140_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+c140_device::c140_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: c140_device(mconfig, C140, tag, owner, clock)
{
}
-c140_device::c140_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+c140_device::c140_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
@@ -101,7 +101,7 @@ c140_device::c140_device(const machine_config &mconfig, device_type type, const
std::fill(std::begin(m_pcmtbl), std::end(m_pcmtbl), 0);
}
-c219_device::c219_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+c219_device::c219_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: c140_device(mconfig, C219, tag, owner, clock)
{
// TODO: unknown address bus bits
diff --git a/src/devices/sound/c140.h b/src/devices/sound/c140.h
index 918f5dae31a..7f8a0a00040 100644
--- a/src/devices/sound/c140.h
+++ b/src/devices/sound/c140.h
@@ -22,7 +22,7 @@ class c140_device : public device_t,
public device_rom_interface<25, 1, 0, ENDIANNESS_BIG>
{
public:
- c140_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ c140_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration
auto int1_callback() { return m_int1_callback.bind(); }
@@ -35,7 +35,7 @@ public:
void c140_le_w(offs_t offset, u8 data) { c140_w(offset ^ 1, data);}
protected:
- c140_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ c140_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
// device-level overrides
virtual void device_start() override;
@@ -104,7 +104,7 @@ protected:
class c219_device : public c140_device
{
public:
- c219_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ c219_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
u8 c219_r(offs_t offset);
void c219_w(offs_t offset, u8 data);
diff --git a/src/devices/sound/c352.cpp b/src/devices/sound/c352.cpp
index dcbd58f3eb3..52925f0fe05 100644
--- a/src/devices/sound/c352.cpp
+++ b/src/devices/sound/c352.cpp
@@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(C352, c352_device, "c352", "Namco C352")
// c352_device - constructor
//-------------------------------------------------
-c352_device::c352_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+c352_device::c352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, C352, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/c352.h b/src/devices/sound/c352.h
index cf333ba356e..f0e9b896a97 100644
--- a/src/devices/sound/c352.h
+++ b/src/devices/sound/c352.h
@@ -19,13 +19,13 @@ class c352_device : public device_t,
{
public:
// construction/destruction
- c352_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, int divider)
+ c352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int divider)
: c352_device(mconfig, tag, owner, clock)
{
set_divider(divider);
}
- c352_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ c352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void set_divider(int divider) { m_divider = divider; }
diff --git a/src/devices/sound/c6280.cpp b/src/devices/sound/c6280.cpp
index 644269e01f7..cfeb4292583 100644
--- a/src/devices/sound/c6280.cpp
+++ b/src/devices/sound/c6280.cpp
@@ -292,7 +292,7 @@ void c6280_device::c6280_w(offs_t offset, uint8_t data)
DEFINE_DEVICE_TYPE(C6280, c6280_device, "c6280", "Hudson Soft HuC6280 PSG")
-c6280_device::c6280_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+c6280_device::c6280_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, C6280, tag, owner, clock)
, device_sound_interface(mconfig, *this)
{
diff --git a/src/devices/sound/c6280.h b/src/devices/sound/c6280.h
index 60ea993f71b..08df35de323 100644
--- a/src/devices/sound/c6280.h
+++ b/src/devices/sound/c6280.h
@@ -10,7 +10,7 @@ class c6280_device : public device_t, public device_sound_interface
public:
static constexpr feature_type imperfect_features() { return feature::SOUND; } // Incorrect / Not verified noise / LFO output
- c6280_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ c6280_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// write only
void c6280_w(offs_t offset, uint8_t data);
diff --git a/src/devices/sound/cdda.cpp b/src/devices/sound/cdda.cpp
index 38a4c4736cc..e2f58b00fd5 100644
--- a/src/devices/sound/cdda.cpp
+++ b/src/devices/sound/cdda.cpp
@@ -233,7 +233,7 @@ int16_t cdda_device::get_channel_volume(int channel)
DEFINE_DEVICE_TYPE(CDDA, cdda_device, "cdda", "CD/DA")
-cdda_device::cdda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+cdda_device::cdda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, CDDA, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_disc(nullptr)
diff --git a/src/devices/sound/cdda.h b/src/devices/sound/cdda.h
index b0c7b7f81e8..b6f36c9b3c1 100644
--- a/src/devices/sound/cdda.h
+++ b/src/devices/sound/cdda.h
@@ -11,7 +11,7 @@
class cdda_device : public device_t, public device_sound_interface
{
public:
- cdda_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 44'100);
+ cdda_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(44'100));
void set_cdrom(void *file);
diff --git a/src/devices/sound/cdp1863.cpp b/src/devices/sound/cdp1863.cpp
index da9194b9a7e..b63d3397fe6 100644
--- a/src/devices/sound/cdp1863.cpp
+++ b/src/devices/sound/cdp1863.cpp
@@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(CDP1863, cdp1863_device, "cdp1863", "RCA CDP1863")
// cdp1863_device - constructor
//-------------------------------------------------
-cdp1863_device::cdp1863_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+cdp1863_device::cdp1863_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, CDP1863, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_stream(nullptr)
diff --git a/src/devices/sound/cdp1863.h b/src/devices/sound/cdp1863.h
index ec0706e9a7c..8090705a5e4 100644
--- a/src/devices/sound/cdp1863.h
+++ b/src/devices/sound/cdp1863.h
@@ -36,7 +36,7 @@ class cdp1863_device : public device_t,
{
public:
// construction/destruction
- cdp1863_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ cdp1863_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// inline configuration helpers
void set_clock2(int clock2) { m_clock2 = clock2; }
diff --git a/src/devices/sound/cdp1864.cpp b/src/devices/sound/cdp1864.cpp
index a3e8f5c037f..642925b4311 100644
--- a/src/devices/sound/cdp1864.cpp
+++ b/src/devices/sound/cdp1864.cpp
@@ -58,7 +58,7 @@ DEFINE_DEVICE_TYPE(CDP1864, cdp1864_device, "cdp1864", "RCA CDP1864")
// cdp1864_device - constructor
//-------------------------------------------------
-cdp1864_device::cdp1864_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+cdp1864_device::cdp1864_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, CDP1864, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_video_interface(mconfig, *this),
diff --git a/src/devices/sound/cdp1864.h b/src/devices/sound/cdp1864.h
index 8dc1eb04e8e..9da7d1a1604 100644
--- a/src/devices/sound/cdp1864.h
+++ b/src/devices/sound/cdp1864.h
@@ -80,7 +80,7 @@ public:
static constexpr unsigned SCANLINE_EFX_BOTTOM_END = SCANLINE_DISPLAY_END;
// construction/destruction
- cdp1864_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ cdp1864_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto inlace_cb() { return m_read_inlace.bind(); }
auto int_cb() { return m_write_int.bind(); }
diff --git a/src/devices/sound/cdp1869.cpp b/src/devices/sound/cdp1869.cpp
index 70e4718f212..179e7d99a03 100644
--- a/src/devices/sound/cdp1869.cpp
+++ b/src/devices/sound/cdp1869.cpp
@@ -350,7 +350,7 @@ int cdp1869_device::get_pen(int ccb0, int ccb1, int pcb)
// cdp1869_device - constructor
//-------------------------------------------------
-cdp1869_device::cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+cdp1869_device::cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, CDP1869, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_video_interface(mconfig, *this),
diff --git a/src/devices/sound/cdp1869.h b/src/devices/sound/cdp1869.h
index 6ce373a6931..94a8856a5e8 100644
--- a/src/devices/sound/cdp1869.h
+++ b/src/devices/sound/cdp1869.h
@@ -147,12 +147,12 @@ public:
// construction/destruction
template <typename T>
- cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&addrmap)
+ cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&addrmap)
: cdp1869_device(mconfig, tag, owner, clock)
{
set_addrmap(0, std::forward<T>(addrmap));
}
- cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ cdp1869_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto pal_ntsc_callback() { return m_read_pal_ntsc.bind(); }
auto prd_callback() { return m_write_prd.bind(); }
diff --git a/src/devices/sound/cem3394.cpp b/src/devices/sound/cem3394.cpp
index 0a4ba228827..fc27e3b902a 100644
--- a/src/devices/sound/cem3394.cpp
+++ b/src/devices/sound/cem3394.cpp
@@ -129,7 +129,7 @@ DEFINE_DEVICE_TYPE(CEM3394, cem3394_device, "cem3394", "CEM3394 Synthesizer Voic
// cem3394_device - constructor
//-------------------------------------------------
-cem3394_device::cem3394_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+cem3394_device::cem3394_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, CEM3394, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
diff --git a/src/devices/sound/cem3394.h b/src/devices/sound/cem3394.h
index a3e5e3a85ea..2a2262f6de4 100644
--- a/src/devices/sound/cem3394.h
+++ b/src/devices/sound/cem3394.h
@@ -22,7 +22,7 @@ public:
FINAL_GAIN
};
- cem3394_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ cem3394_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void set_vco_zero_freq(double freq) { m_vco_zero_freq = freq; }
void set_filter_zero_freq(double freq) { m_filter_zero_freq = freq; }
diff --git a/src/devices/sound/dac.cpp b/src/devices/sound/dac.cpp
index 7305f2c12a7..ee35c6d60a9 100644
--- a/src/devices/sound/dac.cpp
+++ b/src/devices/sound/dac.cpp
@@ -65,7 +65,7 @@ stream_buffer::sample_t dac_mapper_ones_complement(u32 input, u8 bits)
// dac_device_base - constructor
//-------------------------------------------------
-dac_device_base::dac_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) :
+dac_device_base::dac_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) :
device_t(mconfig, type, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
diff --git a/src/devices/sound/dac.h b/src/devices/sound/dac.h
index e0b4fb01cf9..246c78044b4 100644
--- a/src/devices/sound/dac.h
+++ b/src/devices/sound/dac.h
@@ -82,7 +82,7 @@ class dac_device_base : public device_t, public device_sound_interface
{
protected:
// constructor
- dac_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain);
+ dac_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain);
// device startup
virtual void device_start() override;
@@ -128,7 +128,7 @@ private:
class dac_bit_device_base : public dac_device_base, public dac_bit_interface
{
protected:
- dac_bit_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) :
+ dac_bit_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) :
dac_device_base(mconfig, type, tag, owner, clock, bits, mapper, gain)
{
}
@@ -144,7 +144,7 @@ public:
class dac_byte_device_base : public dac_device_base, public dac_byte_interface
{
protected:
- dac_byte_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) :
+ dac_byte_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) :
dac_device_base(mconfig, type, tag, owner, clock, bits, mapper, gain)
{
}
@@ -160,7 +160,7 @@ public:
class dac_word_device_base : public dac_device_base, public dac_word_interface
{
protected:
- dac_word_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) :
+ dac_word_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 bits, dac_mapper_callback mapper, stream_buffer::sample_t gain) :
dac_device_base(mconfig, type, tag, owner, clock, bits, mapper, gain)
{
}
@@ -186,7 +186,7 @@ DECLARE_DEVICE_TYPE(_dac_type, _dac_class) \
class _dac_class : public _dac_base_class \
{\
public: \
- _dac_class(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0) : \
+ _dac_class(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : \
_dac_base_class(mconfig, _dac_type, tag, owner, clock, _dac_bits, _dac_mapper, _dac_gain) {} \
}; \
DAC_GENERATOR_EPILOG(_dac_type, _dac_class, _dac_description, _dac_shortname)
diff --git a/src/devices/sound/dac76.cpp b/src/devices/sound/dac76.cpp
index 1c73d7b02c1..16baaff2e46 100644
--- a/src/devices/sound/dac76.cpp
+++ b/src/devices/sound/dac76.cpp
@@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(DAC76, dac76_device, "dac76", "PMI DAC-76 COMDAC")
// dac76_device - constructor
//-------------------------------------------------
-dac76_device::dac76_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+dac76_device::dac76_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, DAC76, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
diff --git a/src/devices/sound/dac76.h b/src/devices/sound/dac76.h
index 7f3cd1a52fd..5c2e7adc5a3 100644
--- a/src/devices/sound/dac76.h
+++ b/src/devices/sound/dac76.h
@@ -34,7 +34,7 @@ class dac76_device : public device_t, public device_sound_interface
{
public:
// construction/destruction
- dac76_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ dac76_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// chord
DECLARE_WRITE_LINE_MEMBER(b1_w) { m_chord &= ~(1 << 2); m_chord |= (state << 2); }
diff --git a/src/devices/sound/dave.cpp b/src/devices/sound/dave.cpp
index 44719ab4584..fa8916ef8aa 100644
--- a/src/devices/sound/dave.cpp
+++ b/src/devices/sound/dave.cpp
@@ -57,7 +57,7 @@ void dave_device::io_map(address_map &map)
// dave_device - constructor
//-------------------------------------------------
-dave_device::dave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+dave_device::dave_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, DAVE, tag, owner, clock),
device_memory_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
diff --git a/src/devices/sound/dave.h b/src/devices/sound/dave.h
index 82c024f748e..8a9340ec7e1 100644
--- a/src/devices/sound/dave.h
+++ b/src/devices/sound/dave.h
@@ -23,7 +23,7 @@ class dave_device : public device_t,
public device_sound_interface
{
public:
- dave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ dave_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto irq_wr() { return m_write_irq.bind(); }
auto lh_wr() { return m_write_lh.bind(); }
diff --git a/src/devices/sound/digitalk.cpp b/src/devices/sound/digitalk.cpp
index 2bff98478e5..94e8eefc455 100644
--- a/src/devices/sound/digitalk.cpp
+++ b/src/devices/sound/digitalk.cpp
@@ -263,7 +263,7 @@ static constexpr int pitch_vals[32] = {
DEFINE_DEVICE_TYPE(DIGITALKER, digitalker_device, "digitalker", "MM54104 Digitalker")
-digitalker_device::digitalker_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+digitalker_device::digitalker_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, DIGITALKER, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_rom(*this, DEVICE_SELF),
diff --git a/src/devices/sound/digitalk.h b/src/devices/sound/digitalk.h
index 18cc32fd3bd..ece8a38a201 100644
--- a/src/devices/sound/digitalk.h
+++ b/src/devices/sound/digitalk.h
@@ -15,7 +15,7 @@
class digitalker_device : public device_t, public device_sound_interface
{
public:
- digitalker_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ digitalker_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void digitalker_0_cs_w(int line);
void digitalker_0_cms_w(int line);
diff --git a/src/devices/sound/discrete.cpp b/src/devices/sound/discrete.cpp
index 8568c647657..1b5fa493e3d 100644
--- a/src/devices/sound/discrete.cpp
+++ b/src/devices/sound/discrete.cpp
@@ -810,7 +810,7 @@ int discrete_device::same_module_index(const discrete_base_node &node)
// discrete_device - constructor
//-------------------------------------------------
-discrete_device::discrete_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+discrete_device::discrete_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, type, tag, owner, clock),
m_intf(nullptr),
m_sample_rate(0),
@@ -825,7 +825,7 @@ discrete_device::discrete_device(const machine_config &mconfig, device_type type
{
}
-discrete_sound_device::discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+discrete_sound_device::discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: discrete_device(mconfig, DISCRETE, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(nullptr)
diff --git a/src/devices/sound/discrete.h b/src/devices/sound/discrete.h
index eebc4936df7..6b55107fe74 100644
--- a/src/devices/sound/discrete.h
+++ b/src/devices/sound/discrete.h
@@ -4180,7 +4180,7 @@ class discrete_device : public device_t
{
protected:
// construction/destruction
- discrete_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ discrete_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
public:
typedef std::vector<std::unique_ptr<discrete_task> > task_list_t;
@@ -4280,17 +4280,17 @@ class discrete_sound_device : public discrete_device,
{
public:
// construction/destruction
- discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const discrete_block *intf)
+ discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, const discrete_block *intf)
: discrete_sound_device(mconfig, tag, owner, clock)
{
set_intf(intf);
}
discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const discrete_block *intf)
- : discrete_sound_device(mconfig, tag, owner, uint32_t(0))
+ : discrete_sound_device(mconfig, tag, owner)
{
set_intf(intf);
}
- discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
virtual ~discrete_sound_device() { }
/* --------------------------------- */
diff --git a/src/devices/sound/dmadac.cpp b/src/devices/sound/dmadac.cpp
index ae2ebce61ad..40ed75cd132 100644
--- a/src/devices/sound/dmadac.cpp
+++ b/src/devices/sound/dmadac.cpp
@@ -163,7 +163,7 @@ void dmadac_sound_device::set_volume(uint16_t volume)
DEFINE_DEVICE_TYPE(DMADAC, dmadac_sound_device, "dmadac", "DMA-driven DAC")
-dmadac_sound_device::dmadac_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+dmadac_sound_device::dmadac_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, DMADAC, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_buffer(BUFFER_SIZE),
diff --git a/src/devices/sound/dmadac.h b/src/devices/sound/dmadac.h
index 6cbe8312231..a7904e5f50b 100644
--- a/src/devices/sound/dmadac.h
+++ b/src/devices/sound/dmadac.h
@@ -16,7 +16,7 @@
class dmadac_sound_device : public device_t, public device_sound_interface
{
public:
- dmadac_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ dmadac_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
void initialize_state();
void flush();
diff --git a/src/devices/sound/dspv.cpp b/src/devices/sound/dspv.cpp
index cf14ead15d3..86f88bb56f3 100644
--- a/src/devices/sound/dspv.cpp
+++ b/src/devices/sound/dspv.cpp
@@ -8,7 +8,7 @@
DEFINE_DEVICE_TYPE(DSPV, dspv_device, "dspv", "Yamaha DSPV audio simulation DSP (YSS217-F/")
-dspv_device::dspv_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+dspv_device::dspv_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: cpu_device(mconfig, DSPV, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_program_config("program", ENDIANNESS_BIG, 16, 16, -1, address_map_constructor(FUNC(dspv_device::prg_map), this)),
diff --git a/src/devices/sound/dspv.h b/src/devices/sound/dspv.h
index fb68acda569..a1d16c9222f 100644
--- a/src/devices/sound/dspv.h
+++ b/src/devices/sound/dspv.h
@@ -13,7 +13,7 @@
class dspv_device : public cpu_device, public device_sound_interface
{
public:
- dspv_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 22579200);
+ dspv_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 22579200);
void map(address_map &map);
diff --git a/src/devices/sound/es1373.cpp b/src/devices/sound/es1373.cpp
index d254527b0bc..ccdf4903fc9 100644
--- a/src/devices/sound/es1373.cpp
+++ b/src/devices/sound/es1373.cpp
@@ -84,7 +84,7 @@ void es1373_device::map(address_map &map)
map(0x00, 0x3f).rw(FUNC(es1373_device::reg_r), FUNC(es1373_device::reg_w));
}
-es1373_device::es1373_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+es1373_device::es1373_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: pci_device(mconfig, ES1373, tag, owner, clock)
, device_sound_interface(mconfig, *this), m_stream(nullptr)
, m_eslog(nullptr), m_tempCount(0), m_timer(nullptr), m_memory_space(nullptr), m_irq_handler(*this)
diff --git a/src/devices/sound/es1373.h b/src/devices/sound/es1373.h
index 6d493391ae4..13b8159247f 100644
--- a/src/devices/sound/es1373.h
+++ b/src/devices/sound/es1373.h
@@ -11,7 +11,7 @@
class es1373_device : public pci_device, public device_sound_interface
{
public:
- es1373_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ es1373_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space,
uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override;
diff --git a/src/devices/sound/es5503.cpp b/src/devices/sound/es5503.cpp
index f460050df66..3d3fa530a0e 100644
--- a/src/devices/sound/es5503.cpp
+++ b/src/devices/sound/es5503.cpp
@@ -57,7 +57,7 @@ static constexpr int resshifts[8] = { 9, 10, 11, 12, 13, 14, 15, 16 };
// es5503_device - constructor
//-------------------------------------------------
-es5503_device::es5503_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+es5503_device::es5503_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, ES5503, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_rom_interface(mconfig, *this),
diff --git a/src/devices/sound/es5503.h b/src/devices/sound/es5503.h
index 4499d58d1f3..fc8063ddd3d 100644
--- a/src/devices/sound/es5503.h
+++ b/src/devices/sound/es5503.h
@@ -15,7 +15,7 @@ class es5503_device : public device_t,
{
public:
// construction/destruction
- es5503_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ es5503_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// channels must be a power of two
void set_channels(int channels) { output_channels = channels; }
diff --git a/src/devices/sound/es5506.cpp b/src/devices/sound/es5506.cpp
index 3ea90a97261..c4197f1c9ff 100644
--- a/src/devices/sound/es5506.cpp
+++ b/src/devices/sound/es5506.cpp
@@ -146,7 +146,7 @@ enum : u16 {
}
-es550x_device::es550x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
+es550x_device::es550x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_memory_interface(mconfig, *this)
@@ -178,7 +178,7 @@ es550x_device::es550x_device(const machine_config &mconfig, device_type type, co
DEFINE_DEVICE_TYPE(ES5506, es5506_device, "es5506", "Ensoniq ES5506")
-es5506_device::es5506_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+es5506_device::es5506_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: es550x_device(mconfig, ES5506, tag, owner, clock)
, m_bank0_config("bank0", ENDIANNESS_BIG, 16, 21, -1) // 21 bit address bus, word addressing only
, m_bank1_config("bank1", ENDIANNESS_BIG, 16, 21, -1)
@@ -348,7 +348,7 @@ device_memory_interface::space_config_vector es5506_device::memory_space_config(
DEFINE_DEVICE_TYPE(ES5505, es5505_device, "es5505", "Ensoniq ES5505")
-es5505_device::es5505_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+es5505_device::es5505_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: es550x_device(mconfig, ES5505, tag, owner, clock)
, m_bank0_config("bank0", ENDIANNESS_BIG, 16, 20, -1) // 20 bit address bus, word addressing only
, m_bank1_config("bank1", ENDIANNESS_BIG, 16, 20, -1)
diff --git a/src/devices/sound/es5506.h b/src/devices/sound/es5506.h
index 73f5c0a3c8f..3305afc5abe 100644
--- a/src/devices/sound/es5506.h
+++ b/src/devices/sound/es5506.h
@@ -75,7 +75,7 @@ protected:
u8 filtcount = 0; // filter count
};
- es550x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+ es550x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
// device-level overrides
virtual void device_start() override;
@@ -159,7 +159,7 @@ protected:
class es5506_device : public es550x_device
{
public:
- es5506_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ es5506_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
~es5506_device() {}
u8 read(offs_t offset);
@@ -217,7 +217,7 @@ DECLARE_DEVICE_TYPE(ES5506, es5506_device)
class es5505_device : public es550x_device
{
public:
- es5505_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ es5505_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
u16 read(offs_t offset);
void write(offs_t offset, u16 data, u16 mem_mask = ~0);
diff --git a/src/devices/sound/es8712.cpp b/src/devices/sound/es8712.cpp
index 5cddf18cc7e..a9ef9e922b1 100644
--- a/src/devices/sound/es8712.cpp
+++ b/src/devices/sound/es8712.cpp
@@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(ES8712, es8712_device, "es8712", "Excellent Systems ES8712 So
// es8712_device - constructor
//-------------------------------------------------
-es8712_device::es8712_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+es8712_device::es8712_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, ES8712, tag, owner, clock)
, device_rom_interface(mconfig, *this)
, m_adpcm_select(*this, "adpcm_select")
@@ -59,7 +59,7 @@ es8712_device::es8712_device(const machine_config &mconfig, const char *tag, dev
void es8712_device::device_add_mconfig(machine_config &config)
{
- HCT157(config, m_adpcm_select, 0); // TODO : gcpinbal case, differs per games?
+ HCT157(config, m_adpcm_select); // TODO : gcpinbal case, differs per games?
m_adpcm_select->out_callback().set(FUNC(es8712_device::msm_w));
}
diff --git a/src/devices/sound/es8712.h b/src/devices/sound/es8712.h
index 27fc5bab853..b5fb2193431 100644
--- a/src/devices/sound/es8712.h
+++ b/src/devices/sound/es8712.h
@@ -21,7 +21,7 @@
class es8712_device : public device_t, public device_rom_interface<20> // TODO : 20 address bits?
{
public:
- es8712_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ es8712_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration
template <typename T> void set_msm_tag(T &&tag) { m_msm.set_tag(std::forward<T>(tag)); }
diff --git a/src/devices/sound/esqpump.cpp b/src/devices/sound/esqpump.cpp
index 38b95a15bed..21486d82b7f 100644
--- a/src/devices/sound/esqpump.cpp
+++ b/src/devices/sound/esqpump.cpp
@@ -13,7 +13,7 @@
DEFINE_DEVICE_TYPE(ESQ_5505_5510_PUMP, esq_5505_5510_pump_device, "esq_5505_5510_pump", "Ensoniq 5505/5506 to 5510 interface")
-esq_5505_5510_pump_device::esq_5505_5510_pump_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+esq_5505_5510_pump_device::esq_5505_5510_pump_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, ESQ_5505_5510_PUMP, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_stream(nullptr)
diff --git a/src/devices/sound/esqpump.h b/src/devices/sound/esqpump.h
index 897475cd8b4..51f7e378c9e 100644
--- a/src/devices/sound/esqpump.h
+++ b/src/devices/sound/esqpump.h
@@ -18,7 +18,7 @@ class esq_5505_5510_pump_device : public device_t, public device_sound_interface
public:
static constexpr feature_type imperfect_features() { return feature::SOUND; }
- esq_5505_5510_pump_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ esq_5505_5510_pump_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
template <typename T> void set_esp(T &&tag) { m_esp.set_tag(std::forward<T>(tag)); }
void set_esp_halted(bool esp_halted) {
diff --git a/src/devices/sound/flt_biquad.cpp b/src/devices/sound/flt_biquad.cpp
index 6ae1bde0109..cc7ff2e002d 100644
--- a/src/devices/sound/flt_biquad.cpp
+++ b/src/devices/sound/flt_biquad.cpp
@@ -46,7 +46,7 @@ ALLOW_SAVE_TYPE(filter_biquad_device::biquad_type);
//-------------------------------------------------
// initialize with some sane defaults for a highpass filter with a cutoff at 16hz, same as flt_rc's 'ac' mode.
-filter_biquad_device::filter_biquad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+filter_biquad_device::filter_biquad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, FILTER_BIQUAD, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
diff --git a/src/devices/sound/flt_biquad.h b/src/devices/sound/flt_biquad.h
index e565aa6da8a..20e5ffd8364 100644
--- a/src/devices/sound/flt_biquad.h
+++ b/src/devices/sound/flt_biquad.h
@@ -36,7 +36,7 @@ public:
double gain;
};
- filter_biquad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ filter_biquad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
// set up the filter with the specified filter parameters and return a pointer to the new device
filter_biquad_device& setup(biquad_type type, double fc, double q, double gain);
diff --git a/src/devices/sound/flt_rc.cpp b/src/devices/sound/flt_rc.cpp
index 489cb01fb07..8dfd97ba43f 100644
--- a/src/devices/sound/flt_rc.cpp
+++ b/src/devices/sound/flt_rc.cpp
@@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(FILTER_RC, filter_rc_device, "filter_rc", "RC Filter")
// filter_rc_device - constructor
//-------------------------------------------------
-filter_rc_device::filter_rc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+filter_rc_device::filter_rc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, FILTER_RC, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
diff --git a/src/devices/sound/flt_rc.h b/src/devices/sound/flt_rc.h
index def09f1eb11..30df14ee8aa 100644
--- a/src/devices/sound/flt_rc.h
+++ b/src/devices/sound/flt_rc.h
@@ -44,7 +44,7 @@
* (10KOhm R, 1uF C)
* This filter may be setup just with
*
- * FILTER_RC(config, "tag", 0).set_ac();
+ * FILTER_RC(config, "tag").set_ac();
*
* Default behaviour:
*
@@ -69,7 +69,7 @@ public:
AC = 4
};
- filter_rc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ filter_rc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
// configuration
filter_rc_device &set_rc(int type, double R1, double R2, double R3, double C)
diff --git a/src/devices/sound/flt_vol.cpp b/src/devices/sound/flt_vol.cpp
index 6e63fa1ae1b..fc57255a417 100644
--- a/src/devices/sound/flt_vol.cpp
+++ b/src/devices/sound/flt_vol.cpp
@@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(FILTER_VOLUME, filter_volume_device, "filter_volume", "Volume
// filter_volume_device - constructor
//-------------------------------------------------
-filter_volume_device::filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+filter_volume_device::filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, FILTER_VOLUME, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
diff --git a/src/devices/sound/flt_vol.h b/src/devices/sound/flt_vol.h
index 022a980a6a5..021271809bd 100644
--- a/src/devices/sound/flt_vol.h
+++ b/src/devices/sound/flt_vol.h
@@ -15,7 +15,7 @@
class filter_volume_device : public device_t, public device_sound_interface
{
public:
- filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
void flt_volume_set_volume(float volume);
diff --git a/src/devices/sound/gaelco.cpp b/src/devices/sound/gaelco.cpp
index 39a14d6487f..19439718587 100644
--- a/src/devices/sound/gaelco.cpp
+++ b/src/devices/sound/gaelco.cpp
@@ -57,12 +57,12 @@ static util::wav_file_ptr wavraw; // Raw waveform
DEFINE_DEVICE_TYPE(GAELCO_GAE1, gaelco_gae1_device, "gaelco_gae1", "Gaelco GAE1")
-gaelco_gae1_device::gaelco_gae1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+gaelco_gae1_device::gaelco_gae1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: gaelco_gae1_device(mconfig, GAELCO_GAE1, tag, owner, clock)
{
}
-gaelco_gae1_device::gaelco_gae1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+gaelco_gae1_device::gaelco_gae1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
@@ -339,7 +339,7 @@ void gaelco_gae1_device::rom_bank_pre_change()
DEFINE_DEVICE_TYPE(GAELCO_CG1V, gaelco_cg1v_device, "gaelco_cg1v", "Gaelco CG1V")
-gaelco_cg1v_device::gaelco_cg1v_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+gaelco_cg1v_device::gaelco_cg1v_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: gaelco_gae1_device(mconfig, GAELCO_CG1V, tag, owner, clock)
{
}
diff --git a/src/devices/sound/gaelco.h b/src/devices/sound/gaelco.h
index 3bfac39f988..6c663cc92f0 100644
--- a/src/devices/sound/gaelco.h
+++ b/src/devices/sound/gaelco.h
@@ -19,7 +19,7 @@ class gaelco_gae1_device : public device_t,
public device_rom_interface<27> // Unknown address bits
{
public:
- gaelco_gae1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ gaelco_gae1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
void set_bank_offsets(int offs1, int offs2, int offs3, int offs4)
{
@@ -33,7 +33,7 @@ public:
uint16_t gaelcosnd_r(offs_t offset);
protected:
- gaelco_gae1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ gaelco_gae1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
// device-level overrides
virtual void device_start() override;
@@ -81,7 +81,7 @@ DECLARE_DEVICE_TYPE(GAELCO_GAE1, gaelco_gae1_device)
class gaelco_cg1v_device : public gaelco_gae1_device
{
public:
- gaelco_cg1v_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ gaelco_cg1v_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
};
DECLARE_DEVICE_TYPE(GAELCO_CG1V, gaelco_cg1v_device)
diff --git a/src/devices/sound/gb.cpp b/src/devices/sound/gb.cpp
index 643ecf9ec68..de319513f7f 100644
--- a/src/devices/sound/gb.cpp
+++ b/src/devices/sound/gb.cpp
@@ -84,20 +84,20 @@ DEFINE_DEVICE_TYPE(CGB04_APU, cgb04_apu_device, "cgb04_apu", "CGB04 APU")
// gameboy_sound_device - constructor
//-------------------------------------------------
-gameboy_sound_device::gameboy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+gameboy_sound_device::gameboy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
{
}
-dmg_apu_device::dmg_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+dmg_apu_device::dmg_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: gameboy_sound_device(mconfig, DMG_APU, tag, owner, clock)
{
}
-cgb04_apu_device::cgb04_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+cgb04_apu_device::cgb04_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: gameboy_sound_device(mconfig, CGB04_APU, tag, owner, clock)
{
}
diff --git a/src/devices/sound/gb.h b/src/devices/sound/gb.h
index 162672f0287..bdcac58a1eb 100644
--- a/src/devices/sound/gb.h
+++ b/src/devices/sound/gb.h
@@ -9,7 +9,7 @@ class gameboy_sound_device : public device_t,
public device_sound_interface
{
public:
- gameboy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ gameboy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
u8 sound_r(offs_t offset);
virtual u8 wave_r(offs_t offset) = 0;
@@ -17,7 +17,7 @@ public:
virtual void wave_w(offs_t offset, u8 data) = 0;
protected:
- gameboy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ gameboy_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
// device-level overrides
virtual void device_start() override;
@@ -164,7 +164,7 @@ protected:
class dmg_apu_device : public gameboy_sound_device
{
public:
- dmg_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ dmg_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
virtual u8 wave_r(offs_t offset) override;
virtual void wave_w(offs_t offset, u8 data) override;
@@ -180,7 +180,7 @@ protected:
class cgb04_apu_device : public gameboy_sound_device
{
public:
- cgb04_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ cgb04_apu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
virtual u8 wave_r(offs_t offset) override;
virtual void wave_w(offs_t offset, u8 data) override;
diff --git a/src/devices/sound/hc55516.cpp b/src/devices/sound/hc55516.cpp
index ab4497a4a93..a1dc4568cc0 100644
--- a/src/devices/sound/hc55516.cpp
+++ b/src/devices/sound/hc55516.cpp
@@ -36,7 +36,7 @@
//#####################################
// COMMON
//#####################################
-cvsd_device_base::cvsd_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool active_clock_edge, uint8_t shiftreg_mask)
+cvsd_device_base::cvsd_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool active_clock_edge, uint8_t shiftreg_mask)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_clock_state_push_cb(*this)
@@ -215,13 +215,13 @@ void cvsd_device_base::sound_stream_update(sound_stream &stream, std::vector<rea
//#########################################
DEFINE_DEVICE_TYPE(HC55516, hc55516_device, "hc55516", "HC-55516")
-hc55516_device::hc55516_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hc55516_device::hc55516_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: hc55516_device(mconfig, HC55516, tag, owner, clock, 0xfc0, 6, 0xfc1, 4)
{
}
// overridable type for hc55532 etc
-hc55516_device::hc55516_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t sylmask, int32_t sylshift, int32_t syladd, int32_t intshift)
+hc55516_device::hc55516_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t sylmask, int32_t sylshift, int32_t syladd, int32_t intshift)
: cvsd_device_base(mconfig, type, tag, owner, clock, RISING, 0x7)
, m_agc_push_cb(*this)
, m_fzq_pull_cb(*this)
@@ -414,7 +414,7 @@ void hc55516_device::sound_stream_update(sound_stream &stream, std::vector<read_
//#########################################
DEFINE_DEVICE_TYPE(HC55532, hc55532_device, "hc55532", "HC-55532")
-hc55532_device::hc55532_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+hc55532_device::hc55532_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: hc55516_device(mconfig, HC55532, tag, owner, clock, 0xf80, 7, 0xfe1, 5)
{
}
@@ -440,13 +440,13 @@ void hc55532_device::device_reset()
//##########################################
DEFINE_DEVICE_TYPE(MC3417, mc3417_device, "mc3417", "MC3417")
-mc3417_device::mc3417_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+mc3417_device::mc3417_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mc3417_device(mconfig, MC3417, tag, owner, clock, 0x7)
{
}
// overridable type for mc3418 etc
-mc3417_device::mc3417_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t shiftreg_mask)
+mc3417_device::mc3417_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t shiftreg_mask)
: cvsd_device_base(mconfig, type, tag, owner, clock, FALLING, shiftreg_mask)
, m_charge(pow(exp(-1.0), 1.0 / (FILTER_CHARGE_TC * 16000.0)))
, m_decay(pow(exp(-1.0), 1.0 / (FILTER_DECAY_TC * 16000.0)))
@@ -561,7 +561,7 @@ void mc3417_device::sound_stream_update(sound_stream &stream, std::vector<read_s
//##########################################
DEFINE_DEVICE_TYPE(MC3418, mc3418_device, "mc3418", "MC3418")
-mc3418_device::mc3418_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+mc3418_device::mc3418_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mc3417_device(mconfig, MC3418, tag, owner, clock, 0xf)
{
}
diff --git a/src/devices/sound/hc55516.h b/src/devices/sound/hc55516.h
index 8f06ba55a28..3e93898555e 100644
--- a/src/devices/sound/hc55516.h
+++ b/src/devices/sound/hc55516.h
@@ -66,7 +66,7 @@ public:
virtual int clock_state_r();
protected:
- cvsd_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool active_clock_edge, uint8_t shiftreg_mask);
+ cvsd_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool active_clock_edge, uint8_t shiftreg_mask);
// device-level overrides
virtual void device_start() override;
@@ -108,7 +108,7 @@ protected:
class hc55516_device : public cvsd_device_base
{
public:
- hc55516_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hc55516_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// /FZ (partial reset) pull callback, ok to leave unconnected (we assume it is pulled high)
auto fzq_cb() { return m_fzq_pull_cb.bind(); }
@@ -124,7 +124,7 @@ public:
protected:
// overridable type for subclass
- hc55516_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t sylmask, int32_t sylshift, int32_t syladd, int32_t intshift);
+ hc55516_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t sylmask, int32_t sylshift, int32_t syladd, int32_t intshift);
// device-level overrides
virtual void device_start() override;
@@ -157,7 +157,7 @@ protected:
class hc55532_device : public hc55516_device
{
public:
- hc55532_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ hc55532_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
// device-level overrides
virtual void device_reset() override;
@@ -167,14 +167,14 @@ protected:
class mc3417_device : public cvsd_device_base
{
public:
- mc3417_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mc3417_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// override for clock_w
//virtual void clock_w(int state) override;
protected:
// overridable type for subclass
- mc3417_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t shiftreg_mask);
+ mc3417_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t shiftreg_mask);
// device-level overrides
virtual void device_start() override;
@@ -200,7 +200,7 @@ protected:
class mc3418_device : public mc3417_device
{
public:
- mc3418_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mc3418_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
diff --git a/src/devices/sound/huc6230.cpp b/src/devices/sound/huc6230.cpp
index d257572f79e..587a2fed1c5 100644
--- a/src/devices/sound/huc6230.cpp
+++ b/src/devices/sound/huc6230.cpp
@@ -147,7 +147,7 @@ TIMER_CALLBACK_MEMBER(huc6230_device::adpcm_timer)
DEFINE_DEVICE_TYPE(HuC6230, huc6230_device, "huc6230", "Hudson Soft HuC6230 SoundBox")
-huc6230_device::huc6230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+huc6230_device::huc6230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, HuC6230, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_stream(nullptr)
diff --git a/src/devices/sound/huc6230.h b/src/devices/sound/huc6230.h
index a2ca7824617..1b73c35a191 100644
--- a/src/devices/sound/huc6230.h
+++ b/src/devices/sound/huc6230.h
@@ -13,7 +13,7 @@ class huc6230_device : public device_t, public device_sound_interface
public:
static constexpr feature_type imperfect_features() { return feature::SOUND; } // Incorrect ADPCM
- huc6230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ huc6230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
template <unsigned N> auto adpcm_update_cb() { return m_adpcm_update_cb[N].bind(); }
auto vca_callback() { return m_vca_cb.bind(); }
diff --git a/src/devices/sound/i5000.cpp b/src/devices/sound/i5000.cpp
index 3f194ef74c5..e4a006771eb 100644
--- a/src/devices/sound/i5000.cpp
+++ b/src/devices/sound/i5000.cpp
@@ -23,7 +23,7 @@
// device type definition
DEFINE_DEVICE_TYPE(I5000_SND, i5000snd_device, "i5000snd", "Imagetek I5000 Sound")
-i5000snd_device::i5000snd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i5000snd_device::i5000snd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, I5000_SND, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_stream(nullptr), m_rom_base(nullptr), m_rom_mask(0)
diff --git a/src/devices/sound/i5000.h b/src/devices/sound/i5000.h
index abd84f5ac43..7b07decd966 100644
--- a/src/devices/sound/i5000.h
+++ b/src/devices/sound/i5000.h
@@ -23,7 +23,7 @@ class i5000snd_device : public device_t,
{
public:
// construction/destruction
- i5000snd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i5000snd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
uint16_t read(offs_t offset);
void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
diff --git a/src/devices/sound/ics2115.cpp b/src/devices/sound/ics2115.cpp
index 56c0cf607c4..87f2ccebdb9 100644
--- a/src/devices/sound/ics2115.cpp
+++ b/src/devices/sound/ics2115.cpp
@@ -30,7 +30,7 @@
// device type definition
DEFINE_DEVICE_TYPE(ICS2115, ics2115_device, "ics2115", "ICS2115 WaveFront Synthesizer")
-ics2115_device::ics2115_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ics2115_device::ics2115_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, ICS2115, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_memory_interface(mconfig, *this)
diff --git a/src/devices/sound/ics2115.h b/src/devices/sound/ics2115.h
index 269069ff387..7f0151b19ef 100644
--- a/src/devices/sound/ics2115.h
+++ b/src/devices/sound/ics2115.h
@@ -19,7 +19,7 @@ public:
// current ramping behavior is seems like incorrect?
// construction/destruction
- ics2115_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ ics2115_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto irq() { return m_irq_cb.bind(); }
diff --git a/src/devices/sound/iopspu.cpp b/src/devices/sound/iopspu.cpp
index 55e6cd3b789..2ba17bfae83 100644
--- a/src/devices/sound/iopspu.cpp
+++ b/src/devices/sound/iopspu.cpp
@@ -14,7 +14,7 @@
DEFINE_DEVICE_TYPE(SONYIOP_SPU, iop_spu_device, "iopspu", "PlayStation 2 IOP SPU")
-iop_spu_device::iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+iop_spu_device::iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SONYIOP_SPU, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_iop(*this, finder_base::DUMMY_TAG)
diff --git a/src/devices/sound/iopspu.h b/src/devices/sound/iopspu.h
index bea55615c04..672cbc2e534 100644
--- a/src/devices/sound/iopspu.h
+++ b/src/devices/sound/iopspu.h
@@ -21,14 +21,14 @@ class iop_spu_device : public device_t, public device_sound_interface
{
public:
template <typename T, typename U>
- iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&iop_tag, U &&intc_tag)
+ iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&iop_tag, U &&intc_tag)
: iop_spu_device(mconfig, tag, owner, clock)
{
m_iop.set_tag(std::forward<T>(iop_tag));
m_intc.set_tag(std::forward<U>(intc_tag));
}
- iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ iop_spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
virtual ~iop_spu_device() override;
uint16_t read(offs_t offset, uint16_t mem_mask = ~0);
diff --git a/src/devices/sound/iremga20.cpp b/src/devices/sound/iremga20.cpp
index b87c9f26da0..f902ca16be9 100644
--- a/src/devices/sound/iremga20.cpp
+++ b/src/devices/sound/iremga20.cpp
@@ -58,7 +58,7 @@ DEFINE_DEVICE_TYPE(IREMGA20, iremga20_device, "iremga20", "Irem GA20")
// iremga20_device - constructor
//-------------------------------------------------
-iremga20_device::iremga20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+iremga20_device::iremga20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, IREMGA20, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_rom_interface(mconfig, *this),
diff --git a/src/devices/sound/iremga20.h b/src/devices/sound/iremga20.h
index 99440bc5782..25650667038 100644
--- a/src/devices/sound/iremga20.h
+++ b/src/devices/sound/iremga20.h
@@ -24,7 +24,7 @@ class iremga20_device : public device_t,
public device_rom_interface<20>
{
public:
- iremga20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ iremga20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void write(offs_t offset, uint8_t data);
uint8_t read(offs_t offset);
diff --git a/src/devices/sound/k005289.cpp b/src/devices/sound/k005289.cpp
index ffdfb4f0588..d3a32141c6a 100644
--- a/src/devices/sound/k005289.cpp
+++ b/src/devices/sound/k005289.cpp
@@ -53,7 +53,7 @@ DEFINE_DEVICE_TYPE(K005289, k005289_device, "k005289", "K005289 SCC")
// k005289_device - constructor
//-------------------------------------------------
-k005289_device::k005289_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+k005289_device::k005289_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, K005289, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_sound_prom(*this, DEVICE_SELF)
diff --git a/src/devices/sound/k005289.h b/src/devices/sound/k005289.h
index cacf1d98f52..76d6f186610 100644
--- a/src/devices/sound/k005289.h
+++ b/src/devices/sound/k005289.h
@@ -12,7 +12,7 @@ class k005289_device : public device_t,
public device_sound_interface
{
public:
- k005289_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ k005289_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void control_A_w(u8 data);
void control_B_w(u8 data);
diff --git a/src/devices/sound/k007232.cpp b/src/devices/sound/k007232.cpp
index 9b4bc9e4b16..0754d55f062 100644
--- a/src/devices/sound/k007232.cpp
+++ b/src/devices/sound/k007232.cpp
@@ -32,7 +32,7 @@
DEFINE_DEVICE_TYPE(K007232, k007232_device, "k007232", "K007232 PCM Controller")
-k007232_device::k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+k007232_device::k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, K007232, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_memory_interface(mconfig, *this)
diff --git a/src/devices/sound/k007232.h b/src/devices/sound/k007232.h
index f467670fc9b..a1319ef78e2 100644
--- a/src/devices/sound/k007232.h
+++ b/src/devices/sound/k007232.h
@@ -12,7 +12,7 @@
class k007232_device : public device_t, public device_sound_interface, public device_memory_interface
{
public:
- k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ k007232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto port_write() { return m_port_write_handler.bind(); }
diff --git a/src/devices/sound/k051649.cpp b/src/devices/sound/k051649.cpp
index 5ddffc5f36f..b27f123a0de 100644
--- a/src/devices/sound/k051649.cpp
+++ b/src/devices/sound/k051649.cpp
@@ -49,7 +49,7 @@ DEFINE_DEVICE_TYPE(K051649, k051649_device, "k051649", "K051649 SCC1")
// k051649_device - constructor
//-------------------------------------------------
-k051649_device::k051649_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+k051649_device::k051649_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, K051649, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_stream(nullptr)
diff --git a/src/devices/sound/k051649.h b/src/devices/sound/k051649.h
index d9174e00dc9..4b90ceb7f2f 100644
--- a/src/devices/sound/k051649.h
+++ b/src/devices/sound/k051649.h
@@ -16,7 +16,7 @@ class k051649_device : public device_t,
public device_sound_interface
{
public:
- k051649_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ k051649_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void k051649_waveform_w(offs_t offset, u8 data);
u8 k051649_waveform_r(offs_t offset);
diff --git a/src/devices/sound/k053260.cpp b/src/devices/sound/k053260.cpp
index 7cd0e6b3baa..12f751146e5 100644
--- a/src/devices/sound/k053260.cpp
+++ b/src/devices/sound/k053260.cpp
@@ -90,7 +90,7 @@ const int k053260_device::pan_mul[8][2] = {
// k053260_device - constructor
//-------------------------------------------------
-k053260_device::k053260_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+k053260_device::k053260_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, K053260, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/k053260.h b/src/devices/sound/k053260.h
index 9b652bba4fe..494b906477f 100644
--- a/src/devices/sound/k053260.h
+++ b/src/devices/sound/k053260.h
@@ -24,7 +24,7 @@ class k053260_device : public device_t,
public device_rom_interface<21>
{
public:
- k053260_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ k053260_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
u8 main_read(offs_t offset);
void main_write(offs_t offset, u8 data);
diff --git a/src/devices/sound/k054539.cpp b/src/devices/sound/k054539.cpp
index 762bdce92c8..f704a55e9cf 100644
--- a/src/devices/sound/k054539.cpp
+++ b/src/devices/sound/k054539.cpp
@@ -18,7 +18,7 @@
DEFINE_DEVICE_TYPE(K054539, k054539_device, "k054539", "K054539 ADPCM")
-k054539_device::k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+k054539_device::k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, K054539, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/k054539.h b/src/devices/sound/k054539.h
index 15ec7ecfe16..7d398e8cd3f 100644
--- a/src/devices/sound/k054539.h
+++ b/src/devices/sound/k054539.h
@@ -33,7 +33,7 @@ public:
using apan_delegate = device_delegate<void (double left, double right)>;
// construction/destruction
- k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers
auto timer_handler() { return m_timer_handler.bind(); }
diff --git a/src/devices/sound/k056800.cpp b/src/devices/sound/k056800.cpp
index aae1aa10bf2..6810fb87c4d 100644
--- a/src/devices/sound/k056800.cpp
+++ b/src/devices/sound/k056800.cpp
@@ -20,7 +20,7 @@ DEFINE_DEVICE_TYPE(K056800, k056800_device, "k056800", "K056800 MIRAC")
// k056800_device - constructor
//-------------------------------------------------
-k056800_device::k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+k056800_device::k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, K056800, tag, owner, clock)
, m_int_pending(false)
, m_int_enabled(false)
diff --git a/src/devices/sound/k056800.h b/src/devices/sound/k056800.h
index a6d0aa6e567..c165b130734 100644
--- a/src/devices/sound/k056800.h
+++ b/src/devices/sound/k056800.h
@@ -18,7 +18,7 @@ class k056800_device : public device_t
{
public:
// construction/destruction
- k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ k056800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers
auto int_callback() { return m_int_handler.bind(); }
diff --git a/src/devices/sound/ks0164.cpp b/src/devices/sound/ks0164.cpp
index f5c3c4d02e9..d04259b5f6c 100644
--- a/src/devices/sound/ks0164.cpp
+++ b/src/devices/sound/ks0164.cpp
@@ -9,7 +9,7 @@
DEFINE_DEVICE_TYPE(KS0164, ks0164_device, "ks0164", "Samsung KS0164 Wavetable Synthesizer")
-ks0164_device::ks0164_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ks0164_device::ks0164_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, KS0164, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
diff --git a/src/devices/sound/ks0164.h b/src/devices/sound/ks0164.h
index 208176c6e2e..d3ed92557b8 100644
--- a/src/devices/sound/ks0164.h
+++ b/src/devices/sound/ks0164.h
@@ -14,7 +14,7 @@
class ks0164_device : public device_t, public device_sound_interface, public device_memory_interface, public device_serial_interface
{
public:
- ks0164_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 16934400);
+ ks0164_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(16934400));
void mpu401_data_w(u8 data);
void mpu401_ctrl_w(u8 data);
diff --git a/src/devices/sound/l7a1045_l6028_dsp_a.cpp b/src/devices/sound/l7a1045_l6028_dsp_a.cpp
index a9db61b5deb..08b6716aa48 100644
--- a/src/devices/sound/l7a1045_l6028_dsp_a.cpp
+++ b/src/devices/sound/l7a1045_l6028_dsp_a.cpp
@@ -100,7 +100,7 @@ DEFINE_DEVICE_TYPE(L7A1045, l7a1045_sound_device, "l7a1045", "L7A1045 L6028 DSP-
// l7a1045_sound_device - constructor
//-------------------------------------------------
-l7a1045_sound_device::l7a1045_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+l7a1045_sound_device::l7a1045_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, L7A1045, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
diff --git a/src/devices/sound/l7a1045_l6028_dsp_a.h b/src/devices/sound/l7a1045_l6028_dsp_a.h
index 4fff2caa465..3d132db7b18 100644
--- a/src/devices/sound/l7a1045_l6028_dsp_a.h
+++ b/src/devices/sound/l7a1045_l6028_dsp_a.h
@@ -15,7 +15,7 @@ class l7a1045_sound_device : public device_t,
public device_sound_interface
{
public:
- l7a1045_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ l7a1045_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// void set_base(int8_t* base) { m_base = base; }
diff --git a/src/devices/sound/lc7535.cpp b/src/devices/sound/lc7535.cpp
index 0f05bb14456..14a5faa8f87 100644
--- a/src/devices/sound/lc7535.cpp
+++ b/src/devices/sound/lc7535.cpp
@@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(LC7535, lc7535_device, "lc7535", "Sanyo LC7535")
// lc7535_device - constructor
//-------------------------------------------------
-lc7535_device::lc7535_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+lc7535_device::lc7535_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, LC7535, tag, owner, clock),
m_select_cb(*this),
m_volume_cb(*this),
diff --git a/src/devices/sound/lc7535.h b/src/devices/sound/lc7535.h
index 4fcf649abd9..bcd7487d9eb 100644
--- a/src/devices/sound/lc7535.h
+++ b/src/devices/sound/lc7535.h
@@ -37,7 +37,7 @@ class lc7535_device : public device_t
{
public:
// construction/destruction
- lc7535_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ lc7535_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
typedef device_delegate<void (int attenuation_right, int attenuation_left, bool loudness)> volume_delegate;
diff --git a/src/devices/sound/lmc1992.cpp b/src/devices/sound/lmc1992.cpp
index c3f2d6d3bf4..cd8dc1444c2 100644
--- a/src/devices/sound/lmc1992.cpp
+++ b/src/devices/sound/lmc1992.cpp
@@ -139,7 +139,7 @@ inline void lmc1992_device::execute_command(int addr, int data)
// lmc1992_device - constructor
//-------------------------------------------------
-lmc1992_device::lmc1992_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+lmc1992_device::lmc1992_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, LMC1992, tag, owner, clock)
, device_sound_interface(mconfig, *this)
{
diff --git a/src/devices/sound/lmc1992.h b/src/devices/sound/lmc1992.h
index beb893d9983..79c892f51d3 100644
--- a/src/devices/sound/lmc1992.h
+++ b/src/devices/sound/lmc1992.h
@@ -60,7 +60,7 @@ class lmc1992_device : public device_t,
{
public:
// construction/destruction
- lmc1992_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ lmc1992_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
DECLARE_WRITE_LINE_MEMBER( clock_w );
DECLARE_WRITE_LINE_MEMBER( data_w );
diff --git a/src/devices/sound/lynx.cpp b/src/devices/sound/lynx.cpp
index d546e4ce00c..1cfb797be88 100644
--- a/src/devices/sound/lynx.cpp
+++ b/src/devices/sound/lynx.cpp
@@ -100,12 +100,12 @@ DEFINE_DEVICE_TYPE(LYNX2_SND, lynx2_sound_device, "lynx2_sound", "Atari Hayato (
// lynx_sound_device - constructor
//-------------------------------------------------
-lynx_sound_device::lynx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+lynx_sound_device::lynx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: lynx_sound_device(mconfig, LYNX_SND, tag, owner, clock)
{
}
-lynx_sound_device::lynx_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+lynx_sound_device::lynx_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_timer_delegate(*this)
@@ -113,7 +113,7 @@ lynx_sound_device::lynx_sound_device(const machine_config &mconfig, device_type
}
-lynx2_sound_device::lynx2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+lynx2_sound_device::lynx2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: lynx_sound_device(mconfig, LYNX2_SND, tag, owner, clock)
{
}
diff --git a/src/devices/sound/lynx.h b/src/devices/sound/lynx.h
index 6f9eb575013..046583f89d3 100644
--- a/src/devices/sound/lynx.h
+++ b/src/devices/sound/lynx.h
@@ -11,7 +11,7 @@ class lynx_sound_device : public device_t, public device_sound_interface
public:
typedef device_delegate<void (void)> timer_delegate;
- lynx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ lynx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
u8 read(offs_t offset);
void write(offs_t offset, u8 data);
@@ -48,7 +48,7 @@ protected:
s16 count = 0;
};
- lynx_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ lynx_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
// device-level overrides
virtual void device_start() override;
@@ -78,7 +78,7 @@ protected:
class lynx2_sound_device : public lynx_sound_device
{
public:
- lynx2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ lynx2_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
// device-level overrides
diff --git a/src/devices/sound/mas3507d.cpp b/src/devices/sound/mas3507d.cpp
index eb156ec63b7..b7d6c52c718 100644
--- a/src/devices/sound/mas3507d.cpp
+++ b/src/devices/sound/mas3507d.cpp
@@ -46,7 +46,7 @@ ALLOW_SAVE_TYPE(mas3507d_device::i2c_command_t)
// device type definition
DEFINE_DEVICE_TYPE(MAS3507D, mas3507d_device, "mas3507d", "Micronas MAS 3507D MPEG decoder")
-mas3507d_device::mas3507d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+mas3507d_device::mas3507d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, MAS3507D, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, cb_mpeg_frame_sync(*this), cb_demand(*this)
diff --git a/src/devices/sound/mas3507d.h b/src/devices/sound/mas3507d.h
index 52c2e924109..e4cbbb25ff3 100644
--- a/src/devices/sound/mas3507d.h
+++ b/src/devices/sound/mas3507d.h
@@ -13,7 +13,7 @@ class mas3507d_device : public device_t, public device_sound_interface
{
public:
// construction/destruction
- mas3507d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ mas3507d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
auto mpeg_frame_sync_cb() { return cb_mpeg_frame_sync.bind(); }
auto demand_cb() { return cb_demand.bind(); }
diff --git a/src/devices/sound/mea8000.cpp b/src/devices/sound/mea8000.cpp
index e557d046db4..fba5500686a 100644
--- a/src/devices/sound/mea8000.cpp
+++ b/src/devices/sound/mea8000.cpp
@@ -114,7 +114,7 @@ static const int pi_table[32] =
DEFINE_DEVICE_TYPE(MEA8000, mea8000_device, "mea8000", "Philips/Signetics MEA 8000 speech synthesizer")
-mea8000_device::mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+mea8000_device::mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, MEA8000, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_write_req(*this),
diff --git a/src/devices/sound/mea8000.h b/src/devices/sound/mea8000.h
index 7538bffa62c..01cbc006129 100644
--- a/src/devices/sound/mea8000.h
+++ b/src/devices/sound/mea8000.h
@@ -19,7 +19,7 @@
class mea8000_device : public device_t, public device_sound_interface
{
public:
- mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mea8000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto req() { return m_write_req.bind(); }
diff --git a/src/devices/sound/meg.cpp b/src/devices/sound/meg.cpp
index f6a90812d6a..34bc8639081 100644
--- a/src/devices/sound/meg.cpp
+++ b/src/devices/sound/meg.cpp
@@ -27,7 +27,7 @@ void meg_base_device::offsets_map(address_map &map)
map(0, 0x7f).ram();
}
-meg_base_device::meg_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, u32 prg_size) :
+meg_base_device::meg_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 prg_size) :
cpu_device(mconfig, type, tag, owner, clock),
m_program_config("program", ENDIANNESS_BIG, 64, prg_size > 256 ? 9 : 8, -3, address_map_constructor(FUNC(meg_base_device::prg_map), this)),
m_fp_config("fp", ENDIANNESS_BIG, 16, prg_size > 256 ? 9 : 8, -1, address_map_constructor(FUNC(meg_base_device::fp_map), this)),
@@ -168,12 +168,12 @@ std::unique_ptr<util::disasm_interface> meg_base_device::create_disassembler()
return std::make_unique<meg_disassembler>(this);
}
-meg_embedded_device::meg_embedded_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+meg_embedded_device::meg_embedded_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
meg_base_device(mconfig, MEGEMB, tag, owner, clock, 384)
{
}
-meg_device::meg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+meg_device::meg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
meg_base_device(mconfig, MEG, tag, owner, clock, 256)
{
}
diff --git a/src/devices/sound/meg.h b/src/devices/sound/meg.h
index 40129158fc8..9deb7ff6af4 100644
--- a/src/devices/sound/meg.h
+++ b/src/devices/sound/meg.h
@@ -21,7 +21,7 @@ public:
AS_OFFSETS = 2
};
- meg_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, u32 prg_size);
+ meg_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 prg_size);
void prg_w(u16 address, u64 opcode);
void fp_w(u16 address, u16 value);
@@ -64,13 +64,13 @@ private:
class meg_embedded_device : public meg_base_device
{
public:
- meg_embedded_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 44100*384);
+ meg_embedded_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(44100*384));
};
class meg_device : public meg_base_device
{
public:
- meg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 44100*256);
+ meg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(44100*256));
void map(address_map &map);
private:
diff --git a/src/devices/sound/mixer.cpp b/src/devices/sound/mixer.cpp
index ba57be9b10c..64e94cc6e2c 100644
--- a/src/devices/sound/mixer.cpp
+++ b/src/devices/sound/mixer.cpp
@@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(MIXER, mixer_device, "mixer", "Generic Audio Mixer")
// mixer_device - constructor
//-------------------------------------------------
-mixer_device::mixer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+mixer_device::mixer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, MIXER, tag, owner, clock),
device_mixer_interface(mconfig, *this)
{
diff --git a/src/devices/sound/mixer.h b/src/devices/sound/mixer.h
index 5be1d45d5d3..8c98ddd26c5 100644
--- a/src/devices/sound/mixer.h
+++ b/src/devices/sound/mixer.h
@@ -17,7 +17,7 @@ class mixer_device : public device_t, public device_mixer_interface
{
public:
// internal constructor
- mixer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ mixer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
protected:
// device-level overrides
diff --git a/src/devices/sound/mm5837.cpp b/src/devices/sound/mm5837.cpp
index ae6687655f3..34582123cad 100644
--- a/src/devices/sound/mm5837.cpp
+++ b/src/devices/sound/mm5837.cpp
@@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(MM5837_STREAM, mm5837_stream_device, "mm5837_stream", "MM5837
// mm5837_device - constructor
//-------------------------------------------------
-mm5837_device::mm5837_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+mm5837_device::mm5837_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, MM5837, tag, owner, clock),
m_output_cb(*this),
m_timer(nullptr),
@@ -88,7 +88,7 @@ TIMER_CALLBACK_MEMBER(mm5837_device::update_clock_output)
// mm5837_stream_device - constructor
//-------------------------------------------------
-mm5837_stream_device::mm5837_stream_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+mm5837_stream_device::mm5837_stream_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, MM5837_STREAM, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
diff --git a/src/devices/sound/mm5837.h b/src/devices/sound/mm5837.h
index df76f6171fd..5f946472340 100644
--- a/src/devices/sound/mm5837.h
+++ b/src/devices/sound/mm5837.h
@@ -158,7 +158,7 @@ class mm5837_device : public device_t
{
public:
// construction/destruction
- mm5837_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ mm5837_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
// configuration
void set_vdd(double voltage) { m_vdd = voltage; }
@@ -186,7 +186,7 @@ class mm5837_stream_device : public device_t, public device_sound_interface
{
public:
// construction/destruction
- mm5837_stream_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mm5837_stream_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration
void set_vdd(double voltage) { m_vdd = voltage; }
diff --git a/src/devices/sound/mos6560.cpp b/src/devices/sound/mos6560.cpp
index bd35429c31c..959d123430e 100644
--- a/src/devices/sound/mos6560.cpp
+++ b/src/devices/sound/mos6560.cpp
@@ -680,7 +680,7 @@ void mos6560_device::mos6560_colorram_map(address_map &map)
map(0x000, 0x3ff).ram();
}
-mos6560_device::mos6560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant)
+mos6560_device::mos6560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant)
: device_t(mconfig, type, tag, owner, clock),
device_memory_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
@@ -693,17 +693,17 @@ mos6560_device::mos6560_device(const machine_config &mconfig, device_type type,
{
}
-mos6560_device::mos6560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+mos6560_device::mos6560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mos6560_device(mconfig, MOS6560, tag, owner, clock, TYPE_6560)
{
}
-mos6561_device::mos6561_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+mos6561_device::mos6561_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mos6560_device(mconfig, MOS6561, tag, owner, clock, TYPE_6561)
{
}
-mos656x_attack_ufo_device::mos656x_attack_ufo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+mos656x_attack_ufo_device::mos656x_attack_ufo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mos6560_device(mconfig, MOS656X_ATTACK_UFO, tag, owner, clock, TYPE_ATTACK_UFO)
{
}
diff --git a/src/devices/sound/mos6560.h b/src/devices/sound/mos6560.h
index bf1b8604695..36063198fd3 100644
--- a/src/devices/sound/mos6560.h
+++ b/src/devices/sound/mos6560.h
@@ -68,8 +68,8 @@
/* the following values depend on the VIC clock,
* but to achieve TV-frequency the clock must have a fix frequency */
-#define MOS6560_CLOCK (14318181/14)
-#define MOS6561_CLOCK (4433618/4)
+#define MOS6560_CLOCK (XTAL::u(14318181)/14)
+#define MOS6561_CLOCK (XTAL::u(4433618)/4)
@@ -85,7 +85,7 @@ class mos6560_device : public device_t,
public device_video_interface
{
public:
- mos6560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mos6560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto potx_rd_callback() { return m_read_potx.bind(); }
auto poty_rd_callback() { return m_read_poty.bind(); }
@@ -111,7 +111,7 @@ protected:
TYPE_ATTACK_UFO // NTSC-M, less features
};
- mos6560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant);
+ mos6560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant);
// device-level overrides
virtual void device_start() override;
@@ -183,7 +183,7 @@ class mos6561_device : public mos6560_device
{
public:
// construction/destruction
- mos6561_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mos6561_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
@@ -193,7 +193,7 @@ class mos656x_attack_ufo_device : public mos6560_device
{
public:
// construction/destruction
- mos656x_attack_ufo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mos656x_attack_ufo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
diff --git a/src/devices/sound/mos6581.cpp b/src/devices/sound/mos6581.cpp
index 6682ddca4fe..3f3fb7c54bf 100644
--- a/src/devices/sound/mos6581.cpp
+++ b/src/devices/sound/mos6581.cpp
@@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(MOS8580, mos8580_device, "mos8580", "MOS 8580 SID")
// mos6581_device - constructor
//-------------------------------------------------
-mos6581_device::mos6581_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant)
+mos6581_device::mos6581_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_read_potx(*this)
@@ -49,7 +49,7 @@ mos6581_device::mos6581_device(const machine_config &mconfig, device_type type,
{
}
-mos6581_device::mos6581_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+mos6581_device::mos6581_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mos6581_device(mconfig, MOS6581, tag, owner, clock, TYPE_6581)
{
}
@@ -62,7 +62,7 @@ mos6581_device::~mos6581_device()
// mos8580_device - constructor
//-------------------------------------------------
-mos8580_device::mos8580_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+mos8580_device::mos8580_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mos6581_device(mconfig, MOS8580, tag, owner, clock, TYPE_8580)
{
}
diff --git a/src/devices/sound/mos6581.h b/src/devices/sound/mos6581.h
index de05db489d3..9ab6811f6fd 100644
--- a/src/devices/sound/mos6581.h
+++ b/src/devices/sound/mos6581.h
@@ -47,7 +47,7 @@ public:
TYPE_8580
};
- mos6581_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mos6581_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
~mos6581_device();
auto potx() { return m_read_potx.bind(); }
@@ -57,7 +57,7 @@ public:
void write(offs_t offset, uint8_t data);
protected:
- mos6581_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant);
+ mos6581_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant);
// device-level overrides
virtual void device_start() override;
@@ -85,7 +85,7 @@ private:
class mos8580_device : public mos6581_device
{
public:
- mos8580_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mos8580_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
diff --git a/src/devices/sound/mos7360.cpp b/src/devices/sound/mos7360.cpp
index c76e1d8adb7..7671206679f 100644
--- a/src/devices/sound/mos7360.cpp
+++ b/src/devices/sound/mos7360.cpp
@@ -261,7 +261,7 @@ inline uint8_t mos7360_device::read_rom(offs_t offset)
// mos7360_device - constructor
//-------------------------------------------------
-mos7360_device::mos7360_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+mos7360_device::mos7360_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, MOS7360, tag, owner, clock),
device_memory_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
diff --git a/src/devices/sound/mos7360.h b/src/devices/sound/mos7360.h
index fd0a51f597b..1c05fd6e825 100644
--- a/src/devices/sound/mos7360.h
+++ b/src/devices/sound/mos7360.h
@@ -75,7 +75,7 @@ public:
static constexpr unsigned PAL_LINES = 312;
// construction/destruction
- mos7360_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mos7360_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// callbacks
auto write_irq_callback() { return m_write_irq.bind(); }
diff --git a/src/devices/sound/msm5205.cpp b/src/devices/sound/msm5205.cpp
index ba196a419a3..f06d5d467fd 100644
--- a/src/devices/sound/msm5205.cpp
+++ b/src/devices/sound/msm5205.cpp
@@ -62,12 +62,12 @@ DEFINE_DEVICE_TYPE(MSM5205, msm5205_device, "msm5205", "OKI MSM5205 ADPCM")
DEFINE_DEVICE_TYPE(MSM6585, msm6585_device, "msm6585", "OKI MSM6585 ADPCM")
-msm5205_device::msm5205_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+msm5205_device::msm5205_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: msm5205_device(mconfig, MSM5205, tag, owner, clock, 10)
{
}
-msm5205_device::msm5205_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 dac_bits)
+msm5205_device::msm5205_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 dac_bits)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_s1(false)
@@ -80,7 +80,7 @@ msm5205_device::msm5205_device(const machine_config &mconfig, device_type type,
}
-msm6585_device::msm6585_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+msm6585_device::msm6585_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: msm5205_device(mconfig, MSM6585, tag, owner, clock, 12)
{
}
diff --git a/src/devices/sound/msm5205.h b/src/devices/sound/msm5205.h
index 46052aaffcb..b7eb947ea05 100644
--- a/src/devices/sound/msm5205.h
+++ b/src/devices/sound/msm5205.h
@@ -20,7 +20,7 @@ public:
static constexpr int S64_4B = 6; // prescaler 1/64(6KHz) , data 4bit
static constexpr int SEX_4B = 7; // VCK slave mode , data 4bit
- msm5205_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ msm5205_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void set_prescaler_selector(int select)
{
@@ -48,7 +48,7 @@ public:
void s2_w(int state);
protected:
- msm5205_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 dac_bits);
+ msm5205_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 dac_bits);
// device-level overrides
virtual void device_start() override;
@@ -94,7 +94,7 @@ public:
static constexpr int S80 = 6 + 8; /* prescaler 1/80 (8KHz), data 4bit */
static constexpr int S20 = 7 + 8; /* prescaler 1/20(32KHz), data 4bit */
- msm6585_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ msm6585_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
virtual int get_prescaler() const override;
diff --git a/src/devices/sound/msm5232.cpp b/src/devices/sound/msm5232.cpp
index 3d08f3582a8..7506d2dd2ae 100644
--- a/src/devices/sound/msm5232.cpp
+++ b/src/devices/sound/msm5232.cpp
@@ -12,7 +12,7 @@
DEFINE_DEVICE_TYPE(MSM5232, msm5232_device, "msm5232", "MSM5232")
-msm5232_device::msm5232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+msm5232_device::msm5232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, MSM5232, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_stream(nullptr)
diff --git a/src/devices/sound/msm5232.h b/src/devices/sound/msm5232.h
index 552cd7669e3..0ee73ae1d32 100644
--- a/src/devices/sound/msm5232.h
+++ b/src/devices/sound/msm5232.h
@@ -10,13 +10,13 @@ class msm5232_device : public device_t,
public device_sound_interface
{
public:
- msm5232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ msm5232_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void set_capacitors(double cap1, double cap2, double cap3, double cap4, double cap5, double cap6, double cap7, double cap8);
auto gate() { return m_gate_handler_cb.bind(); }
void write(offs_t offset, uint8_t data);
- void set_clock(int clock);
+ void set_clock(const XTAL &clock);
protected:
// device-level overrides
diff --git a/src/devices/sound/multipcm.cpp b/src/devices/sound/multipcm.cpp
index e8564f22698..175b5c2a8d4 100644
--- a/src/devices/sound/multipcm.cpp
+++ b/src/devices/sound/multipcm.cpp
@@ -464,7 +464,7 @@ void multipcm_device::write(offs_t offset, uint8_t data)
DEFINE_DEVICE_TYPE(MULTIPCM, multipcm_device, "ymw258f", "Yamaha YMW-258-F")
-multipcm_device::multipcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+multipcm_device::multipcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, MULTIPCM, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_rom_interface(mconfig, *this),
diff --git a/src/devices/sound/multipcm.h b/src/devices/sound/multipcm.h
index 786b5a3f02c..bc62df41538 100644
--- a/src/devices/sound/multipcm.h
+++ b/src/devices/sound/multipcm.h
@@ -18,7 +18,7 @@ class multipcm_device : public device_t,
public device_rom_interface<22, 0, 0, ENDIANNESS_BIG>
{
public:
- multipcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ multipcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void write(offs_t offset, uint8_t data);
uint8_t read();
diff --git a/src/devices/sound/n63701x.cpp b/src/devices/sound/n63701x.cpp
index 6f16c988d8e..04bf7d62925 100644
--- a/src/devices/sound/n63701x.cpp
+++ b/src/devices/sound/n63701x.cpp
@@ -31,7 +31,7 @@ static const int vol_table[4] = { 26, 84, 200, 258 };
// device type definition
DEFINE_DEVICE_TYPE(NAMCO_63701X, namco_63701x_device, "namco_63701x", "Namco 63701X")
-namco_63701x_device::namco_63701x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+namco_63701x_device::namco_63701x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, NAMCO_63701X, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_rom(*this, DEVICE_SELF)
diff --git a/src/devices/sound/n63701x.h b/src/devices/sound/n63701x.h
index 3ca5411df6d..c45b4d4447d 100644
--- a/src/devices/sound/n63701x.h
+++ b/src/devices/sound/n63701x.h
@@ -16,7 +16,7 @@ class namco_63701x_device : public device_t,
public device_sound_interface
{
public:
- namco_63701x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ namco_63701x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void write(offs_t offset, uint8_t data);
diff --git a/src/devices/sound/namco.cpp b/src/devices/sound/namco.cpp
index a83f0ccbb65..4e3d600fdb6 100644
--- a/src/devices/sound/namco.cpp
+++ b/src/devices/sound/namco.cpp
@@ -49,7 +49,7 @@ DEFINE_DEVICE_TYPE(NAMCO, namco_device, "namco", "Namco")
DEFINE_DEVICE_TYPE(NAMCO_15XX, namco_15xx_device, "namco_15xx", "Namco 15xx")
DEFINE_DEVICE_TYPE(NAMCO_CUS30, namco_cus30_device, "namco_cus30", "Namco CUS30")
-namco_audio_device::namco_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+namco_audio_device::namco_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_wave_ptr(*this, DEVICE_SELF)
@@ -66,19 +66,19 @@ namco_audio_device::namco_audio_device(const machine_config &mconfig, device_typ
{
}
-namco_device::namco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+namco_device::namco_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: namco_audio_device(mconfig, NAMCO, tag, owner, clock)
, m_soundregs(nullptr)
{
}
-namco_15xx_device::namco_15xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+namco_15xx_device::namco_15xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
:namco_audio_device(mconfig, NAMCO_15XX, tag, owner, clock)
, m_soundregs(nullptr)
{
}
-namco_cus30_device::namco_cus30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+namco_cus30_device::namco_cus30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: namco_audio_device(mconfig, NAMCO_CUS30, tag, owner, clock)
{
}
diff --git a/src/devices/sound/namco.h b/src/devices/sound/namco.h
index f032a71a536..45bda912528 100644
--- a/src/devices/sound/namco.h
+++ b/src/devices/sound/namco.h
@@ -34,7 +34,7 @@ protected:
int32_t waveform_select;
};
- namco_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ namco_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
// device-level overrides
virtual void device_start() override;
@@ -76,7 +76,7 @@ protected:
class namco_device : public namco_audio_device
{
public:
- namco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ namco_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void pacman_sound_w(offs_t offset, uint8_t data);
@@ -97,7 +97,7 @@ private:
class namco_15xx_device : public namco_audio_device
{
public:
- namco_15xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ namco_15xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void namco_15xx_w(offs_t offset, uint8_t data);
uint8_t sharedram_r(offs_t offset);
@@ -117,7 +117,7 @@ private:
class namco_cus30_device : public namco_audio_device
{
public:
- namco_cus30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ namco_cus30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void namcos1_cus30_w(offs_t offset, uint8_t data); /* wavedata + sound registers + RAM */
uint8_t namcos1_cus30_r(offs_t offset);
diff --git a/src/devices/sound/namco_163.cpp b/src/devices/sound/namco_163.cpp
index c26a1f1c638..87a3611fc37 100644
--- a/src/devices/sound/namco_163.cpp
+++ b/src/devices/sound/namco_163.cpp
@@ -16,7 +16,7 @@
DEFINE_DEVICE_TYPE(NAMCO_163, namco_163_sound_device, "namco_163_sound", "Namco 163 (Sound)")
-namco_163_sound_device::namco_163_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+namco_163_sound_device::namco_163_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, NAMCO_163, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_reg_addr(0x78)
diff --git a/src/devices/sound/namco_163.h b/src/devices/sound/namco_163.h
index f3a7428300d..fd928bc31e4 100644
--- a/src/devices/sound/namco_163.h
+++ b/src/devices/sound/namco_163.h
@@ -10,7 +10,7 @@ class namco_163_sound_device : public device_t,
public device_sound_interface
{
public:
- namco_163_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ namco_163_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
DECLARE_WRITE_LINE_MEMBER(disable_w);
diff --git a/src/devices/sound/nes_apu.cpp b/src/devices/sound/nes_apu.cpp
index ee059c1cd22..9af003bfff7 100644
--- a/src/devices/sound/nes_apu.cpp
+++ b/src/devices/sound/nes_apu.cpp
@@ -48,7 +48,7 @@
DEFINE_DEVICE_TYPE(NES_APU, nesapu_device, "nesapu", "RP2A0X APU")
DEFINE_DEVICE_TYPE(APU_2A03, apu2a03_device, "apu2a03", "RP2A03 APU")
-nesapu_device::nesapu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
+nesapu_device::nesapu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_is_pal(0)
@@ -59,7 +59,7 @@ nesapu_device::nesapu_device(const machine_config &mconfig, device_type type, co
{
}
-nesapu_device::nesapu_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock)
+nesapu_device::nesapu_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock)
: nesapu_device(mconfig, NES_APU, tag, owner, clock)
{
}
diff --git a/src/devices/sound/nes_apu.h b/src/devices/sound/nes_apu.h
index 8837e683034..d7e17a530ef 100644
--- a/src/devices/sound/nes_apu.h
+++ b/src/devices/sound/nes_apu.h
@@ -43,7 +43,7 @@ class nesapu_device : public device_t,
public device_sound_interface
{
public:
- nesapu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ nesapu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers
auto irq() { return m_irq_handler.bind(); }
@@ -56,7 +56,7 @@ public:
void write(offs_t offset, u8 data);
protected:
- nesapu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+ nesapu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
// device-level overrides
virtual void device_start() override;
@@ -97,7 +97,7 @@ private:
class apu2a03_device : public nesapu_device
{
public:
- apu2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ apu2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
virtual void update_lfsr(apu_t::noise_t &chan) override;
diff --git a/src/devices/sound/nes_apu_vt.cpp b/src/devices/sound/nes_apu_vt.cpp
index f93c3203bac..a3093b1e9e3 100644
--- a/src/devices/sound/nes_apu_vt.cpp
+++ b/src/devices/sound/nes_apu_vt.cpp
@@ -12,7 +12,7 @@
DEFINE_DEVICE_TYPE(NES_APU_VT, nes_apu_vt_device, "nes_apu_vt", "XOP APU")
-nes_apu_vt_device::nes_apu_vt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+nes_apu_vt_device::nes_apu_vt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: nesapu_device(mconfig, NES_APU_VT, tag, owner, clock)
{
}
diff --git a/src/devices/sound/nes_apu_vt.h b/src/devices/sound/nes_apu_vt.h
index f93616673fa..c38f3c3bd9e 100644
--- a/src/devices/sound/nes_apu_vt.h
+++ b/src/devices/sound/nes_apu_vt.h
@@ -14,7 +14,7 @@ class nes_apu_vt_device : public nesapu_device
{
public:
// construction/destruction
- nes_apu_vt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ nes_apu_vt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
virtual void device_start() override;
diff --git a/src/devices/sound/okim6258.cpp b/src/devices/sound/okim6258.cpp
index 349fe9ca13c..88ff1ddfb55 100644
--- a/src/devices/sound/okim6258.cpp
+++ b/src/devices/sound/okim6258.cpp
@@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(OKIM6258, okim6258_device, "okim6258", "OKI MSM6258 ADPCM")
// okim6258_device - constructor
//-------------------------------------------------
-okim6258_device::okim6258_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+okim6258_device::okim6258_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, OKIM6258, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_status(0),
diff --git a/src/devices/sound/okim6258.h b/src/devices/sound/okim6258.h
index 95189f0ef3c..e5c37327645 100644
--- a/src/devices/sound/okim6258.h
+++ b/src/devices/sound/okim6258.h
@@ -26,7 +26,7 @@ public:
static constexpr int OUTPUT_10BITS = 10;
static constexpr int OUTPUT_12BITS = 12;
- okim6258_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ okim6258_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration
void set_start_div(int div) { m_start_divider = div; }
diff --git a/src/devices/sound/okim6295.cpp b/src/devices/sound/okim6295.cpp
index fbded659cf1..b14ffccf046 100644
--- a/src/devices/sound/okim6295.cpp
+++ b/src/devices/sound/okim6295.cpp
@@ -85,7 +85,7 @@ const stream_buffer::sample_t okim6295_device::s_volume_table[16] =
// okim6295_device - constructor
//-------------------------------------------------
-okim6295_device::okim6295_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+okim6295_device::okim6295_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, OKIM6295, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_rom_interface(mconfig, *this),
diff --git a/src/devices/sound/okim6295.h b/src/devices/sound/okim6295.h
index 4d372a8a47c..cbad0f281a3 100644
--- a/src/devices/sound/okim6295.h
+++ b/src/devices/sound/okim6295.h
@@ -35,12 +35,12 @@ public:
};
// construction/destruction
- okim6295_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, pin7_state pin7)
+ okim6295_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, pin7_state pin7)
: okim6295_device(mconfig, tag, owner, clock)
{
config_pin7(pin7);
}
- okim6295_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ okim6295_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// inline configuration helpers
void config_pin7(pin7_state pin7) { assert(!started()); m_pin7_state = pin7; }
diff --git a/src/devices/sound/okim6376.cpp b/src/devices/sound/okim6376.cpp
index 58a52858ecf..b95fe5284a6 100644
--- a/src/devices/sound/okim6376.cpp
+++ b/src/devices/sound/okim6376.cpp
@@ -113,7 +113,7 @@ void okim6376_device::ADPCMVoice::reset()
DEFINE_DEVICE_TYPE(OKIM6376, okim6376_device, "okim6376", "OKI MSM6376 ADPCM")
DEFINE_DEVICE_TYPE(OKIM6650, okim6650_device, "okim6650", "OKI MSM6650 ADPCM")
-okim6376_device::okim6376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addrbits)
+okim6376_device::okim6376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits)
: device_t(mconfig, type, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_rom_interface(mconfig, *this),
@@ -135,12 +135,12 @@ okim6376_device::okim6376_device(const machine_config &mconfig, device_type type
override_address_width(addrbits);
}
-okim6376_device::okim6376_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+okim6376_device::okim6376_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: okim6376_device(mconfig, OKIM6376, tag, owner, clock, 21)
{
}
-okim6650_device::okim6650_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+okim6650_device::okim6650_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: okim6376_device(mconfig, OKIM6650, tag, owner, clock, 23)
{
}
diff --git a/src/devices/sound/okim6376.h b/src/devices/sound/okim6376.h
index aca7eb4de31..2ea932be760 100644
--- a/src/devices/sound/okim6376.h
+++ b/src/devices/sound/okim6376.h
@@ -12,7 +12,7 @@
class okim6376_device : public device_t, public device_sound_interface, public device_rom_interface<23, 0, 0, ENDIANNESS_BIG>
{
public:
- okim6376_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ okim6376_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void write(uint8_t data);
@@ -23,7 +23,7 @@ public:
DECLARE_READ_LINE_MEMBER( nar_r );
protected:
- okim6376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addrbits);
+ okim6376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits);
// device-level overrides
virtual void device_start() override;
@@ -84,7 +84,7 @@ protected:
class okim6650_device : public okim6376_device
{
public:
- okim6650_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ okim6650_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
DECLARE_WRITE_LINE_MEMBER( cmd_w );
diff --git a/src/devices/sound/okim9810.cpp b/src/devices/sound/okim9810.cpp
index db658eacf00..8eca6dfaf08 100644
--- a/src/devices/sound/okim9810.cpp
+++ b/src/devices/sound/okim9810.cpp
@@ -80,7 +80,7 @@ const uint32_t okim9810_device::s_sampling_freq_div_table[16] =
// okim9810_device - constructor
//-------------------------------------------------
-okim9810_device::okim9810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+okim9810_device::okim9810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, OKIM9810, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_rom_interface(mconfig, *this),
diff --git a/src/devices/sound/okim9810.h b/src/devices/sound/okim9810.h
index 18db148aa40..3b0e145b0a1 100644
--- a/src/devices/sound/okim9810.h
+++ b/src/devices/sound/okim9810.h
@@ -34,7 +34,7 @@ class okim9810_device : public device_t,
{
public:
// construction/destruction
- okim9810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ okim9810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
uint8_t read_status();
void write_tmp_register(uint8_t command);
diff --git a/src/devices/sound/pcd3311.cpp b/src/devices/sound/pcd3311.cpp
index 4b5a4fb87f5..1102e923ff8 100644
--- a/src/devices/sound/pcd3311.cpp
+++ b/src/devices/sound/pcd3311.cpp
@@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(PCD3311, pcd3311_device, "pcd3311", "PCD3311")
// pcd3311_device - constructor
//-------------------------------------------------
-pcd3311_device::pcd3311_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+pcd3311_device::pcd3311_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, PCD3311, tag, owner, clock),
device_sound_interface(mconfig, *this)
{
diff --git a/src/devices/sound/pcd3311.h b/src/devices/sound/pcd3311.h
index 5d5b8870008..26a74d7a58d 100644
--- a/src/devices/sound/pcd3311.h
+++ b/src/devices/sound/pcd3311.h
@@ -36,7 +36,7 @@ class pcd3311_device : public device_t,
{
public:
// construction/destruction
- pcd3311_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ pcd3311_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void write(uint8_t data) { m_data = data; }
void strobe_w(int state) { m_strobe = state; }
diff --git a/src/devices/sound/pci-ac97.cpp b/src/devices/sound/pci-ac97.cpp
index 939ef832ab7..6b944c933fc 100644
--- a/src/devices/sound/pci-ac97.cpp
+++ b/src/devices/sound/pci-ac97.cpp
@@ -21,7 +21,7 @@ void ac97_device::bus_mastering_map(address_map &map)
{
}
-ac97_device::ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ac97_device::ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: pci_device(mconfig, AC97, tag, owner, clock)
{
}
diff --git a/src/devices/sound/pci-ac97.h b/src/devices/sound/pci-ac97.h
index 4633337e6dc..ba7c82903f1 100644
--- a/src/devices/sound/pci-ac97.h
+++ b/src/devices/sound/pci-ac97.h
@@ -9,12 +9,12 @@
class ac97_device : public pci_device {
public:
- ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id)
+ ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t main_id, uint32_t revision, uint32_t subdevice_id)
: ac97_device(mconfig, tag, owner, clock)
{
set_ids(main_id, revision, 0x040300, subdevice_id);
}
- ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ac97_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
virtual void device_start() override;
diff --git a/src/devices/sound/pokey.cpp b/src/devices/sound/pokey.cpp
index b490126c0d5..f003f048199 100644
--- a/src/devices/sound/pokey.cpp
+++ b/src/devices/sound/pokey.cpp
@@ -192,7 +192,7 @@ DEFINE_DEVICE_TYPE(POKEY, pokey_device, "pokey", "Atari C012294 POKEY")
// pokey_device - constructor
//-------------------------------------------------
-pokey_device::pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+pokey_device::pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, POKEY, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_execute_interface(mconfig, *this),
diff --git a/src/devices/sound/pokey.h b/src/devices/sound/pokey.h
index 018394d3003..2c167fed057 100644
--- a/src/devices/sound/pokey.h
+++ b/src/devices/sound/pokey.h
@@ -66,7 +66,7 @@ public:
/* CONSTANT DEFINITIONS */
/* exact 1.79 MHz clock freq (of the Atari 800 that is) */
- static constexpr unsigned FREQ_17_EXACT = 1789790;
+ static constexpr auto FREQ_17_EXACT = XTAL::u(1789790);
enum
{
@@ -124,7 +124,7 @@ public:
};
// construction/destruction
- pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ pokey_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
template <unsigned N> auto pot_r() { return m_pot_r_cb[N].bind(); }
auto allpot_r() { return m_allpot_r_cb.bind(); }
diff --git a/src/devices/sound/qs1000.cpp b/src/devices/sound/qs1000.cpp
index fb42e4936db..8f6c1997ecc 100644
--- a/src/devices/sound/qs1000.cpp
+++ b/src/devices/sound/qs1000.cpp
@@ -164,7 +164,7 @@ ROM_END
//-------------------------------------------------
// qs1000_device - constructor
//-------------------------------------------------
-qs1000_device::qs1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+qs1000_device::qs1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, QS1000, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_rom_interface(mconfig, *this),
diff --git a/src/devices/sound/qs1000.h b/src/devices/sound/qs1000.h
index 22683ff7d35..77765d13e2e 100644
--- a/src/devices/sound/qs1000.h
+++ b/src/devices/sound/qs1000.h
@@ -31,7 +31,7 @@ public:
static constexpr feature_type imperfect_features() { return feature::SOUND; }
// construction/destruction
- qs1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ qs1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void set_external_rom(bool external_rom) { m_external_rom = external_rom; }
auto p1_in() { return m_in_p1_cb.bind(); }
diff --git a/src/devices/sound/qsound.cpp b/src/devices/sound/qsound.cpp
index bae635a6f7b..58a0ec3eeec 100644
--- a/src/devices/sound/qsound.cpp
+++ b/src/devices/sound/qsound.cpp
@@ -130,7 +130,7 @@ ROM_END
// qsound_device - constructor
//-------------------------------------------------
-qsound_device::qsound_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
+qsound_device::qsound_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, QSOUND, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/qsound.h b/src/devices/sound/qsound.h
index 48ccf3acf87..d571c14f9fb 100644
--- a/src/devices/sound/qsound.h
+++ b/src/devices/sound/qsound.h
@@ -18,7 +18,7 @@ class qsound_device : public device_t, public device_sound_interface, public dev
{
public:
// default 60MHz clock (divided by 2 for DSP core clock, and then by 1248 for sample rate)
- qsound_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 60'000'000);
+ qsound_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL::u(60'000'000));
void qsound_w(offs_t offset, u8 data);
u8 qsound_r();
diff --git a/src/devices/sound/qsoundhle.cpp b/src/devices/sound/qsoundhle.cpp
index ed69b569cb5..42658abd73a 100644
--- a/src/devices/sound/qsoundhle.cpp
+++ b/src/devices/sound/qsoundhle.cpp
@@ -39,7 +39,7 @@ ROM_END
// qsound_hle_device - constructor
//-------------------------------------------------
-qsound_hle_device::qsound_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+qsound_hle_device::qsound_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, QSOUND_HLE, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/qsoundhle.h b/src/devices/sound/qsoundhle.h
index d5256854842..0cc1f5a7bd6 100644
--- a/src/devices/sound/qsoundhle.h
+++ b/src/devices/sound/qsoundhle.h
@@ -18,7 +18,7 @@ class qsound_hle_device : public device_t, public device_sound_interface, public
{
public:
// default 60MHz clock (divided by 2 for DSP core clock, and then by 1248 for sample rate)
- qsound_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock = 60'000'000);
+ qsound_hle_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL::u(60'000'000));
void qsound_w(offs_t offset, uint8_t data);
uint8_t qsound_r();
diff --git a/src/devices/sound/rf5c400.cpp b/src/devices/sound/rf5c400.cpp
index fc466fb0a0f..ab3af9117c9 100644
--- a/src/devices/sound/rf5c400.cpp
+++ b/src/devices/sound/rf5c400.cpp
@@ -115,7 +115,7 @@ void rf5c400_device::envelope_tables::init(uint32_t clock)
// rf5c400_device - constructor
//-------------------------------------------------
-rf5c400_device::rf5c400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+rf5c400_device::rf5c400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, RF5C400, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/rf5c400.h b/src/devices/sound/rf5c400.h
index a91ba9ee097..a95c92f6d10 100644
--- a/src/devices/sound/rf5c400.h
+++ b/src/devices/sound/rf5c400.h
@@ -23,7 +23,7 @@ class rf5c400_device : public device_t,
public:
static constexpr feature_type imperfect_features() { return feature::SOUND; } // unemulated and/or unverified effects and envelopes
- rf5c400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ rf5c400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
uint16_t rf5c400_r(offs_t offset, uint16_t mem_mask = ~0);
void rf5c400_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
diff --git a/src/devices/sound/rf5c68.cpp b/src/devices/sound/rf5c68.cpp
index 09fd397d4fb..8530fec3e2b 100644
--- a/src/devices/sound/rf5c68.cpp
+++ b/src/devices/sound/rf5c68.cpp
@@ -40,7 +40,7 @@ void rf5c164_device::rf5c164_map(address_map &map)
// rf5c68_device - constructor
//-------------------------------------------------
-rf5c68_device::rf5c68_device(const machine_config & mconfig, device_type type, const char * tag, device_t * owner, u32 clock, int output_bits)
+rf5c68_device::rf5c68_device(const machine_config & mconfig, device_type type, const char * tag, device_t * owner, const XTAL &clock, int output_bits)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_memory_interface(mconfig, *this)
@@ -54,7 +54,7 @@ rf5c68_device::rf5c68_device(const machine_config & mconfig, device_type type, c
{
}
-rf5c68_device::rf5c68_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+rf5c68_device::rf5c68_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: rf5c68_device(mconfig, RF5C68, tag, owner, clock, 10)
{
}
@@ -64,7 +64,7 @@ rf5c68_device::rf5c68_device(const machine_config &mconfig, const char *tag, dev
// rf5c164_device - constructor
//-------------------------------------------------
-rf5c164_device::rf5c164_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+rf5c164_device::rf5c164_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: rf5c68_device(mconfig, RF5C164, tag, owner, clock, 16)
{
}
diff --git a/src/devices/sound/rf5c68.h b/src/devices/sound/rf5c68.h
index d78f378faaf..219d11477da 100644
--- a/src/devices/sound/rf5c68.h
+++ b/src/devices/sound/rf5c68.h
@@ -26,7 +26,7 @@ class rf5c68_device : public device_t,
public:
typedef device_delegate<void (int channel)> sample_end_cb_delegate;
- rf5c68_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ rf5c68_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
template <typename... T> void set_end_callback(T &&... args) { m_sample_end_cb.set(std::forward<T>(args)...); }
@@ -38,7 +38,7 @@ public:
void map(address_map &map);
protected:
- rf5c68_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int output_bits);
+ rf5c68_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int output_bits);
// device-level overrides
virtual void device_start() override;
@@ -84,7 +84,7 @@ private:
class rf5c164_device : public rf5c68_device
{
public:
- rf5c164_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ rf5c164_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void rf5c164_map(address_map &map);
};
diff --git a/src/devices/sound/rolandpcm.cpp b/src/devices/sound/rolandpcm.cpp
index e31132b934e..16191b60282 100644
--- a/src/devices/sound/rolandpcm.cpp
+++ b/src/devices/sound/rolandpcm.cpp
@@ -26,7 +26,7 @@
DEFINE_DEVICE_TYPE(MB87419_MB87420, mb87419_mb87420_device, "mb87419_mb87420", "Roland MB87419/MB87420 PCM")
-mb87419_mb87420_device::mb87419_mb87420_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+mb87419_mb87420_device::mb87419_mb87420_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, MB87419_MB87420, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/rolandpcm.h b/src/devices/sound/rolandpcm.h
index 702da28dcf1..0a6c6a64397 100644
--- a/src/devices/sound/rolandpcm.h
+++ b/src/devices/sound/rolandpcm.h
@@ -10,7 +10,7 @@
class mb87419_mb87420_device : public device_t, public device_sound_interface, public device_rom_interface<22>
{
public:
- mb87419_mb87420_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ mb87419_mb87420_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto int_callback() { return m_int_callback.bind(); }
diff --git a/src/devices/sound/rp2c33_snd.cpp b/src/devices/sound/rp2c33_snd.cpp
index d0701041a6b..b1efe47636e 100644
--- a/src/devices/sound/rp2c33_snd.cpp
+++ b/src/devices/sound/rp2c33_snd.cpp
@@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(RP2C33_SOUND, rp2c33_sound_device, "rp2c33_snd", "Ricoh RP2C3
// rp2c33_sound_device - constructor
//-------------------------------------------------
-rp2c33_sound_device::rp2c33_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+rp2c33_sound_device::rp2c33_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, RP2C33_SOUND, tag, owner, clock)
, device_sound_interface(mconfig, *this)
{
diff --git a/src/devices/sound/rp2c33_snd.h b/src/devices/sound/rp2c33_snd.h
index bdb32e58f60..1f480519e3b 100644
--- a/src/devices/sound/rp2c33_snd.h
+++ b/src/devices/sound/rp2c33_snd.h
@@ -26,7 +26,7 @@ public:
static constexpr feature_type imperfect_features() { return feature::SOUND; } // one or more features are not verified, and possibly incorrect
// construction/destruction
- rp2c33_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ rp2c33_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// host interface
void write(offs_t offset, u8 data);
diff --git a/src/devices/sound/s14001a.cpp b/src/devices/sound/s14001a.cpp
index 50f2ca07eaa..b3bf75c777b 100644
--- a/src/devices/sound/s14001a.cpp
+++ b/src/devices/sound/s14001a.cpp
@@ -196,7 +196,7 @@ uint8_t CalculateOutput(bool bVoiced, bool bXSilence, uint8_t uPPQtr, bool bPPQS
// device definition
DEFINE_DEVICE_TYPE(S14001A, s14001a_device, "s14001a", "SSi TSI S14001A")
-s14001a_device::s14001a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+s14001a_device::s14001a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, S14001A, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_SpeechRom(*this, DEVICE_SELF),
diff --git a/src/devices/sound/s14001a.h b/src/devices/sound/s14001a.h
index 511503d9daa..d43884b310b 100644
--- a/src/devices/sound/s14001a.h
+++ b/src/devices/sound/s14001a.h
@@ -11,7 +11,7 @@
class s14001a_device : public device_t, public device_sound_interface
{
public:
- s14001a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ s14001a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers
auto bsy() { return m_bsy_handler.bind(); }
diff --git a/src/devices/sound/s_dsp.cpp b/src/devices/sound/s_dsp.cpp
index 98cd204b503..1492738534e 100644
--- a/src/devices/sound/s_dsp.cpp
+++ b/src/devices/sound/s_dsp.cpp
@@ -141,7 +141,7 @@ ALLOW_SAVE_TYPE(s_dsp_device::env_state_t32);
DEFINE_DEVICE_TYPE(S_DSP, s_dsp_device, "s_dsp", "Nintendo/Sony S-DSP")
-s_dsp_device::s_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+s_dsp_device::s_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, S_DSP, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_memory_interface(mconfig, *this)
diff --git a/src/devices/sound/s_dsp.h b/src/devices/sound/s_dsp.h
index 00097b17303..f52d638eda4 100644
--- a/src/devices/sound/s_dsp.h
+++ b/src/devices/sound/s_dsp.h
@@ -16,7 +16,7 @@
class s_dsp_device : public device_t, public device_sound_interface, public device_memory_interface
{
public:
- s_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ s_dsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void set_volume(int volume);
diff --git a/src/devices/sound/saa1099.cpp b/src/devices/sound/saa1099.cpp
index 682cbb5873f..eeaa4dd44e6 100644
--- a/src/devices/sound/saa1099.cpp
+++ b/src/devices/sound/saa1099.cpp
@@ -136,7 +136,7 @@ DEFINE_DEVICE_TYPE(SAA1099, saa1099_device, "saa1099", "Philips SAA1099")
// saa1099_device - constructor
//-------------------------------------------------
-saa1099_device::saa1099_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+saa1099_device::saa1099_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SAA1099, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_stream(nullptr)
diff --git a/src/devices/sound/saa1099.h b/src/devices/sound/saa1099.h
index 87f5b58f48a..7b0b3a783b2 100644
--- a/src/devices/sound/saa1099.h
+++ b/src/devices/sound/saa1099.h
@@ -19,7 +19,7 @@ class saa1099_device : public device_t,
public device_sound_interface
{
public:
- saa1099_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ saa1099_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void control_w(u8 data);
void data_w(u8 data);
diff --git a/src/devices/sound/samples.cpp b/src/devices/sound/samples.cpp
index 999f4da7e0b..8120b917ff9 100644
--- a/src/devices/sound/samples.cpp
+++ b/src/devices/sound/samples.cpp
@@ -46,12 +46,12 @@ DEFINE_DEVICE_TYPE(SAMPLES, samples_device, "samples", "Samples")
// samples_device - constructors
//-------------------------------------------------
-samples_device::samples_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+samples_device::samples_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: samples_device(mconfig, SAMPLES, tag, owner, clock)
{
}
-samples_device::samples_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+samples_device::samples_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_channels(0)
diff --git a/src/devices/sound/samples.h b/src/devices/sound/samples.h
index 073fc3ae180..dcc10c34694 100644
--- a/src/devices/sound/samples.h
+++ b/src/devices/sound/samples.h
@@ -34,7 +34,7 @@ public:
typedef device_delegate<void ()> start_cb_delegate;
// construction/destruction
- samples_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ samples_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
// configuration helpers
void set_channels(uint8_t channels) { m_channels = channels; }
@@ -75,7 +75,7 @@ public:
protected:
// subclasses can do it this way
- samples_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ samples_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
// device-level overrides
virtual void device_start() override;
diff --git a/src/devices/sound/sb0400.cpp b/src/devices/sound/sb0400.cpp
index b124a99b8f9..99073db5d8b 100644
--- a/src/devices/sound/sb0400.cpp
+++ b/src/devices/sound/sb0400.cpp
@@ -9,7 +9,7 @@ void sb0400_device::map(address_map &map)
{
}
-sb0400_device::sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sb0400_device::sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: pci_device(mconfig, SB0400, tag, owner, clock)
{
}
diff --git a/src/devices/sound/sb0400.h b/src/devices/sound/sb0400.h
index 440e82a0544..bd4f4d887d0 100644
--- a/src/devices/sound/sb0400.h
+++ b/src/devices/sound/sb0400.h
@@ -9,12 +9,12 @@
class sb0400_device : public pci_device {
public:
- sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subdevice_id)
+ sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subdevice_id)
: sb0400_device(mconfig, tag, owner, clock)
{
set_ids(0x11020008, 0x00, 0x040100, subdevice_id);
}
- sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sb0400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
virtual void device_start() override;
diff --git a/src/devices/sound/scsp.cpp b/src/devices/sound/scsp.cpp
index 96436fefd90..e6d17af76b3 100644
--- a/src/devices/sound/scsp.cpp
+++ b/src/devices/sound/scsp.cpp
@@ -142,7 +142,7 @@ static const float SDLT[8] = {-1000000.0f,-36.0f,-30.0f,-24.0f,-18.0f,-12.0f,-6.
DEFINE_DEVICE_TYPE(SCSP, scsp_device, "scsp", "Yamaha YMF292-F SCSP")
-scsp_device::scsp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+scsp_device::scsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SCSP, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_rom_interface(mconfig, *this),
diff --git a/src/devices/sound/scsp.h b/src/devices/sound/scsp.h
index dfd62c24dd0..e6bd22acfa8 100644
--- a/src/devices/sound/scsp.h
+++ b/src/devices/sound/scsp.h
@@ -25,7 +25,7 @@ class scsp_device : public device_t,
public:
static constexpr feature_type imperfect_features() { return feature::SOUND; } // DSP / EG incorrections, etc
- scsp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 22'579'200);
+ scsp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(22'579'200));
auto irq_cb() { return m_irq_cb.bind(); }
auto main_irq_cb() { return m_main_irq_cb.bind(); }
diff --git a/src/devices/sound/segapcm.cpp b/src/devices/sound/segapcm.cpp
index 9f7a9b6fc63..e9415754590 100644
--- a/src/devices/sound/segapcm.cpp
+++ b/src/devices/sound/segapcm.cpp
@@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(SEGAPCM, segapcm_device, "segapcm", "Sega PCM")
// segapcm_device - constructor
//-------------------------------------------------
-segapcm_device::segapcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+segapcm_device::segapcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SEGAPCM, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/segapcm.h b/src/devices/sound/segapcm.h
index ff098088037..bb9c6d44941 100644
--- a/src/devices/sound/segapcm.h
+++ b/src/devices/sound/segapcm.h
@@ -27,7 +27,7 @@ public:
static constexpr int BANK_MASKF = 0xf0 << 16;
static constexpr int BANK_MASKF8 = 0xf8 << 16;
- segapcm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ segapcm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration
void set_bank(int bank) { m_bankshift = (bank & 0xf); m_bankmask = (0x70|((bank >> 16) & 0xfc)); }
diff --git a/src/devices/sound/setapcm.cpp b/src/devices/sound/setapcm.cpp
index ab002f68f10..fdde501f704 100644
--- a/src/devices/sound/setapcm.cpp
+++ b/src/devices/sound/setapcm.cpp
@@ -75,7 +75,7 @@ DEFINE_DEVICE_TYPE(ST0032_SOUND, st0032_sound_device, "st0032_sound", "Seta ST-0
//-------------------------------------------------
template<unsigned MaxVoices, unsigned Divider>
-setapcm_device<MaxVoices, Divider>::setapcm_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
+setapcm_device<MaxVoices, Divider>::setapcm_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
@@ -84,12 +84,12 @@ setapcm_device<MaxVoices, Divider>::setapcm_device(const machine_config &mconfig
{
}
-nile_sound_device::nile_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+nile_sound_device::nile_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: setapcm_device<8, 160>(mconfig, NILE_SOUND, tag, owner, clock)
{
}
-st0032_sound_device::st0032_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+st0032_sound_device::st0032_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: setapcm_device<16, 384>(mconfig, ST0032_SOUND, tag, owner, clock)
{
}
diff --git a/src/devices/sound/setapcm.h b/src/devices/sound/setapcm.h
index 2da5c147563..ed96f17fe79 100644
--- a/src/devices/sound/setapcm.h
+++ b/src/devices/sound/setapcm.h
@@ -31,7 +31,7 @@ public:
u16 key_r();
protected:
- setapcm_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+ setapcm_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
// device-level overrides
virtual void device_start() override;
@@ -82,7 +82,7 @@ private:
class nile_sound_device : public setapcm_device<8, 160>
{
public:
- nile_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ nile_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
// ======================> st0032_sound_device
@@ -90,7 +90,7 @@ public:
class st0032_sound_device : public setapcm_device<16, 384>
{
public:
- st0032_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ st0032_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
//**************************************************************************
diff --git a/src/devices/sound/sn76477.cpp b/src/devices/sound/sn76477.cpp
index 1ccbd2fc4b5..90c73099065 100644
--- a/src/devices/sound/sn76477.cpp
+++ b/src/devices/sound/sn76477.cpp
@@ -143,7 +143,7 @@ static constexpr double out_neg_gain[] =
DEFINE_DEVICE_TYPE(SN76477, sn76477_device, "sn76477", "TI SN76477 CSG")
-sn76477_device::sn76477_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sn76477_device::sn76477_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SN76477, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_enable(0),
diff --git a/src/devices/sound/sn76477.h b/src/devices/sound/sn76477.h
index 6aa4c10c9f0..261c60118db 100644
--- a/src/devices/sound/sn76477.h
+++ b/src/devices/sound/sn76477.h
@@ -55,7 +55,7 @@ class sn76477_device : public device_t,
public device_sound_interface
{
public:
- sn76477_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ sn76477_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
void set_noise_params(double clock_res, double filter_res, double filter_cap)
{
diff --git a/src/devices/sound/sn76496.cpp b/src/devices/sound/sn76496.cpp
index 96c6a3ba789..37a8cdd6cd3 100644
--- a/src/devices/sound/sn76496.cpp
+++ b/src/devices/sound/sn76496.cpp
@@ -173,52 +173,52 @@ sn76496_base_device::sn76496_base_device(
{
}
-sn76496_device::sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sn76496_device::sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sn76496_base_device(mconfig, SN76496, tag, 0x10000, 0x04, 0x08, false, false, 8, false, true, owner, clock)
{
}
-y2404_device::y2404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+y2404_device::y2404_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sn76496_base_device(mconfig, Y2404, tag, 0x10000, 0x04, 0x08, false, false, 8, false, true, owner, clock)
{
}
-sn76489_device::sn76489_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sn76489_device::sn76489_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sn76496_base_device(mconfig, SN76489, tag, 0x4000, 0x01, 0x02, true, false, 8, false, true, owner, clock)
{
}
-sn76489a_device::sn76489a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sn76489a_device::sn76489a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sn76496_base_device(mconfig, SN76489A, tag, 0x10000, 0x04, 0x08, false, false, 8, false, true, owner, clock)
{
}
-sn76494_device::sn76494_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sn76494_device::sn76494_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sn76496_base_device(mconfig, SN76494, tag, 0x10000, 0x04, 0x08, false, false, 1, false, true, owner, clock)
{
}
-sn94624_device::sn94624_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sn94624_device::sn94624_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sn76496_base_device(mconfig, SN94624, tag, 0x4000, 0x01, 0x02, true, false, 1, false, true, owner, clock)
{
}
-ncr8496_device::ncr8496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ncr8496_device::ncr8496_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sn76496_base_device(mconfig, NCR8496, tag, 0x8000, 0x02, 0x20, true, false, 8, true, true, owner, clock)
{
}
-pssj3_device::pssj3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+pssj3_device::pssj3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sn76496_base_device(mconfig, PSSJ3, tag, 0x8000, 0x02, 0x20, false, false, 8, true, true, owner, clock)
{
}
-gamegear_device::gamegear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+gamegear_device::gamegear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sn76496_base_device(mconfig, GAMEGEAR, tag, 0x8000, 0x01, 0x08, true, true, 8, false, false, owner, clock)
{
}
-segapsg_device::segapsg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+segapsg_device::segapsg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sn76496_base_device(mconfig, SEGAPSG, tag, 0x8000, 0x01, 0x08, true, false, 8, false, false, owner, clock)
{
}
diff --git a/src/devices/sound/sn76496.h b/src/devices/sound/sn76496.h
index f5484248715..f5b33167bdc 100644
--- a/src/devices/sound/sn76496.h
+++ b/src/devices/sound/sn76496.h
@@ -29,7 +29,7 @@ public:
protected:
sn76496_base_device(const machine_config &mconfig, device_type type, const char *tag,
int feedbackmask, int noisetap1, int noisetap2, bool negate, bool stereo, int clockdivider,
- bool ncr, bool sega, device_t *owner, uint32_t clock);
+ bool ncr, bool sega, device_t *owner, const XTAL &clock);
virtual void device_start() override;
virtual void device_clock_changed() override;
@@ -73,70 +73,70 @@ private:
class sn76496_device : public sn76496_base_device
{
public:
- sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
// Y2404 not verified yet. todo: verify; (don't be fooled by the Y, it's a TI chip, not Yamaha)
class y2404_device : public sn76496_base_device
{
public:
- y2404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ y2404_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
// SN76489 not verified yet. todo: verify;
class sn76489_device : public sn76496_base_device
{
public:
- sn76489_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sn76489_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
// SN76489A: whitenoise verified, phase verified, periodic verified (by plgdavid)
class sn76489a_device : public sn76496_base_device
{
public:
- sn76489a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sn76489a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
// SN76494 not verified, (according to datasheet: same as sn76489a but without the /8 divider)
class sn76494_device : public sn76496_base_device
{
public:
- sn76494_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sn76494_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
// SN94624 whitenoise verified, phase verified, period verified; verified by PlgDavid
class sn94624_device : public sn76496_base_device
{
public:
- sn94624_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sn94624_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
// NCR8496 whitenoise verified, phase verified; verified by ValleyBell & NewRisingSun
class ncr8496_device : public sn76496_base_device
{
public:
- ncr8496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ncr8496_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
// PSSJ-3 whitenoise verified, phase verified; verified by ValleyBell & NewRisingSun
class pssj3_device : public sn76496_base_device
{
public:
- pssj3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ pssj3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
// Verified by Justin Kerk
class gamegear_device : public sn76496_base_device
{
public:
- gamegear_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ gamegear_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
// todo: verify; from smspower wiki, assumed to have same invert as gamegear
class segapsg_device : public sn76496_base_device
{
public:
- segapsg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ segapsg_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
#endif // MAME_SOUND_SN76496_H
diff --git a/src/devices/sound/snkwave.cpp b/src/devices/sound/snkwave.cpp
index 44e6ba51466..1dda2bcb31c 100644
--- a/src/devices/sound/snkwave.cpp
+++ b/src/devices/sound/snkwave.cpp
@@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(SNKWAVE, snkwave_device, "snkwave", "SNK Wave")
// snkwave_device - constructor
//-------------------------------------------------
-snkwave_device::snkwave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+snkwave_device::snkwave_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SNKWAVE, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
diff --git a/src/devices/sound/snkwave.h b/src/devices/sound/snkwave.h
index bf40a33e500..4cc085b6831 100644
--- a/src/devices/sound/snkwave.h
+++ b/src/devices/sound/snkwave.h
@@ -17,7 +17,7 @@ class snkwave_device : public device_t,
public device_sound_interface
{
public:
- snkwave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ snkwave_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void snkwave_w(offs_t offset, uint8_t data);
diff --git a/src/devices/sound/sp0250.cpp b/src/devices/sound/sp0250.cpp
index 9544adb3c38..75e6c646333 100644
--- a/src/devices/sound/sp0250.cpp
+++ b/src/devices/sound/sp0250.cpp
@@ -22,7 +22,7 @@ static constexpr int PWM_CLOCKS = 39;
DEFINE_DEVICE_TYPE(SP0250, sp0250_device, "sp0250", "GI SP0250 LPC")
-sp0250_device::sp0250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+sp0250_device::sp0250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, SP0250, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_timer(nullptr),
diff --git a/src/devices/sound/sp0250.h b/src/devices/sound/sp0250.h
index 31c32ef4d5d..4b473d4d05d 100644
--- a/src/devices/sound/sp0250.h
+++ b/src/devices/sound/sp0250.h
@@ -8,7 +8,7 @@
class sp0250_device : public device_t, public device_sound_interface
{
public:
- sp0250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sp0250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto drq() { return m_drq.bind(); }
void set_pwm_mode() { m_pwm_mode = true; }
diff --git a/src/devices/sound/sp0256.cpp b/src/devices/sound/sp0256.cpp
index 7f709ec90c0..b8e69cee24d 100644
--- a/src/devices/sound/sp0256.cpp
+++ b/src/devices/sound/sp0256.cpp
@@ -51,7 +51,7 @@ DEFINE_DEVICE_TYPE(SP0256, sp0256_device, "sp0256", "GI SP0256 Narrator Speech P
// LIVE DEVICE
//**************************************************************************
-sp0256_device::sp0256_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sp0256_device::sp0256_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SP0256, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_rom(*this, DEVICE_SELF)
diff --git a/src/devices/sound/sp0256.h b/src/devices/sound/sp0256.h
index 0047b5bb0a3..6b91a399f1f 100644
--- a/src/devices/sound/sp0256.h
+++ b/src/devices/sound/sp0256.h
@@ -40,7 +40,7 @@ class sp0256_device : public device_t,
public device_sound_interface
{
public:
- sp0256_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sp0256_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto data_request_callback() { return m_drq_cb.bind(); }
auto standby_callback() { return m_sby_cb.bind(); }
diff --git a/src/devices/sound/spkrdev.cpp b/src/devices/sound/spkrdev.cpp
index 7d9333d02cb..77d01f880f1 100644
--- a/src/devices/sound/spkrdev.cpp
+++ b/src/devices/sound/spkrdev.cpp
@@ -84,7 +84,7 @@ static constexpr int RATE_MULTIPLIER = 4;
DEFINE_DEVICE_TYPE(SPEAKER_SOUND, speaker_sound_device, "speaker_sound_device", "Filtered DAC")
-speaker_sound_device::speaker_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+speaker_sound_device::speaker_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SPEAKER_SOUND, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_num_levels(2)
diff --git a/src/devices/sound/spkrdev.h b/src/devices/sound/spkrdev.h
index 98289857f07..2d8fc409e87 100644
--- a/src/devices/sound/spkrdev.h
+++ b/src/devices/sound/spkrdev.h
@@ -17,7 +17,7 @@ class speaker_sound_device : public device_t,
public device_sound_interface
{
public:
- speaker_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ speaker_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
~speaker_sound_device() {}
// configuration
diff --git a/src/devices/sound/spu.cpp b/src/devices/sound/spu.cpp
index 7cc987a8067..0e9a5111379 100644
--- a/src/devices/sound/spu.cpp
+++ b/src/devices/sound/spu.cpp
@@ -937,7 +937,7 @@ static int shift_register15(int &shift)
// spu_device - constructor
//-------------------------------------------------
-spu_device::spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, psxcpu_device *cpu)
+spu_device::spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, psxcpu_device *cpu)
: spu_device(mconfig, tag, owner, clock)
{
cpu->spu_read().set(tag, FUNC(spu_device::read));
@@ -947,7 +947,7 @@ spu_device::spu_device(const machine_config &mconfig, const char *tag, device_t
irq_handler().set(*cpu->subdevice<psxirq_device>("irq"), FUNC(psxirq_device::intin9));
}
-spu_device::spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+spu_device::spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, SPU, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_irq_handler(*this),
diff --git a/src/devices/sound/spu.h b/src/devices/sound/spu.h
index 7aee602e38c..9cb7a4bc74d 100644
--- a/src/devices/sound/spu.h
+++ b/src/devices/sound/spu.h
@@ -200,8 +200,8 @@ protected:
static reverb_preset *find_reverb_preset(const unsigned short *param);
public:
- spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, psxcpu_device *cpu);
- spu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, psxcpu_device *cpu);
+ spu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers
auto irq_handler() { return m_irq_handler.bind(); }
diff --git a/src/devices/sound/st0016.cpp b/src/devices/sound/st0016.cpp
index 39d85aed58b..bb90e3483c1 100644
--- a/src/devices/sound/st0016.cpp
+++ b/src/devices/sound/st0016.cpp
@@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(ST0016, st0016_device, "st0016", "Seta ST0016 (Audio)")
// st0016_device - constructor
//-------------------------------------------------
-st0016_device::st0016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+st0016_device::st0016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, ST0016, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_memory_interface(mconfig, *this)
diff --git a/src/devices/sound/st0016.h b/src/devices/sound/st0016.h
index c965687732e..655833e1cfa 100644
--- a/src/devices/sound/st0016.h
+++ b/src/devices/sound/st0016.h
@@ -15,7 +15,7 @@
class st0016_device : public device_t, public device_sound_interface, public device_memory_interface
{
public:
- st0016_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ st0016_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
u8 snd_r(offs_t offset);
void snd_w(offs_t offset, u8 data);
diff --git a/src/devices/sound/swp00.cpp b/src/devices/sound/swp00.cpp
index c985da89b8c..a793d2352e8 100644
--- a/src/devices/sound/swp00.cpp
+++ b/src/devices/sound/swp00.cpp
@@ -8,7 +8,7 @@
DEFINE_DEVICE_TYPE(SWP00, swp00_device, "swp00", "Yamaha SWP00 (TC170C120SF / XQ036A00) sound chip")
-swp00_device::swp00_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+swp00_device::swp00_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SWP00, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/swp00.h b/src/devices/sound/swp00.h
index 166ebe0951e..b36daaa2055 100644
--- a/src/devices/sound/swp00.h
+++ b/src/devices/sound/swp00.h
@@ -14,7 +14,7 @@
class swp00_device : public device_t, public device_sound_interface, public device_rom_interface<25+2, 2, 0, ENDIANNESS_LITTLE>
{
public:
- swp00_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 33868800);
+ swp00_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 33868800);
void map(address_map &map);
diff --git a/src/devices/sound/swp20.cpp b/src/devices/sound/swp20.cpp
index da4ef34dc4d..c48bb3d69f1 100644
--- a/src/devices/sound/swp20.cpp
+++ b/src/devices/sound/swp20.cpp
@@ -8,7 +8,7 @@
DEFINE_DEVICE_TYPE(SWP20, swp20_device, "swp20", "Yamaha SWP20 sound chip")
-swp20_device::swp20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+swp20_device::swp20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SWP20, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/swp20.h b/src/devices/sound/swp20.h
index 83f665fdc5b..5989a42a216 100644
--- a/src/devices/sound/swp20.h
+++ b/src/devices/sound/swp20.h
@@ -13,7 +13,7 @@
class swp20_device : public device_t, public device_sound_interface, public device_rom_interface<23+2, 1, 0, ENDIANNESS_LITTLE>
{
public:
- swp20_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 11289600);
+ swp20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 11289600);
void map(address_map &map);
diff --git a/src/devices/sound/swp30.cpp b/src/devices/sound/swp30.cpp
index 5dd853f8151..28d01317c14 100644
--- a/src/devices/sound/swp30.cpp
+++ b/src/devices/sound/swp30.cpp
@@ -171,7 +171,7 @@ static int scount = 0;
DEFINE_DEVICE_TYPE(SWP30, swp30_device, "swp30", "Yamaha SWP30 sound chip")
-swp30_device::swp30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+swp30_device::swp30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SWP30, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_rom_interface(mconfig, *this),
diff --git a/src/devices/sound/swp30.h b/src/devices/sound/swp30.h
index 0ef1223eb4f..a2f7c989917 100644
--- a/src/devices/sound/swp30.h
+++ b/src/devices/sound/swp30.h
@@ -14,7 +14,7 @@
class swp30_device : public device_t, public device_sound_interface, public device_rom_interface<25+2, 2, 0, ENDIANNESS_LITTLE>
{
public:
- swp30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 33868800);
+ swp30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(33868800));
void map(address_map &map);
diff --git a/src/devices/sound/t6721a.cpp b/src/devices/sound/t6721a.cpp
index 2c29e31dc62..4053bae39e9 100644
--- a/src/devices/sound/t6721a.cpp
+++ b/src/devices/sound/t6721a.cpp
@@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(T6721A, t6721a_device, "t6721a", "Toshiba T6721A")
// t6721a_device - constructor
//-------------------------------------------------
-t6721a_device::t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+t6721a_device::t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, T6721A, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_write_eos(*this),
diff --git a/src/devices/sound/t6721a.h b/src/devices/sound/t6721a.h
index 52a76393894..ca6b57875a6 100644
--- a/src/devices/sound/t6721a.h
+++ b/src/devices/sound/t6721a.h
@@ -45,7 +45,7 @@ class t6721a_device : public device_t,
public device_sound_interface
{
public:
- t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ t6721a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// static configuration helpers
auto eos_handler() { return m_write_eos.bind(); }
diff --git a/src/devices/sound/t6w28.cpp b/src/devices/sound/t6w28.cpp
index 9525794e489..0f8604cd366 100644
--- a/src/devices/sound/t6w28.cpp
+++ b/src/devices/sound/t6w28.cpp
@@ -347,7 +347,7 @@ void t6w28_device::set_enable(bool enable)
DEFINE_DEVICE_TYPE(T6W28, t6w28_device, "t6w28", "T6W28")
-t6w28_device::t6w28_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+t6w28_device::t6w28_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, T6W28, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_channel(nullptr)
diff --git a/src/devices/sound/t6w28.h b/src/devices/sound/t6w28.h
index 6b953449f87..8090bf5c57a 100644
--- a/src/devices/sound/t6w28.h
+++ b/src/devices/sound/t6w28.h
@@ -8,7 +8,7 @@
class t6w28_device : public device_t, public device_sound_interface
{
public:
- t6w28_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ t6w28_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void write(offs_t offset, uint8_t data);
void set_enable(bool enable);
diff --git a/src/devices/sound/ta7630.cpp b/src/devices/sound/ta7630.cpp
index 6dcb84455b9..3888cda6e1b 100644
--- a/src/devices/sound/ta7630.cpp
+++ b/src/devices/sound/ta7630.cpp
@@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(TA7630, ta7630_device, "ta7630", "Toshiba TA7630P")
// ta7630_device - constructor
//-------------------------------------------------
-ta7630_device::ta7630_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ta7630_device::ta7630_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, TA7630, tag, owner, clock)
// ,device_sound_interface(mconfig, *this)
{
diff --git a/src/devices/sound/ta7630.h b/src/devices/sound/ta7630.h
index e32b4bab407..8a7fed74a74 100644
--- a/src/devices/sound/ta7630.h
+++ b/src/devices/sound/ta7630.h
@@ -22,7 +22,7 @@ class ta7630_device : public device_t
{
public:
// construction/destruction
- ta7630_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ ta7630_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
// filter setters
void set_device_volume(device_sound_interface *device,uint8_t value);
diff --git a/src/devices/sound/tc8830f.cpp b/src/devices/sound/tc8830f.cpp
index f9f65975347..56e4c89be92 100644
--- a/src/devices/sound/tc8830f.cpp
+++ b/src/devices/sound/tc8830f.cpp
@@ -24,7 +24,7 @@
// device type definition
DEFINE_DEVICE_TYPE(TC8830F, tc8830f_device, "tc8830f", "Toshiba TC8830F")
-tc8830f_device::tc8830f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tc8830f_device::tc8830f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, TC8830F, tag, owner, clock),
device_sound_interface(mconfig, *this), m_stream(nullptr),
m_playing(false),
diff --git a/src/devices/sound/tc8830f.h b/src/devices/sound/tc8830f.h
index 0a447b02dba..abed8b26787 100644
--- a/src/devices/sound/tc8830f.h
+++ b/src/devices/sound/tc8830f.h
@@ -21,7 +21,7 @@ class tc8830f_device : public device_t,
{
public:
// construction/destruction
- tc8830f_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tc8830f_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void reset();
void write_p(uint8_t data);
diff --git a/src/devices/sound/tiaintf.cpp b/src/devices/sound/tiaintf.cpp
index 5a64db7bb4c..ea7f1ba3996 100644
--- a/src/devices/sound/tiaintf.cpp
+++ b/src/devices/sound/tiaintf.cpp
@@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(TIA, tia_device, "tia_sound", "Atari TIA (Sound)")
// tia_device - constructor
//-------------------------------------------------
-tia_device::tia_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tia_device::tia_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, TIA, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_channel(nullptr),
diff --git a/src/devices/sound/tiaintf.h b/src/devices/sound/tiaintf.h
index 8ef5d0341f7..1ea6c6a0f96 100644
--- a/src/devices/sound/tiaintf.h
+++ b/src/devices/sound/tiaintf.h
@@ -14,7 +14,7 @@
class tia_device : public device_t, public device_sound_interface
{
public:
- tia_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tia_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void tia_sound_w(offs_t offset, uint8_t data);
diff --git a/src/devices/sound/tms3615.cpp b/src/devices/sound/tms3615.cpp
index 3f595c8a97b..1d4da0533c2 100644
--- a/src/devices/sound/tms3615.cpp
+++ b/src/devices/sound/tms3615.cpp
@@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(TMS3615, tms3615_device, "tms3615", "TMS3615")
// tms3615_device - constructor
//-------------------------------------------------
-tms3615_device::tms3615_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms3615_device::tms3615_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, TMS3615, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_channel(nullptr)
diff --git a/src/devices/sound/tms3615.h b/src/devices/sound/tms3615.h
index a1eeaab5318..9b93cdefe77 100644
--- a/src/devices/sound/tms3615.h
+++ b/src/devices/sound/tms3615.h
@@ -19,7 +19,7 @@ public:
static constexpr unsigned FOOTAGE_8 = 0;
static constexpr unsigned FOOTAGE_16 = 1;
- tms3615_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms3615_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void enable_w(int enable);
diff --git a/src/devices/sound/tms36xx.cpp b/src/devices/sound/tms36xx.cpp
index 08df1d03f51..477fca324f4 100644
--- a/src/devices/sound/tms36xx.cpp
+++ b/src/devices/sound/tms36xx.cpp
@@ -320,7 +320,7 @@ DEFINE_DEVICE_TYPE(TMS36XX, tms36xx_device, "tms36xx", "TMS36XX")
// tms36xx_device - constructor
//-------------------------------------------------
-tms36xx_device::tms36xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms36xx_device::tms36xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, TMS36XX, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_subtype(nullptr),
diff --git a/src/devices/sound/tms36xx.h b/src/devices/sound/tms36xx.h
index 5693e3b8e7c..854d04c47fd 100644
--- a/src/devices/sound/tms36xx.h
+++ b/src/devices/sound/tms36xx.h
@@ -24,7 +24,7 @@ public:
TMS3617 = 17 // Monster Bash (13 notes, six outputs)
};
- tms36xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms36xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void set_subtype(subtype type)
{
diff --git a/src/devices/sound/tms5110.cpp b/src/devices/sound/tms5110.cpp
index a9d3395a4d2..e91a65f4471 100644
--- a/src/devices/sound/tms5110.cpp
+++ b/src/devices/sound/tms5110.cpp
@@ -1433,12 +1433,12 @@ DEFINE_DEVICE_TYPE(TMS5110A, tms5110a_device, "tms5110a", "TMS5110A")
DEFINE_DEVICE_TYPE(M58817, m58817_device, "m58817", "M58817")
-tms5110_device::tms5110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms5110_device::tms5110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5110_device(mconfig, TMS5110, tag, owner, clock, TMS5110_IS_TMS5110A)
{
}
-tms5110_device::tms5110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int variant)
+tms5110_device::tms5110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int variant)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_table(*this, DEVICE_SELF)
@@ -1452,49 +1452,49 @@ tms5110_device::tms5110_device(const machine_config &mconfig, device_type type,
}
-tms5100_device::tms5100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms5100_device::tms5100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5110_device(mconfig, TMS5100, tag, owner, clock, TMS5110_IS_TMC0281)
{
}
-tmc0281_device::tmc0281_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tmc0281_device::tmc0281_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5110_device(mconfig, TMC0281, tag, owner, clock, TMS5110_IS_TMC0281)
{
}
-tms5100a_device::tms5100a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms5100a_device::tms5100a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5110_device(mconfig, TMS5100A, tag, owner, clock, TMS5110_IS_TMC0281D)
{
}
-tmc0281d_device::tmc0281d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tmc0281d_device::tmc0281d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5110_device(mconfig, TMC0281D, tag, owner, clock, TMS5110_IS_TMC0281D)
{
}
-cd2801_device::cd2801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+cd2801_device::cd2801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5110_device(mconfig, CD2801, tag, owner, clock, TMS5110_IS_CD2801)
{
}
-cd2802_device::cd2802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+cd2802_device::cd2802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5110_device(mconfig, CD2802, tag, owner, clock, TMS5110_IS_CD2802)
{
}
-tms5110a_device::tms5110a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms5110a_device::tms5110a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5110_device(mconfig, TMS5110A, tag, owner, clock, TMS5110_IS_TMS5110A)
{
}
-m58817_device::m58817_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+m58817_device::m58817_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5110_device(mconfig, M58817, tag, owner, clock, TMS5110_IS_M58817)
{
}
@@ -1502,7 +1502,7 @@ m58817_device::m58817_device(const machine_config &mconfig, const char *tag, dev
DEFINE_DEVICE_TYPE(TMSPROM, tmsprom_device, "tmsprom", "TMSPROM")
-tmsprom_device::tmsprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tmsprom_device::tmsprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, TMSPROM, tag, owner, clock),
m_rom(*this, DEVICE_SELF),
m_prom(*this, finder_base::DUMMY_TAG),
diff --git a/src/devices/sound/tms5110.h b/src/devices/sound/tms5110.h
index 9d907668a70..8d2f05199ce 100644
--- a/src/devices/sound/tms5110.h
+++ b/src/devices/sound/tms5110.h
@@ -33,7 +33,7 @@ public:
static constexpr uint8_t CMD_READ_BRANCH = 12; /* 1 1 0 x | 1 */
static constexpr uint8_t CMD_TEST_TALK = 14; /* 1 1 1 x | 3 */
- tms5110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms5110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto m0() { return m_m0_cb.bind(); }
auto m1() { return m_m1_cb.bind(); }
@@ -50,7 +50,7 @@ public:
int romclk_hack_r();
protected:
- tms5110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int variant);
+ tms5110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int variant);
// device-level overrides
virtual void device_start() override;
@@ -187,56 +187,56 @@ private:
class tms5100_device : public tms5110_device
{
public:
- tms5100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms5100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class tmc0281_device : public tms5110_device
{
public:
- tmc0281_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tmc0281_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class tms5100a_device : public tms5110_device
{
public:
- tms5100a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms5100a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class tmc0281d_device : public tms5110_device
{
public:
- tmc0281d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tmc0281d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class cd2801_device : public tms5110_device
{
public:
- cd2801_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ cd2801_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class cd2802_device : public tms5110_device
{
public:
- cd2802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ cd2802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class tms5110a_device : public tms5110_device
{
public:
- tms5110a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms5110a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class m58817_device : public tms5110_device
{
public:
- m58817_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ m58817_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
uint8_t status_r();
};
@@ -259,7 +259,7 @@ DECLARE_DEVICE_TYPE(M58817, m58817_device)
class tmsprom_device : public device_t
{
public:
- tmsprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tmsprom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void set_region(const char *region) { m_prom.set_tag(region); }
void set_rom_size(uint32_t rom_size) { m_rom_size = rom_size; }
diff --git a/src/devices/sound/tms5220.cpp b/src/devices/sound/tms5220.cpp
index 77622b12fef..be059840e05 100644
--- a/src/devices/sound/tms5220.cpp
+++ b/src/devices/sound/tms5220.cpp
@@ -2085,18 +2085,18 @@ DEFINE_DEVICE_TYPE(TMS5200, tms5200_device, "tms5200", "TMS5200")
DEFINE_DEVICE_TYPE(CD2501ECD, cd2501ecd_device, "cd2501ecd", "CD2501ECD")
-tms5220c_device::tms5220c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms5220c_device::tms5220c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5220_device(mconfig, TMS5220C, tag, owner, clock, TMS5220_IS_5220C)
{
}
-tms5220_device::tms5220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms5220_device::tms5220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5220_device(mconfig, TMS5220, tag, owner, clock, TMS5220_IS_5220)
{
}
-tms5220_device::tms5220_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int variant)
+tms5220_device::tms5220_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int variant)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_variant(variant)
@@ -2112,19 +2112,19 @@ tms5220_device::tms5220_device(const machine_config &mconfig, device_type type,
}
-cd2501e_device::cd2501e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+cd2501e_device::cd2501e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5220_device(mconfig, CD2501E, tag, owner, clock, TMS5220_IS_CD2501E)
{
}
-tms5200_device::tms5200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+tms5200_device::tms5200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5220_device(mconfig, TMS5200, tag, owner, clock, TMS5220_IS_5200)
{
}
-cd2501ecd_device::cd2501ecd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+cd2501ecd_device::cd2501ecd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: tms5220_device(mconfig, CD2501ECD, tag, owner, clock, TMS5220_IS_CD2501ECD)
{
}
diff --git a/src/devices/sound/tms5220.h b/src/devices/sound/tms5220.h
index 82a589c486d..9a4fab8e24f 100644
--- a/src/devices/sound/tms5220.h
+++ b/src/devices/sound/tms5220.h
@@ -23,7 +23,7 @@ public:
WS=1
};
- tms5220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms5220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// IRQ callback function, active low, i.e. state=0
auto irq_cb() { return m_irq_handler.bind(); }
@@ -65,7 +65,7 @@ public:
READ_LINE_MEMBER( intq_r );
protected:
- tms5220_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int variant);
+ tms5220_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int variant);
// device-level overrides
virtual void device_start() override;
@@ -249,28 +249,28 @@ private:
class tms5220c_device : public tms5220_device
{
public:
- tms5220c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms5220c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class cd2501e_device : public tms5220_device
{
public:
- cd2501e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ cd2501e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class tms5200_device : public tms5220_device
{
public:
- tms5200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ tms5200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class cd2501ecd_device : public tms5220_device
{
public:
- cd2501ecd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ cd2501ecd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
diff --git a/src/devices/sound/tt5665.cpp b/src/devices/sound/tt5665.cpp
index 363481669ff..46228a3d02c 100644
--- a/src/devices/sound/tt5665.cpp
+++ b/src/devices/sound/tt5665.cpp
@@ -117,7 +117,7 @@ const stream_buffer::sample_t tt5665_device::s_volume_table[16] =
// tt5665_device - constructor
//-------------------------------------------------
-tt5665_device::tt5665_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+tt5665_device::tt5665_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, TT5665, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/tt5665.h b/src/devices/sound/tt5665.h
index 5d3f0a155bc..83498aff951 100644
--- a/src/devices/sound/tt5665.h
+++ b/src/devices/sound/tt5665.h
@@ -35,13 +35,13 @@ public:
};
// construction/destruction
- tt5665_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, ss_state ss, u8 s0_s1)
+ tt5665_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, ss_state ss, u8 s0_s1)
: tt5665_device(mconfig, tag, owner, clock)
{
config_ss(ss);
config_s0_s1(s0_s1);
}
- tt5665_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ tt5665_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// inline configuration helpers
void config_ss(ss_state ss) { assert(!started()); m_ss_state = ss; }
diff --git a/src/devices/sound/uda1344.cpp b/src/devices/sound/uda1344.cpp
index 183ba51fd36..51e783c198a 100644
--- a/src/devices/sound/uda1344.cpp
+++ b/src/devices/sound/uda1344.cpp
@@ -24,7 +24,7 @@
DEFINE_DEVICE_TYPE(UDA1344, uda1344_device, "ud1344", "Philips UDA1344 Codec")
-uda1344_device::uda1344_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+uda1344_device::uda1344_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, UDA1344, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_stream(nullptr)
diff --git a/src/devices/sound/uda1344.h b/src/devices/sound/uda1344.h
index 7bb07856df7..eeac89d53cc 100644
--- a/src/devices/sound/uda1344.h
+++ b/src/devices/sound/uda1344.h
@@ -14,7 +14,7 @@
class uda1344_device : public device_t, public device_sound_interface
{
public:
- uda1344_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ uda1344_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
void l3_addr_w(offs_t offset, uint8_t data);
void l3_data_w(offs_t offset, uint8_t data);
diff --git a/src/devices/sound/upd1771.cpp b/src/devices/sound/upd1771.cpp
index 4e865ea2c42..554bfa68890 100644
--- a/src/devices/sound/upd1771.cpp
+++ b/src/devices/sound/upd1771.cpp
@@ -237,7 +237,7 @@ const unsigned char noise_tbl[]=
DEFINE_DEVICE_TYPE(UPD1771C, upd1771c_device, "upd1771c", "NEC uPD1771C 017")
-upd1771c_device::upd1771c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+upd1771c_device::upd1771c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, UPD1771C, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_ack_handler(*this)
diff --git a/src/devices/sound/upd1771.h b/src/devices/sound/upd1771.h
index 7c5cc5f7f95..432da4003bb 100644
--- a/src/devices/sound/upd1771.h
+++ b/src/devices/sound/upd1771.h
@@ -18,7 +18,7 @@ class upd1771c_device : public device_t,
public device_sound_interface
{
public:
- upd1771c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ upd1771c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto ack_handler() { return m_ack_handler.bind(); }
diff --git a/src/devices/sound/upd7752.cpp b/src/devices/sound/upd7752.cpp
index 7c063fbee95..31949384492 100644
--- a/src/devices/sound/upd7752.cpp
+++ b/src/devices/sound/upd7752.cpp
@@ -43,7 +43,7 @@ void upd7752_device::upd7752_ram(address_map &map)
// upd7752_device - constructor
//-------------------------------------------------
-upd7752_device::upd7752_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+upd7752_device::upd7752_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, UPD7752, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this), m_stream(nullptr),
diff --git a/src/devices/sound/upd7752.h b/src/devices/sound/upd7752.h
index 9693ee99f4d..d143f7e73f2 100644
--- a/src/devices/sound/upd7752.h
+++ b/src/devices/sound/upd7752.h
@@ -16,7 +16,7 @@ class upd7752_device : public device_t, public device_sound_interface, public de
{
public:
// construction/destruction
- upd7752_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ upd7752_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// I/O operations
void write(offs_t offset, uint8_t data);
diff --git a/src/devices/sound/upd7759.cpp b/src/devices/sound/upd7759.cpp
index ea1790a40b5..58f12396431 100644
--- a/src/devices/sound/upd7759.cpp
+++ b/src/devices/sound/upd7759.cpp
@@ -147,7 +147,7 @@
#define FRAC_MASK (FRAC_ONE - 1)
-upd775x_device::upd775x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+upd775x_device::upd775x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
@@ -183,13 +183,13 @@ upd775x_device::upd775x_device(const machine_config &mconfig, device_type type,
DEFINE_DEVICE_TYPE(UPD7759, upd7759_device, "upd7759", "NEC uPD7759")
-upd7759_device::upd7759_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+upd7759_device::upd7759_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: upd7759_device(mconfig, UPD7759, tag, owner, clock)
{
}
-upd7759_device::upd7759_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+upd7759_device::upd7759_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: upd775x_device(mconfig, type, tag, owner, clock)
, m_drqcallback(*this)
, m_timer(nullptr)
@@ -199,12 +199,12 @@ upd7759_device::upd7759_device(const machine_config &mconfig, device_type type,
DEFINE_DEVICE_TYPE(UPD7756, upd7756_device, "upd7756", "NEC uPD7756")
-upd7756_device::upd7756_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+upd7756_device::upd7756_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: upd7756_device(mconfig, UPD7756, tag, owner, clock)
{
}
-upd7756_device::upd7756_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+upd7756_device::upd7756_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock)
: upd775x_device(mconfig, type, tag, owner, clock)
{
}
diff --git a/src/devices/sound/upd7759.h b/src/devices/sound/upd7759.h
index f23bdb51ac3..7a9dcbd127c 100644
--- a/src/devices/sound/upd7759.h
+++ b/src/devices/sound/upd7759.h
@@ -18,7 +18,7 @@ class upd775x_device : public device_t,
public device_rom_interface<17>
{
public:
- enum : u32 { STANDARD_CLOCK = 640'000 };
+ static constexpr XTAL STANDARD_CLOCK = XTAL::u(640'000);
DECLARE_WRITE_LINE_MEMBER( reset_w );
DECLARE_WRITE_LINE_MEMBER( start_w );
@@ -63,7 +63,7 @@ protected:
MODE_SLAVE
};
- upd775x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ upd775x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
// device-level overrides
virtual void device_start() override;
@@ -128,12 +128,12 @@ class upd7759_device : public upd775x_device
public:
auto drq() { return m_drqcallback.bind(); }
- upd7759_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = STANDARD_CLOCK);
+ upd7759_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = STANDARD_CLOCK);
DECLARE_WRITE_LINE_MEMBER( md_w );
protected:
- upd7759_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ upd7759_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
virtual void device_start() override;
virtual void device_reset() override;
@@ -152,10 +152,10 @@ protected:
class upd7756_device : public upd775x_device
{
public:
- upd7756_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = STANDARD_CLOCK);
+ upd7756_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = STANDARD_CLOCK);
protected:
- upd7756_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ upd7756_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock);
virtual void device_reset() override;
diff --git a/src/devices/sound/upd934g.cpp b/src/devices/sound/upd934g.cpp
index b57886685e1..5bb84d6745d 100644
--- a/src/devices/sound/upd934g.cpp
+++ b/src/devices/sound/upd934g.cpp
@@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(UPD934G, upd934g_device, "upd934g", "NEC uPD934G")
// upd934g_device - constructor
//-------------------------------------------------
-upd934g_device::upd934g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+upd934g_device::upd934g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, UPD934G, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_data_cb(*this),
diff --git a/src/devices/sound/upd934g.h b/src/devices/sound/upd934g.h
index 1340dd7bf60..77bf9fa3083 100644
--- a/src/devices/sound/upd934g.h
+++ b/src/devices/sound/upd934g.h
@@ -24,7 +24,7 @@ public:
static constexpr feature_type imperfect_features() { return feature::SOUND; }
// construction/destruction
- upd934g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ upd934g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration
auto data_callback() { return m_data_cb.bind(); }
diff --git a/src/devices/sound/vgm_visualizer.cpp b/src/devices/sound/vgm_visualizer.cpp
index bab3c909ddf..ac5287330bf 100644
--- a/src/devices/sound/vgm_visualizer.cpp
+++ b/src/devices/sound/vgm_visualizer.cpp
@@ -52,7 +52,7 @@ DEFINE_DEVICE_TYPE(VGMVIZ, vgmviz_device, "vgmviz", "VGM Visualizer")
// vgmviz_device - constructor
//-------------------------------------------------
-vgmviz_device::vgmviz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+vgmviz_device::vgmviz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, VGMVIZ, tag, owner, clock)
, device_mixer_interface(mconfig, *this, 2)
, m_screen(*this, "screen")
diff --git a/src/devices/sound/vgm_visualizer.h b/src/devices/sound/vgm_visualizer.h
index 516e4e4bfad..e4001dd53a2 100644
--- a/src/devices/sound/vgm_visualizer.h
+++ b/src/devices/sound/vgm_visualizer.h
@@ -39,11 +39,7 @@ class vgmviz_device : public device_t, public device_mixer_interface
{
public:
// construction/destruction
- vgmviz_device(const machine_config &mconfig, const char *tag, device_t *owner)
- : vgmviz_device(mconfig, tag, owner, 0)
- {
- }
- vgmviz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
+ vgmviz_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
virtual ~vgmviz_device();
void cycle_viz_mode();
diff --git a/src/devices/sound/vlm5030.cpp b/src/devices/sound/vlm5030.cpp
index 15f302f307e..e2502ffbb7d 100644
--- a/src/devices/sound/vlm5030.cpp
+++ b/src/devices/sound/vlm5030.cpp
@@ -159,7 +159,7 @@ static const int vlm5030_speed_table[8] =
DEFINE_DEVICE_TYPE(VLM5030, vlm5030_device, "vlm5030", "Sanyo VLM5030")
-vlm5030_device::vlm5030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+vlm5030_device::vlm5030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, VLM5030, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_rom_interface(mconfig, *this),
diff --git a/src/devices/sound/vlm5030.h b/src/devices/sound/vlm5030.h
index 1eddcdc45bf..aaa8aebb9cd 100644
--- a/src/devices/sound/vlm5030.h
+++ b/src/devices/sound/vlm5030.h
@@ -10,7 +10,7 @@
class vlm5030_device : public device_t, public device_sound_interface, public device_rom_interface<16>
{
public:
- vlm5030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ vlm5030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
/* get BSY pin level */
DECLARE_READ_LINE_MEMBER( bsy );
diff --git a/src/devices/sound/votrax.cpp b/src/devices/sound/votrax.cpp
index 1ec2343f72f..237db849a9b 100644
--- a/src/devices/sound/votrax.cpp
+++ b/src/devices/sound/votrax.cpp
@@ -75,7 +75,7 @@ const double votrax_sc01_device::s_glottal_wave[9] =
};
-votrax_sc01_device::votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+votrax_sc01_device::votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, VOTRAX_SC01, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_stream(nullptr),
diff --git a/src/devices/sound/votrax.h b/src/devices/sound/votrax.h
index 2dcc7d087da..58ab20af024 100644
--- a/src/devices/sound/votrax.h
+++ b/src/devices/sound/votrax.h
@@ -20,7 +20,7 @@ public:
static constexpr feature_type imperfect_features() { return feature::SOUND; }
// construction/destruction
- votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto ar_callback() { return m_ar_cb.bind(); }
diff --git a/src/devices/sound/vrc6.cpp b/src/devices/sound/vrc6.cpp
index d9b36f5b8a6..e43d3a43c04 100644
--- a/src/devices/sound/vrc6.cpp
+++ b/src/devices/sound/vrc6.cpp
@@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(VRC6, vrc6snd_device, "vrc6snd", "Konami 053329 VRC VI (Sound
// vrc6snd_device - constructor
//-------------------------------------------------
-vrc6snd_device::vrc6snd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+vrc6snd_device::vrc6snd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, VRC6, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_freqctrl(0), m_pulsectrl{ 0, 0 }, m_sawrate(0), m_master_freq(0)
diff --git a/src/devices/sound/vrc6.h b/src/devices/sound/vrc6.h
index eb17dabff82..5464d869fa9 100644
--- a/src/devices/sound/vrc6.h
+++ b/src/devices/sound/vrc6.h
@@ -22,7 +22,7 @@ class vrc6snd_device : public device_t, public device_sound_interface
{
public:
// construction/destruction
- vrc6snd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ vrc6snd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void write(offs_t offset, u8 data);
diff --git a/src/devices/sound/vrender0.cpp b/src/devices/sound/vrender0.cpp
index fd86b56adea..4e630cbf1ea 100644
--- a/src/devices/sound/vrender0.cpp
+++ b/src/devices/sound/vrender0.cpp
@@ -121,7 +121,7 @@ DEFINE_DEVICE_TYPE(SOUND_VRENDER0, vr0sound_device, "vr0sound", "MagicEyes VRend
// vr0sound_device - constructor
//-------------------------------------------------
-vr0sound_device::vr0sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+vr0sound_device::vr0sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SOUND_VRENDER0, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_memory_interface(mconfig, *this)
diff --git a/src/devices/sound/vrender0.h b/src/devices/sound/vrender0.h
index 1e234232c69..9667a8d9ece 100644
--- a/src/devices/sound/vrender0.h
+++ b/src/devices/sound/vrender0.h
@@ -27,7 +27,7 @@ public:
static constexpr feature_type imperfect_features() { return feature::SOUND; }
- vr0sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ vr0sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
auto irq_callback() { return m_irq_cb.bind(); }
diff --git a/src/devices/sound/wave.cpp b/src/devices/sound/wave.cpp
index 1a53aaa95f7..3adea26793d 100644
--- a/src/devices/sound/wave.cpp
+++ b/src/devices/sound/wave.cpp
@@ -25,7 +25,7 @@
DEFINE_DEVICE_TYPE(WAVE, wave_device, "wave", "Cassette Sound")
-wave_device::wave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+wave_device::wave_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, WAVE, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_cass(*this, finder_base::DUMMY_TAG)
diff --git a/src/devices/sound/wave.h b/src/devices/sound/wave.h
index 73c9b94873a..e374717bad9 100644
--- a/src/devices/sound/wave.h
+++ b/src/devices/sound/wave.h
@@ -23,11 +23,11 @@ class wave_device : public device_t, public device_sound_interface
public:
template <typename T>
wave_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cassette_tag)
- : wave_device(mconfig, tag, owner, uint32_t(0))
+ : wave_device(mconfig, tag, owner)
{
m_cass.set_tag(std::forward<T>(cassette_tag));
}
- wave_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ wave_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
template <typename T> void set_cassette_tag(T &&cassette_tag) { m_cass.set_tag(std::forward<T>(cassette_tag)); }
diff --git a/src/devices/sound/x1_010.cpp b/src/devices/sound/x1_010.cpp
index d18f40c5f84..c56a6be63b5 100644
--- a/src/devices/sound/x1_010.cpp
+++ b/src/devices/sound/x1_010.cpp
@@ -86,7 +86,7 @@ struct X1_010_CHANNEL
DEFINE_DEVICE_TYPE(X1_010, x1_010_device, "x1_010", "Seta X1-010")
-x1_010_device::x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+x1_010_device::x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, X1_010, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/x1_010.h b/src/devices/sound/x1_010.h
index a107534d4ae..4cdab69865c 100644
--- a/src/devices/sound/x1_010.h
+++ b/src/devices/sound/x1_010.h
@@ -10,7 +10,7 @@
class x1_010_device : public device_t, public device_sound_interface, public device_rom_interface<20>
{
public:
- x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ x1_010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
u8 read(offs_t offset);
void write(offs_t offset, u8 data);
diff --git a/src/devices/sound/xt446.cpp b/src/devices/sound/xt446.cpp
index 9dc3053f1ff..b4cd6cbacd2 100644
--- a/src/devices/sound/xt446.cpp
+++ b/src/devices/sound/xt446.cpp
@@ -35,7 +35,7 @@ ROM_START( xt446 )
ROM_LOAD32_WORD( "xt463a0.ic38", 0x1000002, 0x400000, CRC(cce5f8d3) SHA1(bdca8c5158f452f2b5535c7d658c9b22c6d66048) )
ROM_END
-xt446_device::xt446_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+xt446_device::xt446_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, XT446, tag, owner, clock)
, device_mixer_interface(mconfig, *this, 2)
, m_maincpu(*this, "maincpu")
diff --git a/src/devices/sound/xt446.h b/src/devices/sound/xt446.h
index 5404dfd3466..c845f4ad776 100644
--- a/src/devices/sound/xt446.h
+++ b/src/devices/sound/xt446.h
@@ -18,7 +18,7 @@
class xt446_device : public device_t, public device_mixer_interface
{
public:
- xt446_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
+ xt446_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL());
void midi_w(int state) { m_midi_serial->rx_w(state); }
diff --git a/src/devices/sound/ym2154.cpp b/src/devices/sound/ym2154.cpp
index 287529aeeec..9dec45d504f 100644
--- a/src/devices/sound/ym2154.cpp
+++ b/src/devices/sound/ym2154.cpp
@@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(YM2154, ym2154_device, "ym2154", "YM2154 (RYP4)")
// ym2154_device - constructor
//-------------------------------------------------
-ym2154_device::ym2154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym2154_device::ym2154_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, YM2154, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
diff --git a/src/devices/sound/ym2154.h b/src/devices/sound/ym2154.h
index e7f287409fa..613a27abd47 100644
--- a/src/devices/sound/ym2154.h
+++ b/src/devices/sound/ym2154.h
@@ -19,7 +19,7 @@ class ym2154_device : public device_t, public device_sound_interface, public dev
public:
// internal constructor
- ym2154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym2154_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers
auto irq_handler() { return m_update_irq.bind(); }
diff --git a/src/devices/sound/ymf271.cpp b/src/devices/sound/ymf271.cpp
index 886d6d516d5..bbb36481fa5 100644
--- a/src/devices/sound/ymf271.cpp
+++ b/src/devices/sound/ymf271.cpp
@@ -1788,7 +1788,7 @@ void ymf271_device::rom_bank_pre_change()
DEFINE_DEVICE_TYPE(YMF271, ymf271_device, "ymf271", "Yamaha YMF271 OPX")
-ymf271_device::ymf271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ymf271_device::ymf271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, YMF271, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/ymf271.h b/src/devices/sound/ymf271.h
index 04d49c57f09..c3113e8c707 100644
--- a/src/devices/sound/ymf271.h
+++ b/src/devices/sound/ymf271.h
@@ -12,7 +12,7 @@ class ymf271_device : public device_t, public device_sound_interface, public dev
public:
static constexpr feature_type imperfect_features() { return feature::SOUND; }
- ymf271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ymf271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers
auto irq_handler() { return m_irq_handler.bind(); }
diff --git a/src/devices/sound/ymfm_mame.h b/src/devices/sound/ymfm_mame.h
index d0161426619..27a7d002b18 100644
--- a/src/devices/sound/ymfm_mame.h
+++ b/src/devices/sound/ymfm_mame.h
@@ -30,7 +30,7 @@ class ym_generic_device : public device_t, public device_sound_interface, public
{
public:
// constructor
- ym_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) :
+ ym_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type) :
device_t(mconfig, type, tag, owner, clock),
device_sound_interface(mconfig, *this),
m_timer{ nullptr, nullptr },
@@ -177,7 +177,7 @@ protected:
public:
// constructor
- ymfm_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) :
+ ymfm_device_base(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type) :
ym_generic_device(mconfig, tag, owner, clock, type),
m_stream(nullptr),
m_chip(*this)
@@ -201,7 +201,7 @@ protected:
ym_generic_device::device_start();
// allocate our stream
- m_stream = device_sound_interface::stream_alloc(0, OUTPUTS, m_chip.sample_rate(device_t::clock()));
+ m_stream = device_sound_interface::stream_alloc(0, OUTPUTS, XTAL::u(m_chip.sample_rate(device_t::clock().value())));
// compute the size of the save buffer by doing an initial save
ymfm::ymfm_saved_state state(m_save_blob, true);
@@ -221,7 +221,7 @@ protected:
virtual void device_clock_changed() override
{
if (m_stream != nullptr)
- m_stream->set_sample_rate(m_chip.sample_rate(device_t::clock()));
+ m_stream->set_sample_rate(XTAL::u(m_chip.sample_rate(device_t::clock().value())));
}
// handle pre-saving by filling the blob
@@ -303,7 +303,7 @@ class ymfm_ssg_device_base : public ymfm_device_base<ChipClass>
public:
// constructor
- ymfm_ssg_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) :
+ ymfm_ssg_device_base(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type) :
ymfm_device_base<ChipClass>(mconfig, tag, owner, clock, type)
{
}
diff --git a/src/devices/sound/ymopl.cpp b/src/devices/sound/ymopl.cpp
index 92e9eb99928..e647e6fd4bf 100644
--- a/src/devices/sound/ymopl.cpp
+++ b/src/devices/sound/ymopl.cpp
@@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(YM3526, ym3526_device, "ym3526", "YM3526 OPL")
// ym3526_device - constructor
//-------------------------------------------------
-ym3526_device::ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym3526_device::ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ym3526>(mconfig, tag, owner, clock, YM3526)
{
}
@@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(Y8950, y8950_device, "y8950", "Y8950 OPL MSX-Audio")
// y8950_device - constructor
//-------------------------------------------------
-y8950_device::y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+y8950_device::y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::y8950>(mconfig, tag, owner, clock, Y8950),
device_rom_interface(mconfig, *this)
{
@@ -89,7 +89,7 @@ DEFINE_DEVICE_TYPE(YM3812, ym3812_device, "ym3812", "YM3812 OPL2")
// ym3812_device - constructor
//-------------------------------------------------
-ym3812_device::ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym3812_device::ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ym3812>(mconfig, tag, owner, clock, YM3812)
{
}
@@ -106,7 +106,7 @@ DEFINE_DEVICE_TYPE(YMF262, ymf262_device, "ymf262", "YMF262 OPL3")
// ymf262_device - constructor
//-------------------------------------------------
-ymf262_device::ymf262_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ymf262_device::ymf262_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ymf262>(mconfig, tag, owner, clock, YMF262)
{
}
@@ -123,7 +123,7 @@ DEFINE_DEVICE_TYPE(YMF278B, ymf278b_device, "ymf278b", "YMF278B OPL4")
// ymf278b_device - constructor
//-------------------------------------------------
-ymf278b_device::ymf278b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ymf278b_device::ymf278b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ymf278b>(mconfig, tag, owner, clock, YMF278B),
device_rom_interface(mconfig, *this)
{
@@ -192,7 +192,7 @@ DEFINE_DEVICE_TYPE(YM2413, ym2413_device, "ym2413", "YM2413 OPLL")
// ym2413_device - constructor
//-------------------------------------------------
-ym2413_device::ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym2413_device::ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ym2413>(mconfig, tag, owner, clock, YM2413),
m_internal(*this, "internal")
{
@@ -240,7 +240,7 @@ DEFINE_DEVICE_TYPE(YM2423, ym2423_device, "ym2423", "YM2423 OPLL-X")
// ym2423_device - constructor
//-------------------------------------------------
-ym2423_device::ym2423_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym2423_device::ym2423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ym2423>(mconfig, tag, owner, clock, YM2423),
m_internal(*this, "internal")
{
@@ -288,7 +288,7 @@ DEFINE_DEVICE_TYPE(YMF281, ymf281_device, "ymf281", "YMF281 OPLLP")
// ymf281_device - constructor
//-------------------------------------------------
-ymf281_device::ymf281_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ymf281_device::ymf281_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ymf281>(mconfig, tag, owner, clock, YMF281),
m_internal(*this, "internal")
{
@@ -336,7 +336,7 @@ DEFINE_DEVICE_TYPE(DS1001, ds1001_device, "ds1001", "Yamaha DS1001 / Konami 0539
// ds1001_device - constructor
//-------------------------------------------------
-ds1001_device::ds1001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ds1001_device::ds1001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ds1001>(mconfig, tag, owner, clock, DS1001),
m_internal(*this, "internal")
{
diff --git a/src/devices/sound/ymopl.h b/src/devices/sound/ymopl.h
index 6d5f279be03..e44627db955 100644
--- a/src/devices/sound/ymopl.h
+++ b/src/devices/sound/ymopl.h
@@ -19,7 +19,7 @@ class ym3526_device : public ymfm_device_base<ymfm::ym3526>
{
public:
// constructor
- ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
@@ -33,7 +33,7 @@ class y8950_device : public ymfm_device_base<ymfm::y8950>, public device_rom_int
public:
// constructor
- y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers
auto io_read() { return io_read_handler(0); }
@@ -63,7 +63,7 @@ class ym3812_device : public ymfm_device_base<ymfm::ym3812>
{
public:
// constructor
- ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
@@ -75,7 +75,7 @@ class ymf262_device : public ymfm_device_base<ymfm::ymf262>
{
public:
// constructor
- ymf262_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ymf262_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// additional register writes
void address_hi_w(u8 data) { update_streams().write_address_hi(data); }
@@ -93,7 +93,7 @@ class ymf278b_device : public ymfm_device_base<ymfm::ymf278b>, public device_rom
public:
// constructor
- ymf278b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ymf278b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// additional register reads
uint8_t data_pcm_r() { return update_streams().read_data_pcm(); }
@@ -128,7 +128,7 @@ class ym2413_device : public ymfm_device_base<ymfm::ym2413>
public:
// constructor
- ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
// device-level overrides
@@ -150,7 +150,7 @@ class ym2423_device : public ymfm_device_base<ymfm::ym2423>
public:
// constructor
- ym2423_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym2423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
// device-level overrides
@@ -172,7 +172,7 @@ class ymf281_device : public ymfm_device_base<ymfm::ymf281>
public:
// constructor
- ymf281_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ymf281_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
// device-level overrides
@@ -194,7 +194,7 @@ class ds1001_device : public ymfm_device_base<ymfm::ds1001>
public:
// constructor
- ds1001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ds1001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
// device-level overrides
diff --git a/src/devices/sound/ymopm.cpp b/src/devices/sound/ymopm.cpp
index a75da72b449..1f73821a48e 100644
--- a/src/devices/sound/ymopm.cpp
+++ b/src/devices/sound/ymopm.cpp
@@ -15,7 +15,7 @@ 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, uint32_t clock) :
+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)
{
@@ -75,7 +75,7 @@ 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, uint32_t clock) :
+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)
{
}
diff --git a/src/devices/sound/ymopm.h b/src/devices/sound/ymopm.h
index ce4a7c87f51..f156f40397c 100644
--- a/src/devices/sound/ymopm.h
+++ b/src/devices/sound/ymopm.h
@@ -20,7 +20,7 @@ class ym2151_device : public ymfm_device_base<ymfm::ym2151>
public:
// constructor
- ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers, handled by the interface
auto port_write_handler() { return io_write_handler(); }
@@ -47,7 +47,7 @@ class ym2164_device : public ymfm_device_base<ymfm::ym2164>
{
public:
// constructor
- ym2164_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym2164_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers, handled by the interface
auto port_write_handler() { return io_write_handler(); }
diff --git a/src/devices/sound/ymopn.cpp b/src/devices/sound/ymopn.cpp
index de18330fa89..9f373941145 100644
--- a/src/devices/sound/ymopn.cpp
+++ b/src/devices/sound/ymopn.cpp
@@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(YM2203, ym2203_device, "ym2203", "YM2203 OPN")
// ym2203_device - constructor
//-------------------------------------------------
-ym2203_device::ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym2203_device::ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_ssg_device_base<ymfm::ym2203>(mconfig, tag, owner, clock, YM2203)
{
}
@@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(YM2608, ym2608_device, "ym2608", "YM2608 OPNA")
// ym2608_device - constructor
//-------------------------------------------------
-ym2608_device::ym2608_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym2608_device::ym2608_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_ssg_device_base<ymfm::ym2608>(mconfig, tag, owner, clock, YM2608),
device_rom_interface(mconfig, *this),
m_internal(*this, "internal")
@@ -147,7 +147,7 @@ void ym2608_device::ymfm_external_write(ymfm::access_class type, uint32_t offset
//-------------------------------------------------
template<typename ChipClass>
-ym2610_device_base<ChipClass>::ym2610_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) :
+ym2610_device_base<ChipClass>::ym2610_device_base(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type) :
ymfm_ssg_device_base<ChipClass>(mconfig, tag, owner, clock, type),
device_memory_interface(mconfig, *this),
m_adpcm_a_config("adpcm_a", ENDIANNESS_LITTLE, 8, 24, 0),
@@ -227,7 +227,7 @@ DEFINE_DEVICE_TYPE(YM2610, ym2610_device, "ym2610", "YM2610 OPNB")
// ym2610_device - constructor
//-------------------------------------------------
-ym2610_device::ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym2610_device::ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ym2610_device_base<ymfm::ym2610>(mconfig, tag, owner, clock, YM2610)
{
}
@@ -243,7 +243,7 @@ DEFINE_DEVICE_TYPE(YM2610B, ym2610b_device, "ym2610b", "YM2610B OPNB2")
// ym2610b_device - constructor
//-------------------------------------------------
-ym2610b_device::ym2610b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym2610b_device::ym2610b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ym2610_device_base<ymfm::ym2610b>(mconfig, tag, owner, clock, YM2610B)
{
}
@@ -260,7 +260,7 @@ DEFINE_DEVICE_TYPE(YM2612, ym2612_device, "ym2612", "YM2612 OPN2")
// ym2612_device - constructor
//-------------------------------------------------
-ym2612_device::ym2612_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym2612_device::ym2612_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ym2612>(mconfig, tag, owner, clock, YM2612)
{
}
@@ -277,7 +277,7 @@ DEFINE_DEVICE_TYPE(YM3438, ym3438_device, "ym3438", "YM3438 OPN2C")
// ym3438_device - constructor
//-------------------------------------------------
-ym3438_device::ym3438_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym3438_device::ym3438_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ym3438>(mconfig, tag, owner, clock, YM3438)
{
}
@@ -294,7 +294,7 @@ DEFINE_DEVICE_TYPE(YMF276, ymf276_device, "ymf276", "YMF276 OPN2L")
// ymf276_device - constructor
//-------------------------------------------------
-ymf276_device::ymf276_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ymf276_device::ymf276_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ymf276>(mconfig, tag, owner, clock, YMF276)
{
}
diff --git a/src/devices/sound/ymopn.h b/src/devices/sound/ymopn.h
index 93b0999be8c..65cbde934e0 100644
--- a/src/devices/sound/ymopn.h
+++ b/src/devices/sound/ymopn.h
@@ -21,7 +21,7 @@ class ym2203_device : public ymfm_ssg_device_base<ymfm::ym2203>
public:
// constructor
- ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers, handled by the interface
auto port_a_read_callback() { return io_read_handler(0); }
@@ -48,7 +48,7 @@ class ym2608_device : public ymfm_ssg_device_base<ymfm::ym2608>, public device_r
public:
// constructor
- ym2608_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym2608_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers, handled by the interface
auto port_a_read_callback() { return io_read_handler(0); }
@@ -92,7 +92,7 @@ class ym2610_device_base : public ymfm_ssg_device_base<ChipClass>, public device
public:
// constructor
- ym2610_device_base(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type);
+ ym2610_device_base(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, device_type type);
// additional register reads
u8 data_r() { return update_streams().read_data(); }
@@ -131,7 +131,7 @@ DECLARE_DEVICE_TYPE(YM2610, ym2610_device);
class ym2610_device : public ym2610_device_base<ymfm::ym2610>
{
public:
- ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
@@ -142,7 +142,7 @@ DECLARE_DEVICE_TYPE(YM2610B, ym2610b_device);
class ym2610b_device : public ym2610_device_base<ymfm::ym2610b>
{
public:
- ym2610b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym2610b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
@@ -154,7 +154,7 @@ class ym2612_device : public ymfm_device_base<ymfm::ym2612>
{
public:
// constructor
- ym2612_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym2612_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// additional register writes
void address_hi_w(u8 data) { update_streams().write_address_hi(data); }
@@ -170,7 +170,7 @@ class ym3438_device : public ymfm_device_base<ymfm::ym3438>
{
public:
// constructor
- ym3438_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym3438_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// additional register writes
void address_hi_w(u8 data) { update_streams().write_address_hi(data); }
@@ -186,7 +186,7 @@ class ymf276_device : public ymfm_device_base<ymfm::ymf276>
{
public:
// constructor
- ymf276_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ymf276_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// additional register writes
void address_hi_w(u8 data) { update_streams().write_address_hi(data); }
diff --git a/src/devices/sound/ymopq.cpp b/src/devices/sound/ymopq.cpp
index 3286dd7cf3b..4bc5fb21252 100644
--- a/src/devices/sound/ymopq.cpp
+++ b/src/devices/sound/ymopq.cpp
@@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(YM3806, ym3806_device, "ym3806", "YM3806 OPQ")
// ym3806_device - constructor
//-------------------------------------------------
-ym3806_device::ym3806_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym3806_device::ym3806_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ym3806>(mconfig, tag, owner, clock, YM3806)
{
}
@@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(YM3533, ym3533_device, "ym3533", "YM3533 OPQ")
// ym3533_device - constructor
//-------------------------------------------------
-ym3533_device::ym3533_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym3533_device::ym3533_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ym3533>(mconfig, tag, owner, clock, YM3533)
{
}
diff --git a/src/devices/sound/ymopq.h b/src/devices/sound/ymopq.h
index 39a76e7307d..f2d7f31608e 100644
--- a/src/devices/sound/ymopq.h
+++ b/src/devices/sound/ymopq.h
@@ -18,7 +18,7 @@ class ym3806_device : public ymfm_device_base<ymfm::ym3806>
{
public:
// constructor
- ym3806_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym3806_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
@@ -30,7 +30,7 @@ class ym3533_device : public ymfm_device_base<ymfm::ym3533>
{
public:
// constructor
- ym3533_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym3533_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
#endif // MAME_SOUND_YMOPQ_H
diff --git a/src/devices/sound/ymopz.cpp b/src/devices/sound/ymopz.cpp
index cf629cb7779..c503592dfd1 100644
--- a/src/devices/sound/ymopz.cpp
+++ b/src/devices/sound/ymopz.cpp
@@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(YM2414, ym2414_device, "ym2414", "YM2414 OPZ")
// ym2414_device - constructor
//-------------------------------------------------
-ym2414_device::ym2414_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ym2414_device::ym2414_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
ymfm_device_base<ymfm::ym2414>(mconfig, tag, owner, clock, YM2414)
{
}
diff --git a/src/devices/sound/ymopz.h b/src/devices/sound/ymopz.h
index 133da4160f4..33d3cf3292a 100644
--- a/src/devices/sound/ymopz.h
+++ b/src/devices/sound/ymopz.h
@@ -20,7 +20,7 @@ class ym2414_device : public ymfm_device_base<ymfm::ym2414>
public:
// constructor
- ym2414_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ym2414_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers, handled by the interface
auto port_write_handler() { return io_write_handler(); }
diff --git a/src/devices/sound/ymz280b.cpp b/src/devices/sound/ymz280b.cpp
index ef4e9bf1190..d0a2750aa7a 100644
--- a/src/devices/sound/ymz280b.cpp
+++ b/src/devices/sound/ymz280b.cpp
@@ -551,7 +551,7 @@ void ymz280b_device::device_start()
compute_tables();
/* initialize the rest of the structure */
- m_master_clock = (double)clock() / 384.0;
+ m_master_clock = clock() / 384;
m_irq_handler.resolve();
for (int i = 0; i < 8; i++)
@@ -641,7 +641,7 @@ void ymz280b_device::device_reset()
void ymz280b_device::device_clock_changed()
{
- m_master_clock = (double)clock() / 384.0;
+ m_master_clock = clock() / 384;
m_stream->set_sample_rate(INTERNAL_SAMPLE_RATE);
}
@@ -908,7 +908,7 @@ void ymz280b_device::write(offs_t offset, u8 data)
DEFINE_DEVICE_TYPE(YMZ280B, ymz280b_device, "ymz280b", "Yamaha YMZ280B PCMD8")
-ymz280b_device::ymz280b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ymz280b_device::ymz280b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, YMZ280B, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, device_rom_interface(mconfig, *this)
diff --git a/src/devices/sound/ymz280b.h b/src/devices/sound/ymz280b.h
index 319f85b83f4..29f648c38e6 100644
--- a/src/devices/sound/ymz280b.h
+++ b/src/devices/sound/ymz280b.h
@@ -19,7 +19,7 @@
class ymz280b_device : public device_t, public device_sound_interface, public device_rom_interface<24>
{
public:
- ymz280b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ ymz280b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers
auto irq_handler() { return m_irq_handler.bind(); }
@@ -104,7 +104,7 @@ private:
devcb_write_line m_irq_handler; /* IRQ callback */
- double m_master_clock; /* master clock frequency */
+ XTAL m_master_clock; /* master clock frequency */
sound_stream *m_stream; /* which stream are we using */
std::unique_ptr<s16[]> m_scratch;
#if YMZ280B_MAKE_WAVS
diff --git a/src/devices/sound/ymz770.cpp b/src/devices/sound/ymz770.cpp
index b19c21514e5..87e2807832d 100644
--- a/src/devices/sound/ymz770.cpp
+++ b/src/devices/sound/ymz770.cpp
@@ -48,12 +48,12 @@ DEFINE_DEVICE_TYPE(YMZ774, ymz774_device, "ymz774", "Yamaha YMZ774 AMMS2C")
// ymz770_device - constructor
//-------------------------------------------------
-ymz770_device::ymz770_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ymz770_device::ymz770_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: ymz770_device(mconfig, YMZ770, tag, owner, clock, 16000)
{
}
-ymz770_device::ymz770_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t sclock)
+ymz770_device::ymz770_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t sclock)
: device_t(mconfig, type, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_stream(nullptr)
@@ -456,7 +456,7 @@ void ymz770_device::internal_reg_write(uint8_t reg, uint8_t data)
// ymz774_device
//-------------------------------------------------
-ymz774_device::ymz774_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ymz774_device::ymz774_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: ymz770_device(mconfig, YMZ774, tag, owner, clock, 44100)
{
// calculate volume increments, fixed point values, fractions of 0x20000
diff --git a/src/devices/sound/ymz770.h b/src/devices/sound/ymz770.h
index c8850b2e2bc..219e08e6da1 100644
--- a/src/devices/sound/ymz770.h
+++ b/src/devices/sound/ymz770.h
@@ -24,7 +24,7 @@ class ymz770_device : public device_t, public device_sound_interface
{
public:
// construction/destruction
- ymz770_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ymz770_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void write(offs_t offset, uint8_t data);
@@ -41,7 +41,7 @@ protected:
virtual void sequencer();
uint8_t get_rom_byte(uint32_t offset) { return m_rom[offset % m_rom.bytes()]; } // need optimise or its good as is ?
- ymz770_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t sclock);
+ ymz770_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t sclock);
sound_stream *m_stream;
uint32_t m_sclock;
@@ -111,7 +111,7 @@ class ymz774_device : public ymz770_device
{
public:
// construction/destruction
- ymz774_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ymz774_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
uint8_t read(offs_t offset);
diff --git a/src/devices/sound/zsg2.cpp b/src/devices/sound/zsg2.cpp
index 518d765ccc3..dca71a28f97 100644
--- a/src/devices/sound/zsg2.cpp
+++ b/src/devices/sound/zsg2.cpp
@@ -115,7 +115,7 @@ DEFINE_DEVICE_TYPE(ZSG2, zsg2_device, "zsg2", "ZOOM ZSG-2")
// zsg2_device - constructor
//-------------------------------------------------
-zsg2_device::zsg2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+zsg2_device::zsg2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, ZSG2, tag, owner, clock)
, device_sound_interface(mconfig, *this)
, m_mem_base(*this, DEVICE_SELF)
diff --git a/src/devices/sound/zsg2.h b/src/devices/sound/zsg2.h
index 0239f6ff03d..49982ec2d4a 100644
--- a/src/devices/sound/zsg2.h
+++ b/src/devices/sound/zsg2.h
@@ -15,7 +15,7 @@ class zsg2_device : public device_t,
public device_sound_interface
{
public:
- zsg2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ zsg2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// configuration helpers
auto ext_read() { return m_ext_read_handler.bind(); }