diff options
author | 2022-06-16 12:47:52 +0200 | |
---|---|---|
committer | 2025-04-29 23:06:41 +0200 | |
commit | 45d4cd52a8194f2ef9e0383cfb2e2a35634af6ff (patch) | |
tree | 4e8d8fcb7382a5e9e0bce5ec59939bcfbe67155a /src/devices/machine | |
parent | 5c14bcdfcb4aefb71b5b62387c4ad05dbeb3814e (diff) |
full xtal conversionxtal
Diffstat (limited to 'src/devices/machine')
916 files changed, 2158 insertions, 2209 deletions
diff --git a/src/devices/machine/1ma6.cpp b/src/devices/machine/1ma6.cpp index 621e6aa6960..4e2b3936784 100644 --- a/src/devices/machine/1ma6.cpp +++ b/src/devices/machine/1ma6.cpp @@ -110,7 +110,7 @@ enum { HOLE_TMR_ID }; -hp_1ma6_device::hp_1ma6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_1ma6_device::hp_1ma6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP_1MA6 , tag , owner , clock) , m_tape(*this , "drive") { diff --git a/src/devices/machine/1ma6.h b/src/devices/machine/1ma6.h index cb083e05c88..27f8a95ddf1 100644 --- a/src/devices/machine/1ma6.h +++ b/src/devices/machine/1ma6.h @@ -20,7 +20,7 @@ class hp_1ma6_device : public device_t { public: // construction/destruction - hp_1ma6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_1ma6_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Register read/write void reg_w(offs_t offset, uint8_t data); diff --git a/src/devices/machine/1mb5.cpp b/src/devices/machine/1mb5.cpp index 054202b06e1..79b7e007aad 100644 --- a/src/devices/machine/1mb5.cpp +++ b/src/devices/machine/1mb5.cpp @@ -48,7 +48,7 @@ namespace { } } -hp_1mb5_device::hp_1mb5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_1mb5_device::hp_1mb5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , HP_1MB5 , tag , owner , clock), m_irl_handler(*this), m_halt_handler(*this), diff --git a/src/devices/machine/1mb5.h b/src/devices/machine/1mb5.h index 13b1296e6cc..bd2821cf3c0 100644 --- a/src/devices/machine/1mb5.h +++ b/src/devices/machine/1mb5.h @@ -17,7 +17,7 @@ class hp_1mb5_device : public device_t { public: // construction/destruction - hp_1mb5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_1mb5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // static configuration helpers auto irl_handler() { return m_irl_handler.bind(); } diff --git a/src/devices/machine/2812fifo.cpp b/src/devices/machine/2812fifo.cpp index 3cc10965ecb..ffa019b8c3e 100644 --- a/src/devices/machine/2812fifo.cpp +++ b/src/devices/machine/2812fifo.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(FIFO2812, fifo2812_device, "fifo2812", "2812 32x8 FIFO Memory"); -fifo2812_device::fifo2812_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : +fifo2812_device::fifo2812_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FIFO2812, tag, owner, clock), m_q_cb(*this), m_ir_cb(*this), diff --git a/src/devices/machine/2812fifo.h b/src/devices/machine/2812fifo.h index 01c42624c09..5ed387ff80a 100644 --- a/src/devices/machine/2812fifo.h +++ b/src/devices/machine/2812fifo.h @@ -32,7 +32,7 @@ class fifo2812_device : public device_t { public: // standard constructor - fifo2812_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + fifo2812_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto q_cb() { return m_q_cb.bind(); } diff --git a/src/devices/machine/28fxxx.cpp b/src/devices/machine/28fxxx.cpp index 60351ee7565..f104114e433 100644 --- a/src/devices/machine/28fxxx.cpp +++ b/src/devices/machine/28fxxx.cpp @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(AMD_28F020, amd_28f020_device, "amd_28f020", "Am28F020 2 Mega ALLOW_SAVE_TYPE(base_28fxxx_device::state); -base_28fxxx_device::base_28fxxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 size, u8 manufacturer_code, u8 device_code) +base_28fxxx_device::base_28fxxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 size, u8 manufacturer_code, u8 device_code) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_region(*this, DEVICE_SELF) @@ -62,17 +62,17 @@ base_28fxxx_device::base_28fxxx_device(const machine_config &mconfig, device_typ throw emu_fatalerror("%s(%s): memory size must be an exact power of two", type.shortname(), tag); } -intel_28f010_device::intel_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +intel_28f010_device::intel_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : base_28fxxx_device(mconfig, INTEL_28F010, tag, owner, clock, 0x20000, MFG_INTEL, 0xb4) { } -amd_28f010_device::amd_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +amd_28f010_device::amd_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : base_28fxxx_device(mconfig, AMD_28F010, tag, owner, clock, 0x20000, MFG_AMD, 0xa7) { } -amd_28f020_device::amd_28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +amd_28f020_device::amd_28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : base_28fxxx_device(mconfig, AMD_28F020, tag, owner, clock, 0x40000, MFG_AMD, 0x2a) { } diff --git a/src/devices/machine/28fxxx.h b/src/devices/machine/28fxxx.h index 9ec25a6a7d9..55bb6c5172a 100644 --- a/src/devices/machine/28fxxx.h +++ b/src/devices/machine/28fxxx.h @@ -26,7 +26,7 @@ public: void write(offs_t offset, u8 data); protected: - base_28fxxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 size, u8 manufacturer_code, u8 device_code); + base_28fxxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 size, u8 manufacturer_code, u8 device_code); virtual void device_start() override; @@ -69,19 +69,19 @@ private: class intel_28f010_device : public base_28fxxx_device { public: - intel_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + intel_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_28f010_device : public base_28fxxx_device { public: - amd_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + amd_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_28f020_device : public base_28fxxx_device { public: - amd_28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + amd_28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(INTEL_28F010, intel_28f010_device) diff --git a/src/devices/machine/40105.cpp b/src/devices/machine/40105.cpp index ffcfab73da9..51279c61e39 100644 --- a/src/devices/machine/40105.cpp +++ b/src/devices/machine/40105.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(CD40105, cmos_40105_device, "cd40105", "CD40105B FIFO Registe // cmos_40105_device - constructor //------------------------------------------------- -cmos_40105_device::cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cmos_40105_device::cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CD40105, tag, owner, clock), m_write_dir(*this), m_write_dor(*this), diff --git a/src/devices/machine/40105.h b/src/devices/machine/40105.h index 5b35de12a58..82d61cbc053 100644 --- a/src/devices/machine/40105.h +++ b/src/devices/machine/40105.h @@ -35,7 +35,7 @@ class cmos_40105_device : public device_t { public: // construction/destruction - cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + cmos_40105_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_ready_cb() { return m_write_dir.bind(); } auto out_ready_cb() { return m_write_dor.bind(); } diff --git a/src/devices/machine/53c7xx.cpp b/src/devices/machine/53c7xx.cpp index 754d2714909..1dacd5196bc 100644 --- a/src/devices/machine/53c7xx.cpp +++ b/src/devices/machine/53c7xx.cpp @@ -87,7 +87,7 @@ DEFINE_DEVICE_TYPE(NCR53C7XX, ncr53c7xx_device, "ncr537xx", "NCR 53C7xx SCSI") // ncr53c7xx_device - constructor/destructor //------------------------------------------------- -ncr53c7xx_device::ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr53c7xx_device::ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, NCR53C7XX, tag, owner, clock), nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF), device_execute_interface(mconfig, *this), diff --git a/src/devices/machine/53c7xx.h b/src/devices/machine/53c7xx.h index 2d6c695acd2..f7b351b0bff 100644 --- a/src/devices/machine/53c7xx.h +++ b/src/devices/machine/53c7xx.h @@ -20,7 +20,7 @@ class ncr53c7xx_device : public nscsi_device, public nscsi_slot_card_interface, { public: // construction/destruction - ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // static configuration helpers auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/machine/53c810.cpp b/src/devices/machine/53c810.cpp index 261d640b340..f9f622a98d2 100644 --- a/src/devices/machine/53c810.cpp +++ b/src/devices/machine/53c810.cpp @@ -621,7 +621,7 @@ void lsi53c810_device::add_opcode(uint8_t op, uint8_t mask, opcode_handler_deleg } } -lsi53c810_device::lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lsi53c810_device::lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : legacy_scsi_host_adapter(mconfig, LSI53C810, tag, owner, clock) , m_irq_cb(*this) , m_dma_cb(*this) diff --git a/src/devices/machine/53c810.h b/src/devices/machine/53c810.h index b6ecd035072..3a98c670144 100644 --- a/src/devices/machine/53c810.h +++ b/src/devices/machine/53c810.h @@ -15,7 +15,7 @@ public: typedef device_delegate<uint32_t (uint32_t dsp)> fetch_delegate; // construction/destruction - lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + lsi53c810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <typename... T> void set_irq_callback(T &&... args) { diff --git a/src/devices/machine/64h156.cpp b/src/devices/machine/64h156.cpp index bf859402e55..ba190ff0341 100644 --- a/src/devices/machine/64h156.cpp +++ b/src/devices/machine/64h156.cpp @@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE(C64H156, c64h156_device, "c64h156", "Commodore 64H156") // c64h156_device - constructor //------------------------------------------------- -c64h156_device::c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +c64h156_device::c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, C64H156, tag, owner, clock), m_write_atn(*this), m_write_sync(*this), diff --git a/src/devices/machine/64h156.h b/src/devices/machine/64h156.h index 0f6508caab6..ee9a1079405 100644 --- a/src/devices/machine/64h156.h +++ b/src/devices/machine/64h156.h @@ -76,7 +76,7 @@ class c64h156_device : public device_t { public: // construction/destruction - c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + c64h156_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto atn_callback() { return m_write_atn.bind(); } auto sync_callback() { return m_write_sync.bind(); } diff --git a/src/devices/machine/6522via.cpp b/src/devices/machine/6522via.cpp index 5224fc4fbd5..56ef0a3e0dc 100644 --- a/src/devices/machine/6522via.cpp +++ b/src/devices/machine/6522via.cpp @@ -180,7 +180,7 @@ void via6522_device::map(address_map &map) // via6522_device - constructor //------------------------------------------------- -via6522_device::via6522_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +via6522_device::via6522_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_in_a_handler(*this), m_in_b_handler(*this), @@ -209,7 +209,7 @@ via6522_device::via6522_device(const machine_config &mconfig, device_type type, // mos6522_device - constructor //------------------------------------------------- -mos6522_device::mos6522_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6522_device::mos6522_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : via6522_device(mconfig, MOS6522, tag, owner, clock) { } @@ -219,7 +219,7 @@ mos6522_device::mos6522_device(const machine_config &mconfig, const char *tag, d // r65c22_device - constructor //------------------------------------------------- -r65c22_device::r65c22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +r65c22_device::r65c22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : via6522_device(mconfig, R65C22, tag, owner, clock) { } @@ -229,7 +229,7 @@ r65c22_device::r65c22_device(const machine_config &mconfig, const char *tag, dev // r65c22_device - constructor //------------------------------------------------- -r65nc22_device::r65nc22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +r65nc22_device::r65nc22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : via6522_device(mconfig, R65NC22, tag, owner, clock) { } @@ -239,7 +239,7 @@ r65nc22_device::r65nc22_device(const machine_config &mconfig, const char *tag, d // w65c22s_device - constructor //------------------------------------------------- -w65c22s_device::w65c22s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +w65c22s_device::w65c22s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : via6522_device(mconfig, W65C22S, tag, owner, clock) { } diff --git a/src/devices/machine/6522via.h b/src/devices/machine/6522via.h index 813a74a63d5..87ae018b31f 100644 --- a/src/devices/machine/6522via.h +++ b/src/devices/machine/6522via.h @@ -118,7 +118,7 @@ public: protected: // construction/destruction - via6522_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + via6522_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; @@ -213,7 +213,7 @@ class mos6522_device : public via6522_device { public: // construction/destruction - mos6522_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6522_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> r65c22_device @@ -222,7 +222,7 @@ class r65c22_device : public via6522_device { public: // construction/destruction - r65c22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + r65c22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> r65nc22_device @@ -231,7 +231,7 @@ class r65nc22_device : public via6522_device { public: // construction/destruction - r65nc22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + r65nc22_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> w65c22s_device @@ -240,7 +240,7 @@ class w65c22s_device : public via6522_device { public: // construction/destruction - w65c22s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + w65c22s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/6525tpi.cpp b/src/devices/machine/6525tpi.cpp index 83d28fc0355..2c1ee826c58 100644 --- a/src/devices/machine/6525tpi.cpp +++ b/src/devices/machine/6525tpi.cpp @@ -106,7 +106,7 @@ DEFINE_DEVICE_TYPE(TPI6525, tpi6525_device, "tpi6525", "6525 TPI") -tpi6525_device::tpi6525_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tpi6525_device::tpi6525_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TPI6525, tag, owner, clock), m_out_irq_cb(*this), m_in_pa_cb(*this), diff --git a/src/devices/machine/6525tpi.h b/src/devices/machine/6525tpi.h index 4052662d50a..f558c7ddd72 100644 --- a/src/devices/machine/6525tpi.h +++ b/src/devices/machine/6525tpi.h @@ -41,7 +41,7 @@ class tpi6525_device : public device_t { public: - tpi6525_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tpi6525_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_irq_cb() { return m_out_irq_cb.bind(); } auto in_pa_cb() { return m_in_pa_cb.bind(); } diff --git a/src/devices/machine/6532riot.cpp b/src/devices/machine/6532riot.cpp index cdeb8e673af..a4fd8ed0647 100644 --- a/src/devices/machine/6532riot.cpp +++ b/src/devices/machine/6532riot.cpp @@ -413,7 +413,7 @@ WRITE_LINE_MEMBER(riot6532_device::pb7_w) { portb_in_set(state ? 0x80 : 0x00, 0x // riot6532_device - constructor //------------------------------------------------- -riot6532_device::riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +riot6532_device::riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RIOT6532, tag, owner, clock), m_in_pa_cb(*this), m_out_pa_cb(*this), diff --git a/src/devices/machine/6532riot.h b/src/devices/machine/6532riot.h index 56156f929c3..7a04e709f9d 100644 --- a/src/devices/machine/6532riot.h +++ b/src/devices/machine/6532riot.h @@ -24,7 +24,7 @@ class riot6532_device : public device_t { public: // construction/destruction - riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + riot6532_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_pa_callback() { return m_in_pa_cb.bind(); } auto out_pa_callback() { return m_out_pa_cb.bind(); } diff --git a/src/devices/machine/68153bim.cpp b/src/devices/machine/68153bim.cpp index 20d63ef959e..06f8f74f13b 100644 --- a/src/devices/machine/68153bim.cpp +++ b/src/devices/machine/68153bim.cpp @@ -69,10 +69,10 @@ DEFINE_DEVICE_TYPE(EI68C153, ei68c153_device, "ei68c153", "EPIC void bim68153_device::device_add_mconfig(machine_config &config) { - MC68153_CHANNEL(config, m_chn[0], 0); - MC68153_CHANNEL(config, m_chn[1], 0); - MC68153_CHANNEL(config, m_chn[2], 0); - MC68153_CHANNEL(config, m_chn[3], 0); + MC68153_CHANNEL(config, m_chn[0]); + MC68153_CHANNEL(config, m_chn[1]); + MC68153_CHANNEL(config, m_chn[2]); + MC68153_CHANNEL(config, m_chn[3]); } //************************************************************************** @@ -82,7 +82,7 @@ void bim68153_device::device_add_mconfig(machine_config &config) //------------------------------------------------- // bim68153_device - constructor //------------------------------------------------- -bim68153_device::bim68153_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +bim68153_device::bim68153_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) , m_chn{{*this, CHN0_TAG}, {*this, CHN1_TAG}, {*this, CHN2_TAG}, {*this, CHN3_TAG}} , m_out_int_cb(*this) @@ -96,14 +96,14 @@ bim68153_device::bim68153_device(const machine_config &mconfig, device_type type LOG("%s\n", FUNCNAME); } -bim68153_device::bim68153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bim68153_device::bim68153_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bim68153_device(mconfig, MC68153, tag, owner, clock, TYPE_MC68153) { LOG("%s\n", FUNCNAME); } /* The EPIC EI68C153 is a CMOS implementation that is fully compatible with the bipolar MC68153 from Motorola */ -ei68c153_device::ei68c153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ei68c153_device::ei68c153_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bim68153_device(mconfig, EI68C153, tag, owner, clock, TYPE_EI68C153) { LOG("%s\n", FUNCNAME); @@ -318,7 +318,7 @@ void bim68153_device::write(offs_t offset, uint8_t data) // BIM CHANNEL //************************************************************************** -bim68153_channel::bim68153_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bim68153_channel::bim68153_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC68153_CHANNEL, tag, owner, clock) , m_out_iack_cb(*this) , m_int_state(NONE) diff --git a/src/devices/machine/68153bim.h b/src/devices/machine/68153bim.h index 124870b8194..4bf511af7f3 100644 --- a/src/devices/machine/68153bim.h +++ b/src/devices/machine/68153bim.h @@ -45,7 +45,7 @@ class bim68153_channel : public device_t friend class bim68153_device; public: - bim68153_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bim68153_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -102,7 +102,7 @@ class bim68153_device : public device_t public: // construction/destruction - bim68153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bim68153_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u16 iack(int irqline); int acknowledge(); @@ -133,7 +133,7 @@ public: DECLARE_WRITE_LINE_MEMBER( int3_w ) { m_chn[CHN_3]->int_w(state); } protected: - bim68153_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + bim68153_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; @@ -187,7 +187,7 @@ protected: class ei68c153_device : public bim68153_device { public : - ei68c153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ei68c153_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/6821pia.cpp b/src/devices/machine/6821pia.cpp index 2b32eb164ff..cc28a11eb52 100644 --- a/src/devices/machine/6821pia.cpp +++ b/src/devices/machine/6821pia.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(PIA6821, pia6821_device, "pia6821", "6821 PIA") // pia6821_device - constructor //------------------------------------------------- -pia6821_device::pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pia6821_device::pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PIA6821, tag, owner, clock), m_in_a_handler(*this), m_in_b_handler(*this), diff --git a/src/devices/machine/6821pia.h b/src/devices/machine/6821pia.h index 397b584fa3b..d152b6bcf94 100644 --- a/src/devices/machine/6821pia.h +++ b/src/devices/machine/6821pia.h @@ -34,7 +34,7 @@ class pia6821_device : public device_t { public: // construction/destruction - pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pia6821_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // TODO: REMOVE THESE auto readpa_handler() { return m_in_a_handler.bind(); } diff --git a/src/devices/machine/68230pit.cpp b/src/devices/machine/68230pit.cpp index d5aeafd4c76..91824db487f 100644 --- a/src/devices/machine/68230pit.cpp +++ b/src/devices/machine/68230pit.cpp @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(PIT68230, pit68230_device, "pit68230", "MC68230 PI/T") //------------------------------------------------- // pit68230_device - constructors //------------------------------------------------- -pit68230_device::pit68230_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +pit68230_device::pit68230_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) , m_pa_out_cb(*this) , m_pa_in_cb(*this) @@ -87,7 +87,7 @@ pit68230_device::pit68230_device(const machine_config &mconfig, device_type type } -pit68230_device::pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pit68230_device::pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pit68230_device (mconfig, PIT68230, tag, owner, clock, 0) { } diff --git a/src/devices/machine/68230pit.h b/src/devices/machine/68230pit.h index f99c3e541ee..950614f5498 100644 --- a/src/devices/machine/68230pit.h +++ b/src/devices/machine/68230pit.h @@ -72,7 +72,7 @@ class pit68230_device : public device_t { public: // construction/destruction - pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pit68230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto pa_in_callback() { return m_pa_in_cb.bind(); } auto pa_out_callback() { return m_pa_out_cb.bind(); } @@ -272,7 +272,7 @@ protected: REG_TCR_TOUT_PC7_INT = 0xe0, // 1 1 1 }; - pit68230_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + pit68230_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; diff --git a/src/devices/machine/68307.cpp b/src/devices/machine/68307.cpp index 2a16def71d9..656d673d817 100644 --- a/src/devices/machine/68307.cpp +++ b/src/devices/machine/68307.cpp @@ -56,7 +56,7 @@ void m68307_cpu_device::device_add_mconfig(machine_config &config) } -m68307_cpu_device::m68307_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m68307_cpu_device::m68307_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_device(mconfig, tag, owner, clock, M68307, 16, 24, address_map_constructor(FUNC(m68307_cpu_device::internal_map), this)), m_write_irq(*this), m_write_a_tx(*this), diff --git a/src/devices/machine/68307.h b/src/devices/machine/68307.h index cc5638b5efb..83857f5b3ae 100644 --- a/src/devices/machine/68307.h +++ b/src/devices/machine/68307.h @@ -18,7 +18,7 @@ public: typedef device_delegate<uint16_t (address_space &space, bool dedicated, uint16_t line_mask)> portb_read_delegate; typedef device_delegate<void (address_space &space, bool dedicated, uint16_t data, uint16_t line_mask)> portb_write_delegate; - m68307_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m68307_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); /* trampolines so we can specify the 68681 serial configuration when adding the CPU */ auto serial_a_tx_callback() { return m_write_a_tx.bind(); } diff --git a/src/devices/machine/68340.cpp b/src/devices/machine/68340.cpp index 81719f87a1b..0a37acf927d 100644 --- a/src/devices/machine/68340.cpp +++ b/src/devices/machine/68340.cpp @@ -221,7 +221,7 @@ void m68340_cpu_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -m68340_cpu_device::m68340_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m68340_cpu_device::m68340_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fscpu32_device(mconfig, tag, owner, clock, M68340, address_map_constructor(FUNC(m68340_cpu_device::m68340_internal_map), this)) , m_serial(*this, "serial") , m_timer(*this, "timer%u", 1U) diff --git a/src/devices/machine/68340.h b/src/devices/machine/68340.h index ef89972a72c..052006b4ba0 100644 --- a/src/devices/machine/68340.h +++ b/src/devices/machine/68340.h @@ -20,7 +20,7 @@ class m68340_cpu_device : public fscpu32_device friend class mc68340_timer_module_device; public: - m68340_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m68340_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto pa_in_callback() { return m_pa_in_cb.bind(); } auto pa_out_callback() { return m_pa_out_cb.bind(); } diff --git a/src/devices/machine/68340ser.cpp b/src/devices/machine/68340ser.cpp index e0fc3b29fde..7f1c2d5a035 100644 --- a/src/devices/machine/68340ser.cpp +++ b/src/devices/machine/68340ser.cpp @@ -152,7 +152,7 @@ WRITE_LINE_MEMBER( mc68340_serial_module_device::irq_w ) m_cpu->update_ipl(); } -mc68340_serial_module_device::mc68340_serial_module_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68340_serial_module_device::mc68340_serial_module_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68340_duart_device(mconfig, MC68340_SERIAL_MODULE, tag, owner, clock) { } diff --git a/src/devices/machine/68340ser.h b/src/devices/machine/68340ser.h index b9775f2ad86..056bc69c30f 100644 --- a/src/devices/machine/68340ser.h +++ b/src/devices/machine/68340ser.h @@ -14,7 +14,7 @@ class mc68340_serial_module_device : public mc68340_duart_device friend class m68340_cpu_device; public: - mc68340_serial_module_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mc68340_serial_module_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // device-level overrides virtual void device_start() override; diff --git a/src/devices/machine/68340tmu.cpp b/src/devices/machine/68340tmu.cpp index 1b358e14f6c..d0e88416fff 100644 --- a/src/devices/machine/68340tmu.cpp +++ b/src/devices/machine/68340tmu.cpp @@ -516,7 +516,7 @@ void mc68340_timer_module_device::tout_clear() } } -mc68340_timer_module_device::mc68340_timer_module_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68340_timer_module_device::mc68340_timer_module_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC68340_TIMER_MODULE, tag, owner, clock) , m_tout_out_cb(*this) , m_tin_in_cb(*this) diff --git a/src/devices/machine/68340tmu.h b/src/devices/machine/68340tmu.h index 653226f8887..e4ea6dd202c 100644 --- a/src/devices/machine/68340tmu.h +++ b/src/devices/machine/68340tmu.h @@ -12,7 +12,7 @@ class mc68340_timer_module_device : public device_t friend class m68340_cpu_device; public: - mc68340_timer_module_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mc68340_timer_module_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint16_t read(offs_t offset, uint16_t mem_mask = ~0); void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/machine/6840ptm.cpp b/src/devices/machine/6840ptm.cpp index 4d2a146f0e9..5f42ababdec 100644 --- a/src/devices/machine/6840ptm.cpp +++ b/src/devices/machine/6840ptm.cpp @@ -76,7 +76,7 @@ DEFINE_DEVICE_TYPE(PTM6840, ptm6840_device, "ptm6840", "MC6840 PTM") // ptm6840_device - constructor //------------------------------------------------- -ptm6840_device::ptm6840_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ptm6840_device::ptm6840_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PTM6840, tag, owner, clock) , m_external_clock{ 0.0, 0.0, 0.0 } , m_out_cb(*this) diff --git a/src/devices/machine/6840ptm.h b/src/devices/machine/6840ptm.h index 614901625a4..788526df72a 100644 --- a/src/devices/machine/6840ptm.h +++ b/src/devices/machine/6840ptm.h @@ -24,9 +24,8 @@ class ptm6840_device : public device_t { public: // construction/destruction - ptm6840_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ptm6840_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); - void set_external_clocks(double clock0, double clock1, double clock2) { m_external_clock[0] = clock0; m_external_clock[1] = clock1; m_external_clock[2] = clock2; } void set_external_clocks(const XTAL &clock0, const XTAL &clock1, const XTAL &clock2) { set_external_clocks(clock0.dvalue(), clock1.dvalue(), clock2.dvalue()); } auto o1_callback() { return m_out_cb[0].bind(); } auto o2_callback() { return m_out_cb[1].bind(); } @@ -61,6 +60,7 @@ protected: virtual void device_resolve_objects() override; private: + void set_external_clocks(double clock0, double clock1, double clock2) { m_external_clock[0] = clock0; m_external_clock[1] = clock1; m_external_clock[2] = clock2; } void deduct_from_counter(int idx); void tick(int counter); TIMER_CALLBACK_MEMBER(state_changed); diff --git a/src/devices/machine/6850acia.cpp b/src/devices/machine/6850acia.cpp index 364fcfdfc92..20fde1c7870 100644 --- a/src/devices/machine/6850acia.cpp +++ b/src/devices/machine/6850acia.cpp @@ -71,12 +71,12 @@ DEFINE_DEVICE_TYPE(ACIA6850, acia6850_device, "acia6850", "MC6850 ACIA") // acia6850_device - constructor //------------------------------------------------- -acia6850_device::acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acia6850_device::acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : acia6850_device(mconfig, ACIA6850, tag, owner, clock) { } -acia6850_device::acia6850_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +acia6850_device::acia6850_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_txd_handler(*this) , m_rts_handler(*this) diff --git a/src/devices/machine/6850acia.h b/src/devices/machine/6850acia.h index 4d99209d519..89a76e0978c 100644 --- a/src/devices/machine/6850acia.h +++ b/src/devices/machine/6850acia.h @@ -18,7 +18,7 @@ class acia6850_device : public device_t { public: // construction/destruction - acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + acia6850_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto txd_handler() { return m_txd_handler.bind(); } auto rts_handler() { return m_rts_handler.bind(); } @@ -38,7 +38,7 @@ public: DECLARE_WRITE_LINE_MEMBER( write_txc ); protected: - acia6850_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + acia6850_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/machine/68561mpcc.cpp b/src/devices/machine/68561mpcc.cpp index 1a3280d7975..d748205368e 100644 --- a/src/devices/machine/68561mpcc.cpp +++ b/src/devices/machine/68561mpcc.cpp @@ -95,7 +95,7 @@ DEFINE_DEVICE_TYPE(MPCC68561A, mpcc68561a_device, "mpcc68561a", "MPCC 68561A") // LIVE DEVICE //************************************************************************** -mpcc_device::mpcc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +mpcc_device::mpcc_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_serial_interface(mconfig, *this), m_irq(CLEAR_LINE), @@ -139,27 +139,27 @@ mpcc_device::mpcc_device(const machine_config &mconfig, device_type type, const elem = 0; } -mpcc_device::mpcc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcc_device::mpcc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpcc_device(mconfig, MPCC, tag, owner, clock, TYPE_MPCC) { } -mpcc68560_device::mpcc68560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcc68560_device::mpcc68560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpcc_device(mconfig, MPCC68560, tag, owner, clock, TYPE_MPCC68560) { } -mpcc68560a_device::mpcc68560a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcc68560a_device::mpcc68560a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpcc_device(mconfig, MPCC68560A, tag, owner, clock, TYPE_MPCC68560A) { } -mpcc68561_device::mpcc68561_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcc68561_device::mpcc68561_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpcc_device(mconfig, MPCC68561, tag, owner, clock, TYPE_MPCC68561) { } -mpcc68561a_device::mpcc68561a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mpcc68561a_device::mpcc68561a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mpcc_device(mconfig, MPCC68561A, tag, owner, clock, TYPE_MPCC68561A) { } @@ -474,7 +474,7 @@ void mpcc_device::update_serial() if (m_rcr & REG_RCR_RRES) { LOGSETUP("- Rx in reset\n"); - set_rcv_rate(0); + set_rcv_rate(XTAL::u(0)); } // Rx is running else @@ -491,7 +491,7 @@ void mpcc_device::update_serial() if (m_tcr & REG_TCR_TRES) { LOGSETUP("- Tx in reset\n"); - set_tra_rate(0); + set_tra_rate(XTAL::u(0)); } // Tx is running else @@ -508,7 +508,7 @@ void mpcc_device::update_serial() else { LOGSETUP("- Tx disabled\n"); - set_tra_rate(0); + set_tra_rate(XTAL::u(0)); } } } diff --git a/src/devices/machine/68561mpcc.h b/src/devices/machine/68561mpcc.h index 9758f387976..a55fd94890e 100644 --- a/src/devices/machine/68561mpcc.h +++ b/src/devices/machine/68561mpcc.h @@ -47,7 +47,7 @@ class mpcc_device : public device_t, public device_serial_interface { public: // construction/destruction - mpcc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void configure_clocks(int rxc, int txc) { @@ -77,7 +77,7 @@ public: DECLARE_WRITE_LINE_MEMBER( txc_w ) {} // { m_chanA->txc_w(state); } protected: - mpcc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + mpcc_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; @@ -407,49 +407,49 @@ protected: class mpcc68560_device : public mpcc_device { public: - mpcc68560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int rxc, int txc) + mpcc68560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int rxc, int txc) : mpcc68560_device(mconfig, tag, owner, clock) { configure_clocks(rxc, txc); } - mpcc68560_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcc68560_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mpcc68560a_device : public mpcc_device { public: - mpcc68560a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int rxc, int txc) + mpcc68560a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int rxc, int txc) : mpcc68560a_device(mconfig, tag, owner, clock) { configure_clocks(rxc, txc); } - mpcc68560a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcc68560a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mpcc68561_device : public mpcc_device { public: - mpcc68561_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int rxc, int txc) + mpcc68561_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int rxc, int txc) : mpcc68561_device(mconfig, tag, owner, clock) { configure_clocks(rxc, txc); } - mpcc68561_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcc68561_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mpcc68561a_device : public mpcc_device { public: - mpcc68561a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, int rxc, int txc) + mpcc68561a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int rxc, int txc) : mpcc68561a_device(mconfig, tag, owner, clock) { configure_clocks(rxc, txc); } - mpcc68561a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mpcc68561a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/7200fifo.cpp b/src/devices/machine/7200fifo.cpp index e9cb45f66a7..57ec29f4954 100644 --- a/src/devices/machine/7200fifo.cpp +++ b/src/devices/machine/7200fifo.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(IDT7202, idt7202_device, "idt7202", "IDT7202 FIFO (1024x9)") //------------------------------------------------- fifo7200_device::fifo7200_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, int size) - : device_t(mconfig, type, tag, owner, (uint32_t)0), + : device_t(mconfig, type, tag, owner), m_ram_size(size), m_read_ptr(0), m_write_ptr(0), m_ef(0), m_ff(0), m_hf(0), m_ef_handler(*this), @@ -37,8 +37,8 @@ fifo7200_device::fifo7200_device(const machine_config &mconfig, device_type type // idt7200_device - constructor //------------------------------------------------- -idt7200_device::idt7200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : fifo7200_device(mconfig, IDT7200, tag, owner, 0x100) +idt7200_device::idt7200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : fifo7200_device(mconfig, IDT7200, tag, ownerx100) { } @@ -47,8 +47,8 @@ idt7200_device::idt7200_device(const machine_config &mconfig, const char *tag, d // idt7201_device - constructor //------------------------------------------------- -idt7201_device::idt7201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : fifo7200_device(mconfig, IDT7201, tag, owner, 0x200) +idt7201_device::idt7201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : fifo7200_device(mconfig, IDT7201, tag, ownerx200) { } @@ -57,8 +57,8 @@ idt7201_device::idt7201_device(const machine_config &mconfig, const char *tag, d // idt7202_device - constructor //------------------------------------------------- -idt7202_device::idt7202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : fifo7200_device(mconfig, IDT7202, tag, owner, 0x400) +idt7202_device::idt7202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : fifo7200_device(mconfig, IDT7202, tag, ownerx400) { } diff --git a/src/devices/machine/7200fifo.h b/src/devices/machine/7200fifo.h index 6609d4efad6..0706b625f3f 100644 --- a/src/devices/machine/7200fifo.h +++ b/src/devices/machine/7200fifo.h @@ -110,7 +110,7 @@ private: class idt7200_device : public fifo7200_device { public: - idt7200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + idt7200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> idt7201_device @@ -118,7 +118,7 @@ public: class idt7201_device : public fifo7200_device { public: - idt7201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + idt7201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> idt7202_device @@ -126,7 +126,7 @@ public: class idt7202_device : public fifo7200_device { public: - idt7202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + idt7202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // device type definitions diff --git a/src/devices/machine/7400.cpp b/src/devices/machine/7400.cpp index f8ab747715d..71e63d580a4 100644 --- a/src/devices/machine/7400.cpp +++ b/src/devices/machine/7400.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(TTL7400, ttl7400_device, "7400", "7400 Quad 2-Input NAND Gate") -ttl7400_device::ttl7400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl7400_device::ttl7400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL7400, tag, owner, clock) , m_y_func(*this) , m_a(0) diff --git a/src/devices/machine/7400.h b/src/devices/machine/7400.h index 13939cda7a7..49ddd318f83 100644 --- a/src/devices/machine/7400.h +++ b/src/devices/machine/7400.h @@ -37,7 +37,7 @@ class ttl7400_device : public device_t { public: // construction/destruction - ttl7400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl7400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <std::size_t Bit> auto y_cb() { return m_y_func[Bit].bind(); } diff --git a/src/devices/machine/7404.cpp b/src/devices/machine/7404.cpp index ad3ca9e234e..103d6a288b4 100644 --- a/src/devices/machine/7404.cpp +++ b/src/devices/machine/7404.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(TTL7404, ttl7404_device, "7404", "5/7404 Hex Inverters") -ttl7404_device::ttl7404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl7404_device::ttl7404_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL7404, tag, owner, clock) , m_y_func(*this) , m_a(0) diff --git a/src/devices/machine/7404.h b/src/devices/machine/7404.h index 9bc680997e5..4b15203748a 100644 --- a/src/devices/machine/7404.h +++ b/src/devices/machine/7404.h @@ -64,7 +64,7 @@ class ttl7404_device : public device_t { public: // construction/destruction - ttl7404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl7404_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <std::size_t Bit> auto y_cb() { return m_y_func[Bit].bind(); } diff --git a/src/devices/machine/74123.cpp b/src/devices/machine/74123.cpp index d895a72c4e4..fb5fcc11293 100644 --- a/src/devices/machine/74123.cpp +++ b/src/devices/machine/74123.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(TTL74123, ttl74123_device, "ttl74123", "74123 TTL") // ttl74123_device - constructor //------------------------------------------------- -ttl74123_device::ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74123_device::ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL74123, tag, owner, clock), m_clear_timer(nullptr), m_output_timer(nullptr), diff --git a/src/devices/machine/74123.h b/src/devices/machine/74123.h index 1aeed9d3ef7..d733fbf5313 100644 --- a/src/devices/machine/74123.h +++ b/src/devices/machine/74123.h @@ -67,9 +67,9 @@ class ttl74123_device : public device_t { public: // construction/destruction - ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); ttl74123_device(const machine_config &mconfig, const char *tag, device_t *owner, double res, double cap) - : ttl74123_device(mconfig, tag, owner, 0U) + : ttl74123_device(mconfig, tag, owner) { set_resistor_value(res); set_capacitor_value(cap); diff --git a/src/devices/machine/74145.cpp b/src/devices/machine/74145.cpp index 1ac1a41ffa6..5b556434f4e 100644 --- a/src/devices/machine/74145.cpp +++ b/src/devices/machine/74145.cpp @@ -59,7 +59,7 @@ DEFINE_DEVICE_TYPE(TTL74145, ttl74145_device, "ttl74145", "TTL74145") // ttl74145_device - constructor //------------------------------------------------- -ttl74145_device::ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74145_device::ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL74145, tag, owner, clock) , m_output_line_cb(*this) , m_number(0) diff --git a/src/devices/machine/74145.h b/src/devices/machine/74145.h index f5965cea4b1..d2c735af4f6 100644 --- a/src/devices/machine/74145.h +++ b/src/devices/machine/74145.h @@ -24,7 +24,7 @@ class ttl74145_device : public device_t { public: // construction/destruction - ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74145_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <std::size_t Bit> auto output_line_callback() { return m_output_line_cb[Bit].bind(); } diff --git a/src/devices/machine/74148.cpp b/src/devices/machine/74148.cpp index 45ce281ed51..b81670dd63a 100644 --- a/src/devices/machine/74148.cpp +++ b/src/devices/machine/74148.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(TTL74148, ttl74148_device, "74148", "74148 TTL") -ttl74148_device::ttl74148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74148_device::ttl74148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL74148, tag, owner, clock) , m_output_cb(*this) , m_enable_input(0) diff --git a/src/devices/machine/74148.h b/src/devices/machine/74148.h index b9c9ddfdb56..cb32feb5f49 100644 --- a/src/devices/machine/74148.h +++ b/src/devices/machine/74148.h @@ -48,7 +48,7 @@ class ttl74148_device : public device_t { public: - ttl74148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ttl74148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~ttl74148_device() {} auto out_cb() { return m_output_cb.bind(); } diff --git a/src/devices/machine/74153.cpp b/src/devices/machine/74153.cpp index 18352ff7e06..7f2c8838a73 100644 --- a/src/devices/machine/74153.cpp +++ b/src/devices/machine/74153.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(TTL153, ttl153_device, "ttl153", "SN54/74153") // ttl153_device - constructor //------------------------------------------------- -ttl153_device::ttl153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ttl153_device::ttl153_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL153, tag, owner, clock), m_za_cb(*this), m_zb_cb(*this), diff --git a/src/devices/machine/74153.h b/src/devices/machine/74153.h index ae2f3a37353..20f09c47f4c 100644 --- a/src/devices/machine/74153.h +++ b/src/devices/machine/74153.h @@ -31,7 +31,7 @@ class ttl153_device : public device_t { public: // construction/destruction - ttl153_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl153_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto za_cb() { return m_za_cb.bind(); } diff --git a/src/devices/machine/74157.cpp b/src/devices/machine/74157.cpp index 1dc7eb1289b..984e6e75743 100644 --- a/src/devices/machine/74157.cpp +++ b/src/devices/machine/74157.cpp @@ -35,12 +35,12 @@ DEFINE_DEVICE_TYPE(LS157_X2, ls157_x2_device, "ls157_x2", "74LS157 Quad 2-to-1 M // ls157_device - constructor //------------------------------------------------- -ls157_device::ls157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ls157_device::ls157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ls157_device(mconfig, LS157, tag, owner, clock, 0x0f) { } -ls157_device::ls157_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 mask) +ls157_device::ls157_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 mask) : device_t(mconfig, type, tag, owner, clock) , m_a_in_cb(*this) , m_b_in_cb(*this) @@ -58,7 +58,7 @@ ls157_device::ls157_device(const machine_config &mconfig, device_type type, cons // ls157_x2_device - constructor //------------------------------------------------- -ls157_x2_device::ls157_x2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ls157_x2_device::ls157_x2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ls157_device(mconfig, LS157_X2, tag, owner, clock, 0xff) { } @@ -277,7 +277,7 @@ u8 ls157_device::output_r() DEFINE_DEVICE_TYPE(HC157, hc157_device, "hc157", "74HC157 Quad 2-to-1 Multiplexer") -hc157_device::hc157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hc157_device::hc157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ls157_device(mconfig, HC157, tag, owner, clock, 0x0f) { } @@ -289,7 +289,7 @@ hc157_device::hc157_device(const machine_config &mconfig, const char *tag, devic DEFINE_DEVICE_TYPE(HCT157, hct157_device, "hct157", "74HCT157 Quad 2-to-1 Multiplexer") -hct157_device::hct157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hct157_device::hct157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ls157_device(mconfig, HCT157, tag, owner, clock, 0x0f) { } diff --git a/src/devices/machine/74157.h b/src/devices/machine/74157.h index da34d879221..d34b54704a2 100644 --- a/src/devices/machine/74157.h +++ b/src/devices/machine/74157.h @@ -35,7 +35,7 @@ class ls157_device : public device_t { public: // construction/destruction - ls157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ls157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto a_in_callback() { return m_a_in_cb.bind(); } auto b_in_callback() { return m_b_in_cb.bind(); } @@ -66,7 +66,7 @@ public: u8 output_r(); protected: - ls157_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 mask); + ls157_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 mask); // device-level overrides virtual void device_start() override; @@ -96,7 +96,7 @@ class ls157_x2_device : public ls157_device { public: // construction/destruction - ls157_x2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ls157_x2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> hc157_device @@ -105,7 +105,7 @@ class hc157_device : public ls157_device { public: // construction/destruction - hc157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hc157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> hct157_device @@ -114,7 +114,7 @@ class hct157_device : public ls157_device { public: // construction/destruction - hct157_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hct157_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/machine/74161.cpp b/src/devices/machine/74161.cpp index 64e935152f5..479500943bd 100644 --- a/src/devices/machine/74161.cpp +++ b/src/devices/machine/74161.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(TTL74161, ttl74161_device, "ttl74161", "54/74161 Binary Count DEFINE_DEVICE_TYPE(TTL74162, ttl74162_device, "ttl74162", "54/74162 Decade Counter") DEFINE_DEVICE_TYPE(TTL74163, ttl74163_device, "ttl74163", "54/74163 Binary Counter") -ttl7416x_device::ttl7416x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool synchronous_reset, uint8_t limit) +ttl7416x_device::ttl7416x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool synchronous_reset, uint8_t limit) : device_t(mconfig, type, tag, owner, clock) , m_qa_func(*this) , m_qb_func(*this) @@ -36,22 +36,22 @@ ttl7416x_device::ttl7416x_device(const machine_config &mconfig, device_type type { } -ttl74160_device::ttl74160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74160_device::ttl74160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ttl7416x_device(mconfig, TTL74160, tag, owner, clock, false, 10) { } -ttl74161_device::ttl74161_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74161_device::ttl74161_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ttl7416x_device(mconfig, TTL74161, tag, owner, clock, false, 16) { } -ttl74162_device::ttl74162_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74162_device::ttl74162_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ttl7416x_device(mconfig, TTL74162, tag, owner, clock, true, 10) { } -ttl74163_device::ttl74163_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74163_device::ttl74163_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ttl7416x_device(mconfig, TTL74163, tag, owner, clock, true, 16) { } diff --git a/src/devices/machine/74161.h b/src/devices/machine/74161.h index 0145e08a9fb..7a1cc129391 100644 --- a/src/devices/machine/74161.h +++ b/src/devices/machine/74161.h @@ -87,7 +87,7 @@ public: protected: // construction/destruction - ttl7416x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool synchronous_reset, uint8_t limit); + ttl7416x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool synchronous_reset, uint8_t limit); // device-level overrides virtual void device_start() override; @@ -128,25 +128,25 @@ private: class ttl74160_device : public ttl7416x_device { public: - ttl74160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ttl74161_device : public ttl7416x_device { public: - ttl74161_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74161_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ttl74162_device : public ttl7416x_device { public: - ttl74162_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74162_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class ttl74163_device : public ttl7416x_device { public: - ttl74163_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74163_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // device type definition diff --git a/src/devices/machine/74165.cpp b/src/devices/machine/74165.cpp index 9ba4415d56c..b7970029709 100644 --- a/src/devices/machine/74165.cpp +++ b/src/devices/machine/74165.cpp @@ -36,7 +36,7 @@ void ttl165_device::device_add_mconfig(machine_config &config) // ttl153_device - constructor //------------------------------------------------- -ttl165_device::ttl165_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ttl165_device::ttl165_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL165, tag, owner, clock), m_timer(*this, "timer"), m_data_cb(*this), m_qh_cb(*this), diff --git a/src/devices/machine/74165.h b/src/devices/machine/74165.h index 145f3195172..814871dc7a9 100644 --- a/src/devices/machine/74165.h +++ b/src/devices/machine/74165.h @@ -34,7 +34,7 @@ class ttl165_device : public device_t { public: // construction/destruction - ttl165_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl165_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto data_callback() { return m_data_cb.bind(); } auto qh_callback() { return m_qh_cb.bind(); } diff --git a/src/devices/machine/74166.cpp b/src/devices/machine/74166.cpp index 1611b526762..1946c591505 100644 --- a/src/devices/machine/74166.cpp +++ b/src/devices/machine/74166.cpp @@ -36,7 +36,7 @@ void ttl166_device::device_add_mconfig(machine_config &config) // ttl153_device - constructor //------------------------------------------------- -ttl166_device::ttl166_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ttl166_device::ttl166_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL166, tag, owner, clock), m_timer(*this, "timer"), m_data_cb(*this), m_qh_cb(*this), diff --git a/src/devices/machine/74166.h b/src/devices/machine/74166.h index e15149a50cd..4287b97ab1c 100644 --- a/src/devices/machine/74166.h +++ b/src/devices/machine/74166.h @@ -34,7 +34,7 @@ class ttl166_device : public device_t { public: // construction/destruction - ttl166_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl166_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto data_callback() { return m_data_cb.bind(); } auto qh_callback() { return m_qh_cb.bind(); } diff --git a/src/devices/machine/74175.cpp b/src/devices/machine/74175.cpp index 28d3152dbeb..967c3316fc3 100644 --- a/src/devices/machine/74175.cpp +++ b/src/devices/machine/74175.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(TTL74174, ttl74174_device, "ttl74174", "54/74174 Hex D Flip-Flops with Clear") DEFINE_DEVICE_TYPE(TTL74175, ttl74175_device, "ttl74175", "54/74175 Quad D Flip-Flops with Clear") -ttl741745_device::ttl741745_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ttl741745_device::ttl741745_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_q1_func(*this) , m_q2_func(*this) @@ -31,7 +31,7 @@ ttl741745_device::ttl741745_device(const machine_config &mconfig, device_type ty { } -ttl74174_device::ttl74174_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74174_device::ttl74174_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ttl741745_device(mconfig, TTL74174, tag, owner, clock) , m_q5_func(*this) , m_q6_func(*this) @@ -42,7 +42,7 @@ ttl74174_device::ttl74174_device(const machine_config &mconfig, const char *tag, { } -ttl74175_device::ttl74175_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74175_device::ttl74175_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ttl741745_device(mconfig, TTL74175, tag, owner, clock) , m_not_q1_func(*this) , m_not_q2_func(*this) diff --git a/src/devices/machine/74175.h b/src/devices/machine/74175.h index 2eb716d481c..cdd6ffba379 100644 --- a/src/devices/machine/74175.h +++ b/src/devices/machine/74175.h @@ -66,7 +66,7 @@ public: uint8_t q_w(); protected: - ttl741745_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ttl741745_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; @@ -96,7 +96,7 @@ protected: class ttl74174_device : public ttl741745_device { public: - ttl74174_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74174_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto q5_cb() { return m_q5_func.bind(); } auto q6_cb() { return m_q6_func.bind(); } @@ -124,7 +124,7 @@ private: class ttl74175_device : public ttl741745_device { public: - ttl74175_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74175_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto not_q1_cb() { return m_not_q1_func.bind(); } auto not_q2_cb() { return m_not_q2_func.bind(); } diff --git a/src/devices/machine/74181.cpp b/src/devices/machine/74181.cpp index 66901510b32..3e665f80883 100644 --- a/src/devices/machine/74181.cpp +++ b/src/devices/machine/74181.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(TTL74181, ttl74181_device, "ttl74181", "74181 TTL") // ttl74181_device - constructor //------------------------------------------------- -ttl74181_device::ttl74181_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ttl74181_device::ttl74181_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL74181, tag, owner, clock), m_a(0), m_b(0), diff --git a/src/devices/machine/74181.h b/src/devices/machine/74181.h index 40a55abc042..9b72940afe0 100644 --- a/src/devices/machine/74181.h +++ b/src/devices/machine/74181.h @@ -24,7 +24,7 @@ class ttl74181_device : public device_t { public: // construction/destruction - ttl74181_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ttl74181_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inputs void input_a_w(uint8_t data); diff --git a/src/devices/machine/74259.cpp b/src/devices/machine/74259.cpp index 806ea280eb1..ae12a7f6383 100644 --- a/src/devices/machine/74259.cpp +++ b/src/devices/machine/74259.cpp @@ -102,7 +102,7 @@ DEFINE_DEVICE_TYPE(CD4099, cd4099_device, "cd4099", "CD4099B Addressable Latch") // ADDRESSABLE LATCH DEVICE //************************************************************************** -addressable_latch_device::addressable_latch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool clear_active) +addressable_latch_device::addressable_latch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool clear_active) : device_t(mconfig, type, tag, owner, clock) , m_q_out_cb(*this) , m_parallel_out_cb(*this) @@ -379,7 +379,7 @@ void addressable_latch_device::clear_outputs(u8 new_q) // LS259 DEVICE //************************************************************************** -ls259_device::ls259_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ls259_device::ls259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : addressable_latch_device(mconfig, LS259, tag, owner, clock, false) { } @@ -388,7 +388,7 @@ ls259_device::ls259_device(const machine_config &mconfig, const char *tag, devic // HC259 DEVICE //************************************************************************** -hc259_device::hc259_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hc259_device::hc259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : addressable_latch_device(mconfig, HC259, tag, owner, clock, false) { } @@ -397,7 +397,7 @@ hc259_device::hc259_device(const machine_config &mconfig, const char *tag, devic // HCT259 DEVICE //************************************************************************** -hct259_device::hct259_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +hct259_device::hct259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : addressable_latch_device(mconfig, HCT259, tag, owner, clock, false) { } @@ -406,7 +406,7 @@ hct259_device::hct259_device(const machine_config &mconfig, const char *tag, dev // F9334 DEVICE //************************************************************************** -f9334_device::f9334_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +f9334_device::f9334_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : addressable_latch_device(mconfig, F9334, tag, owner, clock, false) { } @@ -415,7 +415,7 @@ f9334_device::f9334_device(const machine_config &mconfig, const char *tag, devic // CD4099 DEVICE //************************************************************************** -cd4099_device::cd4099_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cd4099_device::cd4099_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : addressable_latch_device(mconfig, CD4099, tag, owner, clock, true) { } diff --git a/src/devices/machine/74259.h b/src/devices/machine/74259.h index a2192701cba..87c811e0860 100644 --- a/src/devices/machine/74259.h +++ b/src/devices/machine/74259.h @@ -74,7 +74,7 @@ public: protected: // construction/destruction - addressable_latch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool clear_active); + addressable_latch_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool clear_active); // device-level overrides virtual void device_start() override; @@ -105,7 +105,7 @@ private: class ls259_device : public addressable_latch_device { public: - ls259_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ls259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> hc259_device @@ -113,7 +113,7 @@ public: class hc259_device : public addressable_latch_device { public: - hc259_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hc259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> hct259_device @@ -121,7 +121,7 @@ public: class hct259_device : public addressable_latch_device { public: - hct259_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + hct259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> f9334_device @@ -129,7 +129,7 @@ public: class f9334_device : public addressable_latch_device { public: - f9334_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + f9334_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> cd4099_device @@ -137,7 +137,7 @@ public: class cd4099_device : public addressable_latch_device { public: - cd4099_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cd4099_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // device type definition diff --git a/src/devices/machine/74381.cpp b/src/devices/machine/74381.cpp index 65514a414e3..68cae17a94b 100644 --- a/src/devices/machine/74381.cpp +++ b/src/devices/machine/74381.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(SN74S381, sn74s381_device, "sn74s381", "TI SN74S381 ALU / Fun // sn74s381_device - constructor //------------------------------------------------- -sn74s381_device::sn74s381_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sn74s381_device::sn74s381_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SN74S381, tag, owner, clock) , m_a(0) , m_b(0) diff --git a/src/devices/machine/74381.h b/src/devices/machine/74381.h index 2aef6456540..0f3ff6c42f6 100644 --- a/src/devices/machine/74381.h +++ b/src/devices/machine/74381.h @@ -22,7 +22,7 @@ class sn74s381_device : public device_t { public: // construction/destruction - sn74s381_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sn74s381_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void a_w(uint8_t data); void b_w(uint8_t data); diff --git a/src/devices/machine/74543.cpp b/src/devices/machine/74543.cpp index 2abba597941..1e9fa04b49f 100644 --- a/src/devices/machine/74543.cpp +++ b/src/devices/machine/74543.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(TTL74543, ttl74543_device, "ttl74543", "Octal Registered Transceiver") -ttl74543_device::ttl74543_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ttl74543_device::ttl74543_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL74543, tag, owner, clock), m_output_a(*this), m_output_b(*this), diff --git a/src/devices/machine/74543.h b/src/devices/machine/74543.h index ab2c7a561d2..a8fa43346c9 100644 --- a/src/devices/machine/74543.h +++ b/src/devices/machine/74543.h @@ -66,7 +66,7 @@ class ttl74543_device : public device_t { public: - ttl74543_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ttl74543_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto outputa_cb() { return m_output_a.bind(); } auto outputb_cb() { return m_output_b.bind(); } diff --git a/src/devices/machine/7474.cpp b/src/devices/machine/7474.cpp index 33e4e5af696..debb8a31e4e 100644 --- a/src/devices/machine/7474.cpp +++ b/src/devices/machine/7474.cpp @@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE(TTL7474, ttl7474_device, "7474", "7474 TTL") // ttl7474_device - constructor //------------------------------------------------- -ttl7474_device::ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ttl7474_device::ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TTL7474, tag, owner, clock), m_output_func(*this), m_comp_output_func(*this) diff --git a/src/devices/machine/7474.h b/src/devices/machine/7474.h index 4e2069d0afa..f94374bd194 100644 --- a/src/devices/machine/7474.h +++ b/src/devices/machine/7474.h @@ -55,7 +55,7 @@ class ttl7474_device : public device_t { public: // construction/destruction - ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ttl7474_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // static configuration helpers auto output_cb() { return m_output_func.bind(); } diff --git a/src/devices/machine/8042kbdc.cpp b/src/devices/machine/8042kbdc.cpp index e054990a651..25185011afc 100644 --- a/src/devices/machine/8042kbdc.cpp +++ b/src/devices/machine/8042kbdc.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(KBDC8042, kbdc8042_device, "kbdc8042", "8042 Keyboard/Mouse C // kbdc8042_device - constructor //------------------------------------------------- -kbdc8042_device::kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kbdc8042_device::kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KBDC8042, tag, owner, clock) , m_keyboard_dev(*this, "at_keyboard") , m_mousex_port(*this, "MOUSEX") diff --git a/src/devices/machine/8042kbdc.h b/src/devices/machine/8042kbdc.h index 64a45c8993a..b630c0d2adc 100644 --- a/src/devices/machine/8042kbdc.h +++ b/src/devices/machine/8042kbdc.h @@ -37,7 +37,7 @@ public: }; // construction/destruction - kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + kbdc8042_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_keyboard_type(kbdc8042_type_t keybtype) { m_keybtype = keybtype; } void set_interrupt_type(kbdc8042_interrupt_type_t interrupttype) { m_interrupttype = interrupttype; } diff --git a/src/devices/machine/82s129.cpp b/src/devices/machine/82s129.cpp index ca147f17c2f..745dbb50074 100644 --- a/src/devices/machine/82s129.cpp +++ b/src/devices/machine/82s129.cpp @@ -14,7 +14,7 @@ const uint32_t prom82s129_base_device::PROM_SIZE = 256; DEFINE_DEVICE_TYPE(PROM82S126, prom82s126_device, "82s126", "82S126 1K-bit bipolar PROM") DEFINE_DEVICE_TYPE(PROM82S129, prom82s129_device, "82s129", "82S129 1K-bit bipolar PROM") -prom82s129_base_device::prom82s129_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +prom82s129_base_device::prom82s129_base_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_region(*this, DEVICE_SELF) , m_out_func(*this) @@ -29,12 +29,12 @@ prom82s129_base_device::prom82s129_base_device(const machine_config &mconfig, de { } -prom82s126_device::prom82s126_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +prom82s126_device::prom82s126_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : prom82s129_base_device(mconfig, PROM82S126, tag, owner, clock) { } -prom82s129_device::prom82s129_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +prom82s129_device::prom82s129_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : prom82s129_base_device(mconfig, PROM82S129, tag, owner, clock) { } diff --git a/src/devices/machine/82s129.h b/src/devices/machine/82s129.h index 96f278c85e9..3493705ede8 100644 --- a/src/devices/machine/82s129.h +++ b/src/devices/machine/82s129.h @@ -78,7 +78,7 @@ public: protected: // construction/destruction - prom82s129_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + prom82s129_base_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; @@ -115,13 +115,13 @@ private: class prom82s126_device : public prom82s129_base_device { public: - prom82s126_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + prom82s126_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class prom82s129_device : public prom82s129_base_device { public: - prom82s129_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + prom82s129_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/8364_paula.cpp b/src/devices/machine/8364_paula.cpp index befdb45d7b6..875a4ab4981 100644 --- a/src/devices/machine/8364_paula.cpp +++ b/src/devices/machine/8364_paula.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(PAULA_8364, paula_8364_device, "paula_8364", "MOS 8364 \"Paul // paula_8364_device - constructor //------------------------------------------------- -paula_8364_device::paula_8364_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +paula_8364_device::paula_8364_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PAULA_8364, tag, owner, clock) , device_sound_interface(mconfig, *this) , m_chipmem_r(*this) diff --git a/src/devices/machine/8364_paula.h b/src/devices/machine/8364_paula.h index 873525f8e0e..b2af3e28093 100644 --- a/src/devices/machine/8364_paula.h +++ b/src/devices/machine/8364_paula.h @@ -52,7 +52,7 @@ class paula_8364_device : public device_t, public device_sound_interface { public: - paula_8364_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + paula_8364_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration auto mem_read_cb() { return m_chipmem_r.bind(); } diff --git a/src/devices/machine/8530scc.cpp b/src/devices/machine/8530scc.cpp index 7438ccce738..1ace890c22e 100644 --- a/src/devices/machine/8530scc.cpp +++ b/src/devices/machine/8530scc.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(SCC8530, scc8530_legacy_device, "scc8530l", "Zilog 8530 SCC ( IMPLEMENTATION ***************************************************************************/ -scc8530_legacy_device::scc8530_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +scc8530_legacy_device::scc8530_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCC8530, tag, owner, clock), mode(0), reg(0), status(0), IRQV(0), MasterIRQEnable(0), lastIRQStat(0), IRQType(), intrq_cb(*this) diff --git a/src/devices/machine/8530scc.h b/src/devices/machine/8530scc.h index e4af88b3e97..cb82b923587 100644 --- a/src/devices/machine/8530scc.h +++ b/src/devices/machine/8530scc.h @@ -26,7 +26,7 @@ public: IRQ_B_EXT }; - scc8530_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc8530_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto intrq_callback() { return intrq_cb.bind(); } diff --git a/src/devices/machine/acorn_bmu.cpp b/src/devices/machine/acorn_bmu.cpp index ce3aacf8d2f..e58b5a65008 100644 --- a/src/devices/machine/acorn_bmu.cpp +++ b/src/devices/machine/acorn_bmu.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(ACORN_BMU, acorn_bmu_device, "acorn_bmu", "Acorn Battery Mana // acorn_bmu_device - constructor //------------------------------------------------- -acorn_bmu_device::acorn_bmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_bmu_device::acorn_bmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_BMU, tag, owner, clock) , m_slave_address(BMU_SLAVE_ADDRESS) , m_scl(0) diff --git a/src/devices/machine/acorn_bmu.h b/src/devices/machine/acorn_bmu.h index 52ff13db040..d8ad07a4d97 100644 --- a/src/devices/machine/acorn_bmu.h +++ b/src/devices/machine/acorn_bmu.h @@ -21,7 +21,7 @@ class acorn_bmu_device : public device_t { public: - acorn_bmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_bmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(scl_w); DECLARE_WRITE_LINE_MEMBER(sda_w); diff --git a/src/devices/machine/acorn_ioc.cpp b/src/devices/machine/acorn_ioc.cpp index 3f59b4a66d1..8799a34057a 100644 --- a/src/devices/machine/acorn_ioc.cpp +++ b/src/devices/machine/acorn_ioc.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(ACORN_IOC, acorn_ioc_device, "ioc", "Acorn IOC") // LIVE DEVICE //************************************************************************** -acorn_ioc_device::acorn_ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_ioc_device::acorn_ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_IOC, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_peripherals_r(*this) @@ -74,7 +74,7 @@ void acorn_ioc_device::device_reset() // KART interface set_data_frame(1, 8, PARITY_NONE, STOP_BITS_2); - set_rate(31250); + set_rate(XTAL::u(31250)); for (int i = 0; i < 6; i++) m_giop_w[i](1); diff --git a/src/devices/machine/acorn_ioc.h b/src/devices/machine/acorn_ioc.h index 50477cf8b24..41af51e013c 100644 --- a/src/devices/machine/acorn_ioc.h +++ b/src/devices/machine/acorn_ioc.h @@ -22,7 +22,7 @@ class acorn_ioc_device : public device_t, public device_serial_interface { public: - acorn_ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_ioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <unsigned N> auto peripheral_r() { static_assert(N >= 1 && N <= 7); return m_peripherals_r[N - 1].bind(); } template <unsigned N> auto peripheral_w() { static_assert(N >= 1 && N <= 7); return m_peripherals_w[N - 1].bind(); } diff --git a/src/devices/machine/acorn_lc.cpp b/src/devices/machine/acorn_lc.cpp index 71a545521cb..2e8e90b9908 100644 --- a/src/devices/machine/acorn_lc.cpp +++ b/src/devices/machine/acorn_lc.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(ACORN_LC, acorn_lc_device, "acorn_lc", "Acorn LC ASIC") // acorn_lc_device - constructor //------------------------------------------------- -acorn_lc_device::acorn_lc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +acorn_lc_device::acorn_lc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_LC, tag, owner, clock) //, device_memory_interface(mconfig, *this) //, device_palette_interface(mconfig, *this) diff --git a/src/devices/machine/acorn_lc.h b/src/devices/machine/acorn_lc.h index 8367c90fdf1..5b438a959af 100644 --- a/src/devices/machine/acorn_lc.h +++ b/src/devices/machine/acorn_lc.h @@ -24,7 +24,7 @@ class acorn_lc_device : public device_t //public device_video_interface { public: - acorn_lc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + acorn_lc_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/machine/acorn_memc.cpp b/src/devices/machine/acorn_memc.cpp index c8b12050478..430c7be4646 100644 --- a/src/devices/machine/acorn_memc.cpp +++ b/src/devices/machine/acorn_memc.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(ACORN_MEMC, acorn_memc_device, "memc", "Acorn MEMC") // LIVE DEVICE //************************************************************************** -acorn_memc_device::acorn_memc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +acorn_memc_device::acorn_memc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ACORN_MEMC, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_vidc(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/acorn_memc.h b/src/devices/machine/acorn_memc.h index 9664e07d7f0..a2e2ec54200 100644 --- a/src/devices/machine/acorn_memc.h +++ b/src/devices/machine/acorn_memc.h @@ -22,10 +22,10 @@ class acorn_memc_device : public device_t, public device_memory_interface { public: - acorn_memc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + acorn_memc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename T> - acorn_memc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&vidc_tag) + acorn_memc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&vidc_tag) : acorn_memc_device(mconfig, tag, owner, clock) { m_vidc.set_tag(std::forward<T>(vidc_tag)); diff --git a/src/devices/machine/acorn_vidc.cpp b/src/devices/machine/acorn_vidc.cpp index 9440c339711..ddf6013e3fc 100644 --- a/src/devices/machine/acorn_vidc.cpp +++ b/src/devices/machine/acorn_vidc.cpp @@ -54,7 +54,7 @@ void acorn_vidc10_device::regs_map(address_map &map) } -acorn_vidc10_device::acorn_vidc10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int dac_type) +acorn_vidc10_device::acorn_vidc10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int dac_type) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , device_palette_interface(mconfig, *this) @@ -77,7 +77,7 @@ acorn_vidc10_device::acorn_vidc10_device(const machine_config &mconfig, device_t std::fill(std::begin(m_stereo_image), std::end(m_stereo_image), 0); } -acorn_vidc1_device::acorn_vidc1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +acorn_vidc1_device::acorn_vidc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : acorn_vidc10_device(mconfig, ACORN_VIDC1, tag, owner, clock, 1) { m_space_config = address_space_config("regs_space", ENDIANNESS_LITTLE, 32, 8, 0, address_map_constructor(FUNC(acorn_vidc1_device::regs_map), this)); @@ -86,7 +86,7 @@ acorn_vidc1_device::acorn_vidc1_device(const machine_config &mconfig, const char m_pal_border_base = 0x110; } -acorn_vidc1a_device::acorn_vidc1a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +acorn_vidc1a_device::acorn_vidc1a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : acorn_vidc10_device(mconfig, ACORN_VIDC1A, tag, owner, clock, 2) { m_space_config = address_space_config("regs_space", ENDIANNESS_LITTLE, 32, 8, 0, address_map_constructor(FUNC(acorn_vidc1a_device::regs_map), this)); @@ -115,7 +115,7 @@ void acorn_vidc10_device::device_add_mconfig(machine_config &config) for (int i = 0; i < m_sound_max_channels; i++) { // custom DAC - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac[i], 0).add_route(0, m_lspeaker, m_sound_input_gain).add_route(0, m_rspeaker, m_sound_input_gain); + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac[i]).add_route(0, m_lspeaker, m_sound_input_gain).add_route(0, m_rspeaker, m_sound_input_gain); } } @@ -563,7 +563,7 @@ void arm_vidc20_device::regs_map(address_map &map) map(0xe0, 0xef).w(FUNC(arm_vidc20_device::vidc20_control_w)); } -arm_vidc20_device::arm_vidc20_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arm_vidc20_device::arm_vidc20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : acorn_vidc10_device(mconfig, ARM_VIDC20, tag, owner, clock, 2) , m_dac32(*this, "serial_dac_%u", 0) { @@ -589,8 +589,8 @@ void arm_vidc20_device::device_add_mconfig(machine_config &config) // For simplicity we separate DACs for 32-bit mode // TODO: how stereo image copes with this if at all? - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac32[0], 0).add_route(ALL_OUTPUTS, m_lspeaker, 0.25); - DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac32[1], 0).add_route(ALL_OUTPUTS, m_rspeaker, 0.25); + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac32[0]).add_route(ALL_OUTPUTS, m_lspeaker, 0.25); + DAC_16BIT_R2R_TWOS_COMPLEMENT(config, m_dac32[1]).add_route(ALL_OUTPUTS, m_rspeaker, 0.25); } void arm_vidc20_device::device_config_complete() diff --git a/src/devices/machine/acorn_vidc.h b/src/devices/machine/acorn_vidc.h index f2009b255b2..2affc7173cf 100644 --- a/src/devices/machine/acorn_vidc.h +++ b/src/devices/machine/acorn_vidc.h @@ -49,7 +49,7 @@ public: virtual bool get_dac_mode() { return false; } protected: - acorn_vidc10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int dac_type); + acorn_vidc10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int dac_type); // device-level overrides //virtual void device_validity_check(validity_checker &valid) const override; @@ -134,14 +134,14 @@ class acorn_vidc1_device : public acorn_vidc10_device { public: // construction/destruction - acorn_vidc1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + acorn_vidc1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class acorn_vidc1a_device : public acorn_vidc10_device { public: // construction/destruction - acorn_vidc1a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + acorn_vidc1a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition @@ -152,7 +152,7 @@ class arm_vidc20_device : public acorn_vidc10_device { public: // construction/destruction - arm_vidc20_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + arm_vidc20_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write_dac32(u8 channel, u16 data); virtual bool get_dac_mode() override; diff --git a/src/devices/machine/adc0804.cpp b/src/devices/machine/adc0804.cpp index 12eb9e7754d..8f75a5effe6 100644 --- a/src/devices/machine/adc0804.cpp +++ b/src/devices/machine/adc0804.cpp @@ -57,7 +57,7 @@ ALLOW_SAVE_TYPE(adc0804_device::read_mode); // adc0804_device - constructor //------------------------------------------------- -adc0804_device::adc0804_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +adc0804_device::adc0804_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_vin_callback(*this) , m_intr_callback(*this) @@ -73,7 +73,7 @@ adc0804_device::adc0804_device(const machine_config &mconfig, device_type type, { } -adc0804_device::adc0804_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +adc0804_device::adc0804_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0804_device(mconfig, ADC0804, tag, owner, clock) { } @@ -83,7 +83,7 @@ adc0804_device::adc0804_device(const machine_config &mconfig, const char *tag, d // adc0803_device - constructor //------------------------------------------------- -adc0803_device::adc0803_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +adc0803_device::adc0803_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0804_device(mconfig, ADC0803, tag, owner, clock) { } diff --git a/src/devices/machine/adc0804.h b/src/devices/machine/adc0804.h index d8fe6ad950e..8c7ffc56b12 100644 --- a/src/devices/machine/adc0804.h +++ b/src/devices/machine/adc0804.h @@ -42,9 +42,9 @@ public: }; // device type constructors - adc0804_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + adc0804_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); adc0804_device(const machine_config &mconfig, const char *tag, device_t *owner, double r, double c) - : adc0804_device(mconfig, tag, owner, 0U) + : adc0804_device(mconfig, tag, owner) { set_rc(r, c); } @@ -70,7 +70,7 @@ public: DECLARE_READ_LINE_MEMBER(intr_r) { return m_intr_active ? 0 : 1; } protected: - adc0804_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + adc0804_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -110,9 +110,9 @@ class adc0803_device : public adc0804_device { public: // device type constructors - adc0803_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + adc0803_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); adc0803_device(const machine_config &mconfig, const char *tag, device_t *owner, double r, double c) - : adc0803_device(mconfig, tag, owner, 0U) + : adc0803_device(mconfig, tag, owner) { set_rc(r, c); } diff --git a/src/devices/machine/adc0808.cpp b/src/devices/machine/adc0808.cpp index a55c11077c7..22b59299b11 100644 --- a/src/devices/machine/adc0808.cpp +++ b/src/devices/machine/adc0808.cpp @@ -39,7 +39,7 @@ ALLOW_SAVE_TYPE(adc0808_device::state); // adc0808_device - constructor //------------------------------------------------- -adc0808_device::adc0808_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +adc0808_device::adc0808_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_eoc_cb(*this), m_eoc_ff_cb(*this), m_in_cb(*this), @@ -49,7 +49,7 @@ adc0808_device::adc0808_device(const machine_config &mconfig, device_type type, { } -adc0808_device::adc0808_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adc0808_device::adc0808_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0808_device(mconfig, ADC0808, tag, owner, clock) { } @@ -58,7 +58,7 @@ adc0808_device::adc0808_device(const machine_config &mconfig, const char *tag, d // adc0809_device - constructor //------------------------------------------------- -adc0809_device::adc0809_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adc0809_device::adc0809_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0808_device(mconfig, ADC0809, tag, owner, clock) { } @@ -67,7 +67,7 @@ adc0809_device::adc0809_device(const machine_config &mconfig, const char *tag, d // m58990_device - constructor //------------------------------------------------- -m58990_device::m58990_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m58990_device::m58990_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0808_device(mconfig, M58990, tag, owner, clock) { } diff --git a/src/devices/machine/adc0808.h b/src/devices/machine/adc0808.h index 9d69c67daef..29a7d787671 100644 --- a/src/devices/machine/adc0808.h +++ b/src/devices/machine/adc0808.h @@ -45,7 +45,7 @@ class adc0808_device : public device_t { public: // construction/destruction - adc0808_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adc0808_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto eoc_callback() { return m_eoc_cb.bind(); } auto eoc_ff_callback() { return m_eoc_ff_cb.bind(); } @@ -61,7 +61,7 @@ public: void address_data_start_w(u8 data); // start and ale connected, address to the data bus protected: - adc0808_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + adc0808_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; @@ -95,13 +95,13 @@ private: class adc0809_device : public adc0808_device { public: - adc0809_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adc0809_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class m58990_device : public adc0808_device { public: - m58990_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m58990_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/adc083x.cpp b/src/devices/machine/adc083x.cpp index c5c75655625..163ed9eb457 100644 --- a/src/devices/machine/adc083x.cpp +++ b/src/devices/machine/adc083x.cpp @@ -53,7 +53,7 @@ DEFINE_DEVICE_TYPE(ADC0832, adc0832_device, "adc0832", "ADC0832 A/D Converter") DEFINE_DEVICE_TYPE(ADC0834, adc0834_device, "adc0834", "ADC0834 A/D Converter") DEFINE_DEVICE_TYPE(ADC0838, adc0838_device, "adc0838", "ADC0838 A/D Converter") -adc083x_device::adc083x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t mux_bits) : +adc083x_device::adc083x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t mux_bits) : device_t(mconfig, type, tag, owner, clock), m_mux_bits(mux_bits), m_cs(0), @@ -72,22 +72,22 @@ adc083x_device::adc083x_device(const machine_config &mconfig, device_type type, { } -adc0831_device::adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc0831_device::adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc083x_device(mconfig, ADC0831, tag, owner, clock, 0) { } -adc0832_device::adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc0832_device::adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc083x_device(mconfig, ADC0832, tag, owner, clock, 2) { } -adc0834_device::adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc0834_device::adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc083x_device(mconfig, ADC0834, tag, owner, clock, 3) { } -adc0838_device::adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc0838_device::adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc083x_device(mconfig, ADC0838, tag, owner, clock, 4) { } diff --git a/src/devices/machine/adc083x.h b/src/devices/machine/adc083x.h index babde2515b1..0724ac16fdc 100644 --- a/src/devices/machine/adc083x.h +++ b/src/devices/machine/adc083x.h @@ -50,7 +50,7 @@ public: DECLARE_READ_LINE_MEMBER( do_read ); protected: - adc083x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t mux_bits); + adc083x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t mux_bits); // device-level overrides virtual void device_start() override; @@ -84,28 +84,28 @@ private: class adc0831_device : public adc083x_device { public: - adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adc0831_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class adc0832_device : public adc083x_device { public: - adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adc0832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class adc0834_device : public adc083x_device { public: - adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adc0834_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class adc0838_device : public adc083x_device { public: - adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adc0838_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/machine/adc0844.cpp b/src/devices/machine/adc0844.cpp index bbdafc68aec..20cc531ac35 100644 --- a/src/devices/machine/adc0844.cpp +++ b/src/devices/machine/adc0844.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(ADC0848, adc0848_device, "adc0848", "ADC0848 A/D Converter") // adc0844_device - constructor //------------------------------------------------- -adc0844_device::adc0844_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +adc0844_device::adc0844_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_intr_cb(*this), m_ch1_cb(*this), m_ch2_cb(*this), m_ch3_cb(*this), m_ch4_cb(*this), @@ -38,7 +38,7 @@ adc0844_device::adc0844_device(const machine_config &mconfig, device_type type, { } -adc0844_device::adc0844_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adc0844_device::adc0844_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0844_device(mconfig, ADC0844, tag, owner, clock) { } @@ -47,7 +47,7 @@ adc0844_device::adc0844_device(const machine_config &mconfig, const char *tag, d // adc0848_device - constructor //------------------------------------------------- -adc0848_device::adc0848_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +adc0848_device::adc0848_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc0844_device(mconfig, ADC0848, tag, owner, clock), m_ch5_cb(*this), m_ch6_cb(*this), m_ch7_cb(*this), m_ch8_cb(*this) { diff --git a/src/devices/machine/adc0844.h b/src/devices/machine/adc0844.h index 98ac8b211d4..dcbdd487ad5 100644 --- a/src/devices/machine/adc0844.h +++ b/src/devices/machine/adc0844.h @@ -34,7 +34,7 @@ class adc0844_device : public device_t { public: // construction/destruction - adc0844_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adc0844_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto intr_callback() { return m_intr_cb.bind(); } @@ -47,7 +47,7 @@ public: virtual void write(u8 data); protected: - adc0844_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + adc0844_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; @@ -71,7 +71,7 @@ class adc0848_device : public adc0844_device { public: // construction/destruction - adc0848_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + adc0848_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto ch5_callback() { return m_ch5_cb.bind(); } diff --git a/src/devices/machine/adc1038.cpp b/src/devices/machine/adc1038.cpp index 3baac1fd1be..4c26be90202 100644 --- a/src/devices/machine/adc1038.cpp +++ b/src/devices/machine/adc1038.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(ADC1038, adc1038_device, "adc1038", "ADC1038") -adc1038_device::adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc1038_device::adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADC1038, tag, owner, clock) , m_cycle(0) , m_clk(0) diff --git a/src/devices/machine/adc1038.h b/src/devices/machine/adc1038.h index d4ee5362fd0..d11210bf3fb 100644 --- a/src/devices/machine/adc1038.h +++ b/src/devices/machine/adc1038.h @@ -29,7 +29,7 @@ class adc1038_device : public device_t public: typedef device_delegate<int (int input)> input_delegate; - adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adc1038_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename... T> void set_input_callback(T &&... args) { m_input_cb.set(std::forward<T>(args)...); } diff --git a/src/devices/machine/adc1213x.cpp b/src/devices/machine/adc1213x.cpp index 2f73575909c..2ef5c99ef93 100644 --- a/src/devices/machine/adc1213x.cpp +++ b/src/devices/machine/adc1213x.cpp @@ -39,23 +39,23 @@ DEFINE_DEVICE_TYPE(ADC12132, adc12132_device, "adc12132", "ADC12132") DEFINE_DEVICE_TYPE(ADC12138, adc12138_device, "adc12138", "ADC12138") -adc12130_device::adc12130_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc12130_device::adc12130_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc12138_device(mconfig, ADC12130, tag, owner, clock) { } -adc12132_device::adc12132_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc12132_device::adc12132_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc12138_device(mconfig, ADC12132, tag, owner, clock) { } -adc12138_device::adc12138_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +adc12138_device::adc12138_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : adc12138_device(mconfig, ADC12138, tag, owner, clock) { } -adc12138_device::adc12138_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +adc12138_device::adc12138_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_ipt_read_cb(*this) { diff --git a/src/devices/machine/adc1213x.h b/src/devices/machine/adc1213x.h index 7d3f69caccd..d03d704a94e 100644 --- a/src/devices/machine/adc1213x.h +++ b/src/devices/machine/adc1213x.h @@ -24,7 +24,7 @@ class adc12138_device : public device_t public: typedef device_delegate<double (uint8_t input)> ipt_convert_delegate; - adc12138_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adc12138_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename... T> void set_ipt_convert_callback(T &&... args) { m_ipt_read_cb.set(std::forward<T>(args)...); } @@ -36,7 +36,7 @@ public: u8 eoc_r(); protected: - adc12138_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + adc12138_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; @@ -65,14 +65,14 @@ private: class adc12130_device : public adc12138_device { public: - adc12130_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adc12130_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class adc12132_device : public adc12138_device { public: - adc12132_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + adc12132_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/aic565.cpp b/src/devices/machine/aic565.cpp index 34da7f4fd14..64e910cc943 100644 --- a/src/devices/machine/aic565.cpp +++ b/src/devices/machine/aic565.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(AIC565, aic565_device, "aic565", "AIC-565 Bus Auxiliary Inter // aic565_device - constructor //------------------------------------------------- -aic565_device::aic565_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +aic565_device::aic565_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AIC565, tag, owner, clock) , m_hrst_callback(*this) , m_srst_callback(*this) diff --git a/src/devices/machine/aic565.h b/src/devices/machine/aic565.h index 581a595d77c..d22161cab2c 100644 --- a/src/devices/machine/aic565.h +++ b/src/devices/machine/aic565.h @@ -21,7 +21,7 @@ class aic565_device : public device_t { public: // construction/destruction - aic565_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + aic565_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callback configuration auto hrst_callback() { return m_hrst_callback.bind(); } diff --git a/src/devices/machine/aic580.cpp b/src/devices/machine/aic580.cpp index c5bf3a51e96..f477fb19552 100644 --- a/src/devices/machine/aic580.cpp +++ b/src/devices/machine/aic580.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(AIC580, aic580_device, "aic580", "AIC-580 DMA Bus Master") // aic580_device - constructor //------------------------------------------------- -aic580_device::aic580_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +aic580_device::aic580_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AIC580, tag, owner, clock) , m_bdin_callback(*this) , m_bdout_callback(*this) diff --git a/src/devices/machine/aic580.h b/src/devices/machine/aic580.h index b764daa1710..5733f6af2e8 100644 --- a/src/devices/machine/aic580.h +++ b/src/devices/machine/aic580.h @@ -21,7 +21,7 @@ class aic580_device : public device_t { public: // construction/destruction - aic580_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + aic580_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto bdin_callback() { return m_bdin_callback.bind(); } diff --git a/src/devices/machine/aic6250.cpp b/src/devices/machine/aic6250.cpp index fb885c3b5e3..aaa7b3cc342 100644 --- a/src/devices/machine/aic6250.cpp +++ b/src/devices/machine/aic6250.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(AIC6251A, aic6251a_device, "aic6251a", "Adaptec AIC-6251A Fas static char const *const nscsi_phase[] = { "DATA OUT", "DATA IN", "COMMAND", "STATUS", "*", "*", "MESSAGE OUT", "MESSAGE IN" }; static char const *const aic6250_phase[] = { "DATA OUT", "*", "DATA IN", "*", "COMMAND", "MESSAGE OUT", "STATUS", "MESSAGE IN" }; -aic6250_device::aic6250_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +aic6250_device::aic6250_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, type, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_int_cb(*this) @@ -59,12 +59,12 @@ aic6250_device::aic6250_device(const machine_config &mconfig, device_type type, { } -aic6250_device::aic6250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aic6250_device::aic6250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aic6250_device(mconfig, AIC6250, tag, owner, clock) { } -aic6251a_device::aic6251a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aic6251a_device::aic6251a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : aic6250_device(mconfig, AIC6251A, tag, owner, clock) { } diff --git a/src/devices/machine/aic6250.h b/src/devices/machine/aic6250.h index 048aa6de0c8..39d26f46bd8 100644 --- a/src/devices/machine/aic6250.h +++ b/src/devices/machine/aic6250.h @@ -11,7 +11,7 @@ class aic6250_device : public nscsi_device, public nscsi_slot_card_interface { public: - aic6250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aic6250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void map(address_map &map); @@ -34,7 +34,7 @@ public: void dma16_w(u16 data); protected: - aic6250_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + aic6250_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // standard device_interface overrides virtual void device_start() override; @@ -282,7 +282,7 @@ private: class aic6251a_device : public aic6250_device { public: - aic6251a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aic6251a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(AIC6250, aic6250_device) diff --git a/src/devices/machine/aicartc.cpp b/src/devices/machine/aicartc.cpp index 8e58ec0bb33..9a6d1378843 100644 --- a/src/devices/machine/aicartc.cpp +++ b/src/devices/machine/aicartc.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(AICARTC, aicartc_device, "aicartc", "AICA RTC") // aicartc_device - constructor //------------------------------------------------- -aicartc_device::aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +aicartc_device::aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AICARTC, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_rtc_reg_lo(0), m_rtc_reg_hi(0), m_rtc_tick(0), m_we(0) diff --git a/src/devices/machine/aicartc.h b/src/devices/machine/aicartc.h index fb1955ec685..9a4ebc31f99 100644 --- a/src/devices/machine/aicartc.h +++ b/src/devices/machine/aicartc.h @@ -18,7 +18,7 @@ class aicartc_device : public device_t, public device_rtc_interface { public: // construction/destruction - aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + aicartc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/machine/akiko.cpp b/src/devices/machine/akiko.cpp index 13ae686a972..1bad05d718d 100644 --- a/src/devices/machine/akiko.cpp +++ b/src/devices/machine/akiko.cpp @@ -63,7 +63,7 @@ void akiko_device::device_add_mconfig(machine_config &config) // akiko_device - constructor //------------------------------------------------- -akiko_device::akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +akiko_device::akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AKIKO, tag, owner, clock) , m_c2p_input_index(0) , m_c2p_output_index(0) diff --git a/src/devices/machine/akiko.h b/src/devices/machine/akiko.h index 8a0ffec8e76..3b02ec21e51 100644 --- a/src/devices/machine/akiko.h +++ b/src/devices/machine/akiko.h @@ -31,7 +31,7 @@ class akiko_device : public device_t { public: - akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + akiko_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto mem_r_callback() { return m_mem_r.bind(); } diff --git a/src/devices/machine/alpha_8921.cpp b/src/devices/machine/alpha_8921.cpp index bf57902b31e..9c70be1a8dd 100644 --- a/src/devices/machine/alpha_8921.cpp +++ b/src/devices/machine/alpha_8921.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(ALPHA_8921, alpha_8921_device, "alpha_8921", "Alpha denshi AL // alpha_8921_device - constructor //------------------------------------------------- -alpha_8921_device::alpha_8921_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +alpha_8921_device::alpha_8921_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ALPHA_8921, tag, owner, clock) { } diff --git a/src/devices/machine/alpha_8921.h b/src/devices/machine/alpha_8921.h index a6e8ccdb0ad..d41ff9ccaa5 100644 --- a/src/devices/machine/alpha_8921.h +++ b/src/devices/machine/alpha_8921.h @@ -18,7 +18,7 @@ class alpha_8921_device : public device_t { public: // construction/destruction - alpha_8921_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + alpha_8921_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inputs DECLARE_WRITE_LINE_MEMBER(clk_w); diff --git a/src/devices/machine/am25s55x.cpp b/src/devices/machine/am25s55x.cpp index b1624179463..54ff02e9ba9 100644 --- a/src/devices/machine/am25s55x.cpp +++ b/src/devices/machine/am25s55x.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(AM25S558, am25s558_device, "am25s558", "AMD Am25S558 Combinat // am25s55x_device - constructor //------------------------------------------------- -am25s55x_device::am25s55x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +am25s55x_device::am25s55x_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_x_in(0) , m_y_in(0) @@ -32,13 +32,13 @@ am25s55x_device::am25s55x_device(const machine_config &mconfig, device_type type { } -am25s557_device::am25s557_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am25s557_device::am25s557_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am25s55x_device(mconfig, AM25S557, tag, owner, clock) , m_r(false) { } -am25s558_device::am25s558_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am25s558_device::am25s558_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am25s55x_device(mconfig, AM25S558, tag, owner, clock) { } diff --git a/src/devices/machine/am25s55x.h b/src/devices/machine/am25s55x.h index 1fa3cab8102..8d5e4c1e01e 100644 --- a/src/devices/machine/am25s55x.h +++ b/src/devices/machine/am25s55x.h @@ -22,7 +22,7 @@ class am25s55x_device : public device_t { public: // construction/destruction - am25s55x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + am25s55x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void x_w(uint8_t data); void y_w(uint8_t data); @@ -74,7 +74,7 @@ class am25s557_device : public am25s55x_device { public: // construction/destruction - am25s557_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + am25s557_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual void xm_w(int state) override; virtual void ym_w(int state) override; @@ -97,7 +97,7 @@ class am25s558_device : public am25s55x_device { public: // construction/destruction - am25s558_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + am25s558_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void rs_w(int state); void ru_w(int state); diff --git a/src/devices/machine/am2847.cpp b/src/devices/machine/am2847.cpp index 7e7992a2e85..9d8181bdf2e 100644 --- a/src/devices/machine/am2847.cpp +++ b/src/devices/machine/am2847.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(AM2847, am2847_device, "am2847", "AMD Am2847 80-bit Static DEFINE_DEVICE_TYPE(AM2849, am2849_device, "am2849", "AMD Am2849 96-bit Static Shift Register") DEFINE_DEVICE_TYPE(TMS3409, tms3409_device, "tms3409", "TI TMS3409 80-bit Static Shift Register") -am2847_base_device::am2847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, size_t size) +am2847_base_device::am2847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, size_t size) : device_t(mconfig, type, tag, owner, clock) , m_in(0) , m_out(0) @@ -23,17 +23,17 @@ am2847_base_device::am2847_base_device(const machine_config &mconfig, device_typ { } -am2847_device::am2847_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am2847_device::am2847_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am2847_base_device(mconfig, AM2847, tag, owner, clock, 5) { } -am2849_device::am2849_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am2849_device::am2849_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am2847_base_device(mconfig, AM2849, tag, owner, clock, 6) { } -tms3409_device::tms3409_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms3409_device::tms3409_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am2847_base_device(mconfig, TMS3409, tag, owner, clock, 5) { } diff --git a/src/devices/machine/am2847.h b/src/devices/machine/am2847.h index b5d90642e32..9a21ebd54b8 100644 --- a/src/devices/machine/am2847.h +++ b/src/devices/machine/am2847.h @@ -65,7 +65,7 @@ public: uint8_t out_r() const { return m_out; } protected: - am2847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, size_t size); + am2847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, size_t size); virtual void device_start() override; virtual void device_reset() override; @@ -98,21 +98,21 @@ class am2847_device : public am2847_base_device { public: // construction/destruction - am2847_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am2847_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class am2849_device : public am2847_base_device { public: // construction/destruction - am2849_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am2849_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class tms3409_device : public am2847_base_device { public: // construction/destruction - tms3409_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms3409_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/am2901b.cpp b/src/devices/machine/am2901b.cpp index 87b370a24b4..4ac5016b36a 100644 --- a/src/devices/machine/am2901b.cpp +++ b/src/devices/machine/am2901b.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(AM2901B, am2901b_device, "am2901b", "AMD Am2901B Bitslice Pro // am2901b_device - constructor //------------------------------------------------- -am2901b_device::am2901b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am2901b_device::am2901b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AM2901B, tag, owner, clock) , m_d(0) , m_q(0) diff --git a/src/devices/machine/am2901b.h b/src/devices/machine/am2901b.h index 4e7a25e3915..ac192c152a5 100644 --- a/src/devices/machine/am2901b.h +++ b/src/devices/machine/am2901b.h @@ -23,7 +23,7 @@ class am2901b_device : public device_t { public: // construction/destruction - am2901b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + am2901b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto y() { return m_y.bind(); } auto g() { return m_g.bind(); } diff --git a/src/devices/machine/am2910.cpp b/src/devices/machine/am2910.cpp index 158b4b83bb7..db670d76e4a 100644 --- a/src/devices/machine/am2910.cpp +++ b/src/devices/machine/am2910.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(AM2910, am2910_device, "am2910", "AMD Am2910 Microprogram Con // am2910_device - constructor //------------------------------------------------- -am2910_device::am2910_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am2910_device::am2910_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AM2910, tag, owner, clock) , m_pc(0) , m_r(0) diff --git a/src/devices/machine/am2910.h b/src/devices/machine/am2910.h index 52c075ea52a..1ae6c75a020 100644 --- a/src/devices/machine/am2910.h +++ b/src/devices/machine/am2910.h @@ -22,7 +22,7 @@ class am2910_device : public device_t { public: // construction/destruction - am2910_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am2910_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(cc_w); // !CC DECLARE_WRITE_LINE_MEMBER(ccen_w); // !CCEN diff --git a/src/devices/machine/am53cf96.cpp b/src/devices/machine/am53cf96.cpp index 41b62e145f0..539234f8d73 100644 --- a/src/devices/machine/am53cf96.cpp +++ b/src/devices/machine/am53cf96.cpp @@ -145,7 +145,7 @@ void am53cf96_device::write(offs_t offset, uint8_t data) } } -am53cf96_device::am53cf96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +am53cf96_device::am53cf96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : legacy_scsi_host_adapter(mconfig, AM53CF96, tag, owner, clock), m_irq_handler(*this) { diff --git a/src/devices/machine/am53cf96.h b/src/devices/machine/am53cf96.h index 6fdd801f6df..27355472916 100644 --- a/src/devices/machine/am53cf96.h +++ b/src/devices/machine/am53cf96.h @@ -16,7 +16,7 @@ class am53cf96_device : public legacy_scsi_host_adapter { public: // construction/destruction - am53cf96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am53cf96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/machine/am79c30.cpp b/src/devices/machine/am79c30.cpp index ed31a517398..43ae87797d3 100644 --- a/src/devices/machine/am79c30.cpp +++ b/src/devices/machine/am79c30.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(AM79C30A, am79c30a_device, "am79c30a", "Am79C30A DSC") // am79c30a_device - constructor //------------------------------------------------- -am79c30a_device::am79c30a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am79c30a_device::am79c30a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AM79C30A, tag, owner, clock) , m_int_callback(*this) , m_init(0) diff --git a/src/devices/machine/am79c30.h b/src/devices/machine/am79c30.h index 0188b2c9623..d7ea33d9642 100644 --- a/src/devices/machine/am79c30.h +++ b/src/devices/machine/am79c30.h @@ -55,7 +55,7 @@ class am79c30a_device : public device_t { public: // device type constructor - am79c30a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + am79c30a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto int_callback() { return m_int_callback.bind(); } diff --git a/src/devices/machine/am79c90.cpp b/src/devices/machine/am79c90.cpp index f47457680ec..f7185c203ad 100644 --- a/src/devices/machine/am79c90.cpp +++ b/src/devices/machine/am79c90.cpp @@ -57,7 +57,7 @@ DEFINE_DEVICE_TYPE(AM7990, am7990_device, "am7990", "Am7990 LANCE Ethernet Controller") DEFINE_DEVICE_TYPE(AM79C90, am79c90_device, "am79c90", "Am79C90 C-LANCE Ethernet Controller") -am7990_device_base::am7990_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +am7990_device_base::am7990_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_network_interface(mconfig, *this, 10) , m_intr_out_cb(*this) @@ -68,12 +68,12 @@ am7990_device_base::am7990_device_base(const machine_config &mconfig, device_typ { } -am7990_device::am7990_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am7990_device::am7990_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am7990_device_base(mconfig, AM7990, tag, owner, clock) { } -am79c90_device::am79c90_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am79c90_device::am79c90_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am7990_device_base(mconfig, AM79C90, tag, owner, clock) { } diff --git a/src/devices/machine/am79c90.h b/src/devices/machine/am79c90.h index 80c66ff58ce..e884a949d6e 100644 --- a/src/devices/machine/am79c90.h +++ b/src/devices/machine/am79c90.h @@ -21,7 +21,7 @@ public: void reset_w(int state) { if (!state) device_reset(); } protected: - am7990_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock = 0); + am7990_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // device_t overrides virtual void device_start() override; @@ -175,7 +175,7 @@ private: class am7990_device : public am7990_device_base { public: - am7990_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + am7990_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual int get_buf_length(u16 data) const override { return (data == 0xf000) ? 4096 : -s16(0xf000 | data); } @@ -184,7 +184,7 @@ protected: class am79c90_device : public am7990_device_base { public: - am79c90_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + am79c90_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual int get_buf_length(u16 data) const override { return data ? ((data == 0xf000) ? 4096 : -s16(0xf000 | data)) : 0; } diff --git a/src/devices/machine/am9513.cpp b/src/devices/machine/am9513.cpp index 1c8c3692369..9ad6e2cf441 100644 --- a/src/devices/machine/am9513.cpp +++ b/src/devices/machine/am9513.cpp @@ -54,7 +54,7 @@ DEFINE_DEVICE_TYPE(AM9513A, am9513a_device, "am9513a", "Am9513A STC") // am9513_device - constructor //------------------------------------------------- -am9513_device::am9513_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool is_am9513a) +am9513_device::am9513_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_am9513a) : device_t(mconfig, type, tag, owner, clock) , m_out_cb(*this) , m_fout_cb(*this) @@ -62,12 +62,12 @@ am9513_device::am9513_device(const machine_config &mconfig, device_type type, co { } -am9513_device::am9513_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am9513_device::am9513_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am9513_device(mconfig, AM9513, tag, owner, clock, false) { } -am9513a_device::am9513a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am9513a_device::am9513a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am9513_device(mconfig, AM9513A, tag, owner, clock, true) { } diff --git a/src/devices/machine/am9513.h b/src/devices/machine/am9513.h index 34c3cc3598c..ee24c50c978 100644 --- a/src/devices/machine/am9513.h +++ b/src/devices/machine/am9513.h @@ -44,7 +44,7 @@ class am9513_device : public device_t { public: // device type constructor - am9513_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + am9513_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // static configuration auto out1_cb() { return m_out_cb[0].bind(); } @@ -88,7 +88,7 @@ public: protected: // base constructor - am9513_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool is_am9513a); + am9513_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_am9513a); // device-level overrides virtual void device_start() override; @@ -175,7 +175,7 @@ class am9513a_device : public am9513_device { public: // device type constructor - am9513a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + am9513a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/machine/am9517a.cpp b/src/devices/machine/am9517a.cpp index 533c617f1b5..32969680ffd 100644 --- a/src/devices/machine/am9517a.cpp +++ b/src/devices/machine/am9517a.cpp @@ -441,7 +441,7 @@ void am9517a_device::end_of_process() //------------------------------------------------- -am9517a_device::am9517a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +am9517a_device::am9517a_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_execute_interface(mconfig, *this), m_icount(0), @@ -460,12 +460,12 @@ am9517a_device::am9517a_device(const machine_config &mconfig, device_type type, } -am9517a_device::am9517a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +am9517a_device::am9517a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am9517a_device(mconfig, AM9517A, tag, owner, clock) { } -v5x_dmau_device::v5x_dmau_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v5x_dmau_device::v5x_dmau_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am9517a_device(mconfig, V5X_DMAU, tag, owner, clock) , m_in_mem16r_cb(*this) , m_out_mem16w_cb(*this) @@ -475,7 +475,7 @@ v5x_dmau_device::v5x_dmau_device(const machine_config &mconfig, const char *tag, { } -pcxport_dmac_device::pcxport_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcxport_dmac_device::pcxport_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am9517a_device(mconfig, PCXPORT_DMAC, tag, owner, clock) { } @@ -1327,7 +1327,7 @@ void pcxport_dmac_device::end_of_process() m_state = STATE_SI; } -eisa_dma_device::eisa_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +eisa_dma_device::eisa_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : am9517a_device(mconfig, EISA_DMA, tag, owner, clock) { } diff --git a/src/devices/machine/am9517a.h b/src/devices/machine/am9517a.h index e1dcec9576e..60d84c021f7 100644 --- a/src/devices/machine/am9517a.h +++ b/src/devices/machine/am9517a.h @@ -49,7 +49,7 @@ class am9517a_device : public device_t, public: // construction/destruction - am9517a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + am9517a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_hreq_callback() { return m_out_hreq_cb.bind(); } auto out_eop_callback() { return m_out_eop_cb.bind(); } @@ -79,7 +79,7 @@ public: DECLARE_WRITE_LINE_MEMBER( dreq3_w ); protected: - am9517a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + am9517a_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; @@ -147,7 +147,7 @@ class v5x_dmau_device : public am9517a_device { public: // construction/destruction - v5x_dmau_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v5x_dmau_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_mem16r_callback() { return m_in_mem16r_cb.bind(); } auto out_mem16w_callback() { return m_out_mem16w_cb.bind(); } @@ -184,7 +184,7 @@ class pcxport_dmac_device : public am9517a_device { public: // construction/destruction - pcxport_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcxport_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_reset() override; @@ -195,7 +195,7 @@ protected: class eisa_dma_device : public am9517a_device { public: - eisa_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + eisa_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <unsigned Channel> u8 get_address_page() { return m_channel[Channel].m_address >> 16; } template <unsigned Channel> void set_address_page(u8 data) diff --git a/src/devices/machine/am9519.cpp b/src/devices/machine/am9519.cpp index f09dd4e71cc..55789afc601 100644 --- a/src/devices/machine/am9519.cpp +++ b/src/devices/machine/am9519.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(AM9519, am9519_device, "am9519", "AMD AM9519 Universal Interrupt Controller") -am9519_device::am9519_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +am9519_device::am9519_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AM9519, tag, owner, clock) , m_out_int_func(*this) , m_irr(0) diff --git a/src/devices/machine/am9519.h b/src/devices/machine/am9519.h index bccd4534faf..fe3d55c1060 100644 --- a/src/devices/machine/am9519.h +++ b/src/devices/machine/am9519.h @@ -32,7 +32,7 @@ class am9519_device : public device_t { public: - am9519_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + am9519_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto out_int_callback() { return m_out_int_func.bind(); } diff --git a/src/devices/machine/amiga_copper.cpp b/src/devices/machine/amiga_copper.cpp index f3e0c249a75..4412570a5ef 100644 --- a/src/devices/machine/amiga_copper.cpp +++ b/src/devices/machine/amiga_copper.cpp @@ -64,7 +64,7 @@ DEFINE_DEVICE_TYPE(AMIGA_COPPER, amiga_copper_device, "amiga_copper", "Amiga Cop //------------------------------------------------- -amiga_copper_device::amiga_copper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amiga_copper_device::amiga_copper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AMIGA_COPPER, tag, owner, clock) , m_host_cpu(*this, finder_base::DUMMY_TAG) , m_chipmem_r(*this) diff --git a/src/devices/machine/amiga_copper.h b/src/devices/machine/amiga_copper.h index 15fe5c3cd00..35fb800e0b1 100644 --- a/src/devices/machine/amiga_copper.h +++ b/src/devices/machine/amiga_copper.h @@ -19,7 +19,7 @@ class amiga_copper_device : public device_t { public: // construction/destruction - amiga_copper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + amiga_copper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // config template<class T> void set_host_cpu_tag(T &&tag) { m_host_cpu.set_tag(std::forward<T>(tag)); } diff --git a/src/devices/machine/amigafdc.cpp b/src/devices/machine/amigafdc.cpp index 15694a95f49..cfe4c3cb718 100644 --- a/src/devices/machine/amigafdc.cpp +++ b/src/devices/machine/amigafdc.cpp @@ -52,7 +52,7 @@ void amiga_fdc_device::floppy_formats(format_registration &fr) fr.add(FLOPPY_IPF_FORMAT); } -amiga_fdc_device::amiga_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amiga_fdc_device::amiga_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AMIGA_FDC, tag, owner, clock) , m_write_index(*this) , m_read_dma(*this) diff --git a/src/devices/machine/amigafdc.h b/src/devices/machine/amigafdc.h index 02e8c823539..9689f89c4ad 100644 --- a/src/devices/machine/amigafdc.h +++ b/src/devices/machine/amigafdc.h @@ -9,7 +9,7 @@ class amiga_fdc_device : public device_t { public: - amiga_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + amiga_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto index_callback() { return m_write_index.bind(); } auto read_dma_callback() { return m_read_dma.bind(); } diff --git a/src/devices/machine/applefdintf.cpp b/src/devices/machine/applefdintf.cpp index 68a849ba59b..0ff7cf58d28 100644 --- a/src/devices/machine/applefdintf.cpp +++ b/src/devices/machine/applefdintf.cpp @@ -50,7 +50,7 @@ void applefdintf_device::floppies_35(device_slot_interface &device) device.option_add("35hd", MFD75W); } -applefdintf_device::applefdintf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +applefdintf_device::applefdintf_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_phases_cb(*this), m_devsel_cb(*this), diff --git a/src/devices/machine/applefdintf.h b/src/devices/machine/applefdintf.h index 97f5bc19b22..70f6aa20af5 100644 --- a/src/devices/machine/applefdintf.h +++ b/src/devices/machine/applefdintf.h @@ -105,7 +105,7 @@ protected: // Current value of the driven external phases input u8 m_phases_input; - applefdintf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + applefdintf_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; diff --git a/src/devices/machine/applepic.cpp b/src/devices/machine/applepic.cpp index 0383bb6817c..7f5b33f7ccc 100644 --- a/src/devices/machine/applepic.cpp +++ b/src/devices/machine/applepic.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(APPLEPIC, applepic_device, "applepic", "Apple 343S1021 PIC") const std::string_view applepic_device::s_interrupt_names[8] = { "0", "DMA 1", "DMA 2", "peripheral", "host", "timer", "6", "7" }; -applepic_device::applepic_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +applepic_device::applepic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, APPLEPIC, tag, owner, clock) , m_iopcpu(*this, "iopcpu") , m_prd_callback(*this) diff --git a/src/devices/machine/applepic.h b/src/devices/machine/applepic.h index 67d6186a963..9e03e61d3cb 100644 --- a/src/devices/machine/applepic.h +++ b/src/devices/machine/applepic.h @@ -18,7 +18,7 @@ class applepic_device : public device_t { public: // construction/destruction - applepic_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + applepic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto prd_callback() { return m_prd_callback.bind(); } diff --git a/src/devices/machine/archimedes_keyb.cpp b/src/devices/machine/archimedes_keyb.cpp index a6aa8278969..6fc27036e79 100644 --- a/src/devices/machine/archimedes_keyb.cpp +++ b/src/devices/machine/archimedes_keyb.cpp @@ -230,7 +230,7 @@ ioport_constructor archimedes_keyboard_device::device_input_ports() const // archimedes_keyboard_device - constructor //------------------------------------------------- -archimedes_keyboard_device::archimedes_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +archimedes_keyboard_device::archimedes_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARCHIMEDES_KEYBOARD, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_mcu(*this, "mcu") @@ -252,7 +252,7 @@ void archimedes_keyboard_device::device_start() { // KART interface set_data_frame(1, 8, PARITY_NONE, STOP_BITS_2); - set_rate(31250); + set_rate(XTAL::u(31250)); m_mouse_timer = timer_alloc(FUNC(archimedes_keyboard_device::update_mouse), this); diff --git a/src/devices/machine/archimedes_keyb.h b/src/devices/machine/archimedes_keyb.h index 7acf6ae8d59..5c2dfc300c5 100644 --- a/src/devices/machine/archimedes_keyb.h +++ b/src/devices/machine/archimedes_keyb.h @@ -25,7 +25,7 @@ class archimedes_keyboard_device : public device_t, public device_serial_interfa { public: // construction/destruction - archimedes_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + archimedes_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto kout() { return m_kout.bind(); } diff --git a/src/devices/machine/arm_iomd.cpp b/src/devices/machine/arm_iomd.cpp index e1c32d8d3f3..c29f51d231d 100644 --- a/src/devices/machine/arm_iomd.cpp +++ b/src/devices/machine/arm_iomd.cpp @@ -136,7 +136,7 @@ void arm_iomd_device::map(address_map &map) } -arm_iomd_device::arm_iomd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +arm_iomd_device::arm_iomd_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_host_cpu(*this, finder_base::DUMMY_TAG) , m_vidc(*this, finder_base::DUMMY_TAG) @@ -157,7 +157,7 @@ arm_iomd_device::arm_iomd_device(const machine_config &mconfig, device_type type { } -arm_iomd_device::arm_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +arm_iomd_device::arm_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm_iomd_device(mconfig, ARM_IOMD, tag, owner, clock) { m_id = 0xd4e7; @@ -204,7 +204,7 @@ void arm7500fe_iomd_device::map(address_map &map) } -arm7500fe_iomd_device::arm7500fe_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +arm7500fe_iomd_device::arm7500fe_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : arm_iomd_device(mconfig, ARM7500FE_IOMD, tag, owner, clock) , m_iolines_read_cb(*this) , m_iolines_write_cb(*this) diff --git a/src/devices/machine/arm_iomd.h b/src/devices/machine/arm_iomd.h index e072a7c8a31..6ac3854486f 100644 --- a/src/devices/machine/arm_iomd.h +++ b/src/devices/machine/arm_iomd.h @@ -34,8 +34,8 @@ class arm_iomd_device : public device_t { public: // construction/destruction - arm_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - arm_iomd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + arm_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); + arm_iomd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); template <unsigned N> auto iocr_read_od() { return m_iocr_read_od_cb[N].bind(); } template <unsigned N> auto iocr_write_od() { return m_iocr_write_od_cb[N].bind(); } @@ -167,7 +167,7 @@ class arm7500fe_iomd_device : public arm_iomd_device { public: // construction/destruction - arm7500fe_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + arm7500fe_iomd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; auto iolines_read() { return m_iolines_read_cb.bind(); } diff --git a/src/devices/machine/at.cpp b/src/devices/machine/at.cpp index 75b57c8777d..cd04e6b219f 100644 --- a/src/devices/machine/at.cpp +++ b/src/devices/machine/at.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(AT_MB, at_mb_device, "at_mb", "PC/AT Motherboard") -at_mb_device::at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +at_mb_device::at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AT_MB, tag, owner, clock), m_maincpu(*this, ":maincpu"), m_isabus(*this, "isabus"), @@ -107,7 +107,7 @@ void at_mb_device::device_add_mconfig(machine_config &config) m_pic8259_slave->out_int_callback().set("pic8259_master", FUNC(pic8259_device::ir2_w)); m_pic8259_slave->in_sp_callback().set_constant(0); - ISA16(config, m_isabus, 0); + ISA16(config, m_isabus); m_isabus->set_memspace(":maincpu", AS_PROGRAM); m_isabus->set_iospace(":maincpu", AS_IO); m_isabus->irq2_callback().set(m_pic8259_slave, FUNC(pic8259_device::ir1_w)); // in place of irq 2 on at irq 9 is used diff --git a/src/devices/machine/at.h b/src/devices/machine/at.h index 346721ffbbd..f2f20045b01 100644 --- a/src/devices/machine/at.h +++ b/src/devices/machine/at.h @@ -15,7 +15,7 @@ class at_mb_device : public device_t { public: - at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + at_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void map(address_map &map); diff --git a/src/devices/machine/at28c16.cpp b/src/devices/machine/at28c16.cpp index 38dbdc25117..73dbbb57760 100644 --- a/src/devices/machine/at28c16.cpp +++ b/src/devices/machine/at28c16.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(AT28C16, at28c16_device, "at28c16", "AT28C16 2Kx8 EEPROM") // at28c16_device - constructor //------------------------------------------------- -at28c16_device::at28c16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at28c16_device::at28c16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AT28C16, tag, owner, clock), device_memory_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/machine/at28c16.h b/src/devices/machine/at28c16.h index ca412d7c0af..bab4db821e8 100644 --- a/src/devices/machine/at28c16.h +++ b/src/devices/machine/at28c16.h @@ -27,7 +27,7 @@ class at28c16_device : { public: // construction/destruction - at28c16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at28c16_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/machine/at28c64b.cpp b/src/devices/machine/at28c64b.cpp index 7187a3cd093..88ae9613b6f 100644 --- a/src/devices/machine/at28c64b.cpp +++ b/src/devices/machine/at28c64b.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(AT28C64B, at28c64b_device, "at28c64b", "AT28C64B 8Kx8 EEPROM" // at28c64b_device - constructor //------------------------------------------------- -at28c64b_device::at28c64b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at28c64b_device::at28c64b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AT28C64B, tag, owner, clock), device_memory_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/machine/at28c64b.h b/src/devices/machine/at28c64b.h index c94ac1eec62..d07b45e3ecf 100644 --- a/src/devices/machine/at28c64b.h +++ b/src/devices/machine/at28c64b.h @@ -27,7 +27,7 @@ class at28c64b_device : { public: // construction/destruction - at28c64b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at28c64b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, u8 data); u8 read(offs_t offset); diff --git a/src/devices/machine/at29x.cpp b/src/devices/machine/at29x.cpp index bf0544ede0f..6ad988b190a 100644 --- a/src/devices/machine/at29x.cpp +++ b/src/devices/machine/at29x.cpp @@ -56,7 +56,7 @@ Constructor for all variants */ -at29x_device::at29x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int memory_size, int device_id, int sector_size) +at29x_device::at29x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int memory_size, int device_id, int sector_size) : device_t(mconfig, type, tag, owner, clock), device_nvram_interface(mconfig, *this), m_memory_size(memory_size), // bytes @@ -72,7 +72,7 @@ at29x_device::at29x_device(const machine_config &mconfig, device_type type, cons /* Constructor for AT29C020 */ -at29c020_device::at29c020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at29c020_device::at29c020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : at29x_device(mconfig, AT29C020, tag, owner, clock, 256*1024, 0xda, 256) { } @@ -80,7 +80,7 @@ at29c020_device::at29c020_device(const machine_config &mconfig, const char *tag, /* Constructor for AT29C040 */ -at29c040_device::at29c040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at29c040_device::at29c040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : at29x_device(mconfig, AT29C040, tag, owner, clock, 512*1024, 0x5b, 512) { } @@ -88,7 +88,7 @@ at29c040_device::at29c040_device(const machine_config &mconfig, const char *tag, /* Constructor for AT29C040A */ -at29c040a_device::at29c040a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at29c040a_device::at29c040a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : at29x_device(mconfig, AT29C040A, tag, owner, clock, 512*1024, 0xa4, 256) { } diff --git a/src/devices/machine/at29x.h b/src/devices/machine/at29x.h index 5df3672877f..110f1ad3c01 100644 --- a/src/devices/machine/at29x.h +++ b/src/devices/machine/at29x.h @@ -24,7 +24,7 @@ public: void write(offs_t offset, uint8_t data); protected: - at29x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int memory_size, int device_id, int sector_size); + at29x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int memory_size, int device_id, int sector_size); virtual void device_start(void) override; virtual void device_reset(void) override; @@ -92,19 +92,19 @@ private: class at29c020_device : public at29x_device { public: - at29c020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + at29c020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class at29c040_device : public at29x_device { public: - at29c040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + at29c040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class at29c040a_device : public at29x_device { public: - at29c040a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + at29c040a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; #endif // MAME_MACHINE_AT29X_H diff --git a/src/devices/machine/at45dbxx.cpp b/src/devices/machine/at45dbxx.cpp index 890cd78ac59..a70bee5c462 100644 --- a/src/devices/machine/at45dbxx.cpp +++ b/src/devices/machine/at45dbxx.cpp @@ -46,13 +46,13 @@ DEFINE_DEVICE_TYPE(AT45DB161, at45db161_device, "at45db161", "AT45DB161") // at45db041_device - constructor //------------------------------------------------- -at45db041_device::at45db041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at45db041_device::at45db041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : at45db041_device(mconfig, AT45DB041, tag, owner, clock) { } -at45db041_device::at45db041_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +at45db041_device::at45db041_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_nvram_interface(mconfig, *this) , write_so(*this) @@ -60,13 +60,13 @@ at45db041_device::at45db041_device(const machine_config &mconfig, device_type ty } -at45db081_device::at45db081_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at45db081_device::at45db081_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : at45db041_device(mconfig, AT45DB081, tag, owner, clock) { } -at45db161_device::at45db161_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +at45db161_device::at45db161_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : at45db041_device(mconfig, AT45DB161, tag, owner, clock) { } diff --git a/src/devices/machine/at45dbxx.h b/src/devices/machine/at45dbxx.h index 2521ac10acc..84da1d96c1d 100644 --- a/src/devices/machine/at45dbxx.h +++ b/src/devices/machine/at45dbxx.h @@ -24,7 +24,7 @@ class at45db041_device : public device_t, public device_nvram_interface { public: - at45db041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at45db041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(cs_w); DECLARE_WRITE_LINE_MEMBER(sck_w); @@ -36,7 +36,7 @@ public: auto so_callback() { return write_so.bind(); } protected: - at45db041_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + at45db041_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; @@ -101,7 +101,7 @@ protected: class at45db081_device : public at45db041_device { public: - at45db081_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at45db081_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int num_pages() const override { return 4096; } @@ -116,7 +116,7 @@ protected: class at45db161_device : public at45db041_device { public: - at45db161_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + at45db161_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int num_pages() const override { return 4096; } diff --git a/src/devices/machine/at_keybc.cpp b/src/devices/machine/at_keybc.cpp index a166ff234cb..03cda01a664 100644 --- a/src/devices/machine/at_keybc.cpp +++ b/src/devices/machine/at_keybc.cpp @@ -282,7 +282,7 @@ WRITE_LINE_MEMBER(at_kbc_device_base::kbd_data_w) machine().scheduler().synchronize(timer_expired_delegate(FUNC(at_kbc_device_base::set_kbd_data_in), this), state); } -at_kbc_device_base::at_kbc_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) +at_kbc_device_base::at_kbc_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_mcu(*this, "mcu") , m_hot_res_cb(*this), m_gate_a20_cb(*this), m_kbd_irq_cb(*this) @@ -381,7 +381,7 @@ TIMER_CALLBACK_MEMBER(at_kbc_device_base::set_kbd_data_in) // PC/AT KEYBOARD CONTROLLER DEVICE //************************************************************************** -at_keyboard_controller_device::at_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +at_keyboard_controller_device::at_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : at_kbc_device_base(mconfig, AT_KEYBOARD_CONTROLLER, tag, owner, clock) { } @@ -452,7 +452,7 @@ WRITE_LINE_MEMBER(ps2_keyboard_controller_device::aux_data_w) machine().scheduler().synchronize(timer_expired_delegate(FUNC(ps2_keyboard_controller_device::set_aux_data_in), this), state); } -ps2_keyboard_controller_device::ps2_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ps2_keyboard_controller_device::ps2_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : at_kbc_device_base(mconfig, PS2_KEYBOARD_CONTROLLER, tag, owner, clock) , m_aux_irq_cb(*this) , m_aux_clk_cb(*this), m_aux_data_cb(*this) diff --git a/src/devices/machine/at_keybc.h b/src/devices/machine/at_keybc.h index 9e769416cb2..afaa85b3d4e 100644 --- a/src/devices/machine/at_keybc.h +++ b/src/devices/machine/at_keybc.h @@ -41,7 +41,7 @@ public: protected: // trampoline constructor - at_kbc_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock); + at_kbc_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock); // device_t implementation virtual void device_resolve_objects() override; @@ -83,7 +83,7 @@ class at_keyboard_controller_device : public at_kbc_device_base { public: // standard constructor - at_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + at_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t implementation @@ -120,7 +120,7 @@ public: DECLARE_WRITE_LINE_MEMBER(aux_data_w); // standard constructor - ps2_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ps2_keyboard_controller_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t implementation diff --git a/src/devices/machine/ataflash.cpp b/src/devices/machine/ataflash.cpp index 892031e2052..c2c30d5e401 100644 --- a/src/devices/machine/ataflash.cpp +++ b/src/devices/machine/ataflash.cpp @@ -5,12 +5,12 @@ DEFINE_DEVICE_TYPE(ATA_FLASH_PCCARD, ata_flash_pccard_device, "ataflash", "ATA Flash PC Card") -ata_flash_pccard_device::ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ata_flash_pccard_device::ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ata_flash_pccard_device(mconfig, ATA_FLASH_PCCARD, tag, owner, clock) { } -ata_flash_pccard_device::ata_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ata_flash_pccard_device::ata_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ide_hdd_device(mconfig, type, tag, owner, clock) , device_pccard_interface(mconfig, *this) { @@ -118,7 +118,7 @@ attotime ata_flash_pccard_device::seek_time() DEFINE_DEVICE_TYPE(TAITO_PCCARD1, taito_pccard1_device, "taito_pccard1", "Taito PC Card (Type 1)") -taito_pccard1_device::taito_pccard1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +taito_pccard1_device::taito_pccard1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ata_flash_pccard_device(mconfig, TAITO_PCCARD1, tag, owner, clock), m_locked(0) { @@ -207,7 +207,7 @@ bool taito_pccard1_device::is_ready() DEFINE_DEVICE_TYPE(TAITO_PCCARD2, taito_pccard2_device, "taito_pccard2", "Taito PC Card (Type 2)") -taito_pccard2_device::taito_pccard2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +taito_pccard2_device::taito_pccard2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ata_flash_pccard_device(mconfig, TAITO_PCCARD2, tag, owner, clock), m_locked(false) { @@ -304,7 +304,7 @@ bool taito_pccard2_device::is_ready() DEFINE_DEVICE_TYPE(TAITO_COMPACT_FLASH, taito_compact_flash_device, "taito_cf", "Taito Compact Flash") -taito_compact_flash_device::taito_compact_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +taito_compact_flash_device::taito_compact_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ata_flash_pccard_device(mconfig, TAITO_COMPACT_FLASH, tag, owner, clock), m_locked(false) { diff --git a/src/devices/machine/ataflash.h b/src/devices/machine/ataflash.h index c9e3cbbf991..ad30f883b03 100644 --- a/src/devices/machine/ataflash.h +++ b/src/devices/machine/ataflash.h @@ -13,7 +13,7 @@ DECLARE_DEVICE_TYPE(ATA_FLASH_PCCARD, ata_flash_pccard_device) class ata_flash_pccard_device : public ide_hdd_device, public device_pccard_interface { public: - ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ata_flash_pccard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read_memory(offs_t offset, uint16_t mem_mask = ~0) override; virtual void write_memory(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; @@ -21,7 +21,7 @@ public: virtual void write_reg(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; protected: - ata_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ata_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_reset() override; @@ -41,7 +41,7 @@ DECLARE_DEVICE_TYPE(TAITO_PCCARD1, taito_pccard1_device) class taito_pccard1_device : public ata_flash_pccard_device { public: - taito_pccard1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + taito_pccard1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint16_t read_reg(offs_t offset, uint16_t mem_mask = ~0) override; virtual void write_reg(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; @@ -62,7 +62,7 @@ DECLARE_DEVICE_TYPE(TAITO_PCCARD2, taito_pccard2_device) class taito_pccard2_device : public ata_flash_pccard_device { public: - taito_pccard2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + taito_pccard2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -84,7 +84,7 @@ DECLARE_DEVICE_TYPE(TAITO_COMPACT_FLASH, taito_compact_flash_device) class taito_compact_flash_device : public ata_flash_pccard_device { public: - taito_compact_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + taito_compact_flash_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/machine/atmel_arm_aic.h b/src/devices/machine/atmel_arm_aic.h index 72659841f3a..88308ddf87c 100644 --- a/src/devices/machine/atmel_arm_aic.h +++ b/src/devices/machine/atmel_arm_aic.h @@ -12,7 +12,7 @@ class arm_aic_device : public device_t { public: // construction/destruction - arm_aic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + arm_aic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ARM_AIC, tag, owner, clock), m_irq_out(*this) { diff --git a/src/devices/machine/ay31015.cpp b/src/devices/machine/ay31015.cpp index a3cbbe456aa..2a5cce6e131 100644 --- a/src/devices/machine/ay31015.cpp +++ b/src/devices/machine/ay31015.cpp @@ -104,7 +104,7 @@ Start bit (low), Bit 0, Bit 1... highest bit, Parity bit (if enabled), 1-2 stop DEFINE_DEVICE_TYPE(AY31015, ay31015_device, "ay31015", "AY-3-1015 UART") DEFINE_DEVICE_TYPE(AY51013, ay51013_device, "ay51013", "AY-5-1013 UART") -ay31015_device::ay31015_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ay31015_device::ay31015_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_control_reg(0), m_status_reg(0), @@ -134,12 +134,12 @@ ay31015_device::ay31015_device(const machine_config &mconfig, device_type type, elem = 0; } -ay31015_device::ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ay31015_device::ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay31015_device(mconfig, AY31015, tag, owner, clock) { } -ay51013_device::ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ay51013_device::ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ay31015_device(mconfig, AY51013, tag, owner, clock) { } diff --git a/src/devices/machine/ay31015.h b/src/devices/machine/ay31015.h index 4e27bc8e11f..a351522c4d8 100644 --- a/src/devices/machine/ay31015.h +++ b/src/devices/machine/ay31015.h @@ -18,7 +18,7 @@ class ay31015_device : public device_t { public: - ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_auto_rdav(bool auto_rdav) { m_auto_rdav = auto_rdav; } @@ -101,7 +101,7 @@ protected: PREP_TIME }; - ay31015_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ay31015_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -157,7 +157,7 @@ protected: class ay51013_device : public ay31015_device { public: - ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void internal_reset() override; diff --git a/src/devices/machine/bacta_datalogger.cpp b/src/devices/machine/bacta_datalogger.cpp index 43f9855bfd9..18ed6fcd39f 100644 --- a/src/devices/machine/bacta_datalogger.cpp +++ b/src/devices/machine/bacta_datalogger.cpp @@ -29,12 +29,12 @@ DEFINE_DEVICE_TYPE(BACTA_DATALOGGER, bacta_datalogger_device, "bacta_datalogger" // bacta_datalogger_device - constructor //------------------------------------------------- -bacta_datalogger_device::bacta_datalogger_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bacta_datalogger_device::bacta_datalogger_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bacta_datalogger_device(mconfig, BACTA_DATALOGGER, tag, owner, clock) { } -bacta_datalogger_device::bacta_datalogger_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +bacta_datalogger_device::bacta_datalogger_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BACTA_DATALOGGER, tag, owner, clock), device_serial_interface(mconfig, *this), m_rxd_handler(*this), @@ -57,9 +57,9 @@ void bacta_datalogger_device::device_reset() set_data_frame(startbits, databits, parity, stopbits); - set_tra_rate(1200); + set_tra_rate(XTAL::u(1200)); - set_rcv_rate(1200); + set_rcv_rate(XTAL::u(1200)); output_rxd(1); } @@ -70,7 +70,7 @@ void bacta_datalogger_device::tx_queue() { if (m_output_char != 255) { - set_tra_rate(1200); + set_tra_rate(XTAL::u(1200)); transmit_register_setup(m_output_char); m_output_char = 255; } diff --git a/src/devices/machine/bacta_datalogger.h b/src/devices/machine/bacta_datalogger.h index 61555d85acd..44245c8a884 100644 --- a/src/devices/machine/bacta_datalogger.h +++ b/src/devices/machine/bacta_datalogger.h @@ -9,7 +9,7 @@ class bacta_datalogger_device : public device_t, public device_serial_interface { public: - bacta_datalogger_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + bacta_datalogger_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual WRITE_LINE_MEMBER( write_txd ) {device_serial_interface::rx_w(state); } auto rxd_handler() { return m_rxd_handler.bind(); } @@ -17,7 +17,7 @@ public: DECLARE_WRITE_LINE_MEMBER( output_rxd ) { m_rxd_handler(state); } protected: - bacta_datalogger_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bacta_datalogger_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; diff --git a/src/devices/machine/bankdev.cpp b/src/devices/machine/bankdev.cpp index e8e141ff7e6..308a116a9e9 100644 --- a/src/devices/machine/bankdev.cpp +++ b/src/devices/machine/bankdev.cpp @@ -6,7 +6,7 @@ // device type definition DEFINE_DEVICE_TYPE(ADDRESS_MAP_BANK, address_map_bank_device, "address_map_bank", "Address Map Bank") -address_map_bank_device::address_map_bank_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +address_map_bank_device::address_map_bank_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ADDRESS_MAP_BANK, tag, owner, clock), device_memory_interface(mconfig, *this), m_endianness(ENDIANNESS_NATIVE), diff --git a/src/devices/machine/bankdev.h b/src/devices/machine/bankdev.h index 05a3c2eb411..3f0cd1d3f3d 100644 --- a/src/devices/machine/bankdev.h +++ b/src/devices/machine/bankdev.h @@ -12,7 +12,7 @@ class address_map_bank_device : { public: // construction/destruction - address_map_bank_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + address_map_bank_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers template <typename... T> address_map_bank_device& set_map(T &&... args) { set_addrmap(0, std::forward<T>(args)...); return *this; } diff --git a/src/devices/machine/bcreader.cpp b/src/devices/machine/bcreader.cpp index a94c488583c..8d80e084337 100644 --- a/src/devices/machine/bcreader.cpp +++ b/src/devices/machine/bcreader.cpp @@ -59,7 +59,7 @@ DEFINE_DEVICE_TYPE(BARCODE_READER, barcode_reader_device, "bcreader", "Barcode R // barcode_reader_device - constructor //------------------------------------------------- -barcode_reader_device::barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +barcode_reader_device::barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BARCODE_READER, tag, owner, clock) , m_byte_length(0) , m_pixel_length(0) diff --git a/src/devices/machine/bcreader.h b/src/devices/machine/bcreader.h index 6fd3966bef0..3b5fe3eb86d 100644 --- a/src/devices/machine/bcreader.h +++ b/src/devices/machine/bcreader.h @@ -17,7 +17,7 @@ class barcode_reader_device : public device_t { public: // construction/destruction - barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write_code(const char *barcode, int len); int get_pending_code() { return m_new_code; } diff --git a/src/devices/machine/bitmap_printer.cpp b/src/devices/machine/bitmap_printer.cpp index ca552a14694..83296b5474b 100644 --- a/src/devices/machine/bitmap_printer.cpp +++ b/src/devices/machine/bitmap_printer.cpp @@ -76,7 +76,7 @@ void bitmap_printer_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -bitmap_printer_device::bitmap_printer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +bitmap_printer_device::bitmap_printer_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_cr_direction(1), m_xpos(0), @@ -108,13 +108,13 @@ bitmap_printer_device::bitmap_printer_device(const machine_config &mconfig, devi { } -bitmap_printer_device::bitmap_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bitmap_printer_device::bitmap_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bitmap_printer_device(mconfig, BITMAP_PRINTER, tag, owner, clock) { } bitmap_printer_device::bitmap_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, int paper_width, int paper_height, int hdpi, int vdpi) : - bitmap_printer_device(mconfig, tag, owner, u32(0)) + bitmap_printer_device(mconfig, tag, owner) { m_paper_width = paper_width; m_paper_height = paper_height; diff --git a/src/devices/machine/bitmap_printer.h b/src/devices/machine/bitmap_printer.h index 7b05f0e8c15..6541a2ade47 100644 --- a/src/devices/machine/bitmap_printer.h +++ b/src/devices/machine/bitmap_printer.h @@ -24,7 +24,7 @@ class bitmap_printer_device : public device_t { public: - bitmap_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bitmap_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); bitmap_printer_device(const machine_config &mconfig, const char *tag, device_t *owner, int paper_width, int paper_height, int hdpi, int vdpi); enum @@ -65,7 +65,7 @@ public: int m_ypos; protected: - bitmap_printer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + bitmap_printer_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/machine/bl_handhelds_menucontrol.cpp b/src/devices/machine/bl_handhelds_menucontrol.cpp index 18982731069..af101981a1f 100644 --- a/src/devices/machine/bl_handhelds_menucontrol.cpp +++ b/src/devices/machine/bl_handhelds_menucontrol.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(BL_HANDHELDS_MENUCONTROL, bl_handhelds_menucontrol_device, "blhandheldmenu", "BaoBaoLong Handhelds Menu Controller") -bl_handhelds_menucontrol_device::bl_handhelds_menucontrol_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bl_handhelds_menucontrol_device::bl_handhelds_menucontrol_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BL_HANDHELDS_MENUCONTROL, tag, owner, clock), m_is_unsp_type_hack(false) { diff --git a/src/devices/machine/bl_handhelds_menucontrol.h b/src/devices/machine/bl_handhelds_menucontrol.h index 747a60db76b..7ad8e6b772e 100644 --- a/src/devices/machine/bl_handhelds_menucontrol.h +++ b/src/devices/machine/bl_handhelds_menucontrol.h @@ -12,7 +12,7 @@ class bl_handhelds_menucontrol_device : public device_t { public: // construction/destruction - bl_handhelds_menucontrol_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bl_handhelds_menucontrol_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // the chip is the same between systems, but there's some logic not fully understood that is causing off-by-1 errors on some calcs void set_is_unsp_type_hack() { m_is_unsp_type_hack = true; } diff --git a/src/devices/machine/bq4847.cpp b/src/devices/machine/bq4847.cpp index 91fca4b8edd..db85cd16a92 100644 --- a/src/devices/machine/bq4847.cpp +++ b/src/devices/machine/bq4847.cpp @@ -74,7 +74,7 @@ enum // Constructors for basetype //------------------------------------------------- -bq4847_device::bq4847_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) +bq4847_device::bq4847_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_nvram_interface(mconfig, *this), device_rtc_interface(mconfig, *this), @@ -92,12 +92,12 @@ bq4847_device::bq4847_device(const machine_config& mconfig, device_type type, co { } -bq4847_device::bq4847_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +bq4847_device::bq4847_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : bq4847_device(mconfig, BQ4847, tag, owner, clock) { } -bq4845_device::bq4845_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) +bq4845_device::bq4845_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : bq4847_device(mconfig, BQ4845, tag, owner, clock) { } diff --git a/src/devices/machine/bq4847.h b/src/devices/machine/bq4847.h index 2658e207962..590c2b43aa6 100644 --- a/src/devices/machine/bq4847.h +++ b/src/devices/machine/bq4847.h @@ -20,7 +20,7 @@ class bq4847_device : public device_t, public device_rtc_interface { public: - bq4847_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bq4847_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto wdo_handler() { return m_wdo_handler.bind(); } auto int_handler() { return m_int_handler.bind(); } @@ -32,7 +32,7 @@ public: DECLARE_WRITE_LINE_MEMBER(write_wdi); // watchdog disabled if wdi pin is left floating protected: - bq4847_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 32768); + bq4847_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32768)); // device_t virtual void device_start() override; @@ -89,7 +89,7 @@ private: class bq4845_device : public bq4847_device { public: - bq4845_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock); + bq4845_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(BQ4845, bq4845_device) diff --git a/src/devices/machine/bq48x2.cpp b/src/devices/machine/bq48x2.cpp index 849f019ce6c..a8b8b8f2c45 100644 --- a/src/devices/machine/bq48x2.cpp +++ b/src/devices/machine/bq48x2.cpp @@ -60,7 +60,7 @@ enum //------------------------------------------------- bq48x2_device::bq48x2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, int memsize) - : device_t(mconfig, type, tag, owner, 0), + : device_t(mconfig, type, tag, owner), device_nvram_interface(mconfig, *this), device_rtc_interface(mconfig, *this), m_interrupt_cb(*this), @@ -74,13 +74,13 @@ bq48x2_device::bq48x2_device(const machine_config &mconfig, device_type type, co //------------------------------------------------- // 128 KiB memory (including clock registers) -bq4842_device::bq4842_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bq4842_device::bq4842_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bq48x2_device(mconfig, BQ4842, tag, owner, 128*1024) { } // 512 KiB memory (including clock registers) -bq4852_device::bq4852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bq4852_device::bq4852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : bq48x2_device(mconfig, BQ4852, tag, owner, 512*1024) { } diff --git a/src/devices/machine/bq48x2.h b/src/devices/machine/bq48x2.h index f19b9778c7c..0a36a8d11f8 100644 --- a/src/devices/machine/bq48x2.h +++ b/src/devices/machine/bq48x2.h @@ -121,13 +121,13 @@ private: class bq4842_device : public bq48x2_device { public: - bq4842_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bq4842_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class bq4852_device : public bq48x2_device { public: - bq4852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bq4852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(BQ4842, bq4842_device) diff --git a/src/devices/machine/buffer.cpp b/src/devices/machine/buffer.cpp index b1a93df8fb7..4eb95a7a79c 100644 --- a/src/devices/machine/buffer.cpp +++ b/src/devices/machine/buffer.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(INPUT_BUFFER, input_buffer_device, "input_buffer", "Input Buffer") -input_buffer_device::input_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +input_buffer_device::input_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INPUT_BUFFER, tag, owner, clock) , m_input_data(0xff) { diff --git a/src/devices/machine/buffer.h b/src/devices/machine/buffer.h index 5df28af6c6b..b14e7a1ff1e 100644 --- a/src/devices/machine/buffer.h +++ b/src/devices/machine/buffer.h @@ -6,7 +6,7 @@ class input_buffer_device : public device_t { public: - input_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + input_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t read() { return m_input_data; } diff --git a/src/devices/machine/busmouse.cpp b/src/devices/machine/busmouse.cpp index 2def623649b..bcdf237b9f3 100644 --- a/src/devices/machine/busmouse.cpp +++ b/src/devices/machine/busmouse.cpp @@ -118,7 +118,7 @@ ioport_constructor bus_mouse_device::device_input_ports() const // bus_mouse_device - constructor //------------------------------------------------- -bus_mouse_device::bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +bus_mouse_device::bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, BUS_MOUSE, tag, owner, clock) , m_write_extint(*this) , m_buttons(*this, "mouse_buttons") diff --git a/src/devices/machine/busmouse.h b/src/devices/machine/busmouse.h index 29c20d236ee..93718527d62 100644 --- a/src/devices/machine/busmouse.h +++ b/src/devices/machine/busmouse.h @@ -15,7 +15,7 @@ class bus_mouse_device : public device_t { public: // construction/destruction - bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto extint_callback() { return m_write_extint.bind(); } diff --git a/src/devices/machine/cammu.cpp b/src/devices/machine/cammu.cpp index dabc637f085..e889f00fbba 100644 --- a/src/devices/machine/cammu.cpp +++ b/src/devices/machine/cammu.cpp @@ -96,7 +96,7 @@ DEFINE_DEVICE_TYPE(CAMMU_C4T, cammu_c4t_device, "c4t", "C4E/C4T CAMMU") DEFINE_DEVICE_TYPE(CAMMU_C4I, cammu_c4i_device, "c4i", "C4I CAMMU") DEFINE_DEVICE_TYPE(CAMMU_C3, cammu_c3_device, "c3", "C1/C3 CAMMU") -cammu_c4t_device::cammu_c4t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cammu_c4t_device::cammu_c4t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cammu_c4_device(mconfig, CAMMU_C4T, tag, owner, clock) , m_ram_line(0) , m_htlb_offset(0) @@ -113,7 +113,7 @@ cammu_c4t_device::cammu_c4t_device(const machine_config &mconfig, const char *ta { } -cammu_c4i_device::cammu_c4i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cammu_c4i_device::cammu_c4i_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cammu_c4_device(mconfig, CAMMU_C4I, tag, owner, clock) , m_reset(0) , m_clr_s_data_tlb(0) @@ -125,7 +125,7 @@ cammu_c4i_device::cammu_c4i_device(const machine_config &mconfig, const char *ta { } -cammu_c4_device::cammu_c4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +cammu_c4_device::cammu_c4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cammu_device(mconfig, type, tag, owner, clock) , m_s_pdo(0) , m_u_pdo(0) @@ -140,7 +140,7 @@ cammu_c4_device::cammu_c4_device(const machine_config &mconfig, device_type type { } -cammu_c3_device::cammu_c3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cammu_c3_device::cammu_c3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cammu_device(mconfig, CAMMU_C3, tag, owner, clock) , m_linked{ this } , m_s_pdo(0) @@ -150,7 +150,7 @@ cammu_c3_device::cammu_c3_device(const machine_config &mconfig, const char *tag, { } -cammu_device::cammu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +cammu_device::cammu_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_exception_func(*this) { diff --git a/src/devices/machine/cammu.h b/src/devices/machine/cammu.h index 83b44d4b120..64515a19a05 100644 --- a/src/devices/machine/cammu.h +++ b/src/devices/machine/cammu.h @@ -196,7 +196,7 @@ public: bool memory_translate(const u32 ssw, const int spacenum, const int intention, offs_t &address); protected: - cammu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cammu_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; @@ -293,7 +293,7 @@ public: void fault_data_2_hi_w(u32 data) { m_fault_data_2_hi = data; } protected: - cammu_c4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cammu_c4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -318,7 +318,7 @@ protected: class cammu_c4t_device : public cammu_c4_device { public: - cammu_c4t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cammu_c4t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -408,7 +408,7 @@ private: class cammu_c4i_device : public cammu_c4_device { public: - cammu_c4i_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cammu_c4i_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -505,7 +505,7 @@ private: class cammu_c3_device : public cammu_device { public: - cammu_c3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cammu_c3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void add_linked(cammu_c3_device *child) { m_linked.push_back(child); } diff --git a/src/devices/machine/cdp1852.cpp b/src/devices/machine/cdp1852.cpp index b4850ac669e..7dcf4bfe536 100644 --- a/src/devices/machine/cdp1852.cpp +++ b/src/devices/machine/cdp1852.cpp @@ -39,7 +39,7 @@ enum // cdp1852_device - constructor //------------------------------------------------- -cdp1852_device::cdp1852_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +cdp1852_device::cdp1852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDP1852, tag, owner, clock), m_read_mode(*this), m_write_sr(*this), diff --git a/src/devices/machine/cdp1852.h b/src/devices/machine/cdp1852.h index 4f4bec622f9..58317abe671 100644 --- a/src/devices/machine/cdp1852.h +++ b/src/devices/machine/cdp1852.h @@ -30,7 +30,7 @@ class cdp1852_device : public device_t { public: // construction/destruction - cdp1852_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cdp1852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto mode_cb() { return m_read_mode.bind(); } auto sr_cb() { return m_write_sr.bind(); } diff --git a/src/devices/machine/cdp1871.cpp b/src/devices/machine/cdp1871.cpp index 3e32512c30f..18989e6cd78 100644 --- a/src/devices/machine/cdp1871.cpp +++ b/src/devices/machine/cdp1871.cpp @@ -96,7 +96,7 @@ const uint8_t cdp1871_device::key_codes[4][11][8] = // cdp1871_device - constructor //------------------------------------------------- -cdp1871_device::cdp1871_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cdp1871_device::cdp1871_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDP1871, tag, owner, clock), m_read_d1(*this), m_read_d2(*this), diff --git a/src/devices/machine/cdp1871.h b/src/devices/machine/cdp1871.h index a359980f7fb..368cfa5b5d2 100644 --- a/src/devices/machine/cdp1871.h +++ b/src/devices/machine/cdp1871.h @@ -38,7 +38,7 @@ class cdp1871_device : public device_t { public: // construction/destruction - cdp1871_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1871_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto d1_callback() { return m_read_d1.bind(); } auto d2_callback() { return m_read_d2.bind(); } diff --git a/src/devices/machine/cdp1879.cpp b/src/devices/machine/cdp1879.cpp index f6687f73226..f680146e169 100644 --- a/src/devices/machine/cdp1879.cpp +++ b/src/devices/machine/cdp1879.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(CDP1879, cdp1879_device, "cdp1879", "RCA CDP1879 RTC") // cdp1879_device - constructor //------------------------------------------------- -cdp1879_device::cdp1879_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cdp1879_device::cdp1879_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CDP1879, tag, owner, clock), device_rtc_interface(mconfig, *this), m_irq_w(*this) diff --git a/src/devices/machine/cdp1879.h b/src/devices/machine/cdp1879.h index 4dc761b5fd7..3ac6a05d1b4 100644 --- a/src/devices/machine/cdp1879.h +++ b/src/devices/machine/cdp1879.h @@ -18,7 +18,7 @@ class cdp1879_device : public device_t, { public: // construction/destruction - cdp1879_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cdp1879_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/ch376.cpp b/src/devices/machine/ch376.cpp index eeca140ec0a..8c674e297a4 100644 --- a/src/devices/machine/ch376.cpp +++ b/src/devices/machine/ch376.cpp @@ -74,7 +74,7 @@ static constexpr u8 CMD_BYTE_WR_GO = 0x3d; // ch376_device - constructor //------------------------------------------------- -ch376_device::ch376_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ch376_device::ch376_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CH376, tag, owner, clock), m_state(0), m_status(0), diff --git a/src/devices/machine/ch376.h b/src/devices/machine/ch376.h index d00586b1503..7a1e58e5bc9 100644 --- a/src/devices/machine/ch376.h +++ b/src/devices/machine/ch376.h @@ -28,7 +28,7 @@ class ch376_device : public device_t { public: // construction/destruction - ch376_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ch376_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); u8 read(offs_t offset); void write(offs_t offset, u8 data); diff --git a/src/devices/machine/chessmachine.cpp b/src/devices/machine/chessmachine.cpp index 1016cec2ec4..3b7a7a65768 100644 --- a/src/devices/machine/chessmachine.cpp +++ b/src/devices/machine/chessmachine.cpp @@ -42,7 +42,7 @@ DEFINE_DEVICE_TYPE(CHESSMACHINE, chessmachine_device, "chessmachine", "Tasc Ches // constructor //------------------------------------------------- -chessmachine_device::chessmachine_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +chessmachine_device::chessmachine_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CHESSMACHINE, tag, owner, clock), m_maincpu(*this, "maincpu"), m_bootrom(*this, "bootrom"), diff --git a/src/devices/machine/chessmachine.h b/src/devices/machine/chessmachine.h index 561e95459a7..dfbc5747a1a 100644 --- a/src/devices/machine/chessmachine.h +++ b/src/devices/machine/chessmachine.h @@ -18,7 +18,7 @@ class chessmachine_device : public device_t { public: - chessmachine_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + chessmachine_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto data_out() { return m_data_out.bind(); } // data_r diff --git a/src/devices/machine/clock.cpp b/src/devices/machine/clock.cpp index 4c2ad3afd7a..19760c789b2 100644 --- a/src/devices/machine/clock.cpp +++ b/src/devices/machine/clock.cpp @@ -19,7 +19,7 @@ Output signal at machine start is right after falling edge. DEFINE_DEVICE_TYPE(CLOCK, clock_device, "clock", "Clock") -clock_device::clock_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +clock_device::clock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CLOCK, tag, owner, clock), m_signal(0), m_output(-1), diff --git a/src/devices/machine/clock.h b/src/devices/machine/clock.h index 1dc4739ce6c..1e822985106 100644 --- a/src/devices/machine/clock.h +++ b/src/devices/machine/clock.h @@ -14,7 +14,7 @@ class clock_device : public device_t { public: - clock_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + clock_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto signal_handler() { return m_signal_handler.bind(); } auto &set_period(attotime period) { m_period = period; reinit(); return *this; } diff --git a/src/devices/machine/com52c50.cpp b/src/devices/machine/com52c50.cpp index 89b4e176f85..0488a12f088 100644 --- a/src/devices/machine/com52c50.cpp +++ b/src/devices/machine/com52c50.cpp @@ -15,7 +15,7 @@ // device type definition DEFINE_DEVICE_TYPE(COM52C50, com52c50_device, "com52c50", "SMC COM52C50 TIC") -com52c50_device::com52c50_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +com52c50_device::com52c50_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COM52C50, tag, owner, clock) , m_int1_callback(*this) , m_int2_callback(*this) diff --git a/src/devices/machine/com52c50.h b/src/devices/machine/com52c50.h index 085a3e0808a..b5c47a0e484 100644 --- a/src/devices/machine/com52c50.h +++ b/src/devices/machine/com52c50.h @@ -35,7 +35,7 @@ class com52c50_device : public device_t { public: // device type constructor - com52c50_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + com52c50_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto int1_callback() { return m_int1_callback.bind(); } diff --git a/src/devices/machine/com8116.cpp b/src/devices/machine/com8116.cpp index 38364b4b101..6645d01200d 100644 --- a/src/devices/machine/com8116.cpp +++ b/src/devices/machine/com8116.cpp @@ -88,7 +88,7 @@ const int com8116_device::divisors_16X_4_6080MHz[16] = // com8116_device - constructor //------------------------------------------------- -com8116_device::com8116_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const int *divisors) : +com8116_device::com8116_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const int *divisors) : device_t(mconfig, type, tag, owner, clock), m_fx4_handler(*this), m_fr_handler(*this), @@ -97,32 +97,32 @@ com8116_device::com8116_device(const machine_config &mconfig, device_type type, { } -com8116_device::com8116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +com8116_device::com8116_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : com8116_device(mconfig, COM8116, tag, owner, clock, divisors_16X_5_0688MHz) { } -com8116_003_device::com8116_003_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +com8116_003_device::com8116_003_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : com8116_device(mconfig, COM8116_003, tag, owner, clock, divisors_16X_6_01835MHz) { } -com5016_5_device::com5016_5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +com5016_5_device::com5016_5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : com8116_device(mconfig, COM5016_5, tag, owner, clock, divisors_16X_4_9152MHz) { } -com5016_013_device::com5016_013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +com5016_013_device::com5016_013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : com8116_device(mconfig, COM5016_013, tag, owner, clock, divisors_16X_2_7648MHz) { } -com8116_020_device::com8116_020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +com8116_020_device::com8116_020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : com8116_device(mconfig, COM8116_020, tag, owner, clock, divisors_16X_1_8432MHz) { } -k1135ab_device::k1135ab_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k1135ab_device::k1135ab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : com8116_device(mconfig, K1135AB, tag, owner, clock, divisors_16X_5_0688MHz) { } diff --git a/src/devices/machine/com8116.h b/src/devices/machine/com8116.h index 908d7c782d2..351fb940f32 100644 --- a/src/devices/machine/com8116.h +++ b/src/devices/machine/com8116.h @@ -37,7 +37,7 @@ class com8116_device : public device_t { public: // construction/destruction - com8116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + com8116_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto fx4_handler() { return m_fx4_handler.bind(); } auto fr_handler() { return m_fr_handler.bind(); } @@ -49,7 +49,7 @@ public: void stt_str_w(uint8_t data); protected: - com8116_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const int *divisors); + com8116_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const int *divisors); static const int divisors_16X_5_0688MHz[16]; static const int divisors_16X_6_01835MHz[16]; @@ -92,7 +92,7 @@ class com8116_003_device : public com8116_device { public: // construction/destruction - com8116_003_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + com8116_003_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -102,7 +102,7 @@ class com5016_5_device : public com8116_device { public: // construction/destruction - com5016_5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + com5016_5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -112,7 +112,7 @@ class com5016_013_device : public com8116_device { public: // construction/destruction - com5016_013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + com5016_013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -122,7 +122,7 @@ class com8116_020_device : public com8116_device { public: // construction/destruction - com8116_020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + com8116_020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -132,7 +132,7 @@ class k1135ab_device : public com8116_device { public: // construction/destruction - k1135ab_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k1135ab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/cop452.cpp b/src/devices/machine/cop452.cpp index 87e2d0954d5..a547ee9c66b 100644 --- a/src/devices/machine/cop452.cpp +++ b/src/devices/machine/cop452.cpp @@ -19,7 +19,7 @@ // Device type definition DEFINE_DEVICE_TYPE(COP452, cop452_device, "cop452", "National Semiconductor COP452 frequency generator") -cop452_device::cop452_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cop452_device::cop452_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, COP452, tag, owner, clock) , m_out_handlers(*this) { diff --git a/src/devices/machine/cop452.h b/src/devices/machine/cop452.h index 238e5c8b5ca..7b0c36e30bc 100644 --- a/src/devices/machine/cop452.h +++ b/src/devices/machine/cop452.h @@ -26,7 +26,7 @@ class cop452_device : public device_t { public: - cop452_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cop452_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // SPI I/O DECLARE_WRITE_LINE_MEMBER(cs_w); diff --git a/src/devices/machine/corvushd.cpp b/src/devices/machine/corvushd.cpp index b0c819b33f8..ce47d1a25de 100644 --- a/src/devices/machine/corvushd.cpp +++ b/src/devices/machine/corvushd.cpp @@ -227,7 +227,7 @@ DEFINE_DEVICE_TYPE(CORVUS_HDC, corvus_hdc_device, "corvus_hdc", "Corvus Flat Cable HDC") -corvus_hdc_device::corvus_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +corvus_hdc_device::corvus_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CORVUS_HDC, tag, owner, clock), m_status(0), m_prep_mode(false), diff --git a/src/devices/machine/corvushd.h b/src/devices/machine/corvushd.h index 074b761eb60..9c9f23a7b53 100644 --- a/src/devices/machine/corvushd.h +++ b/src/devices/machine/corvushd.h @@ -28,7 +28,7 @@ public: static constexpr uint8_t CONTROLLER_DIRECTION = 0x40; // Set = Controller->Host, Clear = Host->Controller // construction/destruction - corvus_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + corvus_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(); void write(uint8_t data); diff --git a/src/devices/machine/cr511b.cpp b/src/devices/machine/cr511b.cpp index 9eb07578de0..3b6151d671e 100644 --- a/src/devices/machine/cr511b.cpp +++ b/src/devices/machine/cr511b.cpp @@ -40,7 +40,7 @@ void cr511b_device::device_add_mconfig(machine_config &config) // cr511b_device - constructor //------------------------------------------------- -cr511b_device::cr511b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cr511b_device::cr511b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CR511B, tag, owner, clock), m_cdrom(*this, "cdrom"), m_cdda(*this, "cdda"), diff --git a/src/devices/machine/cr511b.h b/src/devices/machine/cr511b.h index aae738145fd..1b797df9c7a 100644 --- a/src/devices/machine/cr511b.h +++ b/src/devices/machine/cr511b.h @@ -42,7 +42,7 @@ class cr511b_device : public device_t { public: // construction/destruction - cr511b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cr511b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto stch_handler() { return m_stch_handler.bind(); } diff --git a/src/devices/machine/cs4031.cpp b/src/devices/machine/cs4031.cpp index 55cb0377cad..eec830ad9b7 100644 --- a/src/devices/machine/cs4031.cpp +++ b/src/devices/machine/cs4031.cpp @@ -96,7 +96,7 @@ const float cs4031_device::m_dma_clock_divider[] = void cs4031_device::device_add_mconfig(machine_config &config) { - AM9517A(config, m_dma1, 0); + AM9517A(config, m_dma1); m_dma1->out_hreq_callback().set(m_dma2, FUNC(am9517a_device::dreq0_w)); m_dma1->out_eop_callback().set(FUNC(cs4031_device::dma1_eop_w)); m_dma1->in_memr_callback().set(FUNC(cs4031_device::dma_read_byte)); @@ -114,7 +114,7 @@ void cs4031_device::device_add_mconfig(machine_config &config) m_dma1->out_dack_callback<2>().set(FUNC(cs4031_device::dma1_dack2_w)); m_dma1->out_dack_callback<3>().set(FUNC(cs4031_device::dma1_dack3_w)); - AM9517A(config, m_dma2, 0); + AM9517A(config, m_dma2); m_dma2->out_hreq_callback().set(FUNC(cs4031_device::dma2_hreq_w)); m_dma2->in_memr_callback().set(FUNC(cs4031_device::dma_read_word)); m_dma2->out_memw_callback().set(FUNC(cs4031_device::dma_write_word)); @@ -129,16 +129,16 @@ void cs4031_device::device_add_mconfig(machine_config &config) m_dma2->out_dack_callback<2>().set(FUNC(cs4031_device::dma2_dack2_w)); m_dma2->out_dack_callback<3>().set(FUNC(cs4031_device::dma2_dack3_w)); - PIC8259(config, m_intc1, 0); + PIC8259(config, m_intc1); m_intc1->out_int_callback().set(FUNC(cs4031_device::intc1_int_w)); m_intc1->in_sp_callback().set_constant(1); m_intc1->read_slave_ack_callback().set(FUNC(cs4031_device::intc1_slave_ack_r)); - PIC8259(config, m_intc2, 0); + PIC8259(config, m_intc2); m_intc2->out_int_callback().set(m_intc1, FUNC(pic8259_device::ir2_w)); m_intc2->in_sp_callback().set_constant(0); - PIT8254(config, m_ctc, 0); + PIT8254(config, m_ctc); m_ctc->set_clk<0>(XTAL(14'318'181) / 12.0); m_ctc->out_handler<0>().set(m_intc1, FUNC(pic8259_device::ir0_w)); m_ctc->set_clk<1>(XTAL(14'318'181) / 12.0); @@ -160,7 +160,7 @@ void cs4031_device::device_add_mconfig(machine_config &config) // cs4031_device - constructor //------------------------------------------------- -cs4031_device::cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +cs4031_device::cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CS4031, tag, owner, clock), m_read_ior(*this), m_write_iow(*this), diff --git a/src/devices/machine/cs4031.h b/src/devices/machine/cs4031.h index 5e7ea81b4e0..1e7de332904 100644 --- a/src/devices/machine/cs4031.h +++ b/src/devices/machine/cs4031.h @@ -37,7 +37,7 @@ class cs4031_device : public device_t public: // construction/destruction template <typename T, typename U, typename V, typename W, typename X> - cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cputag, U &&isatag, V &&biostag, W &&keybctag, X &&ramtag) + cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cputag, U &&isatag, V &&biostag, W &&keybctag, X &&ramtag) : cs4031_device(mconfig, tag, owner, clock) { set_cputag(std::forward<T>(cputag)); @@ -47,7 +47,7 @@ public: set_ramtag(std::forward<X>(ramtag)); } - cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cs4031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto ior() { return m_read_ior.bind(); } diff --git a/src/devices/machine/cs8221.cpp b/src/devices/machine/cs8221.cpp index e57f181e383..c4970e80975 100644 --- a/src/devices/machine/cs8221.cpp +++ b/src/devices/machine/cs8221.cpp @@ -61,7 +61,7 @@ static const char *const register_names[] = // cs8221_device - constructor //------------------------------------------------- -cs8221_device::cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cs8221_device::cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CS8221, tag, owner, clock), m_address(0), m_address_valid(false) diff --git a/src/devices/machine/cs8221.h b/src/devices/machine/cs8221.h index 63b3102d5e9..c6952a94a9c 100644 --- a/src/devices/machine/cs8221.h +++ b/src/devices/machine/cs8221.h @@ -24,15 +24,15 @@ class cs8221_device : public device_t { public: // construction/destruction - cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const char *cputag, const char *isatag, const char *biostag) - : cs8221_device(mconfig, tag, owner, clock) + cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *cputag, const char *isatag, const char *biostag) + : cs8221_device(mconfig, tag, owner) { set_cputag(cputag); set_isatag(isatag); set_biostag(biostag); } - cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cs8221_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration void set_cputag(const char *tag) { m_cputag = tag; } diff --git a/src/devices/machine/cs8900a.cpp b/src/devices/machine/cs8900a.cpp index 52e0808bb01..84ee06c27d0 100644 --- a/src/devices/machine/cs8900a.cpp +++ b/src/devices/machine/cs8900a.cpp @@ -375,7 +375,7 @@ void cs8900a_device::device_start() save_item(NAME(rxevent_read_mask)); } -cs8900a_device::cs8900a_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +cs8900a_device::cs8900a_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_network_interface(mconfig, *this, 10) , cs8900_ia_mac{0, 0, 0, 0, 0, 0} @@ -400,7 +400,7 @@ cs8900a_device::cs8900a_device(const machine_config& mconfig, device_type type, , rxevent_read_mask(3) /* set if L and/or H u8 was read in RXEVENT? */ {} -cs8900a_device::cs8900a_device(machine_config const& mconfig, char const *tag, device_t *owner, u32 clock) +cs8900a_device::cs8900a_device(machine_config const& mconfig, char const *tag, device_t *owner, const XTAL &clock) : cs8900a_device(mconfig, CS8900A, tag, owner, clock) {} diff --git a/src/devices/machine/cs8900a.h b/src/devices/machine/cs8900a.h index a0a6f88dbb4..408701f7ac5 100644 --- a/src/devices/machine/cs8900a.h +++ b/src/devices/machine/cs8900a.h @@ -27,13 +27,13 @@ class cs8900a_device : public device_t, public device_network_interface { public: - cs8900a_device(machine_config const& mconfig, char const *tag, device_t *owner, u32 clock); + cs8900a_device(machine_config const& mconfig, char const *tag, device_t *owner, const XTAL &clock); u8 read(u16 address); void write(u16 address, u8 data); protected: - cs8900a_device(const machine_config& mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + cs8900a_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/machine/cxd1095.cpp b/src/devices/machine/cxd1095.cpp index 1f78ca628a1..214325c7b31 100644 --- a/src/devices/machine/cxd1095.cpp +++ b/src/devices/machine/cxd1095.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(CXD1095, cxd1095_device, "cxd1095", "CXD1095 I/O Expander") // cxd1095_device - constructor //------------------------------------------------- -cxd1095_device::cxd1095_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +cxd1095_device::cxd1095_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, CXD1095, tag, owner, clock) , m_input_cb(*this) , m_output_cb(*this) diff --git a/src/devices/machine/cxd1095.h b/src/devices/machine/cxd1095.h index f5decf3def7..c1c0a857f44 100644 --- a/src/devices/machine/cxd1095.h +++ b/src/devices/machine/cxd1095.h @@ -48,7 +48,7 @@ class cxd1095_device : public device_t { public: // construction/destruction - cxd1095_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + cxd1095_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration template <std::size_t Port> auto in_port_cb() { static_assert(Port >= 0 && Port < 5, "invalid port"); return m_input_cb[Port].bind(); } diff --git a/src/devices/machine/cxd1185.cpp b/src/devices/machine/cxd1185.cpp index b854884d29a..da153e3918e 100644 --- a/src/devices/machine/cxd1185.cpp +++ b/src/devices/machine/cxd1185.cpp @@ -43,7 +43,7 @@ static unsigned const SCSI_RST_HOLD = 25'000; ALLOW_SAVE_TYPE(cxd1185_device::state); -cxd1185_device::cxd1185_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +cxd1185_device::cxd1185_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, CXD1185, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_irq_out_cb(*this) diff --git a/src/devices/machine/cxd1185.h b/src/devices/machine/cxd1185.h index f1d6732b26d..6a8b5a3236b 100644 --- a/src/devices/machine/cxd1185.h +++ b/src/devices/machine/cxd1185.h @@ -13,7 +13,7 @@ class cxd1185_device , public nscsi_slot_card_interface { public: - cxd1185_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + cxd1185_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // device configuration auto irq_out_cb() { return m_irq_out_cb.bind(); } diff --git a/src/devices/machine/dc7085.cpp b/src/devices/machine/dc7085.cpp index 264cef004c6..b6082392a49 100644 --- a/src/devices/machine/dc7085.cpp +++ b/src/devices/machine/dc7085.cpp @@ -89,7 +89,7 @@ enum tdr_mask : u16 TDR_TBUF = 0x00ff, // transmitter buffer }; -dc7085_device::dc7085_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +dc7085_device::dc7085_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DC7085, tag, owner, clock) , m_chan(*this, "ch%u", 0U) , m_int_cb(*this) @@ -109,7 +109,7 @@ void dc7085_device::device_add_mconfig(machine_config &config) */ for (unsigned i = 0; i < std::size(m_chan); i++) { - DC7085_CHANNEL(config, m_chan[i], 0); + DC7085_CHANNEL(config, m_chan[i]); m_chan[i]->rx_done().set([this, i](u16 data) { rx_done((i << 8) | data); }); m_chan[i]->tx_cb().set([this, i](int state) { m_tx_cb[i](state); if (m_csr & CSR_MAINT) m_chan[i]->rx_w(state); }); @@ -297,7 +297,7 @@ void dc7085_device::tx_done(int state) recalc_irqs(); } -dc7085_channel::dc7085_channel(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +dc7085_channel::dc7085_channel(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DC7085_CHANNEL, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_tx_cb(*this) @@ -321,8 +321,8 @@ void dc7085_channel::device_reset() transmit_register_reset(); set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1); - set_tra_rate(0); - set_rcv_rate(0); + set_tra_rate(XTAL::u(0)); + set_rcv_rate(XTAL::u(0)); m_rx_enabled = false; } diff --git a/src/devices/machine/dc7085.h b/src/devices/machine/dc7085.h index dccb2bbefce..6f33b26a4d4 100644 --- a/src/devices/machine/dc7085.h +++ b/src/devices/machine/dc7085.h @@ -17,7 +17,7 @@ class dc7085_channel public: auto tx_cb() { return m_tx_cb.bind(); } - dc7085_channel(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dc7085_channel(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides @@ -49,7 +49,7 @@ private: class dc7085_device : public device_t { public: - dc7085_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dc7085_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); void map(address_map &map); diff --git a/src/devices/machine/diablo_hd.cpp b/src/devices/machine/diablo_hd.cpp index 2ce1707058c..78bcac694ea 100644 --- a/src/devices/machine/diablo_hd.cpp +++ b/src/devices/machine/diablo_hd.cpp @@ -65,7 +65,7 @@ #define LOG_DRIVE(...) do { if (DIABLO_DEBUG) logprintf(__VA_ARGS__); } while (0) -diablo_hd_device::diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +diablo_hd_device::diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DIABLO_HD, tag, owner, clock), m_log_level(8), m_diablo31(true), @@ -1432,7 +1432,7 @@ TIMER_CALLBACK_MEMBER(diablo_hd_device::sector_mark_tick) void diablo_hd_device::device_add_mconfig(machine_config &config) { - DIABLO(config, "drive", 0); + DIABLO(config, "drive"); } diff --git a/src/devices/machine/diablo_hd.h b/src/devices/machine/diablo_hd.h index 43524706967..7d92e793fe0 100644 --- a/src/devices/machine/diablo_hd.h +++ b/src/devices/machine/diablo_hd.h @@ -19,7 +19,7 @@ DECLARE_DEVICE_TYPE(DIABLO_HD, diablo_hd_device) class diablo_hd_device : public device_t { public: - diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~diablo_hd_device(); static const int DIABLO_UNIT_MAX = 2; //!< max number of drive units diff --git a/src/devices/machine/dl11.cpp b/src/devices/machine/dl11.cpp index cde90816cc3..f059eab37c0 100644 --- a/src/devices/machine/dl11.cpp +++ b/src/devices/machine/dl11.cpp @@ -42,7 +42,7 @@ enum // dl11_device - constructor //------------------------------------------------- -dl11_device::dl11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dl11_device::dl11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DL11, tag, owner, clock) , device_serial_interface(mconfig, *this) , device_z80daisy_interface(mconfig, *this) diff --git a/src/devices/machine/dl11.h b/src/devices/machine/dl11.h index 37dd3d9c614..e0b0f07a2c7 100644 --- a/src/devices/machine/dl11.h +++ b/src/devices/machine/dl11.h @@ -29,7 +29,7 @@ class dl11_device : public device_t, { public: // construction/destruction - dl11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dl11_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_rxc(int clock) { m_rxc = clock; } void set_txc(int clock) { m_txc = clock; } diff --git a/src/devices/machine/dmac.cpp b/src/devices/machine/dmac.cpp index 0705f28c060..6564417bd99 100644 --- a/src/devices/machine/dmac.cpp +++ b/src/devices/machine/dmac.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(AMIGA_DMAC, amiga_dmac_device, "amiga_dmac", "Amiga DMAC DMA // amiga_dmac_device - constructor //------------------------------------------------- -amiga_dmac_device::amiga_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +amiga_dmac_device::amiga_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AMIGA_DMAC, tag, owner, clock), amiga_autoconfig(), m_cfgout_handler(*this), diff --git a/src/devices/machine/dmac.h b/src/devices/machine/dmac.h index 47c5f9f93d3..fd2644a7f01 100644 --- a/src/devices/machine/dmac.h +++ b/src/devices/machine/dmac.h @@ -24,7 +24,7 @@ class amiga_dmac_device : public device_t, public amiga_autoconfig { public: // construction/destruction - amiga_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + amiga_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto cfgout_handler() { return m_cfgout_handler.bind(); } diff --git a/src/devices/machine/dp8390.cpp b/src/devices/machine/dp8390.cpp index 49b98e94846..fc4e8257bf8 100644 --- a/src/devices/machine/dp8390.cpp +++ b/src/devices/machine/dp8390.cpp @@ -9,17 +9,17 @@ DEFINE_DEVICE_TYPE(DP8390D, dp8390d_device, "dp8390d", "DP8390D NIC") DEFINE_DEVICE_TYPE(RTL8019A, rtl8019a_device, "rtl8019a", "RTL8019A Ethernet Controller") -dp8390d_device::dp8390d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dp8390d_device::dp8390d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dp8390_device(mconfig, DP8390D, tag, owner, clock, TYPE::DP8390D, 10.0f) { } -rtl8019a_device::rtl8019a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rtl8019a_device::rtl8019a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : dp8390_device(mconfig, RTL8019A, tag, owner, clock, TYPE::RTL8019A, 10.0f) { } -dp8390_device::dp8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, TYPE variant, u32 bandwidth) +dp8390_device::dp8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, TYPE variant, u32 bandwidth) : device_t(mconfig, type, tag, owner, clock) , device_network_interface(mconfig, *this, bandwidth) , m_variant(variant) diff --git a/src/devices/machine/dp8390.h b/src/devices/machine/dp8390.h index 7e87ffe44db..4b14ce9f817 100644 --- a/src/devices/machine/dp8390.h +++ b/src/devices/machine/dp8390.h @@ -32,7 +32,7 @@ protected: }; // construction/destruction - dp8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, TYPE varian, u32 bandwidth); + dp8390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, TYPE varian, u32 bandwidth); // device-level overrides virtual void device_start() override; @@ -106,13 +106,13 @@ private: class rtl8019a_device : public dp8390_device { public: - rtl8019a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rtl8019a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class dp8390d_device : public dp8390_device { public: - dp8390d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dp8390d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/dp83932c.cpp b/src/devices/machine/dp83932c.cpp index f956d8da8ea..0a818dbd619 100644 --- a/src/devices/machine/dp83932c.cpp +++ b/src/devices/machine/dp83932c.cpp @@ -64,7 +64,7 @@ static u16 const regmask[] = 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xf017, }; -dp83932c_device::dp83932c_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +dp83932c_device::dp83932c_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DP83932C, tag, owner, clock) , device_network_interface(mconfig, *this, 10) , m_bus(*this, finder_base::DUMMY_TAG, 0) diff --git a/src/devices/machine/dp83932c.h b/src/devices/machine/dp83932c.h index 2a7d271eb11..c1464df3f35 100644 --- a/src/devices/machine/dp83932c.h +++ b/src/devices/machine/dp83932c.h @@ -13,7 +13,7 @@ class dp83932c_device , public device_network_interface { public: - dp83932c_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + dp83932c_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // configuration template <typename T> void set_bus(T &&tag, int spacenum) { m_bus.set_tag(std::forward<T>(tag), spacenum); } diff --git a/src/devices/machine/dp8573.cpp b/src/devices/machine/dp8573.cpp index f862bec4deb..dc38bc75b70 100644 --- a/src/devices/machine/dp8573.cpp +++ b/src/devices/machine/dp8573.cpp @@ -20,7 +20,7 @@ // device type definition DEFINE_DEVICE_TYPE(DP8573, dp8573_device, "dp8573", "DP8573 Real-Time Clock") -dp8573_device::dp8573_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +dp8573_device::dp8573_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DP8573, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_intr_cb(*this) diff --git a/src/devices/machine/dp8573.h b/src/devices/machine/dp8573.h index 1730884e1b4..5a04d24c9e9 100644 --- a/src/devices/machine/dp8573.h +++ b/src/devices/machine/dp8573.h @@ -19,7 +19,7 @@ public: { } - dp8573_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dp8573_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, u8 data); u8 read(offs_t offset); diff --git a/src/devices/machine/ds1204.cpp b/src/devices/machine/ds1204.cpp index 6d4fd46fc54..fff9476a244 100644 --- a/src/devices/machine/ds1204.cpp +++ b/src/devices/machine/ds1204.cpp @@ -32,7 +32,7 @@ inline void ATTR_PRINTF( 3, 4 ) ds1204_device::verboselog( int n_level, const ch // device type definition DEFINE_DEVICE_TYPE(DS1204, ds1204_device, "ds1204", "DS1204 Electronic Key") -ds1204_device::ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +ds1204_device::ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, DS1204, tag, owner, clock), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), diff --git a/src/devices/machine/ds1204.h b/src/devices/machine/ds1204.h index 7a51463ac67..bb509e5262a 100644 --- a/src/devices/machine/ds1204.h +++ b/src/devices/machine/ds1204.h @@ -17,7 +17,7 @@ class ds1204_device : public device_t, public device_nvram_interface { public: // construction/destruction - ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0 ); + ds1204_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL() ); DECLARE_WRITE_LINE_MEMBER( write_rst ); DECLARE_WRITE_LINE_MEMBER( write_clk ); diff --git a/src/devices/machine/ds1205.cpp b/src/devices/machine/ds1205.cpp index 7bafe3b6a88..605f102dc10 100644 --- a/src/devices/machine/ds1205.cpp +++ b/src/devices/machine/ds1205.cpp @@ -32,7 +32,7 @@ inline void ATTR_PRINTF( 3, 4 ) ds1205_device::verboselog( int n_level, const ch // device type definition DEFINE_DEVICE_TYPE(DS1205, ds1205_device, "ds1205", "DS1205") -ds1205_device::ds1205_device( const machine_config &mconfig, const char *tag, device_t *owner, u32 clock ) +ds1205_device::ds1205_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, DS1205, tag, owner, clock), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), diff --git a/src/devices/machine/ds1205.h b/src/devices/machine/ds1205.h index 0098142e65f..8c8a05852c3 100644 --- a/src/devices/machine/ds1205.h +++ b/src/devices/machine/ds1205.h @@ -17,7 +17,7 @@ class ds1205_device : public device_t, public device_nvram_interface { public: // construction/destruction - ds1205_device( const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ds1205_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( write_rst ); DECLARE_WRITE_LINE_MEMBER( write_clk ); diff --git a/src/devices/machine/ds128x.cpp b/src/devices/machine/ds128x.cpp index 8292e5237f2..42b32ada204 100644 --- a/src/devices/machine/ds128x.cpp +++ b/src/devices/machine/ds128x.cpp @@ -9,12 +9,12 @@ DEFINE_DEVICE_TYPE(DS12885, ds12885_device, "ds12885", "DS12885 RTC/NVRAM") // ds12885_device - constructor //------------------------------------------------- -ds12885_device::ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds12885_device::ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds12885_device(mconfig, DS12885, tag, owner, clock) { } -ds12885_device::ds12885_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ds12885_device::ds12885_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : mc146818_device(mconfig, type, tag, owner, clock) { } @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(DS12885EXT, ds12885ext_device, "ds12885ext", "DS12885 RTC/NVR // ds12885ext_device - constructor //------------------------------------------------- -ds12885ext_device::ds12885ext_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds12885ext_device::ds12885ext_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds12885_device(mconfig, DS12885EXT, tag, owner, clock) { } diff --git a/src/devices/machine/ds128x.h b/src/devices/machine/ds128x.h index 07209361041..9483449d869 100644 --- a/src/devices/machine/ds128x.h +++ b/src/devices/machine/ds128x.h @@ -12,10 +12,10 @@ class ds12885_device : public mc146818_device { public: // construction/destruction - ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); + ds12885_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); protected: - ds12885_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ds12885_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual int data_size() const override { return 128; } virtual int get_timer_bypass() const override; @@ -30,7 +30,7 @@ class ds12885ext_device : public ds12885_device { public: // construction/destruction - ds12885ext_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); + ds12885ext_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); // read/write access to extended ram uint8_t read_extended(offs_t offset); diff --git a/src/devices/machine/ds1302.cpp b/src/devices/machine/ds1302.cpp index 8d32c3fd3ff..0fa94625b46 100644 --- a/src/devices/machine/ds1302.cpp +++ b/src/devices/machine/ds1302.cpp @@ -70,7 +70,7 @@ DEFINE_DEVICE_TYPE(DS1302, ds1302_device, "ds1302", "Dallas DS1302 Trickle-Charg // ds1302_device - constructor //------------------------------------------------- -ds1302_device::ds1302_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t ram_size) +ds1302_device::ds1302_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t ram_size) : device_t(mconfig, type, tag, owner, clock), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), @@ -78,7 +78,7 @@ ds1302_device::ds1302_device(const machine_config &mconfig, device_type type, co { } -ds1302_device::ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1302_device::ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds1302_device(mconfig, DS1302, tag, owner, clock, 0x1f) { } @@ -88,7 +88,7 @@ ds1302_device::ds1302_device(const machine_config &mconfig, const char *tag, dev // ds1202_device - constructor //------------------------------------------------- -ds1202_device::ds1202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1202_device::ds1202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds1302_device(mconfig, DS1202, tag, owner, clock, 0x18) { } diff --git a/src/devices/machine/ds1302.h b/src/devices/machine/ds1302.h index 9b1d09e9840..8040f37075e 100644 --- a/src/devices/machine/ds1302.h +++ b/src/devices/machine/ds1302.h @@ -34,7 +34,7 @@ class ds1302_device : public device_t, { public: // construction/destruction - ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1302_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( ce_w ); DECLARE_WRITE_LINE_MEMBER( sclk_w ); @@ -42,7 +42,7 @@ public: DECLARE_READ_LINE_MEMBER( io_r ); protected: - ds1302_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint8_t ram_size); + ds1302_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint8_t ram_size); // device-level overrides virtual void device_start() override; @@ -88,7 +88,7 @@ class ds1202_device : public ds1302_device { public: // construction/destruction - ds1202_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/ds1315.cpp b/src/devices/machine/ds1315.cpp index 2a574dca399..5a96c16fed8 100644 --- a/src/devices/machine/ds1315.cpp +++ b/src/devices/machine/ds1315.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(DS1315, ds1315_device, "ds1315", "Dallas DS1315 Phantom Time Chip") -ds1315_device::ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1315_device::ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS1315, tag, owner, clock), m_backing_read(*this), m_mode(), diff --git a/src/devices/machine/ds1315.h b/src/devices/machine/ds1315.h index 720c4a08202..fb8e5e0a0ab 100644 --- a/src/devices/machine/ds1315.h +++ b/src/devices/machine/ds1315.h @@ -18,7 +18,7 @@ class ds1315_device : public device_t { public: - ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1315_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~ds1315_device() {} auto read_backing() { return m_backing_read.bind(); } diff --git a/src/devices/machine/ds1386.cpp b/src/devices/machine/ds1386.cpp index 6f91625bde4..78da8b618c0 100644 --- a/src/devices/machine/ds1386.cpp +++ b/src/devices/machine/ds1386.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(DS1286, ds1286_device, "ds1286", "DS1286 Watchdog DEFINE_DEVICE_TYPE(DS1386_8K, ds1386_8k_device, "ds1386_8k", "DS1386-8K RAMified Watchdog Timekeeper") DEFINE_DEVICE_TYPE(DS1386_32K, ds1386_32k_device, "ds1386_32k", "DS1386-32K RAMified Watchdog Timekeeper") -ds1386_device::ds1386_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, size_t size) +ds1386_device::ds1386_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, size_t size) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , device_rtc_interface(mconfig, *this) @@ -48,17 +48,17 @@ ds1386_device::ds1386_device(const machine_config &mconfig, device_type type, co { } -ds1286_device::ds1286_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1286_device::ds1286_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds1386_device(mconfig, DS1286, tag, owner, clock, 64) { } -ds1386_8k_device::ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1386_8k_device::ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds1386_device(mconfig, DS1386_8K, tag, owner, clock, 8*1024) { } -ds1386_32k_device::ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1386_32k_device::ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds1386_device(mconfig, DS1386_32K, tag, owner, clock, 32*1024) { } diff --git a/src/devices/machine/ds1386.h b/src/devices/machine/ds1386.h index dd07c49c79f..cca0be92a63 100644 --- a/src/devices/machine/ds1386.h +++ b/src/devices/machine/ds1386.h @@ -121,7 +121,7 @@ protected: ALARM_PER_MINUTE = 0x7 }; - ds1386_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, size_t size); + ds1386_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, size_t size); // device-level overrides virtual void device_start() override; @@ -212,19 +212,19 @@ protected: class ds1286_device : public ds1386_device { public: - ds1286_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1286_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ds1386_8k_device : public ds1386_device { public: - ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1386_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ds1386_32k_device : public ds1386_device { public: - ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1386_32k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(DS1286, ds1286_device) diff --git a/src/devices/machine/ds17x85.cpp b/src/devices/machine/ds17x85.cpp index af6837cf621..fba14196193 100644 --- a/src/devices/machine/ds17x85.cpp +++ b/src/devices/machine/ds17x85.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(DS17887, ds17887_device, "ds17887", "DS17887 RTC") // ds17x85_device - constructor //------------------------------------------------- -ds17x85_device::ds17x85_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 model, u32 extram_size) +ds17x85_device::ds17x85_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 model, u32 extram_size) : mc146818_device(mconfig, type, tag, owner, clock) , m_model(model) , m_extram_size(extram_size) @@ -57,7 +57,7 @@ ds17x85_device::ds17x85_device(const machine_config &mconfig, device_type type, // ds1685_device - constructor //------------------------------------------------- -ds1685_device::ds1685_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds1685_device::ds1685_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS1685, tag, owner, clock, 0x71, 128) { } @@ -66,7 +66,7 @@ ds1685_device::ds1685_device(const machine_config &mconfig, const char *tag, dev // ds1687_device - constructor //------------------------------------------------- -ds1687_device::ds1687_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds1687_device::ds1687_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS1687, tag, owner, clock, 0x71, 128) { } @@ -75,7 +75,7 @@ ds1687_device::ds1687_device(const machine_config &mconfig, const char *tag, dev // ds17285_device - constructor //------------------------------------------------- -ds17285_device::ds17285_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds17285_device::ds17285_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS17285, tag, owner, clock, 0x72, 2048) { } @@ -84,7 +84,7 @@ ds17285_device::ds17285_device(const machine_config &mconfig, const char *tag, d // ds17287_device - constructor //------------------------------------------------- -ds17287_device::ds17287_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds17287_device::ds17287_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS17287, tag, owner, clock, 0x72, 2048) { } @@ -93,7 +93,7 @@ ds17287_device::ds17287_device(const machine_config &mconfig, const char *tag, d // ds17485_device - constructor //------------------------------------------------- -ds17485_device::ds17485_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds17485_device::ds17485_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS17485, tag, owner, clock, 0x74, 4096) { } @@ -102,7 +102,7 @@ ds17485_device::ds17485_device(const machine_config &mconfig, const char *tag, d // ds17487_device - constructor //------------------------------------------------- -ds17487_device::ds17487_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds17487_device::ds17487_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS17487, tag, owner, clock, 0x74, 4096) { } @@ -111,7 +111,7 @@ ds17487_device::ds17487_device(const machine_config &mconfig, const char *tag, d // ds17885_device - constructor //------------------------------------------------- -ds17885_device::ds17885_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds17885_device::ds17885_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS17885, tag, owner, clock, 0x78, 8192) { } @@ -120,7 +120,7 @@ ds17885_device::ds17885_device(const machine_config &mconfig, const char *tag, d // ds17887_device - constructor //------------------------------------------------- -ds17887_device::ds17887_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ds17887_device::ds17887_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ds17x85_device(mconfig, DS17887, tag, owner, clock, 0x78, 8192) { } diff --git a/src/devices/machine/ds17x85.h b/src/devices/machine/ds17x85.h index 413ed5f4b8b..4c36844aa21 100644 --- a/src/devices/machine/ds17x85.h +++ b/src/devices/machine/ds17x85.h @@ -83,7 +83,7 @@ protected: REG_EXT_4B_KSE = 0x01 }; - ds17x85_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 model, u32 extram_size); + ds17x85_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u8 model, u32 extram_size); // device-specific overrides virtual void device_start() override; @@ -113,7 +113,7 @@ class ds1685_device : public ds17x85_device { public: // device type constructor - ds1685_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds1685_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds1687_device @@ -122,7 +122,7 @@ class ds1687_device : public ds17x85_device { public: // device type constructor - ds1687_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds1687_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds17285_device @@ -131,7 +131,7 @@ class ds17285_device : public ds17x85_device { public: // device type constructor - ds17285_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds17285_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds17287_device @@ -140,7 +140,7 @@ class ds17287_device : public ds17x85_device { public: // device type constructor - ds17287_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds17287_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds17485_device @@ -149,7 +149,7 @@ class ds17485_device : public ds17x85_device { public: // device type constructor - ds17485_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds17485_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds17487_device @@ -158,7 +158,7 @@ class ds17487_device : public ds17x85_device { public: // device type constructor - ds17487_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds17487_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds17885_device @@ -167,7 +167,7 @@ class ds17885_device : public ds17x85_device { public: // device type constructor - ds17885_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds17885_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> ds17887_device @@ -176,7 +176,7 @@ class ds17887_device : public ds17x85_device { public: // device type constructor - ds17887_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ds17887_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/machine/ds1994.cpp b/src/devices/machine/ds1994.cpp index cff5a921c05..a4d3513c897 100644 --- a/src/devices/machine/ds1994.cpp +++ b/src/devices/machine/ds1994.cpp @@ -31,7 +31,7 @@ // device type definition DEFINE_DEVICE_TYPE(DS1994, ds1994_device, "ds1994", "DS1994 iButton 4Kb Memory Plus Time") -ds1994_device::ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1994_device::ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS1994, tag, owner, clock), device_nvram_interface(mconfig, *this) , m_timer_main(nullptr) , m_timer_reset(nullptr) diff --git a/src/devices/machine/ds1994.h b/src/devices/machine/ds1994.h index c6629b6fbb9..6452297650c 100644 --- a/src/devices/machine/ds1994.h +++ b/src/devices/machine/ds1994.h @@ -18,12 +18,7 @@ class ds1994_device : public device_t, public device_nvram_interface { public: // construction/destruction - ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner) - : ds1994_device(mconfig, tag, owner, uint32_t(0)) - { - } - - ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers void ref_year(uint32_t year) { m_ref_year = year; } diff --git a/src/devices/machine/ds2401.cpp b/src/devices/machine/ds2401.cpp index e2236eef5d2..cd98f000f18 100644 --- a/src/devices/machine/ds2401.cpp +++ b/src/devices/machine/ds2401.cpp @@ -31,7 +31,7 @@ inline void ds2401_device::verboselog(int n_level, const char *s_fmt, ...) // device type definition DEFINE_DEVICE_TYPE(DS2401, ds2401_device, "ds2401", "DS2401 Silicon Serial Number") -ds2401_device::ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds2401_device::ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS2401, tag, owner, clock) , m_state(0) , m_bit(0) diff --git a/src/devices/machine/ds2401.h b/src/devices/machine/ds2401.h index f29132d381e..f035e0bddce 100644 --- a/src/devices/machine/ds2401.h +++ b/src/devices/machine/ds2401.h @@ -17,12 +17,7 @@ class ds2401_device : public device_t { public: // construction/destruction - ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner) - : ds2401_device(mconfig, tag, owner, uint32_t(0)) - { - } - - ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds2401_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( write ); DECLARE_READ_LINE_MEMBER( read ); diff --git a/src/devices/machine/ds2404.cpp b/src/devices/machine/ds2404.cpp index 68845d86dc3..c4e892305d4 100644 --- a/src/devices/machine/ds2404.cpp +++ b/src/devices/machine/ds2404.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(DS2404, ds2404_device, "ds2404", "DS2404 EconoRAM Time Chip") // ds2404_device - constructor //------------------------------------------------- -ds2404_device::ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds2404_device::ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS2404, tag, owner, clock), device_nvram_interface(mconfig, *this), m_tick_timer(nullptr), m_ref_year(0), m_ref_month(0), m_ref_day(0), m_address(0), diff --git a/src/devices/machine/ds2404.h b/src/devices/machine/ds2404.h index 1ed22887b87..3e33b2a237b 100644 --- a/src/devices/machine/ds2404.h +++ b/src/devices/machine/ds2404.h @@ -17,7 +17,7 @@ class ds2404_device : public device_t, public device_nvram_interface { public: // construction/destruction - ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // inline configuration helpers void ref_year(uint32_t year) { m_ref_year = year; } diff --git a/src/devices/machine/ds6417.cpp b/src/devices/machine/ds6417.cpp index 51ae6e7a201..af0c4cf0569 100644 --- a/src/devices/machine/ds6417.cpp +++ b/src/devices/machine/ds6417.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(DS6417, ds6417_device, "ds6417", "Dallas DS6417 CyberCard") -ds6417_device::ds6417_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds6417_device::ds6417_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS6417, tag, owner, clock) , device_memcard_image_interface(mconfig, *this) { diff --git a/src/devices/machine/ds6417.h b/src/devices/machine/ds6417.h index 94d5e109426..c1dcb7f2257 100644 --- a/src/devices/machine/ds6417.h +++ b/src/devices/machine/ds6417.h @@ -16,7 +16,7 @@ class ds6417_device : public device_t, { public: // construction/destruction - ds6417_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds6417_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual bool is_reset_on_load() const noexcept override { return false; } virtual const char *file_extensions() const noexcept override { return "bin"; } diff --git a/src/devices/machine/ds75160a.cpp b/src/devices/machine/ds75160a.cpp index d5ad8007a61..48a7118f9c9 100644 --- a/src/devices/machine/ds75160a.cpp +++ b/src/devices/machine/ds75160a.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(DS75160A, ds75160a_device, "ds75160a", "DS75160A GPIB Transce // ds75160a_device - constructor //------------------------------------------------- -ds75160a_device::ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds75160a_device::ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS75160A, tag, owner, clock), m_read(*this), m_write(*this), diff --git a/src/devices/machine/ds75160a.h b/src/devices/machine/ds75160a.h index 5e2498d28ad..373b00195d9 100644 --- a/src/devices/machine/ds75160a.h +++ b/src/devices/machine/ds75160a.h @@ -35,7 +35,7 @@ class ds75160a_device : public device_t { public: // construction/destruction - ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds75160a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto read_callback() { return m_read.bind(); } auto write_callback() { return m_write.bind(); } diff --git a/src/devices/machine/ds75161a.cpp b/src/devices/machine/ds75161a.cpp index 9d75d6b65a0..a2c64247d69 100644 --- a/src/devices/machine/ds75161a.cpp +++ b/src/devices/machine/ds75161a.cpp @@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(DS75161A, ds75161a_device, "ds75161a", "DS75161A GPIB Transce // ds75161a_device - constructor //------------------------------------------------- -ds75161a_device::ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds75161a_device::ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS75161A, tag, owner, clock), m_in_ren_cb(*this), m_in_ifc_cb(*this), diff --git a/src/devices/machine/ds75161a.h b/src/devices/machine/ds75161a.h index 8ea0a0b9632..8ba13029614 100644 --- a/src/devices/machine/ds75161a.h +++ b/src/devices/machine/ds75161a.h @@ -28,7 +28,7 @@ class ds75161a_device : public device_t { public: // construction/destruction - ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds75161a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_ren() { return m_in_ren_cb.bind(); } auto in_ifc() { return m_in_ifc_cb.bind(); } diff --git a/src/devices/machine/ds8874.cpp b/src/devices/machine/ds8874.cpp index 8b6003dcad3..bc65f40ca7e 100644 --- a/src/devices/machine/ds8874.cpp +++ b/src/devices/machine/ds8874.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(DS8874, ds8874_device, "ds8874", "DS8874 LED Driver") // constructor //------------------------------------------------- -ds8874_device::ds8874_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +ds8874_device::ds8874_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DS8874, tag, owner, clock), m_write_output(*this) { } diff --git a/src/devices/machine/ds8874.h b/src/devices/machine/ds8874.h index 444f15a020c..fcbfa736702 100644 --- a/src/devices/machine/ds8874.h +++ b/src/devices/machine/ds8874.h @@ -31,7 +31,7 @@ class ds8874_device : public device_t { public: - ds8874_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ds8874_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto write_output() { return m_write_output.bind(); } // OUT pins diff --git a/src/devices/machine/e0516.cpp b/src/devices/machine/e0516.cpp index 29fe42e3f17..954f990df43 100644 --- a/src/devices/machine/e0516.cpp +++ b/src/devices/machine/e0516.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(E0516, e0516_device, "e0516", "E05-16 RTC") // e0516_device - constructor //------------------------------------------------- -e0516_device::e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e0516_device::e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, E0516, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_cs(0), m_clk(0), m_data_latch(0), m_reg_latch(0), m_read_write(0), m_state(0), m_bits(0), m_dio(0) diff --git a/src/devices/machine/e0516.h b/src/devices/machine/e0516.h index d3807ff5968..ca068567f7e 100644 --- a/src/devices/machine/e0516.h +++ b/src/devices/machine/e0516.h @@ -28,7 +28,7 @@ class e0516_device : public device_t, public device_rtc_interface { public: // construction/destruction - e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e0516_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( cs_w ); DECLARE_WRITE_LINE_MEMBER( clk_w ); diff --git a/src/devices/machine/e05a03.cpp b/src/devices/machine/e05a03.cpp index 66a2a6785cc..28e196dab1f 100644 --- a/src/devices/machine/e05a03.cpp +++ b/src/devices/machine/e05a03.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(E05A03, e05a03_device, "e05a03", "Epson E05A03 Gate Array") -e05a03_device::e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e05a03_device::e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, E05A03, tag, owner, clock), m_write_nlq_lp(*this), m_write_pe_lp(*this), diff --git a/src/devices/machine/e05a03.h b/src/devices/machine/e05a03.h index 4748bb3a84b..29681b7be7c 100644 --- a/src/devices/machine/e05a03.h +++ b/src/devices/machine/e05a03.h @@ -18,7 +18,7 @@ class e05a03_device : public device_t { public: - e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e05a03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto nlq_lp_wr_callback() { return m_write_nlq_lp.bind(); } auto pe_lp_wr_callback() { return m_write_pe_lp.bind(); } diff --git a/src/devices/machine/e05a30.cpp b/src/devices/machine/e05a30.cpp index 44d90904644..8f6eb4241a3 100644 --- a/src/devices/machine/e05a30.cpp +++ b/src/devices/machine/e05a30.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(E05A30, e05a30_device, "e05a30", "Epson E05A30 Gate Array") -e05a30_device::e05a30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +e05a30_device::e05a30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, E05A30, tag, owner, clock), m_write_printhead(*this), m_write_pf_stepper(*this), diff --git a/src/devices/machine/e05a30.h b/src/devices/machine/e05a30.h index 41bd94d999d..ebd18432ef3 100644 --- a/src/devices/machine/e05a30.h +++ b/src/devices/machine/e05a30.h @@ -13,7 +13,7 @@ class e05a30_device : public device_t { public: - e05a30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + e05a30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto printhead() { return m_write_printhead.bind(); } auto pf_stepper() { return m_write_pf_stepper.bind(); } diff --git a/src/devices/machine/edlc.cpp b/src/devices/machine/edlc.cpp index 956528aa8b7..5c544e2b443 100644 --- a/src/devices/machine/edlc.cpp +++ b/src/devices/machine/edlc.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(SEEQ80C03, seeq80c03_device, "seeq80c03", "SEEQ 80C03 EDLC") static const u8 ETH_BROADCAST[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -seeq8003_device::seeq8003_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock) +seeq8003_device::seeq8003_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_network_interface(mconfig, *this, 10) , m_out_int(*this) @@ -46,7 +46,7 @@ seeq8003_device::seeq8003_device(machine_config const &mconfig, device_type type { } -seeq8003_device::seeq8003_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +seeq8003_device::seeq8003_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : seeq8003_device(mconfig, SEEQ8003, tag, owner, clock) { } @@ -387,7 +387,7 @@ bool seeq8003_device::address_filter(u8 *address) return false; } -seeq80c03_device::seeq80c03_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +seeq80c03_device::seeq80c03_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : seeq8003_device(mconfig, SEEQ80C03, tag, owner, clock) , m_regbank(*this, "regbank") { diff --git a/src/devices/machine/edlc.h b/src/devices/machine/edlc.h index bbcd91d2589..26c9321e83e 100644 --- a/src/devices/machine/edlc.h +++ b/src/devices/machine/edlc.h @@ -19,7 +19,7 @@ public: auto out_rxrdy_cb() { return m_out_rxrdy.bind(); } auto out_txrdy_cb() { return m_out_txrdy.bind(); } - seeq8003_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + seeq8003_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // register interface virtual void map(address_map &map); @@ -36,7 +36,7 @@ public: void fifo_w(u8 data); protected: - seeq8003_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock = 0); + seeq8003_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // device_t overrides virtual void device_start() override; @@ -143,7 +143,7 @@ protected: class seeq80c03_device : public seeq8003_device { public: - seeq80c03_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + seeq80c03_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // register interface virtual void map(address_map &map) override; diff --git a/src/devices/machine/eeprom.cpp b/src/devices/machine/eeprom.cpp index 2ee3b1697c1..20f75613874 100644 --- a/src/devices/machine/eeprom.cpp +++ b/src/devices/machine/eeprom.cpp @@ -24,7 +24,7 @@ //------------------------------------------------- eeprom_base_device::eeprom_base_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner) - : device_t(mconfig, devtype, tag, owner, 0), + : device_t(mconfig, devtype, tag, owner), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), m_cells(0), diff --git a/src/devices/machine/eeprompar.cpp b/src/devices/machine/eeprompar.cpp index 3393ae91a2c..1140e9fed17 100644 --- a/src/devices/machine/eeprompar.cpp +++ b/src/devices/machine/eeprompar.cpp @@ -203,7 +203,7 @@ void eeprom_parallel_28xx_device::unlock_write32(uint32_t data) { oe_w(1); } // macro for defining a new device class #define DEFINE_PARALLEL_EEPROM_DEVICE(_baseclass, _lowercase, _uppercase, _bits, _cells) \ -eeprom_parallel_##_lowercase##_device::eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) \ +eeprom_parallel_##_lowercase##_device::eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) \ : eeprom_parallel_##_baseclass##_device(mconfig, EEPROM_##_uppercase, tag, owner) \ { \ size(_cells, _bits); \ diff --git a/src/devices/machine/eeprompar.h b/src/devices/machine/eeprompar.h index 9399e32a349..ecce599a9dd 100644 --- a/src/devices/machine/eeprompar.h +++ b/src/devices/machine/eeprompar.h @@ -69,7 +69,7 @@ private: class eeprom_parallel_##_lowercase##_device : public eeprom_parallel_##_baseclass##_device \ { \ public: \ - eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); \ + eeprom_parallel_##_lowercase##_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); \ }; \ DECLARE_DEVICE_TYPE(EEPROM_##_uppercase, eeprom_parallel_##_lowercase##_device) diff --git a/src/devices/machine/eepromser.cpp b/src/devices/machine/eepromser.cpp index a8502e72fe3..8b2df6f7d68 100644 --- a/src/devices/machine/eepromser.cpp +++ b/src/devices/machine/eepromser.cpp @@ -1093,7 +1093,7 @@ eeprom_serial_##_lowercase##_##_bits##bit_device::eeprom_serial_##_lowercase##_# size(_cells, _bits); \ set_address_bits(_addrbits); \ } \ -eeprom_serial_##_lowercase##_##_bits##bit_device::eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) \ +eeprom_serial_##_lowercase##_##_bits##bit_device::eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) \ : eeprom_serial_##_baseclass##_device(mconfig, EEPROM_##_uppercase##_##_bits##BIT, tag, owner, eeprom_serial_streaming::DISABLE) \ { \ size(_cells, _bits); \ diff --git a/src/devices/machine/eepromser.h b/src/devices/machine/eepromser.h index d3d33db19d6..cc111b3526e 100644 --- a/src/devices/machine/eepromser.h +++ b/src/devices/machine/eepromser.h @@ -216,7 +216,7 @@ class eeprom_serial_##_lowercase##_##_bits##bit_device : public eeprom_serial_## { \ public: \ eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, eeprom_serial_streaming enable_streaming = eeprom_serial_streaming::DISABLE); \ - eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); \ + eeprom_serial_##_lowercase##_##_bits##bit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); \ }; \ DECLARE_DEVICE_TYPE(EEPROM_##_uppercase##_##_bits##BIT, eeprom_serial_##_lowercase##_##_bits##bit_device) diff --git a/src/devices/machine/er1400.cpp b/src/devices/machine/er1400.cpp index c2375294ba5..73ff53379b7 100644 --- a/src/devices/machine/er1400.cpp +++ b/src/devices/machine/er1400.cpp @@ -39,7 +39,7 @@ DEFINE_DEVICE_TYPE(ER1400, er1400_device, "er1400", "ER1400 Serial EAROM (100x14 // er1400_device - constructor //------------------------------------------------- -er1400_device::er1400_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +er1400_device::er1400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ER1400, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_default_data(*this, DEVICE_SELF) diff --git a/src/devices/machine/er1400.h b/src/devices/machine/er1400.h index 9988edd6744..2829edce749 100644 --- a/src/devices/machine/er1400.h +++ b/src/devices/machine/er1400.h @@ -32,7 +32,7 @@ class er1400_device : public device_t, public device_nvram_interface { public: // construction/destruction - er1400_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + er1400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // line handlers DECLARE_WRITE_LINE_MEMBER(data_w); diff --git a/src/devices/machine/er2055.cpp b/src/devices/machine/er2055.cpp index 678c044122a..43303dfb2cc 100644 --- a/src/devices/machine/er2055.cpp +++ b/src/devices/machine/er2055.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(ER2055, er2055_device, "er2055", "ER2055 EAROM (64x8)") // er2055_device - constructor //------------------------------------------------- -er2055_device::er2055_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +er2055_device::er2055_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ER2055, tag, owner, clock), device_nvram_interface(mconfig, *this), m_default_data(*this, DEVICE_SELF), diff --git a/src/devices/machine/er2055.h b/src/devices/machine/er2055.h index 95517abc542..cbd6ea546ce 100644 --- a/src/devices/machine/er2055.h +++ b/src/devices/machine/er2055.h @@ -41,7 +41,7 @@ class er2055_device : public device_t, { public: // construction/destruction - er2055_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + er2055_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // I/O operations uint8_t data() const { return m_data; } diff --git a/src/devices/machine/exorterm.cpp b/src/devices/machine/exorterm.cpp index 17e0f98a662..1ba792476dc 100644 --- a/src/devices/machine/exorterm.cpp +++ b/src/devices/machine/exorterm.cpp @@ -27,7 +27,7 @@ TODO // TYPE DEFINITIONS //************************************************************************** -exorterm155_device::exorterm155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +exorterm155_device::exorterm155_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_maincpu(*this, "maincpu") , m_irqs(*this, "irqs") @@ -65,7 +65,7 @@ exorterm155_device::exorterm155_device(const machine_config &mconfig, device_typ { } -exorterm155_device::exorterm155_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +exorterm155_device::exorterm155_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : exorterm155_device(mconfig, EXORTERM155, tag, owner, clock) { } @@ -836,7 +836,7 @@ void exorterm155_device::device_add_mconfig(machine_config &config) config.set_default_layout(layout_exorterm155); - ACIA6850(config, m_acia, 0); + ACIA6850(config, m_acia); m_acia->txd_handler().set(FUNC(exorterm155_device::acia_txd_w)); m_acia->rts_handler().set(FUNC(exorterm155_device::acia_rts_w)); m_acia->irq_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); @@ -875,11 +875,11 @@ void exorterm155_device::device_add_mconfig(machine_config &config) m_pia_disp->irqb_handler().set(m_irqs, FUNC(input_merger_device::in_w<6>)); // Derived from the horizontal blanking, 3.4ms. - CLOCK(config, m_sys_timer_clock, 4706 / 16); + CLOCK(config, m_sys_timer_clock, XTAL::u(4706) / 16); m_sys_timer_clock->signal_handler().set(FUNC(exorterm155_device::sys_timer_w)); SPEAKER(config, "bell").front_center(); - BEEP(config, m_beeper, 2000); + BEEP(config, m_beeper, XTAL::u(2000)); m_beeper->add_route(ALL_OUTPUTS, "bell", 0.25); } diff --git a/src/devices/machine/exorterm.h b/src/devices/machine/exorterm.h index 07944bff805..c5f9552d3ed 100644 --- a/src/devices/machine/exorterm.h +++ b/src/devices/machine/exorterm.h @@ -30,7 +30,7 @@ INPUT_PORTS_EXTERN(exorterm155); class exorterm155_device : public device_t { public: - exorterm155_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + exorterm155_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Interface to a RS232 connection. auto rs232_conn_txd_handler() { return m_rs232_conn_txd_handler.bind(); } @@ -43,7 +43,7 @@ public: DECLARE_WRITE_LINE_MEMBER(rs232_conn_rxd_w); protected: - exorterm155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + exorterm155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; virtual void device_start() override; diff --git a/src/devices/machine/f3853.cpp b/src/devices/machine/f3853.cpp index dbea3f30533..24b81bbea56 100644 --- a/src/devices/machine/f3853.cpp +++ b/src/devices/machine/f3853.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(F38T56, f38t56_device, "f38t56_psu", "Fairchild F38T56 PSU") // constructor //------------------------------------------------- -f3853_device::f3853_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +f3853_device::f3853_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_int_req_callback(*this), m_pri_out_callback(*this), @@ -54,29 +54,29 @@ f3853_device::f3853_device(const machine_config &mconfig, device_type type, cons m_external_interrupt_line(false) { } -f3853_device::f3853_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +f3853_device::f3853_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : f3853_device(mconfig, F3853, tag, owner, clock) { } -f3851_device::f3851_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +f3851_device::f3851_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : f3853_device(mconfig, type, tag, owner, clock), m_read_port(*this), m_write_port(*this) { } -f3851_device::f3851_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +f3851_device::f3851_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : f3851_device(mconfig, F3851, tag, owner, clock) { } -f3856_device::f3856_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +f3856_device::f3856_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : f3851_device(mconfig, type, tag, owner, clock) { } -f3856_device::f3856_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +f3856_device::f3856_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : f3856_device(mconfig, F3856, tag, owner, clock) { } -f38t56_device::f38t56_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +f38t56_device::f38t56_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : f3856_device(mconfig, F38T56, tag, owner, clock) { } diff --git a/src/devices/machine/f3853.h b/src/devices/machine/f3853.h index f7d6adb3b5c..22eaae40fb2 100644 --- a/src/devices/machine/f3853.h +++ b/src/devices/machine/f3853.h @@ -67,7 +67,7 @@ class f3853_device : public device_t { public: // construction/destruction - f3853_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + f3853_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_req_callback() { return m_int_req_callback.bind(); } auto pri_out_callback() { return m_pri_out_callback.bind(); } @@ -84,7 +84,7 @@ public: IRQ_CALLBACK_MEMBER(int_acknowledge); protected: - f3853_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + f3853_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -119,7 +119,7 @@ protected: class f3851_device : public f3853_device { public: - f3851_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + f3851_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // interrupt vector is a mask option on 3851 and 3856 void set_int_vector(u16 vector) { m_int_vector = vector; } @@ -134,7 +134,7 @@ public: virtual void write(offs_t offset, uint8_t data) override; protected: - f3851_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + f3851_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; @@ -145,7 +145,7 @@ protected: class f3856_device : public f3851_device { public: - f3856_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + f3856_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; @@ -153,7 +153,7 @@ public: virtual TIMER_CALLBACK_MEMBER(timer_callback) override; protected: - f3856_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + f3856_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -167,7 +167,7 @@ protected: class f38t56_device : public f3856_device { public: - f38t56_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + f38t56_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/machine/f4702.cpp b/src/devices/machine/f4702.cpp index 2a6bf7218c8..c3636003ffb 100644 --- a/src/devices/machine/f4702.cpp +++ b/src/devices/machine/f4702.cpp @@ -75,7 +75,7 @@ DEFINE_DEVICE_TYPE(F4702, f4702_device, "f4702", "Fairchild 4702B Bit Rate Gener // f4702_device - constructor //------------------------------------------------- -f4702_device::f4702_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +f4702_device::f4702_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, F4702, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_s_callback(*this) diff --git a/src/devices/machine/f4702.h b/src/devices/machine/f4702.h index c48601b1e3c..deedce857e5 100644 --- a/src/devices/machine/f4702.h +++ b/src/devices/machine/f4702.h @@ -28,7 +28,7 @@ class f4702_device : public device_t, public device_execute_interface { public: - f4702_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + f4702_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto s_callback() { return m_s_callback.bind(); } diff --git a/src/devices/machine/fdc37c665gt.cpp b/src/devices/machine/fdc37c665gt.cpp index c14e6437d3e..3f58fdb849d 100644 --- a/src/devices/machine/fdc37c665gt.cpp +++ b/src/devices/machine/fdc37c665gt.cpp @@ -22,7 +22,7 @@ SMSC FDC37C665GT High Performance Multi-Mode Parallel Port Super I/O Floppy Disk DEFINE_DEVICE_TYPE(FDC37C665GT, fdc37c665gt_device, "fdc37c665gt", "FDC37C665GT") -fdc37c665gt_device::fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, upd765_family_device::mode_t floppy_mode) +fdc37c665gt_device::fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, upd765_family_device::mode_t floppy_mode) : device_t(mconfig, FDC37C665GT, tag, owner, clock) , mode(OperatingMode::Run) , config_key_step(0) diff --git a/src/devices/machine/fdc37c665gt.h b/src/devices/machine/fdc37c665gt.h index 6b90fc8341e..bbbf62ae0af 100644 --- a/src/devices/machine/fdc37c665gt.h +++ b/src/devices/machine/fdc37c665gt.h @@ -25,11 +25,11 @@ SMSC FDC37C665GT High Performance Multi-Mode Parallel Port Super I/O Floppy Disk class fdc37c665gt_device : public device_t { public: - fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fdc37c665gt_device(mconfig, tag, owner, clock, upd765_family_device::mode_t::AT) { } - fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, upd765_family_device::mode_t floppy_mode); + fdc37c665gt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, upd765_family_device::mode_t floppy_mode); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/machine/fdc37c93x.cpp b/src/devices/machine/fdc37c93x.cpp index 9e76e058a00..0641b1b7d35 100644 --- a/src/devices/machine/fdc37c93x.cpp +++ b/src/devices/machine/fdc37c93x.cpp @@ -15,7 +15,7 @@ SMSC FDC37C93x Plug and Play Compatible Ultra I/O Controller DEFINE_DEVICE_TYPE(FDC37C93X, fdc37c93x_device, "fdc37c93x", "SMSC FDC37C93X") -fdc37c93x_device::fdc37c93x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fdc37c93x_device::fdc37c93x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, FDC37C93X, tag, owner, clock) , device_isa16_card_interface(mconfig, *this) , mode(OperatingMode::Run) @@ -244,7 +244,7 @@ void fdc37c93x_device::floppy_formats(format_registration &fr) void fdc37c93x_device::device_add_mconfig(machine_config &config) { // floppy disc controller - smc37c78_device &fdcdev(SMC37C78(config, floppy_controller_fdcdev, 24'000'000)); + smc37c78_device &fdcdev(SMC37C78(config, floppy_controller_fdcdev, XTAL::u(24'000'000))); fdcdev.intrq_wr_callback().set(FUNC(fdc37c93x_device::irq_floppy_w)); fdcdev.drq_wr_callback().set(FUNC(fdc37c93x_device::drq_floppy_w)); FLOPPY_CONNECTOR(config, "fdc:0", pc_hd_floppies, "35hd", fdc37c93x_device::floppy_formats); diff --git a/src/devices/machine/fdc37c93x.h b/src/devices/machine/fdc37c93x.h index c4305e93b80..6a78f6b1710 100644 --- a/src/devices/machine/fdc37c93x.h +++ b/src/devices/machine/fdc37c93x.h @@ -29,7 +29,7 @@ SMSC FDC37C93x Plug and Play Compatible Ultra I/O Controller class fdc37c93x_device : public device_t, public device_isa16_card_interface { public: - fdc37c93x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fdc37c93x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~fdc37c93x_device() {} // optional information overrides diff --git a/src/devices/machine/fga002.cpp b/src/devices/machine/fga002.cpp index 14ed175fb9e..cf4610a2dd4 100644 --- a/src/devices/machine/fga002.cpp +++ b/src/devices/machine/fga002.cpp @@ -74,7 +74,7 @@ DEFINE_DEVICE_TYPE(FGA002, fga002_device, "fga002", "Force FGA-002") // fga002_device - constructor //------------------------------------------------- -fga002_device::fga002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +fga002_device::fga002_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_out_int_cb(*this) , m_liack4_cb(*this) @@ -87,7 +87,7 @@ fga002_device::fga002_device(const machine_config &mconfig, device_type type, co elem = 0; } -fga002_device::fga002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fga002_device::fga002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : fga002_device(mconfig, FGA002, tag, owner, clock) { } diff --git a/src/devices/machine/fga002.h b/src/devices/machine/fga002.h index 35785189421..0457969ea16 100644 --- a/src/devices/machine/fga002.h +++ b/src/devices/machine/fga002.h @@ -10,7 +10,7 @@ class fga002_device : public device_t { public: // construction/destruction - fga002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fga002_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); @@ -46,7 +46,7 @@ class fga002_device : public device_t // interrupt sources in prio order if on same interrupt level. TODO: Add all sources const static fga_irq_t s_irq_sources[]; - fga002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + fga002_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/machine/fm_scsi.cpp b/src/devices/machine/fm_scsi.cpp index d2b8fcd266f..5b87c8f3bee 100644 --- a/src/devices/machine/fm_scsi.cpp +++ b/src/devices/machine/fm_scsi.cpp @@ -58,7 +58,7 @@ DEFINE_DEVICE_TYPE(FMSCSI, fmscsi_device, "fmscsi", "FM-SCSI") * Device */ -fmscsi_device::fmscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fmscsi_device::fmscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : legacy_scsi_host_adapter(mconfig, FMSCSI, tag, owner, clock), m_irq_handler(*this), m_drq_handler(*this) diff --git a/src/devices/machine/fm_scsi.h b/src/devices/machine/fm_scsi.h index 9a3df8c0ba6..3aa89d69d3f 100644 --- a/src/devices/machine/fm_scsi.h +++ b/src/devices/machine/fm_scsi.h @@ -17,7 +17,7 @@ class fmscsi_device : public legacy_scsi_host_adapter { public: // construction/destruction - fmscsi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fmscsi_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/machine/gayle.cpp b/src/devices/machine/gayle.cpp index 0e55fcd2bb6..22cc7e3fb30 100644 --- a/src/devices/machine/gayle.cpp +++ b/src/devices/machine/gayle.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(GAYLE, gayle_device, "gayle", "Amiga GAYLE") // gayle_device - constructor //------------------------------------------------- -gayle_device::gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gayle_device::gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GAYLE, tag, owner, clock), m_int2_w(*this), m_cs0_read(*this), diff --git a/src/devices/machine/gayle.h b/src/devices/machine/gayle.h index c756e6117b7..ec28f3fac25 100644 --- a/src/devices/machine/gayle.h +++ b/src/devices/machine/gayle.h @@ -24,7 +24,7 @@ class gayle_device : public device_t { public: // construction/destruction - gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gayle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto int2_handler() { return m_int2_w.bind(); } diff --git a/src/devices/machine/gen_fifo.cpp b/src/devices/machine/gen_fifo.cpp index 6dd2c3137d4..81a60a1d051 100644 --- a/src/devices/machine/gen_fifo.cpp +++ b/src/devices/machine/gen_fifo.cpp @@ -4,7 +4,7 @@ #include "emu.h" #include "gen_fifo.h" -template<typename T> generic_fifo_device_base<T>::generic_fifo_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +template<typename T> generic_fifo_device_base<T>::generic_fifo_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), m_empty_cb(*this), m_full_cb(*this), @@ -192,7 +192,7 @@ template<typename T> void generic_fifo_device_base<T>::push(T t) template class generic_fifo_device_base<u32>; -generic_fifo_u32_device::generic_fifo_u32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +generic_fifo_u32_device::generic_fifo_u32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_fifo_device_base<u32>(mconfig, GENERIC_FIFO_U32, tag, owner, clock) { } diff --git a/src/devices/machine/gen_fifo.h b/src/devices/machine/gen_fifo.h index 8e27ef73b6a..fef4b5980fe 100644 --- a/src/devices/machine/gen_fifo.h +++ b/src/devices/machine/gen_fifo.h @@ -133,7 +133,7 @@ public: } protected: - generic_fifo_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + generic_fifo_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual ~generic_fifo_device_base() = default; /* These used to build memory accessors that can be put in a @@ -205,7 +205,7 @@ private: class generic_fifo_u32_device : public generic_fifo_device_base<u32> { public: - generic_fifo_u32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_fifo_u32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~generic_fifo_u32_device() = default; u32 read() { return read_gen<u32>(); } diff --git a/src/devices/machine/gen_latch.cpp b/src/devices/machine/gen_latch.cpp index 10caccd4c7c..1e82ecc677b 100644 --- a/src/devices/machine/gen_latch.cpp +++ b/src/devices/machine/gen_latch.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(GENERIC_LATCH_16, generic_latch_16_device, "generic_latch_16" // generic_latch_base_device - constructor //------------------------------------------------- -generic_latch_base_device::generic_latch_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +generic_latch_base_device::generic_latch_base_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_separate_acknowledge(false), m_latch_written(false), @@ -110,7 +110,7 @@ void generic_latch_base_device::acknowledge_w(u8 data) // generic_latch_8_device - constructor //------------------------------------------------- -generic_latch_8_device::generic_latch_8_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +generic_latch_8_device::generic_latch_8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_latch_base_device(mconfig, GENERIC_LATCH_8, tag, owner, clock), m_latched_value(0) { @@ -181,7 +181,7 @@ void generic_latch_8_device::device_start() // generic_latch_16_device - constructor //------------------------------------------------- -generic_latch_16_device::generic_latch_16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +generic_latch_16_device::generic_latch_16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_latch_base_device(mconfig, GENERIC_LATCH_16, tag, owner, clock), m_latched_value(0) { diff --git a/src/devices/machine/gen_latch.h b/src/devices/machine/gen_latch.h index fc217410d06..9aa66bd45f0 100644 --- a/src/devices/machine/gen_latch.h +++ b/src/devices/machine/gen_latch.h @@ -41,7 +41,7 @@ public: protected: // construction/destruction - generic_latch_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + generic_latch_base_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; @@ -65,7 +65,7 @@ class generic_latch_8_device : public generic_latch_base_device { public: // construction/destruction - generic_latch_8_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + generic_latch_8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); u8 read(); void write(u8 data); @@ -91,7 +91,7 @@ class generic_latch_16_device : public generic_latch_base_device { public: // construction/destruction - generic_latch_16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + generic_latch_16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); u16 read(); void write(u16 data); diff --git a/src/devices/machine/generalplus_gpl16250soc.cpp b/src/devices/machine/generalplus_gpl16250soc.cpp index 7718c586d43..cc2fb07ee65 100644 --- a/src/devices/machine/generalplus_gpl16250soc.cpp +++ b/src/devices/machine/generalplus_gpl16250soc.cpp @@ -25,14 +25,14 @@ DEFINE_DEVICE_TYPE(GCM394, sunplus_gcm394_device, "gcm394", "GeneralPlus GPL16250 System-on-a-Chip") -sunplus_gcm394_device::sunplus_gcm394_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sunplus_gcm394_device::sunplus_gcm394_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sunplus_gcm394_base_device(mconfig, GCM394, tag, owner, clock) { } DEFINE_DEVICE_TYPE(GPAC800, generalplus_gpac800_device, "gpac800", "GeneralPlus GPL16250 System-on-a-Chip (with NAND handling)") -generalplus_gpac800_device::generalplus_gpac800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +generalplus_gpac800_device::generalplus_gpac800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sunplus_gcm394_base_device(mconfig, GPAC800, tag, owner, clock, address_map_constructor(FUNC(generalplus_gpac800_device::gpac800_internal_map), this)) { } @@ -40,7 +40,7 @@ generalplus_gpac800_device::generalplus_gpac800_device(const machine_config &mco DEFINE_DEVICE_TYPE(GP_SPISPI, generalplus_gpspispi_device, "gpac800spi", "GeneralPlus GPL16250 (with SPI handling)") -generalplus_gpspispi_device::generalplus_gpspispi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +generalplus_gpspispi_device::generalplus_gpspispi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sunplus_gcm394_base_device(mconfig, GP_SPISPI, tag, owner, clock, address_map_constructor(FUNC(generalplus_gpspispi_device::gpspispi_internal_map), this)) { } @@ -154,7 +154,7 @@ void generalplus_gpspi_direct_device::gpspi_direct_internal_map(address_map& map DEFINE_DEVICE_TYPE(GP_SPI_DIRECT, generalplus_gpspi_direct_device, "gpac800spi_direct", "GeneralPlus GPL16250 (with direct SPI handling)") -generalplus_gpspi_direct_device::generalplus_gpspi_direct_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +generalplus_gpspi_direct_device::generalplus_gpspi_direct_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sunplus_gcm394_base_device(mconfig, GP_SPI_DIRECT, tag, owner, clock, address_map_constructor(FUNC(generalplus_gpspi_direct_device::gpspi_direct_internal_map), this)) { } diff --git a/src/devices/machine/generalplus_gpl16250soc.h b/src/devices/machine/generalplus_gpl16250soc.h index 214cc7e8ace..cc31af03405 100644 --- a/src/devices/machine/generalplus_gpl16250soc.h +++ b/src/devices/machine/generalplus_gpl16250soc.h @@ -22,12 +22,12 @@ typedef device_delegate<void (uint16_t, uint16_t, uint16_t, uint16_t, uint16_t)> class sunplus_gcm394_base_device : public unsp_20_device, public device_mixer_interface { public: - sunplus_gcm394_base_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) : + sunplus_gcm394_base_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock) : sunplus_gcm394_base_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(sunplus_gcm394_base_device::gcm394_internal_map), this)) { } - sunplus_gcm394_base_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock, address_map_constructor internal) : + sunplus_gcm394_base_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, const XTAL &clock, address_map_constructor internal) : unsp_20_device(mconfig, type, tag, owner, clock, internal), device_mixer_interface(mconfig, *this, 2), m_screen(*this, finder_base::DUMMY_TAG), @@ -377,13 +377,13 @@ class sunplus_gcm394_device : public sunplus_gcm394_base_device { public: template <typename T> - sunplus_gcm394_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) : + sunplus_gcm394_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : sunplus_gcm394_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward<T>(screen_tag)); } - sunplus_gcm394_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sunplus_gcm394_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -391,14 +391,14 @@ class generalplus_gpac800_device : public sunplus_gcm394_base_device { public: template <typename T> - generalplus_gpac800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) : + generalplus_gpac800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : generalplus_gpac800_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward<T>(screen_tag)); m_csbase = 0x30000; } - generalplus_gpac800_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generalplus_gpac800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void gpac800_internal_map(address_map &map); @@ -446,14 +446,14 @@ class generalplus_gpspispi_device : public sunplus_gcm394_base_device { public: template <typename T> - generalplus_gpspispi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) : + generalplus_gpspispi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : generalplus_gpspispi_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward<T>(screen_tag)); m_csbase = 0x30000; } - generalplus_gpspispi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generalplus_gpspispi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void gpspispi_internal_map(address_map &map); @@ -469,7 +469,7 @@ class generalplus_gpspi_direct_device : public sunplus_gcm394_base_device { public: template <typename T> - generalplus_gpspi_direct_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) : + generalplus_gpspi_direct_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : generalplus_gpspi_direct_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward<T>(screen_tag)); @@ -478,7 +478,7 @@ public: m_csbase = 0xffffffff; } - generalplus_gpspi_direct_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generalplus_gpspi_direct_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: void gpspi_direct_internal_map(address_map &map); diff --git a/src/devices/machine/generalplus_gpl16250soc_video.cpp b/src/devices/machine/generalplus_gpl16250soc_video.cpp index 7d2b7f68385..cb23ebab314 100644 --- a/src/devices/machine/generalplus_gpl16250soc_video.cpp +++ b/src/devices/machine/generalplus_gpl16250soc_video.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(GCM394_VIDEO, gcm394_video_device, "gcm394_video", "GeneralPl #include "logmacro.h" -gcm394_base_video_device::gcm394_base_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +gcm394_base_video_device::gcm394_base_video_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_video_interface(mconfig, *this), m_cpu(*this, finder_base::DUMMY_TAG), @@ -43,7 +43,7 @@ gcm394_base_video_device::gcm394_base_video_device(const machine_config &mconfig { } -gcm394_video_device::gcm394_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +gcm394_video_device::gcm394_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gcm394_base_video_device(mconfig, GCM394_VIDEO, tag, owner, clock) { } @@ -1157,7 +1157,7 @@ void gcm394_base_video_device::device_add_mconfig(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xRGB_555, 256*0x10); GFXDECODE(config, m_gfxdecode, m_palette, gfx); - SPG_RENDERER(config, m_renderer, 0); + SPG_RENDERER(config, m_renderer); } diff --git a/src/devices/machine/generalplus_gpl16250soc_video.h b/src/devices/machine/generalplus_gpl16250soc_video.h index 22b4275a990..8a3d9046fe0 100644 --- a/src/devices/machine/generalplus_gpl16250soc_video.h +++ b/src/devices/machine/generalplus_gpl16250soc_video.h @@ -19,7 +19,7 @@ class gcm394_base_video_device : public device_t, public device_video_interface { public: - gcm394_base_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gcm394_base_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank); @@ -245,14 +245,14 @@ class gcm394_video_device : public gcm394_base_video_device { public: template <typename T, typename U> - gcm394_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&screen_tag) + gcm394_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&screen_tag) : gcm394_video_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward<T>(cpu_tag)); m_screen.set_tag(std::forward<U>(screen_tag)); } - gcm394_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + gcm394_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(GCM394_VIDEO, gcm394_video_device) diff --git a/src/devices/machine/genpc.cpp b/src/devices/machine/genpc.cpp index 5c5d19cdbb3..6f98487bd9f 100644 --- a/src/devices/machine/genpc.cpp +++ b/src/devices/machine/genpc.cpp @@ -455,7 +455,7 @@ void ibm5160_mb_device::device_add_mconfig(machine_config &config) m_ppi8255->out_pb_callback().set(FUNC(ibm5160_mb_device::pc_ppi_portb_w)); m_ppi8255->in_pc_callback().set(FUNC(ibm5160_mb_device::pc_ppi_portc_r)); - ISA8(config, m_isabus, 0); + ISA8(config, m_isabus); m_isabus->set_memspace(":maincpu", AS_PROGRAM); m_isabus->set_iospace(":maincpu", AS_IO); m_isabus->irq2_callback().set(m_pic8259, FUNC(pic8259_device::ir2_w)); @@ -517,7 +517,7 @@ ioport_constructor ibm5160_mb_device::device_input_ports() const // ibm5160_mb_device - constructor //------------------------------------------------- -ibm5160_mb_device::ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ibm5160_mb_device::ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm5160_mb_device(mconfig, IBM5160_MOTHERBOARD, tag, owner, clock) { } @@ -697,12 +697,12 @@ ioport_constructor ibm5150_mb_device::device_input_ports() const // ibm5150_mb_device - constructor //------------------------------------------------- -ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm5150_mb_device(mconfig, IBM5150_MOTHERBOARD, tag, owner, clock) { } -ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ibm5150_mb_device::ibm5150_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ibm5160_mb_device(mconfig, type, tag, owner, clock) , m_cassette(*this, "cassette") { @@ -858,7 +858,7 @@ ioport_constructor ec1840_mb_device::device_input_ports() const // ec1840_mb_device - constructor //------------------------------------------------- -ec1840_mb_device::ec1840_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ec1840_mb_device::ec1840_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ec1841_mb_device(mconfig, EC1840_MOTHERBOARD, tag, owner, clock) { } @@ -970,12 +970,12 @@ ioport_constructor ec1841_mb_device::device_input_ports() const // ec1841_mb_device - constructor //------------------------------------------------- -ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm5160_mb_device(mconfig, EC1841_MOTHERBOARD, tag, owner, clock) { } -ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ec1841_mb_device::ec1841_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ibm5160_mb_device(mconfig, type, tag, owner, clock) { } @@ -1025,12 +1025,12 @@ uint8_t ec1841_mb_device::pc_ppi_portc_r() return data; } -pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_noppi_mb_device(mconfig, PCNOPPI_MOTHERBOARD, tag, owner, clock) { } -pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ibm5160_mb_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/machine/genpc.h b/src/devices/machine/genpc.h index 8e836aae807..35d64eff0cb 100644 --- a/src/devices/machine/genpc.h +++ b/src/devices/machine/genpc.h @@ -27,7 +27,7 @@ class ibm5160_mb_device : public device_t { public: // construction/destruction - ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ibm5160_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration template <typename T> void set_cputag(T &&tag) @@ -61,7 +61,7 @@ public: DECLARE_WRITE_LINE_MEMBER( keyboard_data_w ); protected: - ibm5160_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ibm5160_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -143,14 +143,14 @@ class ibm5150_mb_device : public ibm5160_mb_device { public: // construction/destruction - ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ibm5150_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); virtual DECLARE_WRITE_LINE_MEMBER( pc_pit8253_out2_changed ) override; protected: - ibm5150_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ibm5150_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; @@ -173,12 +173,12 @@ class ec1841_mb_device : public ibm5160_mb_device { public: // construction/destruction - ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ec1841_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( keyboard_clock_w ); protected: - ec1841_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ec1841_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // optional information overrides virtual void device_add_mconfig(machine_config &config) override; @@ -197,7 +197,7 @@ class ec1840_mb_device : public ec1841_mb_device { public: // construction/destruction - ec1840_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ec1840_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // optional information overrides @@ -217,7 +217,7 @@ class pc_noppi_mb_device : public ibm5160_mb_device { public: // construction/destruction - pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pc_noppi_mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t pit_out2() { return m_pit_out2; } // helper for near-clones with multifunction ics instead of 8255s @@ -226,7 +226,7 @@ public: uint8_t pc_ppi_portb_r(); protected: - pc_noppi_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pc_noppi_mb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/machine/gt64xxx.cpp b/src/devices/machine/gt64xxx.cpp index ea16a9b0573..d6cb8171726 100644 --- a/src/devices/machine/gt64xxx.cpp +++ b/src/devices/machine/gt64xxx.cpp @@ -164,7 +164,7 @@ void gt64xxx_device::cpu_map(address_map &map) map(0x00000000, 0x00000cff).rw(FUNC(gt64xxx_device::cpu_if_r), FUNC(gt64xxx_device::cpu_if_w)); } -gt64xxx_device::gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +gt64xxx_device::gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, type, tag, owner, clock) , m_cpu(*this, finder_base::DUMMY_TAG), m_be(0), m_autoconfig(0), m_irq_num(-1) , m_mem_config("memory_space", ENDIANNESS_LITTLE, 32, 32) diff --git a/src/devices/machine/gt64xxx.h b/src/devices/machine/gt64xxx.h index 644d101c72e..7c85f082623 100644 --- a/src/devices/machine/gt64xxx.h +++ b/src/devices/machine/gt64xxx.h @@ -69,7 +69,7 @@ public: virtual void device_post_load() override; protected: - gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + gt64xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); address_space *m_cpu_space; virtual space_config_vector memory_space_config() const override; @@ -155,14 +155,14 @@ private: class gt64010_device : public gt64xxx_device { public: template <typename T> - gt64010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int irq_num) + gt64010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, int irq_num) : gt64010_device(mconfig, tag, owner, clock) { set_ids_host(0x11ab0146, 0x03, 0x00000000); set_cpu_tag(std::forward<T>(cpu_tag)); set_irq_num(irq_num); } - gt64010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + gt64010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gt64xxx_device(mconfig, GT64010, tag, owner, clock) {} }; @@ -173,14 +173,14 @@ public: class gt64111_device : public gt64xxx_device { public: template <typename T> - gt64111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int irq_num) + gt64111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, int irq_num) : gt64111_device(mconfig, tag, owner, clock) { set_ids(0x414611ab, 0x10, 0x058000, 0x00000000); set_cpu_tag(std::forward<T>(cpu_tag)); set_irq_num(irq_num); } - gt64111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + gt64111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : gt64xxx_device(mconfig, GT64111, tag, owner, clock) {} }; diff --git a/src/devices/machine/gt913_io.cpp b/src/devices/machine/gt913_io.cpp index d1b091fa308..feaab0c4032 100644 --- a/src/devices/machine/gt913_io.cpp +++ b/src/devices/machine/gt913_io.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(GT913_IO_HLE, gt913_io_hle_device, "gt913_io_hle", "Casio GT913F I/O (HLE)") -gt913_io_hle_device::gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gt913_io_hle_device::gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GT913_IO_HLE, tag, owner, clock), m_cpu(*this, DEVICE_SELF_OWNER), m_cpu_io(nullptr), m_intc(nullptr), m_intc_tag(nullptr) diff --git a/src/devices/machine/gt913_io.h b/src/devices/machine/gt913_io.h index 335c7b2719f..16f118afe48 100644 --- a/src/devices/machine/gt913_io.h +++ b/src/devices/machine/gt913_io.h @@ -21,9 +21,9 @@ class gt913_io_hle_device : public device_t { public: // construction/destruction - gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); gt913_io_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *intc, int t0irq, int t1irq) - : gt913_io_hle_device(mconfig, tag, owner, 0) + : gt913_io_hle_device(mconfig, tag, owner) { m_intc_tag = intc; m_timer_irq[0] = t0irq; diff --git a/src/devices/machine/gt913_kbd.cpp b/src/devices/machine/gt913_kbd.cpp index ba7a2ff521c..35c73ce18a3 100644 --- a/src/devices/machine/gt913_kbd.cpp +++ b/src/devices/machine/gt913_kbd.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(GT913_KBD_HLE, gt913_kbd_hle_device, "gt913_kbd_hle", "Casio GT913F keyboard controller (HLE)") -gt913_kbd_hle_device::gt913_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +gt913_kbd_hle_device::gt913_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GT913_KBD_HLE, tag, owner, clock), device_matrix_keyboard_interface(mconfig, *this, "FI0", "FI1", "FI2", "FI3", "FI4", "FI5", "FI6", "FI7", "FI8", "FI9", "FI10", "KI0", "KI1", "KI2"), m_velocity(*this, "VELOCITY"), diff --git a/src/devices/machine/gt913_kbd.h b/src/devices/machine/gt913_kbd.h index 3bf2ced327e..0a1e64907d0 100644 --- a/src/devices/machine/gt913_kbd.h +++ b/src/devices/machine/gt913_kbd.h @@ -21,7 +21,7 @@ class gt913_kbd_hle_device : public device_t, protected device_matrix_keyboard_i { public: // construction/destruction - gt913_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + gt913_kbd_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_cb() { return m_irq_cb.bind(); } diff --git a/src/devices/machine/gt913_snd.cpp b/src/devices/machine/gt913_snd.cpp index 803e6443278..9d5ecbd84e0 100644 --- a/src/devices/machine/gt913_snd.cpp +++ b/src/devices/machine/gt913_snd.cpp @@ -52,7 +52,7 @@ const u16 gt913_sound_device::volume_ramp[17] = 0x8000 }; -gt913_sound_device::gt913_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +gt913_sound_device::gt913_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, GT913_SOUND, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) diff --git a/src/devices/machine/gt913_snd.h b/src/devices/machine/gt913_snd.h index 4c5bfd4a153..0f32647f413 100644 --- a/src/devices/machine/gt913_snd.h +++ b/src/devices/machine/gt913_snd.h @@ -25,7 +25,7 @@ public: static constexpr feature_type imperfect_features() { return feature::SOUND; } // construction/destruction - gt913_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + gt913_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void data_w(offs_t offset, u16 data); u16 data_r(offs_t offset); diff --git a/src/devices/machine/hd63450.cpp b/src/devices/machine/hd63450.cpp index 5006729badf..b72cbd193fa 100644 --- a/src/devices/machine/hd63450.cpp +++ b/src/devices/machine/hd63450.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(HD63450, hd63450_device, "hd63450", "Hitachi HD63450 DMAC") -hd63450_device::hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd63450_device::hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HD63450, tag, owner, clock) , m_irq_callback(*this) , m_dma_end(*this) diff --git a/src/devices/machine/hd63450.h b/src/devices/machine/hd63450.h index 33ffd8b1097..37056056e61 100644 --- a/src/devices/machine/hd63450.h +++ b/src/devices/machine/hd63450.h @@ -12,13 +12,13 @@ class hd63450_device : public device_t { public: template <typename T> - hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cputag) + hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cputag) : hd63450_device(mconfig, tag, owner, clock) { set_cpu_tag(std::forward<T>(cputag)); } - hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd63450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return m_irq_callback.bind(); } auto dma_end() { return m_dma_end.bind(); } diff --git a/src/devices/machine/hd64610.cpp b/src/devices/machine/hd64610.cpp index 2a2c3064705..876cc9ec4ea 100644 --- a/src/devices/machine/hd64610.cpp +++ b/src/devices/machine/hd64610.cpp @@ -153,7 +153,7 @@ inline void hd64610_device::check_alarm() // hd64610_device - constructor //------------------------------------------------- -hd64610_device::hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd64610_device::hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, HD64610, tag, owner, clock), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/machine/hd64610.h b/src/devices/machine/hd64610.h index 9dda6ed03e5..877fbb0a6d6 100644 --- a/src/devices/machine/hd64610.h +++ b/src/devices/machine/hd64610.h @@ -34,7 +34,7 @@ class hd64610_device : public device_t, { public: // construction/destruction - hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd64610_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_out_irq_cb.bind(); } auto clkout() { return m_out_1hz_cb.bind(); } diff --git a/src/devices/machine/hdc92x4.cpp b/src/devices/machine/hdc92x4.cpp index 1abdcf02abc..5394285e72b 100644 --- a/src/devices/machine/hdc92x4.cpp +++ b/src/devices/machine/hdc92x4.cpp @@ -466,7 +466,7 @@ const hdc92x4_device::cmddef hdc92x4_device::s_command[] = /* Standard constructor for the base class and the two variants */ -hdc92x4_device::hdc92x4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_hdc9234) +hdc92x4_device::hdc92x4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_hdc9234) : device_t(mconfig, type, tag, owner, clock), m_is_hdc9234(is_hdc9234), m_out_intrq(*this), @@ -479,12 +479,12 @@ hdc92x4_device::hdc92x4_device(const machine_config &mconfig, device_type type, { } -hdc9224_device::hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hdc9224_device::hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hdc92x4_device(mconfig, HDC9224, tag, owner, clock, false) { } -hdc9234_device::hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hdc9234_device::hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hdc92x4_device(mconfig, HDC9234, tag, owner, clock, true) { } diff --git a/src/devices/machine/hdc92x4.h b/src/devices/machine/hdc92x4.h index 4527efc6c91..790c6bf62c1 100644 --- a/src/devices/machine/hdc92x4.h +++ b/src/devices/machine/hdc92x4.h @@ -78,7 +78,7 @@ public: void connect_hard_drive(mfm_harddisk_device *harddisk); protected: - hdc92x4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_hdc9234); + hdc92x4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_hdc9234); virtual void device_start() override; virtual void device_reset() override; @@ -462,7 +462,7 @@ private: class hdc9224_device : public hdc92x4_device { public: - hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hdc9224_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int step_time() override; @@ -472,7 +472,7 @@ protected: class hdc9234_device : public hdc92x4_device { public: - hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hdc9234_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int step_time() override; diff --git a/src/devices/machine/hp_dc100_tape.cpp b/src/devices/machine/hp_dc100_tape.cpp index 2afd9d78beb..57118c24d8c 100644 --- a/src/devices/machine/hp_dc100_tape.cpp +++ b/src/devices/machine/hp_dc100_tape.cpp @@ -71,7 +71,7 @@ DEFINE_DEVICE_TYPE(HP_DC100_TAPE, hp_dc100_tape_device, "hp_dc100_tape", "HP DC1 constexpr double MOTION_MARGIN = 1e-5; // Margin to ensure motion events have passed when timer expires (10 µs) constexpr hti_format_t::tape_pos_t TAPE_INIT_POS = 80 * hti_format_t::ONE_INCH_POS; // Initial tape position: 80" from beginning (just past the punched part) -hp_dc100_tape_device::hp_dc100_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_dc100_tape_device::hp_dc100_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : microtape_image_device(mconfig, HP_DC100_TAPE, tag, owner, clock) , m_cart_out_handler(*this) , m_hole_handler(*this) diff --git a/src/devices/machine/hp_dc100_tape.h b/src/devices/machine/hp_dc100_tape.h index fd8ff3b5425..5cf1c0868a8 100644 --- a/src/devices/machine/hp_dc100_tape.h +++ b/src/devices/machine/hp_dc100_tape.h @@ -21,7 +21,7 @@ class hp_dc100_tape_device : public microtape_image_device { public: // Construction - hp_dc100_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_dc100_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device_image_interface overrides virtual image_init_result call_load() override; diff --git a/src/devices/machine/hp_taco.cpp b/src/devices/machine/hp_taco.cpp index 8896edf0fc2..b84a7116ad9 100644 --- a/src/devices/machine/hp_taco.cpp +++ b/src/devices/machine/hp_taco.cpp @@ -274,7 +274,7 @@ enum cmd_t : uint8_t { DEFINE_DEVICE_TYPE(HP_TACO, hp_taco_device, "hp_taco", "HP TACO") // Constructors -hp_taco_device::hp_taco_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +hp_taco_device::hp_taco_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_tape(*this, "drive") , m_irq_handler(*this) @@ -283,7 +283,7 @@ hp_taco_device::hp_taco_device(const machine_config &mconfig, device_type type, { } -hp_taco_device::hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hp_taco_device::hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hp_taco_device(mconfig, HP_TACO, tag, owner, clock) { } @@ -543,7 +543,7 @@ READ_LINE_MEMBER(hp_taco_device::wr_bit_r) void hp_taco_device::device_add_mconfig(machine_config &config) { - HP_DC100_TAPE(config, m_tape, 0); + HP_DC100_TAPE(config, m_tape); m_tape->set_acceleration(ACCELERATION); m_tape->set_set_points(SLOW_SPEED, FAST_SPEED); m_tape->set_tick_size(TACH_TICK_LEN); diff --git a/src/devices/machine/hp_taco.h b/src/devices/machine/hp_taco.h index f409946a988..4ff6eaeec6c 100644 --- a/src/devices/machine/hp_taco.h +++ b/src/devices/machine/hp_taco.h @@ -20,7 +20,7 @@ class hp_taco_device : public device_t { public: // construction/destruction - hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq() { return m_irq_handler.bind(); } @@ -46,7 +46,7 @@ public: DECLARE_READ_LINE_MEMBER(wr_bit_r); protected: - hp_taco_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + hp_taco_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/machine/i2cmem.cpp b/src/devices/machine/i2cmem.cpp index 2db16de0899..102ef7f2373 100644 --- a/src/devices/machine/i2cmem.cpp +++ b/src/devices/machine/i2cmem.cpp @@ -122,68 +122,68 @@ i2cmem_device::i2cmem_device( assert(!clock); } -i2c_x24c01_device::i2c_x24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i2c_x24c01_device::i2c_x24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_X24C01, tag, owner, clock, 0, 8, 0x80) { set_devsel_address_low(true); } -i2c_24c01_device::i2c_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i2c_24c01_device::i2c_24c01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C01, tag, owner, clock, 0, 8, 0x80) { } -i2c_pcf8570_device::i2c_pcf8570_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_pcf8570_device::i2c_pcf8570_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_PCF8570, tag, owner, clock, 0, 0, 0x100) { } -i2c_pcd8572_device::i2c_pcd8572_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_pcd8572_device::i2c_pcd8572_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_PCD8572, tag, owner, clock, 0, 0, 0x80) { } -i2c_pcf8582_device::i2c_pcf8582_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_pcf8582_device::i2c_pcf8582_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_PCF8582, tag, owner, clock, 0, 0, 0x100) { } -i2c_24c02_device::i2c_24c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i2c_24c02_device::i2c_24c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C02, tag, owner, clock, 0, 8, 0x100) { } -i2c_m24c02_device::i2c_m24c02_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_m24c02_device::i2c_m24c02_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_M24C02, tag, owner, clock, 0, 16, 0x100) { } -i2c_24c04_device::i2c_24c04_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_24c04_device::i2c_24c04_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C04, tag, owner, clock, 0, 16, 0x200) { } -i2c_x2404p_device::i2c_x2404p_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_x2404p_device::i2c_x2404p_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_X2404P, tag, owner, clock, 0x100, 8, 0x200) { } -i2c_24c08_device::i2c_24c08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i2c_24c08_device::i2c_24c08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C08, tag, owner, clock, 0, 16, 0x400) { } -i2c_24c16_device::i2c_24c16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i2c_24c16_device::i2c_24c16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C16, tag, owner, clock, 0, 16, 0x800) { } -i2c_24c64_device::i2c_24c64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i2c_24c64_device::i2c_24c64_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C64, tag, owner, clock, 0, 32, 0x2000) { } -i2c_24c512_device::i2c_24c512_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : +i2c_24c512_device::i2c_24c512_device(const machine_config& mconfig, const char* tag, device_t* owner, const XTAL &clock) : i2cmem_device(mconfig, I2C_24C512, tag, owner, clock, 0, 128, 0x10000) { } diff --git a/src/devices/machine/i2cmem.h b/src/devices/machine/i2cmem.h index 9ea431faab2..f8f2faa2630 100644 --- a/src/devices/machine/i2cmem.h +++ b/src/devices/machine/i2cmem.h @@ -50,7 +50,7 @@ public: protected: // construction/destruction - i2cmem_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int read_page_size, int write_page_size, int data_size); + i2cmem_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int read_page_size, int write_page_size, int data_size); // device-level overrides virtual void device_start() override; @@ -100,7 +100,7 @@ protected: class i2c_##name##_device : public i2cmem_device \ { \ public: \ - i2c_##name##_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); \ + i2c_##name##_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); \ }; DECLARE_I2C_DEVICE(x24c01); diff --git a/src/devices/machine/i6300esb.cpp b/src/devices/machine/i6300esb.cpp index 3e9d8089b40..d2938e74e82 100644 --- a/src/devices/machine/i6300esb.cpp +++ b/src/devices/machine/i6300esb.cpp @@ -10,7 +10,7 @@ void i6300esb_watchdog_device::map(address_map &map) { } -i6300esb_watchdog_device::i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i6300esb_watchdog_device::i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, I6300ESB_WATCHDOG, tag, owner, clock) { } @@ -89,7 +89,7 @@ void i6300esb_lpc_device::internal_io_map(address_map &map) } -i6300esb_lpc_device::i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i6300esb_lpc_device::i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, I6300ESB_LPC, tag, owner, clock) , acpi(*this, "acpi") , rtc (*this, "rtc") diff --git a/src/devices/machine/i6300esb.h b/src/devices/machine/i6300esb.h index a126a5c1735..de9c313a30c 100644 --- a/src/devices/machine/i6300esb.h +++ b/src/devices/machine/i6300esb.h @@ -12,7 +12,7 @@ class i6300esb_lpc_device : public pci_device { public: - i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i6300esb_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void reset_all_mappings() override; virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, @@ -138,12 +138,12 @@ private: class i6300esb_watchdog_device : public pci_device { public: - i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subdevice_id) + i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subdevice_id) : i6300esb_watchdog_device(mconfig, tag, owner, clock) { set_ids(0x808625ab, 0x02, 0x088000, subdevice_id); } - i6300esb_watchdog_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i6300esb_watchdog_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/machine/i7220.cpp b/src/devices/machine/i7220.cpp index 9d9c788759f..02df85b266f 100644 --- a/src/devices/machine/i7220.cpp +++ b/src/devices/machine/i7220.cpp @@ -60,7 +60,7 @@ DEFINE_DEVICE_TYPE(I7220, i7220_device, "i7220", "Intel 7220 BMC") // i7220_device - constructor //------------------------------------------------- -i7220_device::i7220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i7220_device::i7220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I7220, tag, owner, clock) , device_image_interface(mconfig, *this) , intrq_cb(*this) diff --git a/src/devices/machine/i7220.h b/src/devices/machine/i7220.h index f961d64559e..6e4f47195dc 100644 --- a/src/devices/machine/i7220.h +++ b/src/devices/machine/i7220.h @@ -42,7 +42,7 @@ class i7220_device : public device_t, { public: // construction/destruction - i7220_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i7220_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return intrq_cb.bind(); } auto drq_callback() { return drq_cb.bind(); } diff --git a/src/devices/machine/i80130.cpp b/src/devices/machine/i80130.cpp index b9b632b93e1..ce13a815010 100644 --- a/src/devices/machine/i80130.cpp +++ b/src/devices/machine/i80130.cpp @@ -102,10 +102,10 @@ void i80130_device::io_w(offs_t offset, uint16_t data, uint16_t mem_mask) void i80130_device::device_add_mconfig(machine_config &config) { - PIC8259(config, m_pic, 0); + PIC8259(config, m_pic); m_pic->out_int_callback().set(FUNC(i80130_device::irq_w)); - PIT8254(config, m_pit, 0); + PIT8254(config, m_pit); m_pit->set_clk<0>(0); m_pit->out_handler<0>().set(FUNC(i80130_device::systick_w)); m_pit->set_clk<1>(0); @@ -124,7 +124,7 @@ void i80130_device::device_add_mconfig(machine_config &config) // i80130_device - constructor //------------------------------------------------- -i80130_device::i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i80130_device::i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I80130, tag, owner, clock), m_pic(*this, "pic"), m_pit(*this, "pit"), diff --git a/src/devices/machine/i80130.h b/src/devices/machine/i80130.h index 0b5958ad875..d067913ad65 100644 --- a/src/devices/machine/i80130.h +++ b/src/devices/machine/i80130.h @@ -18,7 +18,7 @@ class i80130_device : public device_t { public: // construction/destruction - i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i80130_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_write_irq.bind(); } auto ack() { return m_write_ack.bind(); } diff --git a/src/devices/machine/i8087.cpp b/src/devices/machine/i8087.cpp index 4235d734d7e..2d4bd048ac5 100644 --- a/src/devices/machine/i8087.cpp +++ b/src/devices/machine/i8087.cpp @@ -167,7 +167,7 @@ static inline floatx80 double_to_fx80(double in) DEFINE_DEVICE_TYPE(I8087, i8087_device, "i8087", "Intel 8087") -i8087_device::i8087_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +i8087_device::i8087_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_space(*this, finder_base::DUMMY_TAG, -1), m_int_handler(*this), @@ -175,7 +175,7 @@ i8087_device::i8087_device(const machine_config &mconfig, device_type type, cons { } -i8087_device::i8087_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +i8087_device::i8087_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8087_device(mconfig, I8087, tag, owner, clock) { } diff --git a/src/devices/machine/i8087.h b/src/devices/machine/i8087.h index af3dea07f08..925288e188e 100644 --- a/src/devices/machine/i8087.h +++ b/src/devices/machine/i8087.h @@ -13,7 +13,7 @@ DECLARE_DEVICE_TYPE(I8087, i8087_device) class i8087_device : public device_t { public: - i8087_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i8087_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <class Object> void set_space_88(Object &&tag, int spacenum) { m_space.set_tag(std::forward<Object>(tag), spacenum); m_space.set_data_width(8); } template <class Object> void set_space_86(Object &&tag, int spacenum) { m_space.set_tag(std::forward<Object>(tag), spacenum); m_space.set_data_width(16); } auto irq() { return m_int_handler.bind(); } @@ -23,7 +23,7 @@ public: void addr_w(uint32_t data); protected: - i8087_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + i8087_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; diff --git a/src/devices/machine/i8155.cpp b/src/devices/machine/i8155.cpp index 810bb001e67..bf3a035c0fb 100644 --- a/src/devices/machine/i8155.cpp +++ b/src/devices/machine/i8155.cpp @@ -268,12 +268,12 @@ inline void i8155_device::write_port(int port, uint8_t data) // i8155_device - constructor //------------------------------------------------- -i8155_device::i8155_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8155_device::i8155_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8155_device(mconfig, I8155, tag, owner, clock) { } -i8155_device::i8155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +i8155_device::i8155_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_in_pa_cb(*this), m_in_pb_cb(*this), @@ -296,7 +296,7 @@ i8155_device::i8155_device(const machine_config &mconfig, device_type type, cons // i8156_device - constructor //------------------------------------------------- -i8156_device::i8156_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8156_device::i8156_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8155_device(mconfig, I8156, tag, owner, clock) { } diff --git a/src/devices/machine/i8155.h b/src/devices/machine/i8155.h index ace27e002c9..c95d23f8159 100644 --- a/src/devices/machine/i8155.h +++ b/src/devices/machine/i8155.h @@ -45,7 +45,7 @@ class i8155_device : public device_t { public: // construction/destruction - i8155_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8155_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_pa_callback() { return m_in_pa_cb.bind(); } auto in_pb_callback() { return m_in_pb_cb.bind(); } @@ -66,7 +66,7 @@ public: void data_w(uint8_t data); protected: - i8155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + i8155_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; @@ -129,7 +129,7 @@ class i8156_device : public i8155_device { public: // construction/destruction - i8156_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8156_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/i8212.cpp b/src/devices/machine/i8212.cpp index c6cf46eafe5..e45ad13442d 100644 --- a/src/devices/machine/i8212.cpp +++ b/src/devices/machine/i8212.cpp @@ -57,7 +57,7 @@ DEFINE_DEVICE_TYPE(I8212, i8212_device, "i8212", "Intel 8212 I/O Port") // i8212_device - constructor //------------------------------------------------- -i8212_device::i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i8212_device::i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8212, tag, owner, clock), m_write_int(*this), m_read_di(*this), diff --git a/src/devices/machine/i8212.h b/src/devices/machine/i8212.h index efd84d11813..1acd9a51f40 100644 --- a/src/devices/machine/i8212.h +++ b/src/devices/machine/i8212.h @@ -36,7 +36,7 @@ class i8212_device : public device_t public: // construction/destruction - i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + i8212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto int_wr_callback() { return m_write_int.bind(); } auto di_rd_callback() { return m_read_di.bind(); } diff --git a/src/devices/machine/i8214.cpp b/src/devices/machine/i8214.cpp index b5a8c4140be..6752f7bee1b 100644 --- a/src/devices/machine/i8214.cpp +++ b/src/devices/machine/i8214.cpp @@ -113,7 +113,7 @@ void i8214_device::check_interrupt() // i8214_device - constructor //------------------------------------------------- -i8214_device::i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8214_device::i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8214, tag, owner, clock) , m_write_int(*this) , m_write_enlg(*this) diff --git a/src/devices/machine/i8214.h b/src/devices/machine/i8214.h index d8514e400ef..de17fa209bc 100644 --- a/src/devices/machine/i8214.h +++ b/src/devices/machine/i8214.h @@ -30,7 +30,7 @@ class i8214_device : public device_t { public: // construction/destruction - i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8214_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_int_dis_hack(bool hack) { m_int_dis_hack = hack; } diff --git a/src/devices/machine/i82355.cpp b/src/devices/machine/i82355.cpp index 88726f7f04e..4419ee20cb4 100644 --- a/src/devices/machine/i82355.cpp +++ b/src/devices/machine/i82355.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(I82355, i82355_device, "i82355", "Intel 82355 BMIC") // i82355_device - constructor //------------------------------------------------- -i82355_device::i82355_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i82355_device::i82355_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I82355, tag, owner, clock) , m_eint_callback(*this) , m_lint_callback(*this) diff --git a/src/devices/machine/i82355.h b/src/devices/machine/i82355.h index 25cb776d9f7..c11c459ed1b 100644 --- a/src/devices/machine/i82355.h +++ b/src/devices/machine/i82355.h @@ -21,7 +21,7 @@ class i82355_device : public device_t { public: // construction/destruction - i82355_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i82355_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto eint_callback() { return m_eint_callback.bind(); } diff --git a/src/devices/machine/i82357.cpp b/src/devices/machine/i82357.cpp index 91de890a03d..d3bf1c1757f 100644 --- a/src/devices/machine/i82357.cpp +++ b/src/devices/machine/i82357.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(I82357, i82357_device, "i82357", "Intel 82357 Integrated System Peripheral") -i82357_device::i82357_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i82357_device::i82357_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I82357, tag, owner, clock) , m_pic(*this, "pic%u", 0) , m_pit(*this, "pit%u", 0) @@ -43,7 +43,7 @@ i82357_device::i82357_device(const machine_config &mconfig, const char *tag, dev void i82357_device::device_add_mconfig(machine_config &config) { - PIC8259(config, m_pic[0], 0); + PIC8259(config, m_pic[0]); m_pic[0]->in_sp_callback().set_constant(1); m_pic[0]->read_slave_ack_callback().set( [this](offs_t offset) -> u8 @@ -54,12 +54,12 @@ void i82357_device::device_add_mconfig(machine_config &config) return 0; }); - PIC8259(config, m_pic[1], 0); + PIC8259(config, m_pic[1]); m_pic[1]->out_int_callback().set(m_pic[0], FUNC(pic8259_device::ir2_w)); m_pic[1]->in_sp_callback().set_constant(0); - PIT8254(config, m_pit[0], 0); - PIT8254(config, m_pit[1], 0); + PIT8254(config, m_pit[0]); + PIT8254(config, m_pit[1]); // timer 1 counter 0: system timer m_pit[0]->set_clk<0>(clock() / 12); diff --git a/src/devices/machine/i82357.h b/src/devices/machine/i82357.h index 3c5a7756061..8af682c0251 100644 --- a/src/devices/machine/i82357.h +++ b/src/devices/machine/i82357.h @@ -13,7 +13,7 @@ class i82357_device : public device_t { public: - i82357_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i82357_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_rtc_cb() { return m_out_rtc.bind(); } auto out_int_cb() { return subdevice<pic8259_device>("pic0")->out_int_callback(); } diff --git a/src/devices/machine/i82371sb.cpp b/src/devices/machine/i82371sb.cpp index 480561bb69e..c62a9e829e8 100644 --- a/src/devices/machine/i82371sb.cpp +++ b/src/devices/machine/i82371sb.cpp @@ -108,7 +108,7 @@ void i82371sb_isa_device::device_add_mconfig(machine_config &config) SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.50); - ISA16(config, m_isabus, 0); + ISA16(config, m_isabus); m_isabus->set_memspace(":maincpu", AS_PROGRAM); m_isabus->set_iospace(":maincpu", AS_IO); m_isabus->irq3_callback().set(FUNC(i82371sb_isa_device::pc_irq3_w)); @@ -132,7 +132,7 @@ void i82371sb_isa_device::device_add_mconfig(machine_config &config) m_isabus->iochck_callback().set(FUNC(i82371sb_isa_device::iochck_w)); } -i82371sb_isa_device::i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i82371sb_isa_device::i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, I82371SB_ISA, tag, owner, clock), m_smi_callback(*this), m_nmi_callback(*this), @@ -973,7 +973,7 @@ void i82371sb_ide_device::device_add_mconfig(machine_config &config) m_ide2->set_bus_master_space(":maincpu", AS_PROGRAM); } -i82371sb_ide_device::i82371sb_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82371sb_ide_device::i82371sb_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, I82371SB_IDE, tag, owner, clock) , latency_timer(0) , bmiba(1) diff --git a/src/devices/machine/i82371sb.h b/src/devices/machine/i82371sb.h index f667132883c..fd3a28ab335 100644 --- a/src/devices/machine/i82371sb.h +++ b/src/devices/machine/i82371sb.h @@ -26,7 +26,7 @@ class i82371sb_isa_device : public pci_device { public: - i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82371sb_isa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto smi() { return m_smi_callback.bind(); } auto nmi() { return m_nmi_callback.bind(); } @@ -210,7 +210,7 @@ DECLARE_DEVICE_TYPE(I82371SB_ISA, i82371sb_isa_device) class i82371sb_ide_device : public pci_device { public: - i82371sb_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82371sb_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_pri() { return m_irq_pri_callback.bind(); } auto irq_sec() { return m_irq_sec_callback.bind(); } diff --git a/src/devices/machine/i8243.cpp b/src/devices/machine/i8243.cpp index 5c6c0bfe385..116b7ca21f4 100644 --- a/src/devices/machine/i8243.cpp +++ b/src/devices/machine/i8243.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(I8243, i8243_device, "i8243", "Intel 8243 I/O Expander") // i8243_device - constructor //------------------------------------------------- -i8243_device::i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8243_device::i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8243, tag, owner, clock) , m_p{0, 0, 0, 0} , m_p2out(0x0f), m_p2(0x0f), m_opcode(0), m_prog(1), m_cs(0) diff --git a/src/devices/machine/i8243.h b/src/devices/machine/i8243.h index 53c46358567..d74b53348cb 100644 --- a/src/devices/machine/i8243.h +++ b/src/devices/machine/i8243.h @@ -32,7 +32,7 @@ class i8243_device : public device_t { public: // construction/destruction - i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + i8243_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto p4_in_cb() { return m_readhandler[0].bind(); } diff --git a/src/devices/machine/i82439hx.cpp b/src/devices/machine/i82439hx.cpp index 866963184b5..2abb004925b 100644 --- a/src/devices/machine/i82439hx.cpp +++ b/src/devices/machine/i82439hx.cpp @@ -28,7 +28,7 @@ void i82439hx_host_device::config_map(address_map &map) map(0x92, 0x92).r(FUNC(i82439hx_host_device::errsyn_r)); } -i82439hx_host_device::i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82439hx_host_device::i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, I82439HX, tag, owner, clock) , cpu(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/i82439hx.h b/src/devices/machine/i82439hx.h index e6a833c6cfb..92d497b70eb 100644 --- a/src/devices/machine/i82439hx.h +++ b/src/devices/machine/i82439hx.h @@ -12,14 +12,14 @@ class i82439hx_host_device : public pci_host_device { public: template <typename T> - i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int ram_size) + i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, int ram_size) : i82439hx_host_device(mconfig, tag, owner, clock) { set_ids_host(0x80861250, 0x03, 0x00000000); set_cpu_tag(std::forward<T>(cpu_tag)); set_ram_size(ram_size); } - i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82439hx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename T> void set_cpu_tag(T &&tag) { cpu.set_tag(std::forward<T>(tag)); } void set_ram_size(int ram_size); diff --git a/src/devices/machine/i82439tx.cpp b/src/devices/machine/i82439tx.cpp index f8c1c9a8bb3..0ac3d0ee90a 100644 --- a/src/devices/machine/i82439tx.cpp +++ b/src/devices/machine/i82439tx.cpp @@ -23,7 +23,7 @@ void i82439tx_host_device::config_map(address_map &map) map(0x92, 0x92).r(FUNC(i82439tx_host_device::errsyn_r)); } -i82439tx_host_device::i82439tx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82439tx_host_device::i82439tx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, I82439TX, tag, owner, clock) , cpu(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/i82439tx.h b/src/devices/machine/i82439tx.h index a2a9528b1dd..b925a7a4662 100644 --- a/src/devices/machine/i82439tx.h +++ b/src/devices/machine/i82439tx.h @@ -12,14 +12,14 @@ class i82439tx_host_device : public pci_host_device { public: template <typename T> - i82439tx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, int ram_size) + i82439tx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, int ram_size) : i82439tx_host_device(mconfig, tag, owner, clock) { set_ids_host(0x80867100, 0x03, 0x00000000); set_cpu_tag(std::forward<T>(cpu_tag)); set_ram_size(ram_size); } - i82439tx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82439tx_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename T> void set_cpu_tag(T &&tag) { cpu.set_tag(std::forward<T>(tag)); } void set_ram_size(int ram_size); diff --git a/src/devices/machine/i8251.cpp b/src/devices/machine/i8251.cpp index b1a04cba1f6..05a7249c02b 100644 --- a/src/devices/machine/i8251.cpp +++ b/src/devices/machine/i8251.cpp @@ -73,12 +73,12 @@ i8251_device::i8251_device( { } -i8251_device::i8251_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8251_device::i8251_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8251_device(mconfig, I8251, tag, owner, clock) { } -v5x_scu_device::v5x_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v5x_scu_device::v5x_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8251_device(mconfig, V5X_SCU, tag, owner, clock) { } diff --git a/src/devices/machine/i8251.h b/src/devices/machine/i8251.h index 0cf1a7c911d..6d821f250ca 100644 --- a/src/devices/machine/i8251.h +++ b/src/devices/machine/i8251.h @@ -20,7 +20,7 @@ class i8251_device : public device_t, { public: // construction/destruction - i8251_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8251_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto txd_handler() { return m_txd_handler.bind(); } @@ -153,7 +153,7 @@ class v5x_scu_device : public i8251_device { public: // construction/destruction - v5x_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + v5x_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/machine/i82541.cpp b/src/devices/machine/i82541.cpp index b727ac6e295..8e9045cdde8 100644 --- a/src/devices/machine/i82541.cpp +++ b/src/devices/machine/i82541.cpp @@ -17,7 +17,7 @@ void i82541_device::registers_io_map(address_map &map) { } -i82541_device::i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82541_device::i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, I82541, tag, owner, clock) { } diff --git a/src/devices/machine/i82541.h b/src/devices/machine/i82541.h index 1614bf0b01c..80ae5cc4af6 100644 --- a/src/devices/machine/i82541.h +++ b/src/devices/machine/i82541.h @@ -9,12 +9,12 @@ class i82541_device : public pci_device { public: - i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subdevice_id) + i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subdevice_id) : i82541_device(mconfig, tag, owner, clock) { set_ids(0x8086107c, 0x05, 0x020000, subdevice_id); } - i82541_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82541_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/machine/i8255.cpp b/src/devices/machine/i8255.cpp index b1bae643ee9..3ae921b86f4 100644 --- a/src/devices/machine/i8255.cpp +++ b/src/devices/machine/i8255.cpp @@ -215,7 +215,7 @@ inline int i8255_device::port_c_upper_mode() // i8255_device - constructor //------------------------------------------------- -i8255_device::i8255_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_ams40489) +i8255_device::i8255_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_ams40489) : device_t(mconfig, type, tag, owner, clock) , m_force_portb_in(is_ams40489) , m_force_portc_out(is_ams40489) @@ -234,7 +234,7 @@ i8255_device::i8255_device(const machine_config &mconfig, device_type type, cons { } -i8255_device::i8255_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8255_device::i8255_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8255_device(mconfig, I8255, tag, owner, clock, false) { } @@ -946,7 +946,7 @@ WRITE_LINE_MEMBER( i8255_device::pc6_w ) // AMS40489 (Amstrad Plus/GX4000 ASIC PPI implementation) -ams40489_ppi_device::ams40489_ppi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ams40489_ppi_device::ams40489_ppi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8255_device(mconfig, AMS40489_PPI, tag, owner, clock, true) { } diff --git a/src/devices/machine/i8255.h b/src/devices/machine/i8255.h index bd74fe2eb6e..b9e16ccf729 100644 --- a/src/devices/machine/i8255.h +++ b/src/devices/machine/i8255.h @@ -45,7 +45,7 @@ class i8255_device : public device_t { public: // construction/destruction - i8255_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + i8255_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto in_pa_callback() { return m_in_pa_cb.bind(); } auto in_pb_callback() { return m_in_pb_cb.bind(); } @@ -73,7 +73,7 @@ public: DECLARE_WRITE_LINE_MEMBER( pc6_w ); protected: - i8255_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_ams40489); + i8255_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, bool is_ams40489); // device-level overrides virtual void device_resolve_objects() override; @@ -137,7 +137,7 @@ class ams40489_ppi_device : public i8255_device { public: // construction/destruction - ams40489_ppi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ams40489_ppi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // device type definition diff --git a/src/devices/machine/i8257.cpp b/src/devices/machine/i8257.cpp index c2fb87d203b..bfe537f0c79 100644 --- a/src/devices/machine/i8257.cpp +++ b/src/devices/machine/i8257.cpp @@ -251,7 +251,7 @@ inline void i8257_device::advance() // i8257_device - constructor //------------------------------------------------- -i8257_device::i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8257_device::i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8257, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_icount(0) diff --git a/src/devices/machine/i8257.h b/src/devices/machine/i8257.h index df1f74a4858..aff3b3f1829 100644 --- a/src/devices/machine/i8257.h +++ b/src/devices/machine/i8257.h @@ -38,7 +38,7 @@ class i8257_device : public device_t, public device_execute_interface { public: // construction/destruction - i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8257_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/i82586.cpp b/src/devices/machine/i82586.cpp index 0a97a5cf66f..bba9ab2b029 100644 --- a/src/devices/machine/i82586.cpp +++ b/src/devices/machine/i82586.cpp @@ -108,7 +108,7 @@ CFG_PARAMS[] = { "transmit on no crs", "disabled", 0, 8, 0x08, 3, false }, }; -i82586_base_device::i82586_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endian, u8 datawidth, u8 addrwidth) +i82586_base_device::i82586_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endian, u8 datawidth, u8 addrwidth) : device_t(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , device_network_interface(mconfig, *this, 10) @@ -128,32 +128,32 @@ i82586_base_device::i82586_base_device(const machine_config &mconfig, device_typ { } -i82586_device::i82586_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82586_device::i82586_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i82586_base_device(mconfig, I82586, tag, owner, clock, ENDIANNESS_LITTLE, 16, 24) { } -i82596_device::i82596_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endian, u8 datawidth) +i82596_device::i82596_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endian, u8 datawidth) : i82586_base_device(mconfig, type, tag, owner, clock, endian, datawidth, 32) { } -i82596_le16_device::i82596_le16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82596_le16_device::i82596_le16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i82596_device(mconfig, I82596_LE16, tag, owner, clock, ENDIANNESS_LITTLE, 16) { } -i82596_be16_device::i82596_be16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82596_be16_device::i82596_be16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i82596_device(mconfig, I82596_BE16, tag, owner, clock, ENDIANNESS_BIG, 16) { } -i82596_le32_device::i82596_le32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82596_le32_device::i82596_le32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i82596_device(mconfig, I82596_LE32, tag, owner, clock, ENDIANNESS_LITTLE, 32) { } -i82596_be32_device::i82596_be32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82596_be32_device::i82596_be32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i82596_device(mconfig, I82596_BE32, tag, owner, clock, ENDIANNESS_BIG, 32) { } diff --git a/src/devices/machine/i82586.h b/src/devices/machine/i82586.h index 82f48163620..14916e32b22 100644 --- a/src/devices/machine/i82586.h +++ b/src/devices/machine/i82586.h @@ -163,7 +163,7 @@ public: DECLARE_WRITE_LINE_MEMBER(reset_w); protected: - i82586_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endian, u8 datawidth, u8 addrwidth); + i82586_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endian, u8 datawidth, u8 addrwidth); // standard device_* overrides virtual void device_start() override; @@ -261,7 +261,7 @@ protected: class i82586_device : public i82586_base_device { public: - i82586_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82586_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static const int CFG_SIZE = 12; static const int DUMP_SIZE = 170; @@ -324,7 +324,7 @@ public: void port(u32 data); // cpu access interface protected: - i82596_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endian, u8 datawidth); + i82596_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endian, u8 datawidth); // standard device_* overrides virtual void device_start() override; @@ -372,25 +372,25 @@ private: class i82596_le16_device : public i82596_device { public: - i82596_le16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82596_le16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i82596_be16_device : public i82596_device { public: - i82596_be16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82596_be16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i82596_le32_device : public i82596_device { public: - i82596_le32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82596_le32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class i82596_be32_device : public i82596_device { public: - i82596_be32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82596_be32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(I82586, i82586_device) diff --git a/src/devices/machine/i8271.cpp b/src/devices/machine/i8271.cpp index 48d734288f4..0ac06a8db9d 100644 --- a/src/devices/machine/i8271.cpp +++ b/src/devices/machine/i8271.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(I8271, i8271_device, "i8271", "Intel 8271 FDC") -i8271_device::i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8271_device::i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8271, tag, owner, clock), ready_connected(false), mode(0), main_phase(0), intrq_cb(*this), drq_cb(*this), @@ -171,9 +171,9 @@ uint8_t i8271_device::rr_r() return rr; } -void i8271_device::set_rate(int rate) +void i8271_device::set_rate(const XTAL &rate) { - cur_rate = rate; + cur_rate = rate.value(); } uint8_t i8271_device::read(offs_t offset) diff --git a/src/devices/machine/i8271.h b/src/devices/machine/i8271.h index 92880af57d4..7a828296967 100644 --- a/src/devices/machine/i8271.h +++ b/src/devices/machine/i8271.h @@ -18,7 +18,7 @@ class floppy_image_device; class i8271_device : public device_t { public: - i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto intrq_wr_callback() { return intrq_cb.bind(); } auto drq_wr_callback() { return drq_cb.bind(); } @@ -32,7 +32,7 @@ public: void ready_w(bool val); - void set_rate(int rate); // rate in bps, to be used when the fdc is externally frequency-controlled + void set_rate(const XTAL &rate); // rate in bps, to be used when the fdc is externally frequency-controlled void set_ready_line_connected(bool ready); void set_select_lines_connected(bool select); diff --git a/src/devices/machine/i8279.cpp b/src/devices/machine/i8279.cpp index 9de96d806e0..7be9360d04d 100644 --- a/src/devices/machine/i8279.cpp +++ b/src/devices/machine/i8279.cpp @@ -93,7 +93,7 @@ DEFINE_DEVICE_TYPE(I8279, i8279_device, "i8279", "Intel 8279 KDC") // i8279_device - constructor //------------------------------------------------- -i8279_device::i8279_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i8279_device::i8279_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8279, tag, owner, clock), m_out_irq_cb(*this), m_out_sl_cb(*this), diff --git a/src/devices/machine/i8279.h b/src/devices/machine/i8279.h index 56c111a2797..2264ee7dd89 100644 --- a/src/devices/machine/i8279.h +++ b/src/devices/machine/i8279.h @@ -39,7 +39,7 @@ class i8279_device : public device_t { public: // construction/destruction - i8279_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + i8279_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_irq_callback() { return m_out_irq_cb.bind(); } auto out_sl_callback() { return m_out_sl_cb.bind(); } diff --git a/src/devices/machine/i82875p.cpp b/src/devices/machine/i82875p.cpp index 37d95112359..513df703059 100644 --- a/src/devices/machine/i82875p.cpp +++ b/src/devices/machine/i82875p.cpp @@ -43,7 +43,7 @@ void i82875p_host_device::config_map(address_map &map) map(0xe8, 0xe8).r(FUNC(i82875p_host_device::capreg2_r)); } -i82875p_host_device::i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82875p_host_device::i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, I82875P_HOST, tag, owner, clock) , cpu(*this, finder_base::DUMMY_TAG) { @@ -423,7 +423,7 @@ void i82875p_host_device::map_extra(uint64_t memory_window_start, uint64_t memor } -i82875p_agp_device::i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82875p_agp_device::i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : agp_bridge_device(mconfig, I82875P_AGP, tag, owner, clock) { set_ids_bridge(0x80862579, 0x02); @@ -448,7 +448,7 @@ void i82875p_overflow_device::overflow_map(address_map &map) } -i82875p_overflow_device::i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i82875p_overflow_device::i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, I82875P_OVERFLOW, tag, owner, clock) { } diff --git a/src/devices/machine/i82875p.h b/src/devices/machine/i82875p.h index ecd252b35ef..d7f8d4c9143 100644 --- a/src/devices/machine/i82875p.h +++ b/src/devices/machine/i82875p.h @@ -12,7 +12,7 @@ class i82875p_host_device : public pci_host_device { public: template <typename T> - i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subdevice_id, T &&cpu_tag, int ram_size) + i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subdevice_id, T &&cpu_tag, int ram_size) : i82875p_host_device(mconfig, tag, owner, clock) { set_ids_host(0x80862578, 0x02, subdevice_id); @@ -20,7 +20,7 @@ public: set_ram_size(ram_size); } - i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename T> void set_cpu_tag(T &&tag) { cpu.set_tag(std::forward<T>(tag)); } void set_ram_size(int ram_size); @@ -97,7 +97,7 @@ private: class i82875p_agp_device : public agp_bridge_device { public: - i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -106,12 +106,12 @@ protected: class i82875p_overflow_device : public pci_device { public: - i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t subdevice_id) + i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t subdevice_id) : i82875p_overflow_device(mconfig, tag, owner, clock) { set_ids(0x8086257e, 0x02, 0x088000, subdevice_id); } - i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: uint8_t dram_row_boundary_r(offs_t offset); diff --git a/src/devices/machine/i8291a.cpp b/src/devices/machine/i8291a.cpp index 3692ba95a28..cd3750205b0 100644 --- a/src/devices/machine/i8291a.cpp +++ b/src/devices/machine/i8291a.cpp @@ -37,7 +37,7 @@ ALLOW_SAVE_TYPE(i8291a_device::source_handshake_state); ALLOW_SAVE_TYPE(i8291a_device::acceptor_handshake_state); i8291a_device::i8291a_device(const machine_config &mconfig, const char *tag, - device_t *owner, uint32_t clock) : + device_t *owner, const XTAL &clock) : device_t{mconfig, I8291A, tag, owner, clock}, m_int_write_func{*this}, m_dreq_write_func{*this}, diff --git a/src/devices/machine/i8291a.h b/src/devices/machine/i8291a.h index 2d048d806aa..b0a3458223f 100644 --- a/src/devices/machine/i8291a.h +++ b/src/devices/machine/i8291a.h @@ -17,7 +17,7 @@ class i8291a_device : public device_t { public: // construction/destruction - i8291a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8291a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_write() { return m_int_write_func.bind(); } auto dreq_write() { return m_dreq_write_func.bind(); } diff --git a/src/devices/machine/i8355.cpp b/src/devices/machine/i8355.cpp index caa31eb7e1a..14e5e81f8ac 100644 --- a/src/devices/machine/i8355.cpp +++ b/src/devices/machine/i8355.cpp @@ -87,7 +87,7 @@ inline void i8355_device::write_port(int port, u8 data) // i8355_device - constructor //------------------------------------------------- -i8355_device::i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +i8355_device::i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, I8355, tag, owner, clock), m_in_pa_cb(*this), m_out_pa_cb(*this), diff --git a/src/devices/machine/i8355.h b/src/devices/machine/i8355.h index e9205a86a9d..76680c9af44 100644 --- a/src/devices/machine/i8355.h +++ b/src/devices/machine/i8355.h @@ -38,7 +38,7 @@ class i8355_device : public device_t { public: // construction/destruction - i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8355_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_pa() { return m_in_pa_cb.bind(); } auto out_pa() { return m_out_pa_cb.bind(); } diff --git a/src/devices/machine/ibm21s850.cpp b/src/devices/machine/ibm21s850.cpp index c58622cace6..6d5445b92ed 100644 --- a/src/devices/machine/ibm21s850.cpp +++ b/src/devices/machine/ibm21s850.cpp @@ -23,18 +23,18 @@ DEFINE_DEVICE_TYPE(IBM21S850, ibm21s850_device, "ibm21s850", "IBM 21S850 IEEE-1394 1-Port PHY") DEFINE_DEVICE_TYPE(IBM21S851, ibm21s851_device, "ibm21s851", "IBM 21S850 IEEE-1394 3-Port PHY") -ibm21s85x_base_device::ibm21s85x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ibm21s85x_base_device::ibm21s85x_base_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_reset_cb(*this) { } -ibm21s850_device::ibm21s850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ibm21s850_device::ibm21s850_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm21s85x_base_device(mconfig, IBM21S850, tag, owner, clock) { } -ibm21s851_device::ibm21s851_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ibm21s851_device::ibm21s851_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ibm21s85x_base_device(mconfig, IBM21S851, tag, owner, clock) { } diff --git a/src/devices/machine/ibm21s850.h b/src/devices/machine/ibm21s850.h index dde6cf59a4d..c4c1f4dc39f 100644 --- a/src/devices/machine/ibm21s850.h +++ b/src/devices/machine/ibm21s850.h @@ -25,7 +25,7 @@ public: static constexpr feature_type unemulated_features() { return feature::COMMS; } protected: - ibm21s85x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ibm21s85x_base_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; @@ -143,7 +143,7 @@ protected: class ibm21s850_device : public ibm21s85x_base_device { public: - ibm21s850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ibm21s850_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: virtual void device_reset() override; @@ -161,7 +161,7 @@ private: class ibm21s851_device : public ibm21s85x_base_device { public: - ibm21s851_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ibm21s851_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: virtual void device_reset() override; diff --git a/src/devices/machine/icm7170.cpp b/src/devices/machine/icm7170.cpp index 3abcf04ea38..d0ed12fb392 100644 --- a/src/devices/machine/icm7170.cpp +++ b/src/devices/machine/icm7170.cpp @@ -68,7 +68,7 @@ enum // icm7170_device - constructor //------------------------------------------------- -icm7170_device::icm7170_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +icm7170_device::icm7170_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, ICM7170, tag, owner, clock), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/machine/icm7170.h b/src/devices/machine/icm7170.h index 2fef930fa04..a2306fae33e 100644 --- a/src/devices/machine/icm7170.h +++ b/src/devices/machine/icm7170.h @@ -50,7 +50,7 @@ class icm7170_device : public device_t, { public: // construction/destruction - icm7170_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + icm7170_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_out_irq_cb.bind(); } diff --git a/src/devices/machine/idectrl.cpp b/src/devices/machine/idectrl.cpp index c8f79c3fd91..9c0d4e08183 100644 --- a/src/devices/machine/idectrl.cpp +++ b/src/devices/machine/idectrl.cpp @@ -26,12 +26,12 @@ DEFINE_DEVICE_TYPE(IDE_CONTROLLER, ide_controller_device, "idectrl", "IDE Controller (16-bit)") -ide_controller_device::ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ide_controller_device::ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ide_controller_device(mconfig, IDE_CONTROLLER, tag, owner, clock) { } -ide_controller_device::ide_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +ide_controller_device::ide_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : abstract_ata_interface_device(mconfig, type, tag, owner, clock) { } @@ -88,12 +88,12 @@ void ide_controller_device::write_cs1(offs_t offset, uint16_t data, uint16_t mem DEFINE_DEVICE_TYPE(IDE_CONTROLLER_32, ide_controller_32_device, "idectrl32", "IDE Controller (32-bit)") -ide_controller_32_device::ide_controller_32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ide_controller_32_device::ide_controller_32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ide_controller_32_device(mconfig, IDE_CONTROLLER_32, tag, owner, clock) { } -ide_controller_32_device::ide_controller_32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +ide_controller_32_device::ide_controller_32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : abstract_ata_interface_device(mconfig, type, tag, owner, clock) { } @@ -220,7 +220,7 @@ void ide_controller_32_device::write_cs1(offs_t offset, uint32_t data, uint32_t DEFINE_DEVICE_TYPE(BUS_MASTER_IDE_CONTROLLER, bus_master_ide_controller_device, "idectrl32bm", "Bus Master IDE Controller") -bus_master_ide_controller_device::bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +bus_master_ide_controller_device::bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ide_controller_32_device(mconfig, BUS_MASTER_IDE_CONTROLLER, tag, owner, clock), m_dma_space(*this, finder_base::DUMMY_TAG, -1, 32), m_dma_address(0), diff --git a/src/devices/machine/idectrl.h b/src/devices/machine/idectrl.h index e0b10b05d08..28b0adfb974 100644 --- a/src/devices/machine/idectrl.h +++ b/src/devices/machine/idectrl.h @@ -18,7 +18,7 @@ class ide_controller_device : public abstract_ata_interface_device { public: - ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <typename T> ide_controller_device &master(T &&opts, const char *dflt = nullptr, bool fixed = false) { @@ -52,7 +52,7 @@ public: void cs1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { write_cs1(offset, data, mem_mask); } protected: - ide_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ide_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(IDE_CONTROLLER, ide_controller_device) @@ -61,7 +61,7 @@ DECLARE_DEVICE_TYPE(IDE_CONTROLLER, ide_controller_device) class ide_controller_32_device : public abstract_ata_interface_device { public: - ide_controller_32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ide_controller_32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <typename T> ide_controller_32_device &master(T &&opts, const char *dflt = nullptr, bool fixed = false) { @@ -95,7 +95,7 @@ public: void cs1_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { write_cs1(offset, data, mem_mask); } protected: - ide_controller_32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ide_controller_32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(IDE_CONTROLLER_32, ide_controller_32_device) @@ -104,7 +104,7 @@ DECLARE_DEVICE_TYPE(IDE_CONTROLLER_32, ide_controller_32_device) class bus_master_ide_controller_device : public ide_controller_32_device { public: - bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + bus_master_ide_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <typename T> void set_bus_master_space(T &&bmtag, int bmspace) { m_dma_space.set_tag(std::forward<T>(bmtag), bmspace); } template <bool R> void set_bus_master_space(const address_space_finder<R> &finder) { m_dma_space.set_tag(finder); } diff --git a/src/devices/machine/ie15.cpp b/src/devices/machine/ie15.cpp index 603c6034ca9..daacce72812 100644 --- a/src/devices/machine/ie15.cpp +++ b/src/devices/machine/ie15.cpp @@ -39,7 +39,7 @@ #define _PRINT(ch) (std::isprint(ch & 127)?(ch & 127):' ') -ie15_device::ie15_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ie15_device::ie15_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_serial_interface(mconfig, *this) , m_maincpu(*this, "maincpu") @@ -69,7 +69,7 @@ ie15_device::ie15_device(const machine_config &mconfig, device_type type, const { } -ie15_device::ie15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ie15_device::ie15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ie15_device(mconfig, IE15, tag, owner, clock) { } @@ -517,7 +517,7 @@ void ie15_device::device_reset() m_serial_tx_ready = m_serial_rx_ready = IE_TRUE; set_data_frame(1 /* start bits */, 8 /* data bits */, PARITY_NONE, STOP_BITS_1); // device supports rates from 150 to 9600 baud but null_modem has hardcoded 9600 - set_rate(9600); + set_rate(XTAL::u(9600)); } /* @@ -680,12 +680,12 @@ void ie15_device::ie15core(machine_config &config) config.set_default_layout(layout_ie15); /* Devices */ - IE15_KEYBOARD(config, m_keyboard, 0); + IE15_KEYBOARD(config, m_keyboard); m_keyboard->keyboard_cb().set(FUNC(ie15_device::kbd_put)); m_keyboard->sdv_cb().set(FUNC(ie15_device::kbd_sdv)); SPEAKER(config, "mono").front_center(); - BEEP(config, m_beeper, 2400); + BEEP(config, m_beeper, XTAL::u(2400)); m_beeper->add_route(ALL_OUTPUTS, "mono", 0.15); } diff --git a/src/devices/machine/ie15.h b/src/devices/machine/ie15.h index 89eaf0cfd8b..3687300fbda 100644 --- a/src/devices/machine/ie15.h +++ b/src/devices/machine/ie15.h @@ -36,7 +36,7 @@ INPUT_PORTS_EXTERN(ie15); class ie15_device : public device_t, public device_serial_interface { public: - ie15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ie15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Interface to a RS232 connection. auto rs232_conn_txd_handler() { return m_rs232_conn_txd_handler.bind(); } @@ -51,7 +51,7 @@ public: DECLARE_WRITE_LINE_MEMBER(update_serial); protected: - ie15_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ie15_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; virtual void device_start() override; diff --git a/src/devices/machine/ie15_kbd.cpp b/src/devices/machine/ie15_kbd.cpp index 169f4be18aa..015633d7dcc 100644 --- a/src/devices/machine/ie15_kbd.cpp +++ b/src/devices/machine/ie15_kbd.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(IE15_KEYBOARD, ie15_keyboard_device, "ie15kbd", "15WWW-97-006 Keyboard") -ie15_keyboard_device::ie15_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ie15_keyboard_device::ie15_keyboard_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_matrix_keyboard_interface(mconfig, *this, "TERM_LINE0", "TERM_LINE1", "TERM_LINE2", "TERM_LINE3") , m_io_kbdc(*this, "TERM_LINEC") @@ -27,7 +27,7 @@ ie15_keyboard_device::ie15_keyboard_device(const machine_config &mconfig, device { } -ie15_keyboard_device::ie15_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ie15_keyboard_device::ie15_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ie15_keyboard_device(mconfig, IE15_KEYBOARD, tag, owner, clock) { } diff --git a/src/devices/machine/ie15_kbd.h b/src/devices/machine/ie15_kbd.h index 3302bbda8a2..89baf4eccc6 100644 --- a/src/devices/machine/ie15_kbd.h +++ b/src/devices/machine/ie15_kbd.h @@ -31,7 +31,7 @@ public: IE_KB_NR_BIT = 7, }; - ie15_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ie15_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto keyboard_cb() { return m_keyboard_cb.bind(); } auto sdv_cb() { return m_sdv_cb.bind(); } @@ -41,7 +41,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(dip_changed); protected: - ie15_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ie15_keyboard_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; diff --git a/src/devices/machine/im6402.cpp b/src/devices/machine/im6402.cpp index 6a52867bdbd..119d5ff111e 100644 --- a/src/devices/machine/im6402.cpp +++ b/src/devices/machine/im6402.cpp @@ -70,7 +70,7 @@ inline void im6402_device::set_tre(int state) // im6402_device - constructor //------------------------------------------------- -im6402_device::im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +im6402_device::im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, IM6402, tag, owner, clock), device_serial_interface(mconfig, *this), m_write_tro(*this), diff --git a/src/devices/machine/im6402.h b/src/devices/machine/im6402.h index d36853353c2..4455e17d993 100644 --- a/src/devices/machine/im6402.h +++ b/src/devices/machine/im6402.h @@ -48,13 +48,13 @@ class im6402_device : public device_t, public device_serial_interface public: // construction/destruction im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t rrc, uint32_t trc) - : im6402_device(mconfig, tag, owner, 0) + : im6402_device(mconfig, tag, owner) { set_rrc(rrc); set_trc(trc); } - im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + im6402_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_rrc(int rrc) { m_rrc = rrc; } void set_trc(int trc) { m_trc = trc; } diff --git a/src/devices/machine/input_merger.cpp b/src/devices/machine/input_merger.cpp index 7424bd6e8fa..a8b9f96e456 100644 --- a/src/devices/machine/input_merger.cpp +++ b/src/devices/machine/input_merger.cpp @@ -110,22 +110,22 @@ TIMER_CALLBACK_MEMBER(input_merger_device::update_state) // SPECIALISATIONS //************************************************************************** -input_merger_any_high_device::input_merger_any_high_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +input_merger_any_high_device::input_merger_any_high_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : input_merger_device(mconfig, INPUT_MERGER_ANY_HIGH, tag, owner, clock, u32(0), u32(0), 1) { } -input_merger_all_high_device::input_merger_all_high_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +input_merger_all_high_device::input_merger_all_high_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : input_merger_device(mconfig, INPUT_MERGER_ALL_HIGH, tag, owner, clock, ~u32(0), ~u32(0), 0) { } -input_merger_any_low_device::input_merger_any_low_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +input_merger_any_low_device::input_merger_any_low_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : input_merger_device(mconfig, INPUT_MERGER_ANY_LOW, tag, owner, clock, ~u32(0), ~u32(0), 1) { } -input_merger_all_low_device::input_merger_all_low_device(machine_config const &mconfig, char const *tag, device_t *owner, uint32_t clock) +input_merger_all_low_device::input_merger_all_low_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : input_merger_device(mconfig, INPUT_MERGER_ALL_LOW, tag, owner, clock, u32(0), u32(0), 0) { } diff --git a/src/devices/machine/input_merger.h b/src/devices/machine/input_merger.h index aacffeab4ee..b8098d8d901 100644 --- a/src/devices/machine/input_merger.h +++ b/src/devices/machine/input_merger.h @@ -57,28 +57,28 @@ protected: class input_merger_any_high_device : public input_merger_device { public: - input_merger_any_high_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + input_merger_any_high_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class input_merger_all_high_device : public input_merger_device { public: - input_merger_all_high_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + input_merger_all_high_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class input_merger_any_low_device : public input_merger_device { public: - input_merger_any_low_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + input_merger_any_low_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class input_merger_all_low_device : public input_merger_device { public: - input_merger_all_low_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + input_merger_all_low_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/machine/ins8154.cpp b/src/devices/machine/ins8154.cpp index 0ce0dbd11d8..e4d67b1bfbf 100644 --- a/src/devices/machine/ins8154.cpp +++ b/src/devices/machine/ins8154.cpp @@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(INS8154, ins8154_device, "ins8154", "INS8154 RAM I/O") // ins8154_device - constructor //------------------------------------------------- -ins8154_device::ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ins8154_device::ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, INS8154, tag, owner, clock) , m_in_a_cb(*this) , m_out_a_cb(*this) diff --git a/src/devices/machine/ins8154.h b/src/devices/machine/ins8154.h index b4013c0876d..4e996177a5a 100644 --- a/src/devices/machine/ins8154.h +++ b/src/devices/machine/ins8154.h @@ -39,7 +39,7 @@ class ins8154_device : public device_t { public: // construction/destruction - ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ins8154_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto in_a() { return m_in_a_cb.bind(); } auto out_a() { return m_out_a_cb.bind(); } diff --git a/src/devices/machine/ins8250.cpp b/src/devices/machine/ins8250.cpp index 63a68550e2d..b17574e710b 100644 --- a/src/devices/machine/ins8250.cpp +++ b/src/devices/machine/ins8250.cpp @@ -107,7 +107,7 @@ DEFINE_DEVICE_TYPE(NS16450, ns16450_device, "ns16450", "National Semiconductor DEFINE_DEVICE_TYPE(NS16550, ns16550_device, "ns16550", "National Semiconductor NS16550 UART") DEFINE_DEVICE_TYPE(PC16552D, pc16552_device, "pc16552d", "National Semiconductor PC16552D UART") -ins8250_uart_device::ins8250_uart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, dev_type device_type) +ins8250_uart_device::ins8250_uart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, dev_type device_type) : device_t(mconfig, type, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_device_type(device_type) @@ -127,22 +127,22 @@ ins8250_uart_device::ins8250_uart_device(const machine_config &mconfig, device_t m_regs.ier = 0; } -ins8250_device::ins8250_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ins8250_device::ins8250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ins8250_uart_device(mconfig, INS8250, tag, owner, clock, dev_type::INS8250) { } -ns16450_device::ns16450_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ns16450_device::ns16450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ins8250_uart_device(mconfig, NS16450, tag, owner, clock, dev_type::NS16450) { } -ns16550_device::ns16550_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ns16550_device::ns16550_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ins8250_uart_device(mconfig, NS16550, tag, owner, clock, dev_type::NS16550) { } -pc16552_device::pc16552_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pc16552_device::pc16552_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC16552D, tag, owner, clock) { } @@ -643,8 +643,8 @@ void ins8250_uart_device::device_start() m_out_int_cb.resolve_safe(); m_out_out1_cb.resolve_safe(); m_out_out2_cb.resolve_safe(); - set_tra_rate(0); - set_rcv_rate(0); + set_tra_rate(XTAL::u(0)); + set_rcv_rate(XTAL::u(0)); save_item(NAME(m_regs.thr)); save_item(NAME(m_regs.rbr)); diff --git a/src/devices/machine/ins8250.h b/src/devices/machine/ins8250.h index f79715decc3..a6f0f06ce1c 100644 --- a/src/devices/machine/ins8250.h +++ b/src/devices/machine/ins8250.h @@ -46,7 +46,7 @@ protected: NS16550A }; - ins8250_uart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, dev_type device_type); + ins8250_uart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, dev_type device_type); virtual void device_start() override; virtual void device_reset() override; @@ -101,19 +101,19 @@ private: class ins8250_device : public ins8250_uart_device { public: - ins8250_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ins8250_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ns16450_device : public ins8250_uart_device { public: - ns16450_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ns16450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class ns16550_device : public ins8250_uart_device { public: - ns16550_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + ns16550_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; virtual void device_reset() override; @@ -139,7 +139,7 @@ private: class pc16552_device : public device_t { public: - pc16552_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pc16552_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u8 read(offs_t offset) { return ((offset & 8) ? m_chan1 : m_chan0)->ins8250_r(offset & 7); } void write(offs_t offset, u8 data) { ((offset & 8) ? m_chan1 : m_chan0)->ins8250_w(offset & 7, data); } diff --git a/src/devices/machine/intelfsh.cpp b/src/devices/machine/intelfsh.cpp index b4e9c5acde0..068e513ae30 100644 --- a/src/devices/machine/intelfsh.cpp +++ b/src/devices/machine/intelfsh.cpp @@ -133,7 +133,7 @@ DEFINE_DEVICE_TYPE(CAT28F020, cat28f020_device, "cat28f0 // intelfsh_device - constructor //------------------------------------------------- -intelfsh_device::intelfsh_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +intelfsh_device::intelfsh_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_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), @@ -409,130 +409,130 @@ intelfsh_device::intelfsh_device(const machine_config &mconfig, device_type type break; } -intelfsh8_device::intelfsh8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +intelfsh8_device::intelfsh8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : intelfsh_device(mconfig, type, tag, owner, clock, variant) { } -intelfsh16_device::intelfsh16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +intelfsh16_device::intelfsh16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant) : intelfsh_device(mconfig, type, tag, owner, clock, variant) { } -intel_28f016s5_device::intel_28f016s5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_28f016s5_device::intel_28f016s5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, INTEL_28F016S5, tag, owner, clock, FLASH_INTEL_28F016S5) { } -fujitsu_29f160te_device::fujitsu_29f160te_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fujitsu_29f160te_device::fujitsu_29f160te_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, FUJITSU_29F160TE, tag, owner, clock, FLASH_FUJITSU_29F160TE) { } -fujitsu_29f016a_device::fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fujitsu_29f016a_device::fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, FUJITSU_29F016A, tag, owner, clock, FLASH_FUJITSU_29F016A) { } -fujitsu_29dl164bd_device::fujitsu_29dl164bd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fujitsu_29dl164bd_device::fujitsu_29dl164bd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, FUJITSU_29DL164BD, tag, owner, clock, FLASH_FUJITSU_29DL164BD) { } -fujitsu_29lv002tc_device::fujitsu_29lv002tc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fujitsu_29lv002tc_device::fujitsu_29lv002tc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, FUJITSU_29LV002TC, tag, owner, clock, FLASH_FUJITSU_29LV002TC) { } -fujitsu_29lv800b_device::fujitsu_29lv800b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +fujitsu_29lv800b_device::fujitsu_29lv800b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, FUJITSU_29LV800B, tag, owner, clock, FLASH_FUJITSU_29LV800B) { } -sharp_lh28f016s_device::sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sharp_lh28f016s_device::sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, SHARP_LH28F016S, tag, owner, clock, FLASH_SHARP_LH28F016S) { } -sharp_lh28f016s_16bit_device::sharp_lh28f016s_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sharp_lh28f016s_16bit_device::sharp_lh28f016s_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, SHARP_LH28F016S_16BIT, tag, owner, clock, FLASH_SHARP_LH28F016S_16BIT) { } -atmel_29c010_device::atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atmel_29c010_device::atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, ATMEL_29C010, tag, owner, clock, FLASH_ATMEL_29C010) { } -atmel_49f4096_device::atmel_49f4096_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +atmel_49f4096_device::atmel_49f4096_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, ATMEL_49F4096, tag, owner, clock, FLASH_ATMEL_49F4096) { } -amd_29f010_device::amd_29f010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29f010_device::amd_29f010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, AMD_29F010, tag, owner, clock, FLASH_AMD_29F010) { } -amd_29f040_device::amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29f040_device::amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, AMD_29F040, tag, owner, clock, FLASH_AMD_29F040) { } -amd_29f080_device::amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29f080_device::amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, AMD_29F080, tag, owner, clock, FLASH_AMD_29F080) { } -amd_29f400t_device::amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29f400t_device::amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, AMD_29F400T, tag, owner, clock, FLASH_AMD_29F400T) { } -amd_29f800t_device::amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29f800t_device::amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, AMD_29F800T, tag, owner, clock, FLASH_AMD_29F800T) { } -amd_29f800b_16bit_device::amd_29f800b_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29f800b_16bit_device::amd_29f800b_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, AMD_29F800B_16BIT, tag, owner, clock, FLASH_AMD_29F800B_16BIT) { } -amd_29lv200t_device::amd_29lv200t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +amd_29lv200t_device::amd_29lv200t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, AMD_29LV200T, tag, owner, clock, FLASH_AMD_29LV200T) { } -cat28f020_device::cat28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +cat28f020_device::cat28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, CAT28F020, tag, owner, clock, FLASH_CAT28F020) { } -intel_e28f008sa_device::intel_e28f008sa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_e28f008sa_device::intel_e28f008sa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, INTEL_E28F008SA, tag, owner, clock, FLASH_INTEL_E28F008SA) { } -macronix_29f008tc_device::macronix_29f008tc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +macronix_29f008tc_device::macronix_29f008tc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, MACRONIX_29F008TC, tag, owner, clock, FLASH_MACRONIX_29F008TC) { } -macronix_29l001mc_device::macronix_29l001mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +macronix_29l001mc_device::macronix_29l001mc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, MACRONIX_29L001MC, tag, owner, clock, FLASH_MACRONIX_29L001MC) { } -macronix_29lv160tmc_device::macronix_29lv160tmc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +macronix_29lv160tmc_device::macronix_29lv160tmc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, MACRONIX_29LV160TMC, tag, owner, clock, FLASH_MACRONIX_29LV160TMC) { } -panasonic_mn63f805mnp_device::panasonic_mn63f805mnp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +panasonic_mn63f805mnp_device::panasonic_mn63f805mnp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, PANASONIC_MN63F805MNP, tag, owner, clock, FLASH_PANASONIC_MN63F805MNP) { } -sanyo_le26fv10n1ts_device::sanyo_le26fv10n1ts_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sanyo_le26fv10n1ts_device::sanyo_le26fv10n1ts_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, SANYO_LE26FV10N1TS, tag, owner, clock, FLASH_SANYO_LE26FV10N1TS) { } -sst_28sf040_device::sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sst_28sf040_device::sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, SST_28SF040, tag, owner, clock, FLASH_SST_28SF040) { } -sst_39sf040_device::sst_39sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sst_39sf040_device::sst_39sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, SST_39SF040, tag, owner, clock, FLASH_SST_39SF040) { } -sst_39vf020_device::sst_39vf020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sst_39vf020_device::sst_39vf020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, SST_39VF020, tag, owner, clock, FLASH_SST_39VF020) { } -sst_49lf020_device::sst_49lf020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sst_49lf020_device::sst_49lf020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, SST_49LF020, tag, owner, clock, FLASH_SST_49LF020) { } -sharp_lh28f400_device::sharp_lh28f400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sharp_lh28f400_device::sharp_lh28f400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, SHARP_LH28F400, tag, owner, clock, FLASH_SHARP_LH28F400) { } -intel_te28f160_device::intel_te28f160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_te28f160_device::intel_te28f160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, INTEL_TE28F160, tag, owner, clock, FLASH_INTEL_TE28F160) { } -sharp_lh28f160s3_device::sharp_lh28f160s3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sharp_lh28f160s3_device::sharp_lh28f160s3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, SHARP_LH28F160S3, tag, owner, clock, FLASH_SHARP_LH28F160S3) { } -intel_te28f320_device::intel_te28f320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_te28f320_device::intel_te28f320_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, INTEL_TE28F320, tag, owner, clock, FLASH_INTEL_TE28F320) { } -spansion_s29gl064s_device::spansion_s29gl064s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spansion_s29gl064s_device::spansion_s29gl064s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, SPANSION_S29GL064S, tag, owner, clock, FLASH_SPANSION_S29GL064S) { } -intel_e28f400b_device::intel_e28f400b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_e28f400b_device::intel_e28f400b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, INTEL_E28F400B, tag, owner, clock, FLASH_INTEL_E28F400B) { } -sharp_lh28f320bf_device::sharp_lh28f320bf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sharp_lh28f320bf_device::sharp_lh28f320bf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, SHARP_LH28F320BF, tag, owner, clock, FLASH_SHARP_LH28F320BF) { } -intel_28f320j3d_device::intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_28f320j3d_device::intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, INTEL_28F320J3D, tag, owner, clock, FLASH_INTEL_28F320J3D) { } -intel_28f320j5_device::intel_28f320j5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +intel_28f320j5_device::intel_28f320j5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, INTEL_28F320J5, tag, owner, clock, FLASH_INTEL_28F320J5) { } -sst_39vf400a_device::sst_39vf400a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sst_39vf400a_device::sst_39vf400a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh16_device(mconfig, SST_39VF400A, tag, owner, clock, FLASH_SST_39VF400A) { } -tms_29f040_device::tms_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms_29f040_device::tms_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : intelfsh8_device(mconfig, TMS_29F040, tag, owner, clock, FLASH_TMS_29F040) { } //------------------------------------------------- diff --git a/src/devices/machine/intelfsh.h b/src/devices/machine/intelfsh.h index 189d9349d42..1612c0d88e8 100644 --- a/src/devices/machine/intelfsh.h +++ b/src/devices/machine/intelfsh.h @@ -63,7 +63,7 @@ public: protected: // construction/destruction - intelfsh_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + intelfsh_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; @@ -120,7 +120,7 @@ public: protected: // construction/destruction - intelfsh8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + intelfsh8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); }; @@ -138,7 +138,7 @@ public: protected: // construction/destruction - intelfsh16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + intelfsh16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); }; @@ -148,103 +148,103 @@ protected: class intel_28f016s5_device : public intelfsh8_device { public: - intel_28f016s5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_28f016s5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class fujitsu_29f160te_device : public intelfsh8_device { public: - fujitsu_29f160te_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fujitsu_29f160te_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class fujitsu_29f016a_device : public intelfsh8_device { public: - fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fujitsu_29f016a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class fujitsu_29dl164bd_device : public intelfsh8_device { public: - fujitsu_29dl164bd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fujitsu_29dl164bd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class fujitsu_29lv002tc_device : public intelfsh8_device { public: - fujitsu_29lv002tc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fujitsu_29lv002tc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class fujitsu_29lv800b_device : public intelfsh16_device { public: - fujitsu_29lv800b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fujitsu_29lv800b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class atmel_29c010_device : public intelfsh8_device { public: - atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + atmel_29c010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29f010_device : public intelfsh8_device { public: - amd_29f010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29f010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29f040_device : public intelfsh8_device { public: - amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29f080_device : public intelfsh8_device { public: - amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29f080_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29f400t_device : public intelfsh8_device { public: - amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29f400t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29f800t_device : public intelfsh8_device { public: - amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29f800t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29f800b_16bit_device : public intelfsh16_device { public: - amd_29f800b_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29f800b_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class amd_29lv200t_device : public intelfsh8_device { public: - amd_29lv200t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + amd_29lv200t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sharp_lh28f016s_device : public intelfsh8_device { public: - sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sharp_lh28f016s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sharp_lh28f016s_16bit_device : public intelfsh16_device { public: - sharp_lh28f016s_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sharp_lh28f016s_16bit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class intel_e28f008sa_device : public intelfsh8_device { public: - intel_e28f008sa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_e28f008sa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class macronix_29f008tc_device : public intelfsh8_device @@ -256,128 +256,128 @@ public: class macronix_29l001mc_device : public intelfsh8_device { public: - macronix_29l001mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + macronix_29l001mc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class macronix_29lv160tmc_device : public intelfsh8_device { public: - macronix_29lv160tmc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + macronix_29lv160tmc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class panasonic_mn63f805mnp_device : public intelfsh8_device { public: - panasonic_mn63f805mnp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + panasonic_mn63f805mnp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sanyo_le26fv10n1ts_device : public intelfsh8_device { public: - sanyo_le26fv10n1ts_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sanyo_le26fv10n1ts_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sst_28sf040_device : public intelfsh8_device { public: - sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sst_28sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sst_39sf040_device : public intelfsh8_device { public: - sst_39sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sst_39sf040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sst_39vf020_device : public intelfsh8_device { public: - sst_39vf020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sst_39vf020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sst_49lf020_device : public intelfsh8_device { public: - sst_49lf020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sst_49lf020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class tms_29f040_device : public intelfsh8_device { public: - tms_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tms_29f040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // 16-bit variants class sharp_lh28f400_device : public intelfsh16_device { public: - sharp_lh28f400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sharp_lh28f400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class intel_te28f160_device : public intelfsh16_device { public: - intel_te28f160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_te28f160_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sharp_lh28f160s3_device : public intelfsh16_device { public: - sharp_lh28f160s3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sharp_lh28f160s3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class intel_te28f320_device : public intelfsh16_device { public: - intel_te28f320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_te28f320_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class spansion_s29gl064s_device : public intelfsh16_device { public: - spansion_s29gl064s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + spansion_s29gl064s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class intel_e28f400b_device : public intelfsh16_device { public: - intel_e28f400b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_e28f400b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sharp_lh28f320bf_device : public intelfsh16_device { public: - sharp_lh28f320bf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sharp_lh28f320bf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class intel_28f320j3d_device : public intelfsh16_device { public: - intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class intel_28f320j5_device : public intelfsh16_device { public: - intel_28f320j5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + intel_28f320j5_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class sst_39vf400a_device : public intelfsh16_device { public: - sst_39vf400a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sst_39vf400a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class atmel_49f4096_device : public intelfsh16_device { public: - atmel_49f4096_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + atmel_49f4096_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class cat28f020_device : public intelfsh8_device { public: - cat28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + cat28f020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/machine/iopcdvd.cpp b/src/devices/machine/iopcdvd.cpp index a2938c4be35..3ab5d8dee52 100644 --- a/src/devices/machine/iopcdvd.cpp +++ b/src/devices/machine/iopcdvd.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(SONYIOP_CDVD, iop_cdvd_device, "iopcdvd", "PlayStation 2 disc /*static*/ const size_t iop_cdvd_device::BUFFER_SIZE = 16; // Total guess -iop_cdvd_device::iop_cdvd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iop_cdvd_device::iop_cdvd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYIOP_CDVD, tag, owner, clock) , m_intc(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/iopcdvd.h b/src/devices/machine/iopcdvd.h index 194933eb3d9..15717da7612 100644 --- a/src/devices/machine/iopcdvd.h +++ b/src/devices/machine/iopcdvd.h @@ -21,12 +21,12 @@ class iop_cdvd_device : public device_t public: template <typename T> iop_cdvd_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&intc_tag) - : iop_cdvd_device(mconfig, tag, owner, (uint32_t)0) + : iop_cdvd_device(mconfig, tag, owner) { m_intc.set_tag(std::forward<T>(intc_tag)); } - iop_cdvd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iop_cdvd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~iop_cdvd_device() override; uint8_t read(offs_t offset); diff --git a/src/devices/machine/iopdma.cpp b/src/devices/machine/iopdma.cpp index 784bc16b515..cc9d0ad9603 100644 --- a/src/devices/machine/iopdma.cpp +++ b/src/devices/machine/iopdma.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(SONYIOP_DMA, iop_dma_device, "iopdma", "PlayStation 2 IOP DMAC") -iop_dma_device::iop_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iop_dma_device::iop_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYIOP_DMA, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_intc(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/iopdma.h b/src/devices/machine/iopdma.h index 2e84ec44aaa..7bc7252c1de 100644 --- a/src/devices/machine/iopdma.h +++ b/src/devices/machine/iopdma.h @@ -23,7 +23,7 @@ class iop_dma_device : public device_t, public device_execute_interface { public: template <typename T, typename U, typename V, typename W, typename X> - iop_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&intc_tag, U &&ram_tag, V &&sif_tag, W &&spu_tag, X &&sio2_tag) + iop_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&intc_tag, U &&ram_tag, V &&sif_tag, W &&spu_tag, X &&sio2_tag) : iop_dma_device(mconfig, tag, owner, clock) { m_intc.set_tag(std::forward<T>(intc_tag)); @@ -33,7 +33,7 @@ public: m_sio2.set_tag(std::forward<X>(sio2_tag)); } - iop_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iop_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~iop_dma_device() override; uint32_t bank0_r(offs_t offset, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/iopintc.cpp b/src/devices/machine/iopintc.cpp index 15e57e00608..373b6a3e774 100644 --- a/src/devices/machine/iopintc.cpp +++ b/src/devices/machine/iopintc.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(SONYIOP_INTC, iop_intc_device, "iopintc", "PlayStation 2 IOP INTC") -iop_intc_device::iop_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iop_intc_device::iop_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYIOP_INTC, tag, owner, clock) , m_iop(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/iopintc.h b/src/devices/machine/iopintc.h index 5ead2c505fe..c41c61ff6fd 100644 --- a/src/devices/machine/iopintc.h +++ b/src/devices/machine/iopintc.h @@ -21,12 +21,12 @@ class iop_intc_device : public device_t public: template <typename T> iop_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&iop_tag) - : iop_intc_device(mconfig, tag, owner, (uint32_t)0) + : iop_intc_device(mconfig, tag, owner) { m_iop.set_tag(std::forward<T>(iop_tag)); } - iop_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iop_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~iop_intc_device() override; uint32_t read(offs_t offset, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/iopsio2.cpp b/src/devices/machine/iopsio2.cpp index c5b6de09546..84a60623e57 100644 --- a/src/devices/machine/iopsio2.cpp +++ b/src/devices/machine/iopsio2.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(SONYIOP_SIO2, iop_sio2_device, "iopsio2", "PlayStation 2 IOP /*static*/ const size_t iop_sio2_device::BUFFER_SIZE = 512; // total guess based on memcard block size -iop_sio2_device::iop_sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iop_sio2_device::iop_sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYIOP_SIO2, tag, owner, clock) , m_intc(*this, finder_base::DUMMY_TAG) , m_pad0(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/iopsio2.h b/src/devices/machine/iopsio2.h index 67fc395b6f3..7192b7efe2a 100644 --- a/src/devices/machine/iopsio2.h +++ b/src/devices/machine/iopsio2.h @@ -23,7 +23,7 @@ class iop_sio2_device : public device_t public: template <typename T, typename U, typename V, typename W> iop_sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&intc_tag, U &&pad0_tag, V &&pad1_tag, W &&mc0_tag) - : iop_sio2_device(mconfig, tag, owner, (uint32_t)0) + : iop_sio2_device(mconfig, tag, owner) { m_intc.set_tag(std::forward<T>(intc_tag)); m_pad0.set_tag(std::forward<U>(pad0_tag)); @@ -31,7 +31,7 @@ public: m_mc0.set_tag(std::forward<W>(mc0_tag)); } - iop_sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iop_sio2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~iop_sio2_device() override; uint32_t read(offs_t offset, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/ioptimer.cpp b/src/devices/machine/ioptimer.cpp index 54864a00901..292922132f1 100644 --- a/src/devices/machine/ioptimer.cpp +++ b/src/devices/machine/ioptimer.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(SONYIOP_TIMER, iop_timer_device, "ioptimer", "PlayStation 2 IOP timer") -iop_timer_device::iop_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +iop_timer_device::iop_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYIOP_TIMER, tag, owner, clock) , m_compare_timer(nullptr) , m_overflow_timer(nullptr) diff --git a/src/devices/machine/ioptimer.h b/src/devices/machine/ioptimer.h index a7c4891b9dc..2cf4ca928e5 100644 --- a/src/devices/machine/ioptimer.h +++ b/src/devices/machine/ioptimer.h @@ -17,7 +17,7 @@ class iop_timer_device : public device_t { public: - iop_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + iop_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_int_cb.bind(); } diff --git a/src/devices/machine/iwm.cpp b/src/devices/machine/iwm.cpp index b52c01eec83..1db70c91ecb 100644 --- a/src/devices/machine/iwm.cpp +++ b/src/devices/machine/iwm.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(IWM, iwm_device, "iwm", "Apple IWM floppy controller") -iwm_device::iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t q3_clock) : +iwm_device::iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t q3_clock) : applefdintf_device(mconfig, IWM, tag, owner, clock), m_floppy(nullptr), m_q3_clock(q3_clock) diff --git a/src/devices/machine/iwm.h b/src/devices/machine/iwm.h index 73045890d0d..c24d2677c06 100644 --- a/src/devices/machine/iwm.h +++ b/src/devices/machine/iwm.h @@ -22,8 +22,8 @@ class iwm_device: public applefdintf_device { public: // construction/destruction - iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t q3_clock = 0); - iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, XTAL q3_clock) : + iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t q3_clock = 0); + iwm_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, XTAL q3_clock) : iwm_device(mconfig, tag, owner, clock, q3_clock.value()) {} virtual u8 read(offs_t offset) override; diff --git a/src/devices/machine/jvsdev.cpp b/src/devices/machine/jvsdev.cpp index f55a836cd01..650c98e279e 100644 --- a/src/devices/machine/jvsdev.cpp +++ b/src/devices/machine/jvsdev.cpp @@ -3,7 +3,7 @@ #include "emu.h" #include "jvsdev.h" -jvs_device::jvs_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +jvs_device::jvs_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), jvs_outputs(0), host(*this, finder_base::DUMMY_TAG), jvs_address(0), jvs_reset_counter(0) { next_device = nullptr; diff --git a/src/devices/machine/jvsdev.h b/src/devices/machine/jvsdev.h index f7dba299c97..768cd30ef40 100644 --- a/src/devices/machine/jvsdev.h +++ b/src/devices/machine/jvsdev.h @@ -19,7 +19,7 @@ protected: void handle_output(ioport_port *port, uint8_t id, uint8_t val); - jvs_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + jvs_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/machine/jvshost.cpp b/src/devices/machine/jvshost.cpp index 1f720b4fa00..75e4f49a8d1 100644 --- a/src/devices/machine/jvshost.cpp +++ b/src/devices/machine/jvshost.cpp @@ -29,7 +29,7 @@ void jvs_host::device_reset() memset(recv_buffer, 0, sizeof(recv_buffer)); } -jvs_host::jvs_host(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +jvs_host::jvs_host(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), send_size(0), recv_size(0), recv_is_encoded(false) { first_device = nullptr; diff --git a/src/devices/machine/jvshost.h b/src/devices/machine/jvshost.h index c0f8429a1a3..674bdb0afbc 100644 --- a/src/devices/machine/jvshost.h +++ b/src/devices/machine/jvshost.h @@ -13,7 +13,7 @@ public: void add_device(jvs_device *dev); protected: - jvs_host(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + jvs_host(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/machine/k033906.cpp b/src/devices/machine/k033906.cpp index 5ffad3b74eb..d0afff12b2d 100644 --- a/src/devices/machine/k033906.cpp +++ b/src/devices/machine/k033906.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(K033906, k033906_device, "k033906", "K033906 PCI bridge") // k033906_device - constructor //------------------------------------------------- -k033906_device::k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k033906_device::k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K033906, tag, owner, clock) , m_reg_set(0) , m_voodoo(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/k033906.h b/src/devices/machine/k033906.h index 21187ad0541..8cae9f3c46e 100644 --- a/src/devices/machine/k033906.h +++ b/src/devices/machine/k033906.h @@ -18,13 +18,13 @@ class k033906_device : public device_t public: // construction/destruction template <typename T> - k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&voodoo_tag) - : k033906_device(mconfig, tag, owner, clock) + k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&voodoo_tag) + : k033906_device(mconfig, tag, owner) { m_voodoo.set_tag(std::forward<T>(voodoo_tag)); } - k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k033906_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); u32 read(offs_t offset); void write(offs_t offset, u32 data); diff --git a/src/devices/machine/k053252.cpp b/src/devices/machine/k053252.cpp index 6972d0f5c96..f08dc1f71d8 100644 --- a/src/devices/machine/k053252.cpp +++ b/src/devices/machine/k053252.cpp @@ -65,7 +65,7 @@ TODO: DEFINE_DEVICE_TYPE(K053252, k053252_device, "k053252", "K053252 Timing/Interrupt Controller") -k053252_device::k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +k053252_device::k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K053252, tag, owner, clock) , device_video_interface(mconfig, *this) , m_int1_en_cb(*this) diff --git a/src/devices/machine/k053252.h b/src/devices/machine/k053252.h index fec683df1da..f40442682d4 100644 --- a/src/devices/machine/k053252.h +++ b/src/devices/machine/k053252.h @@ -12,7 +12,7 @@ class k053252_device : public device_t, public device_video_interface { public: - k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k053252_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int1_en() { return m_int1_en_cb.bind(); } auto int2_en() { return m_int2_en_cb.bind(); } diff --git a/src/devices/machine/k054321.cpp b/src/devices/machine/k054321.cpp index 6a362f655b2..b9404d056b2 100644 --- a/src/devices/machine/k054321.cpp +++ b/src/devices/machine/k054321.cpp @@ -57,7 +57,7 @@ void k054321_device::sound_map(address_map &map) map(0x3, 0x3).r(m_soundlatch[1], FUNC(generic_latch_8_device::read)); } -k054321_device::k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +k054321_device::k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K054321, tag, owner, clock), m_left(*this, finder_base::DUMMY_TAG), m_right(*this, finder_base::DUMMY_TAG), diff --git a/src/devices/machine/k054321.h b/src/devices/machine/k054321.h index 6c66659372d..450001659bc 100644 --- a/src/devices/machine/k054321.h +++ b/src/devices/machine/k054321.h @@ -13,13 +13,13 @@ class k054321_device : public device_t public: template<typename T, typename U> k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&left, U &&right) : - k054321_device(mconfig, tag, owner, 0) + k054321_device(mconfig, tag, owner) { m_left.set_tag(std::forward<T>(left)); m_right.set_tag(std::forward<U>(right)); } - k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + k054321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void main_map(address_map &map); void sound_map(address_map &map); diff --git a/src/devices/machine/k056230.cpp b/src/devices/machine/k056230.cpp index 7a401c83def..176667e7680 100644 --- a/src/devices/machine/k056230.cpp +++ b/src/devices/machine/k056230.cpp @@ -33,7 +33,7 @@ TODO: nearly everything DEFINE_DEVICE_TYPE(K056230, k056230_device, "k056230", "K056230 LANC") -k056230_device::k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +k056230_device::k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, K056230, tag, owner, clock) , m_ram(*this, "lanc_ram", 0x800U * 4, ENDIANNESS_BIG) , m_irq_cb(*this) diff --git a/src/devices/machine/k056230.h b/src/devices/machine/k056230.h index 7df76c26e53..18cc46ec3fc 100644 --- a/src/devices/machine/k056230.h +++ b/src/devices/machine/k056230.h @@ -15,7 +15,7 @@ class k056230_device : public device_t { public: // construction/destruction - k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + k056230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_cb() { return m_irq_cb.bind(); } diff --git a/src/devices/machine/kb3600.cpp b/src/devices/machine/kb3600.cpp index 9be5846e0c8..290b98e758b 100644 --- a/src/devices/machine/kb3600.cpp +++ b/src/devices/machine/kb3600.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(AY3600, ay3600_device, "ay3600", "AY-5-3600 Keyboard Encoder" // ay3600_device - constructor //------------------------------------------------- -ay3600_device::ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ay3600_device::ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, AY3600, tag, owner, clock), m_read_x0(*this), m_read_x1(*this), diff --git a/src/devices/machine/kb3600.h b/src/devices/machine/kb3600.h index c65bbea3a6f..c1a663c2f5c 100644 --- a/src/devices/machine/kb3600.h +++ b/src/devices/machine/kb3600.h @@ -60,7 +60,7 @@ class ay3600_device : public device_t { public: // construction/destruction - ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ay3600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // public interface uint16_t b_r(); diff --git a/src/devices/machine/keyboard.cpp b/src/devices/machine/keyboard.cpp index eac7263c82c..b11e6c6f6cd 100644 --- a/src/devices/machine/keyboard.cpp +++ b/src/devices/machine/keyboard.cpp @@ -11,7 +11,7 @@ Example of usage in a driver. In the machine config function: - generic_keyboard_device &kbd(GENERIC_KEYBOARD(config, KEYBOARD_TAG, 0)); + generic_keyboard_device &kbd(GENERIC_KEYBOARD(config, KEYBOARD_TAG)); kbd.set_keyboard_callback(FUNC(xxx_state::kbd_put)); In the code: @@ -251,7 +251,7 @@ generic_keyboard_device::generic_keyboard_device( device_type type, char const *tag, device_t *owner, - u32 clock) + const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , device_matrix_keyboard_interface(mconfig, *this, "GENKBD_ROW0", "GENKBD_ROW1", "GENKBD_ROW2", "GENKBD_ROW3") , m_config(*this, "GENKBD_CFG") @@ -262,7 +262,7 @@ generic_keyboard_device::generic_keyboard_device( } -generic_keyboard_device::generic_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +generic_keyboard_device::generic_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : generic_keyboard_device(mconfig, GENERIC_KEYBOARD, tag, owner, clock) { } diff --git a/src/devices/machine/keyboard.h b/src/devices/machine/keyboard.h index 2b4f32e856f..e2364eef3a6 100644 --- a/src/devices/machine/keyboard.h +++ b/src/devices/machine/keyboard.h @@ -77,7 +77,7 @@ public: const machine_config &mconfig, const char *tag, device_t *owner, - u32 clock); + const XTAL &clock); template <typename... T> void set_keyboard_callback(T &&... args) @@ -93,7 +93,7 @@ protected: device_type type, char const *tag, device_t *owner, - u32 clock); + const XTAL &clock); virtual void device_start() override; virtual void device_reset() override; virtual void key_make(u8 row, u8 column) override; diff --git a/src/devices/machine/kr1601rr1.cpp b/src/devices/machine/kr1601rr1.cpp index 561d3f212db..a88a73eab91 100644 --- a/src/devices/machine/kr1601rr1.cpp +++ b/src/devices/machine/kr1601rr1.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(KR1601RR1, kr1601rr1_device, "kr1601rr1", "KR1601RR1 EAROM") // ctor //------------------------------------------------- -kr1601rr1_device::kr1601rr1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kr1601rr1_device::kr1601rr1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, KR1601RR1, tag, owner, clock) , device_nvram_interface(mconfig, *this) { diff --git a/src/devices/machine/kr1601rr1.h b/src/devices/machine/kr1601rr1.h index 49837e42c32..41b71e2201c 100644 --- a/src/devices/machine/kr1601rr1.h +++ b/src/devices/machine/kr1601rr1.h @@ -43,7 +43,7 @@ class kr1601rr1_device : public device_t, public device_nvram_interface { public: // construction/destruction - kr1601rr1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kr1601rr1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/kr2376.cpp b/src/devices/machine/kr2376.cpp index af0abb4169d..f3bf0b860b5 100644 --- a/src/devices/machine/kr2376.cpp +++ b/src/devices/machine/kr2376.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(KR2376_ST, kr2376_st_device, "kr2376_st", "SMC KR2376-ST Keyboard Encoder") DEFINE_DEVICE_TYPE(KR2376_12, kr2376_12_device, "kr2376_12", "SMC KR2376-12 Keyboard Encoder") -kr2376_device::kr2376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +kr2376_device::kr2376_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_read_x(*this), m_read_shift(*this), @@ -22,7 +22,7 @@ kr2376_device::kr2376_device(const machine_config &mconfig, device_type type, co { } -kr2376_st_device::kr2376_st_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kr2376_st_device::kr2376_st_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kr2376_device(mconfig, KR2376_ST, tag, owner, clock) { } @@ -85,7 +85,7 @@ uint8_t kr2376_st_device::key_codes(int mode, int x, int y) return KEY_CODES[mode][x][y]; } -kr2376_12_device::kr2376_12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +kr2376_12_device::kr2376_12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : kr2376_device(mconfig, KR2376_12, tag, owner, clock) { } diff --git a/src/devices/machine/kr2376.h b/src/devices/machine/kr2376.h index 2345ade8c5e..4f7fc9cc739 100644 --- a/src/devices/machine/kr2376.h +++ b/src/devices/machine/kr2376.h @@ -52,7 +52,7 @@ public: KR2376_PO=7 /* PO - Pin 7 - Parity Output */ }; - kr2376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + kr2376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); template <unsigned N> auto x() { return m_read_x[N].bind(); } auto shift() { return m_read_shift.bind(); } @@ -101,7 +101,7 @@ private: class kr2376_st_device : public kr2376_device { public: - kr2376_st_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kr2376_st_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint8_t key_codes(int mode, int x, int y) override; }; @@ -109,7 +109,7 @@ protected: class kr2376_12_device : public kr2376_device { public: - kr2376_12_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kr2376_12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint8_t key_codes(int mode, int x, int y) override; }; diff --git a/src/devices/machine/laserdsc.cpp b/src/devices/machine/laserdsc.cpp index 4184e3e7677..2d572b162ce 100644 --- a/src/devices/machine/laserdsc.cpp +++ b/src/devices/machine/laserdsc.cpp @@ -62,7 +62,7 @@ ALLOW_SAVE_TYPE(laserdisc_device::slider_position); // laserdisc_device - constructor //------------------------------------------------- -laserdisc_device::laserdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +laserdisc_device::laserdisc_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_video_interface(mconfig, *this), @@ -332,7 +332,7 @@ void laserdisc_device::device_stop() void laserdisc_device::device_reset() { // attempt to wire up the audio - m_stream->set_sample_rate(m_samplerate); + m_stream->set_sample_rate(XTAL::u(m_samplerate)); // set up the general ld m_audiosquelch = 3; @@ -856,7 +856,7 @@ void laserdisc_device::init_audio() m_audio_callback.resolve(); // allocate a stream - m_stream = stream_alloc(0, 2, 48000); + m_stream = stream_alloc(0, 2, XTAL::u(48000)); // allocate audio buffers m_audiomaxsamples = ((uint64_t)m_samplerate * 1000000 + m_fps_times_1million - 1) / m_fps_times_1million; diff --git a/src/devices/machine/laserdsc.h b/src/devices/machine/laserdsc.h index abc536a3be0..eaaeb8f1de1 100644 --- a/src/devices/machine/laserdsc.h +++ b/src/devices/machine/laserdsc.h @@ -101,7 +101,7 @@ public: typedef device_delegate<chd_file *(void)> get_disc_delegate; typedef device_delegate<void (int samplerate, int samples, const int16_t *ch0, const int16_t *ch1)> audio_delegate; - laserdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + laserdisc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // use these to add laserdisc screens with proper video update parameters // TODO: actually move these SCREEN_RAW_PARAMS to a common screen info header diff --git a/src/devices/machine/latch8.cpp b/src/devices/machine/latch8.cpp index bfccdc48a30..4c91c81ec64 100644 --- a/src/devices/machine/latch8.cpp +++ b/src/devices/machine/latch8.cpp @@ -99,7 +99,7 @@ void latch8_device::bit7_w(offs_t offset, uint8_t data) { bitx_w<7>(offset, data DEFINE_DEVICE_TYPE(LATCH8, latch8_device, "latch8", "8-bit latch") -latch8_device::latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +latch8_device::latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LATCH8, tag, owner, clock) , m_write_cb(*this) , m_read_cb(*this) diff --git a/src/devices/machine/latch8.h b/src/devices/machine/latch8.h index 0609d3949ff..0fb58c14d5e 100644 --- a/src/devices/machine/latch8.h +++ b/src/devices/machine/latch8.h @@ -22,7 +22,7 @@ class latch8_device : public device_t { public: - latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + latch8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // Write bit to discrete node template <unsigned N> auto write_cb() { return m_write_cb[N].bind(); } diff --git a/src/devices/machine/lc89510.cpp b/src/devices/machine/lc89510.cpp index 649dc01ea8d..7b24e58dc1e 100644 --- a/src/devices/machine/lc89510.cpp +++ b/src/devices/machine/lc89510.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(LC89510, lc89510_device, "lc89510", "LC89510 CD Controller") -lc89510_device::lc89510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lc89510_device::lc89510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LC89510, tag, owner, clock) { } diff --git a/src/devices/machine/lc89510.h b/src/devices/machine/lc89510.h index 4282654136c..956d55c65a9 100644 --- a/src/devices/machine/lc89510.h +++ b/src/devices/machine/lc89510.h @@ -8,7 +8,7 @@ class lc89510_device : public device_t { public: - lc89510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lc89510_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/machine/ldp1000.cpp b/src/devices/machine/ldp1000.cpp index 42f8cb796fe..04aa4e23bcf 100644 --- a/src/devices/machine/ldp1000.cpp +++ b/src/devices/machine/ldp1000.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(SONY_LDP1000, sony_ldp1000_device, "ldp1000", "Sony LDP-1000" // sony_ldp1000_device - constructor //------------------------------------------------- -sony_ldp1000_device::sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sony_ldp1000_device::sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, SONY_LDP1000, tag, owner, clock) { } diff --git a/src/devices/machine/ldp1000.h b/src/devices/machine/ldp1000.h index 2fd79a6a6fc..c112d6cd9c2 100644 --- a/src/devices/machine/ldp1000.h +++ b/src/devices/machine/ldp1000.h @@ -27,7 +27,7 @@ class sony_ldp1000_device : public laserdisc_device { public: // construction/destruction - sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sony_ldp1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations TODO: both actually protected void command_w(uint8_t data); diff --git a/src/devices/machine/ldp1450.cpp b/src/devices/machine/ldp1450.cpp index 2b4d037cab4..2069ec78b92 100644 --- a/src/devices/machine/ldp1450.cpp +++ b/src/devices/machine/ldp1450.cpp @@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(SONY_LDP1450, sony_ldp1450_device, "ldp1450", "Sony LDP-1450" // sony_ldp1450_device - constructor //------------------------------------------------- -sony_ldp1450_device::sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sony_ldp1450_device::sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, SONY_LDP1450, tag, owner, clock) { } diff --git a/src/devices/machine/ldp1450.h b/src/devices/machine/ldp1450.h index 67a429845e1..e57f34096a3 100644 --- a/src/devices/machine/ldp1450.h +++ b/src/devices/machine/ldp1450.h @@ -27,7 +27,7 @@ class sony_ldp1450_device : public laserdisc_device { public: // construction/destruction - sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sony_ldp1450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations TODO: both actually protected void command_w(uint8_t data); diff --git a/src/devices/machine/ldpr8210.cpp b/src/devices/machine/ldpr8210.cpp index a51d84b19ea..df6c3bb4661 100644 --- a/src/devices/machine/ldpr8210.cpp +++ b/src/devices/machine/ldpr8210.cpp @@ -168,12 +168,12 @@ ROM_END // pioneer_pr8210_device - constructor //------------------------------------------------- -pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pioneer_pr8210_device(mconfig, PIONEER_PR8210, tag, owner, clock) { } -pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pioneer_pr8210_device::pioneer_pr8210_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, type, tag, owner, clock), m_audio1(*this, "pr8210_audio1"), m_audio2(*this, "pr8210_audio2"), @@ -884,7 +884,7 @@ ROM_END // simutrek_special_device - constructor //------------------------------------------------- -simutrek_special_device::simutrek_special_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +simutrek_special_device::simutrek_special_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pioneer_pr8210_device(mconfig, SIMUTREK_SPECIAL, tag, owner, clock), m_i8748_cpu(*this, "simutrek"), m_audio_squelch(0), diff --git a/src/devices/machine/ldpr8210.h b/src/devices/machine/ldpr8210.h index 4bc4615c03c..822ca332830 100644 --- a/src/devices/machine/ldpr8210.h +++ b/src/devices/machine/ldpr8210.h @@ -38,13 +38,13 @@ class pioneer_pr8210_device : public laserdisc_device { public: // construction/destruction - pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pioneer_pr8210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // input and output void control_w(uint8_t data); protected: - pioneer_pr8210_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pioneer_pr8210_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; @@ -139,7 +139,7 @@ class simutrek_special_device : public pioneer_pr8210_device { public: // construction/destruction - simutrek_special_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + simutrek_special_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // input and output void data_w(uint8_t data); diff --git a/src/devices/machine/ldstub.cpp b/src/devices/machine/ldstub.cpp index c0c9a7ac05a..38d5560d67a 100644 --- a/src/devices/machine/ldstub.cpp +++ b/src/devices/machine/ldstub.cpp @@ -21,13 +21,13 @@ DEFINE_DEVICE_TYPE(PIONEER_PR7820, pioneer_pr7820_device, "pr7820", "Pioneer DEFINE_DEVICE_TYPE(PHILIPS_22VP932, philips_22vp932_device, "22vp932", "Philips 22VP932") -pioneer_pr7820_device::pioneer_pr7820_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pioneer_pr7820_device::pioneer_pr7820_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, PIONEER_PR7820, tag, owner, clock) { } -philips_22vp932_device::philips_22vp932_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +philips_22vp932_device::philips_22vp932_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, PHILIPS_22VP932, tag, owner, clock) { } diff --git a/src/devices/machine/ldstub.h b/src/devices/machine/ldstub.h index 9fbc756b240..931ee29d600 100644 --- a/src/devices/machine/ldstub.h +++ b/src/devices/machine/ldstub.h @@ -35,7 +35,7 @@ class pioneer_pr7820_device : public laserdisc_device { public: // construction/destruction - pioneer_pr7820_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pioneer_pr7820_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // input/output uint8_t data_available_r() { return CLEAR_LINE; } @@ -58,7 +58,7 @@ class philips_22vp932_device : public laserdisc_device { public: // construction/destruction - philips_22vp932_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + philips_22vp932_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // input/output uint8_t data_r() { return 0; } diff --git a/src/devices/machine/ldv1000.cpp b/src/devices/machine/ldv1000.cpp index 2f382271aaf..82fd1663439 100644 --- a/src/devices/machine/ldv1000.cpp +++ b/src/devices/machine/ldv1000.cpp @@ -101,7 +101,7 @@ ROM_END // pioneer_ldv1000_device - constructor //------------------------------------------------- -pioneer_ldv1000_device::pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pioneer_ldv1000_device::pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, PIONEER_LDV1000, tag, owner, clock), m_z80_cpu(*this, "ldv1000"), m_z80_ctc(*this, "ldvctc"), diff --git a/src/devices/machine/ldv1000.h b/src/devices/machine/ldv1000.h index a4ffa12f5b2..7402a68f7b9 100644 --- a/src/devices/machine/ldv1000.h +++ b/src/devices/machine/ldv1000.h @@ -39,7 +39,7 @@ class pioneer_ldv1000_device : public laserdisc_device { public: // construction/destruction - pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pioneer_ldv1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto command_strobe_callback() { return m_command_strobe_cb.bind(); } diff --git a/src/devices/machine/ldv4200hle.cpp b/src/devices/machine/ldv4200hle.cpp index 577e236fa63..5df5f6965b5 100644 --- a/src/devices/machine/ldv4200hle.cpp +++ b/src/devices/machine/ldv4200hle.cpp @@ -65,7 +65,7 @@ DEFINE_DEVICE_TYPE(PIONEER_LDV4200HLE, pioneer_ldv4200hle_device, "ldv4200hle", // pioneer_ldv4200hle_device - constructor //------------------------------------------------- -pioneer_ldv4200hle_device::pioneer_ldv4200hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pioneer_ldv4200hle_device::pioneer_ldv4200hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, PIONEER_LDV4200HLE, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_serial_tx(*this) diff --git a/src/devices/machine/ldv4200hle.h b/src/devices/machine/ldv4200hle.h index c7ee5738e2a..cf0f77989b8 100644 --- a/src/devices/machine/ldv4200hle.h +++ b/src/devices/machine/ldv4200hle.h @@ -46,7 +46,7 @@ class pioneer_ldv4200hle_device : public laserdisc_device, public device_serial_ { public: // construction/destruction - pioneer_ldv4200hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pioneer_ldv4200hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto serial_tx() { return m_serial_tx.bind(); } diff --git a/src/devices/machine/ldvp931.cpp b/src/devices/machine/ldvp931.cpp index 012d23591fb..3a6ee4f2709 100644 --- a/src/devices/machine/ldvp931.cpp +++ b/src/devices/machine/ldvp931.cpp @@ -77,7 +77,7 @@ ROM_END // philips_22vp931_device - constructor //------------------------------------------------- -philips_22vp931_device::philips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +philips_22vp931_device::philips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : laserdisc_device(mconfig, PHILIPS_22VP931, tag, owner, clock), m_i8049_cpu(*this, "vp931"), m_process_vbi_timer(nullptr), diff --git a/src/devices/machine/ldvp931.h b/src/devices/machine/ldvp931.h index cffc81cc9dc..7a7aea09875 100644 --- a/src/devices/machine/ldvp931.h +++ b/src/devices/machine/ldvp931.h @@ -40,7 +40,7 @@ public: typedef delegate<void (philips_22vp931_device &, int)> data_ready_delegate; // construction/destruction - philips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + philips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // input and output void data_w(uint8_t data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(philips_22vp931_device::process_deferred_data), this), data); } diff --git a/src/devices/machine/legscsi.cpp b/src/devices/machine/legscsi.cpp index c379c797f73..1807fc684c0 100644 --- a/src/devices/machine/legscsi.cpp +++ b/src/devices/machine/legscsi.cpp @@ -3,7 +3,7 @@ #include "emu.h" #include "legscsi.h" -legacy_scsi_host_adapter::legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +legacy_scsi_host_adapter::legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_selected(0) , m_scsi_port(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/legscsi.h b/src/devices/machine/legscsi.h index 229580bc0bf..ad9459fb6a2 100644 --- a/src/devices/machine/legscsi.h +++ b/src/devices/machine/legscsi.h @@ -14,7 +14,7 @@ public: template <typename T> void set_scsi_port(T && tag) { m_scsi_port.set_tag(std::forward<T>(tag)); } protected: - legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; diff --git a/src/devices/machine/lh5810.cpp b/src/devices/machine/lh5810.cpp index 054a532dff0..a37bc10cbda 100644 --- a/src/devices/machine/lh5810.cpp +++ b/src/devices/machine/lh5810.cpp @@ -48,7 +48,7 @@ DEFINE_DEVICE_TYPE(LH5810, lh5810_device, "lh5810", "LH5810 I/O Port") // lh5810_device - constructor //------------------------------------------------- -lh5810_device::lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lh5810_device::lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LH5810, tag, owner, clock) , m_porta_r_cb(*this) , m_porta_w_cb(*this) diff --git a/src/devices/machine/lh5810.h b/src/devices/machine/lh5810.h index a383d0047eb..16e3a573506 100644 --- a/src/devices/machine/lh5810.h +++ b/src/devices/machine/lh5810.h @@ -15,7 +15,7 @@ class lh5810_device : public device_t { public: // construction/destruction - lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto porta_r() { return m_porta_r_cb.bind(); } auto porta_w() { return m_porta_w_cb.bind(); } diff --git a/src/devices/machine/linflash.cpp b/src/devices/machine/linflash.cpp index 25b5257dd0b..149ad07e3a0 100644 --- a/src/devices/machine/linflash.cpp +++ b/src/devices/machine/linflash.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(LINEAR_FLASH_PCCARD_32MB, linear_flash_pccard_32mb_device, "l DEFINE_DEVICE_TYPE(LINEAR_FLASH_PCCARD_64MB, linear_flash_pccard_64mb_device, "linearflash64mb", "Linear Flash PC Card (64MB)") -linear_flash_pccard_device::linear_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +linear_flash_pccard_device::linear_flash_pccard_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_pccard_interface(mconfig, *this), device_memory_interface(mconfig, *this), @@ -53,7 +53,7 @@ void linear_flash_pccard_16mb_device::linear_flash_pccard_16mb(address_map &map) map(0x00c00000, 0x00ffffff).rw("4u", FUNC(intelfsh8_device::read), FUNC(intelfsh8_device::write)).umask16(0xff00); } -linear_flash_pccard_16mb_device::linear_flash_pccard_16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +linear_flash_pccard_16mb_device::linear_flash_pccard_16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : linear_flash_pccard_device(mconfig, LINEAR_FLASH_PCCARD_16MB, tag, owner, clock) { m_space_config = address_space_config("memory", ENDIANNESS_LITTLE, 16, 26, 0, address_map_constructor(FUNC(linear_flash_pccard_16mb_device::linear_flash_pccard_16mb), this)); @@ -93,7 +93,7 @@ void linear_flash_pccard_32mb_device::linear_flash_pccard_32mb(address_map &map) map(0x01c00000, 0x01ffffff).rw("8u", FUNC(intelfsh8_device::read), FUNC(intelfsh8_device::write)).umask16(0xff00); } -linear_flash_pccard_32mb_device::linear_flash_pccard_32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +linear_flash_pccard_32mb_device::linear_flash_pccard_32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : linear_flash_pccard_device(mconfig, LINEAR_FLASH_PCCARD_32MB, tag, owner, clock) { m_space_config = address_space_config("memory", ENDIANNESS_LITTLE, 16, 26, 0, address_map_constructor(FUNC(linear_flash_pccard_32mb_device::linear_flash_pccard_32mb), this)); @@ -157,7 +157,7 @@ void linear_flash_pccard_64mb_device::linear_flash_pccard_64mb(address_map &map) map(0x03c00000, 0x03ffffff).rw("16u", FUNC(intelfsh8_device::read), FUNC(intelfsh8_device::write)).umask16(0xff00); } -linear_flash_pccard_64mb_device::linear_flash_pccard_64mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +linear_flash_pccard_64mb_device::linear_flash_pccard_64mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : linear_flash_pccard_device(mconfig, LINEAR_FLASH_PCCARD_64MB, tag, owner, clock) { m_space_config = address_space_config("memory", ENDIANNESS_LITTLE, 16, 26, 0, address_map_constructor(FUNC(linear_flash_pccard_64mb_device::linear_flash_pccard_64mb), this)); diff --git a/src/devices/machine/linflash.h b/src/devices/machine/linflash.h index 20f4559e98d..bbb1d6fc821 100644 --- a/src/devices/machine/linflash.h +++ b/src/devices/machine/linflash.h @@ -17,7 +17,7 @@ public: virtual void write_memory(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; protected: - linear_flash_pccard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + linear_flash_pccard_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; @@ -33,7 +33,7 @@ protected: class linear_flash_pccard_16mb_device : public linear_flash_pccard_device { public: - linear_flash_pccard_16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + linear_flash_pccard_16mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -47,7 +47,7 @@ private: class linear_flash_pccard_32mb_device : public linear_flash_pccard_device { public: - linear_flash_pccard_32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + linear_flash_pccard_32mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -61,7 +61,7 @@ private: class linear_flash_pccard_64mb_device : public linear_flash_pccard_device { public: - linear_flash_pccard_64mb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + linear_flash_pccard_64mb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/machine/locomo.cpp b/src/devices/machine/locomo.cpp index 01cae8787ce..f888e1c1c70 100644 --- a/src/devices/machine/locomo.cpp +++ b/src/devices/machine/locomo.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(LOCOMO, locomo_device, "locomo", "Sharp LoCoMo Peripheral") -locomo_device::locomo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +locomo_device::locomo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, LOCOMO, tag, owner, clock) { } diff --git a/src/devices/machine/locomo.h b/src/devices/machine/locomo.h index ac240959d9f..d143a2e06ea 100644 --- a/src/devices/machine/locomo.h +++ b/src/devices/machine/locomo.h @@ -14,7 +14,7 @@ class locomo_device : public device_t { public: - locomo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + locomo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint32_t read(offs_t offset, uint32_t mem_mask = ~0U); void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0U); diff --git a/src/devices/machine/lpc-acpi.cpp b/src/devices/machine/lpc-acpi.cpp index b252ffd2c3b..0ee555ce1ae 100644 --- a/src/devices/machine/lpc-acpi.cpp +++ b/src/devices/machine/lpc-acpi.cpp @@ -38,7 +38,7 @@ void lpc_acpi_device::map(address_map &map) map(0x70, 0x70).rw(FUNC(lpc_acpi_device::sw_irq_gen_r), FUNC(lpc_acpi_device::sw_irq_gen_w)); } -lpc_acpi_device::lpc_acpi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lpc_acpi_device::lpc_acpi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : lpc_device(mconfig, LPC_ACPI, tag, owner, clock) { } diff --git a/src/devices/machine/lpc-acpi.h b/src/devices/machine/lpc-acpi.h index 1cd64636a10..2e21c7d1ad0 100644 --- a/src/devices/machine/lpc-acpi.h +++ b/src/devices/machine/lpc-acpi.h @@ -9,7 +9,7 @@ class lpc_acpi_device : public lpc_device { public: - lpc_acpi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lpc_acpi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map_device(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/machine/lpc-pit.cpp b/src/devices/machine/lpc-pit.cpp index e15f1893045..3c18f762be7 100644 --- a/src/devices/machine/lpc-pit.cpp +++ b/src/devices/machine/lpc-pit.cpp @@ -13,7 +13,7 @@ void lpc_pit_device::map(address_map &map) map(0x53, 0x53).w(FUNC(lpc_pit_device::control_w)); } -lpc_pit_device::lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lpc_pit_device::lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : lpc_device(mconfig, LPC_PIT, tag, owner, clock) { } diff --git a/src/devices/machine/lpc-pit.h b/src/devices/machine/lpc-pit.h index aa83b6af5ce..cbba7788a1e 100644 --- a/src/devices/machine/lpc-pit.h +++ b/src/devices/machine/lpc-pit.h @@ -9,7 +9,7 @@ class lpc_pit_device : public lpc_device { public: - lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lpc_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map_device(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/machine/lpc-rtc.cpp b/src/devices/machine/lpc-rtc.cpp index e584d96cd6c..3c65efb66c2 100644 --- a/src/devices/machine/lpc-rtc.cpp +++ b/src/devices/machine/lpc-rtc.cpp @@ -17,7 +17,7 @@ void lpc_rtc_device::extmap(address_map &map) map(0x70, 0x77).rw(FUNC(lpc_rtc_device::exttarget_r), FUNC(lpc_rtc_device::exttarget_w)).umask32(0xff000000); } -lpc_rtc_device::lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +lpc_rtc_device::lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : lpc_device(mconfig, LPC_RTC, tag, owner, clock), cur_index(0), cur_extindex(0) { } diff --git a/src/devices/machine/lpc-rtc.h b/src/devices/machine/lpc-rtc.h index 5243bcf7f8a..c59ac5827a5 100644 --- a/src/devices/machine/lpc-rtc.h +++ b/src/devices/machine/lpc-rtc.h @@ -9,7 +9,7 @@ class lpc_rtc_device : public lpc_device { public: - lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + lpc_rtc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map_device(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/machine/lpci.cpp b/src/devices/machine/lpci.cpp index 44b8b84bf3d..836915a776f 100644 --- a/src/devices/machine/lpci.cpp +++ b/src/devices/machine/lpci.cpp @@ -91,7 +91,7 @@ DEFINE_DEVICE_TYPE(PCI_BUS_LEGACY, pci_bus_legacy_device, "pci_bus_legacy", "PCI //------------------------------------------------- // pci_bus_legacy_device - constructor //------------------------------------------------- -pci_bus_legacy_device::pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pci_bus_legacy_device::pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCI_BUS_LEGACY, tag, owner, clock), m_read_callback(*this), m_write_callback(*this), diff --git a/src/devices/machine/lpci.h b/src/devices/machine/lpci.h index fb289d5538f..e0d1e99ac08 100644 --- a/src/devices/machine/lpci.h +++ b/src/devices/machine/lpci.h @@ -26,12 +26,12 @@ public: typedef device_delegate<void (int function, int reg, uint32_t data, uint32_t mem_mask)> pci_bus_legacy_write_delegate; // construction/destruction - pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint8_t busnum) - : pci_bus_legacy_device(mconfig, tag, owner, clock) + pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint8_t busnum) + : pci_bus_legacy_device(mconfig, tag, owner) { set_busnum(busnum); } - pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint32_t read(offs_t offset, uint32_t mem_mask = ~0); void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/m3002.cpp b/src/devices/machine/m3002.cpp index 1e021571896..ccc3c2e8922 100644 --- a/src/devices/machine/m3002.cpp +++ b/src/devices/machine/m3002.cpp @@ -34,7 +34,7 @@ ALLOW_SAVE_TYPE(m3002_device::mux_state); // m3002_device - constructor //------------------------------------------------- -m3002_device::m3002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +m3002_device::m3002_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_nvram_interface(mconfig, *this) , device_rtc_interface(mconfig, *this) @@ -48,7 +48,7 @@ m3002_device::m3002_device(const machine_config &mconfig, device_type type, cons std::fill_n(&m_ram[0], 0x10, 0); } -m3002_device::m3002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m3002_device::m3002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m3002_device(mconfig, M3002, tag, owner, clock) { } @@ -58,7 +58,7 @@ m3002_device::m3002_device(const machine_config &mconfig, const char *tag, devic // m3000_device - constructor //------------------------------------------------- -m3000_device::m3000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m3000_device::m3000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m3002_device(mconfig, M3000, tag, owner, clock) { } diff --git a/src/devices/machine/m3002.h b/src/devices/machine/m3002.h index b02d13429eb..04ed31b8c74 100644 --- a/src/devices/machine/m3002.h +++ b/src/devices/machine/m3002.h @@ -35,7 +35,7 @@ class m3002_device : public device_t, public device_nvram_interface, public devi { public: // device type constructor - m3002_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m3002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_out() { return m_irq_callback.bind(); } @@ -48,7 +48,7 @@ public: DECLARE_READ_LINE_MEMBER(irq_r) { return m_irq_active ? 0 : 1; } protected: - m3002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + m3002_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -105,7 +105,7 @@ class m3000_device : public m3002_device { public: // device type constructor - m3000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m3000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type declarations diff --git a/src/devices/machine/m68sfdc.cpp b/src/devices/machine/m68sfdc.cpp index 99a0b3b4580..922e0fe100a 100644 --- a/src/devices/machine/m68sfdc.cpp +++ b/src/devices/machine/m68sfdc.cpp @@ -14,7 +14,7 @@ #include "emu.h" #include "m68sfdc.h" -m68sfdc_device::m68sfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m68sfdc_device::m68sfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M68SFDC, tag, owner, clock), m_pia(*this, "pia"), m_ssda(*this, "ssda"), @@ -835,7 +835,7 @@ bool m68sfdc_device::pll_write_next_bit(bool bit, attotime &tm, floppy_image_dev void m68sfdc_device::device_add_mconfig(machine_config &config) { - PIA6821(config, m_pia, 0); + PIA6821(config, m_pia); m_pia->readpa_handler().set(FUNC(m68sfdc_device::pia_pa_r)); m_pia->writepa_handler().set(FUNC(m68sfdc_device::pia_pa_w)); m_pia->ca1_w(0); @@ -847,7 +847,7 @@ void m68sfdc_device::device_add_mconfig(machine_config &config) m_pia->irqa_handler().set(FUNC(m68sfdc_device::handle_nmi)); m_pia->irqb_handler().set(FUNC(m68sfdc_device::handle_irq)); - MC6852(config, m_ssda, 0); + MC6852(config, m_ssda); } DEFINE_DEVICE_TYPE(M68SFDC, m68sfdc_device, "m68sfdc", "M68SFDC") diff --git a/src/devices/machine/m68sfdc.h b/src/devices/machine/m68sfdc.h index 605ac628583..d4d5d10608b 100644 --- a/src/devices/machine/m68sfdc.h +++ b/src/devices/machine/m68sfdc.h @@ -19,7 +19,7 @@ INPUT_PORTS_EXTERN(m68sfdc); class m68sfdc_device : public device_t { public: - m68sfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m68sfdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t reg, uint8_t val); uint8_t read(offs_t reg); diff --git a/src/devices/machine/m6m80011ap.cpp b/src/devices/machine/m6m80011ap.cpp index 937f9e815e1..f4f06d398df 100644 --- a/src/devices/machine/m6m80011ap.cpp +++ b/src/devices/machine/m6m80011ap.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(M6M80011AP, m6m80011ap_device, "m6m80011ap", "M6M80011AP EEPR // m6m80011ap_device - constructor //------------------------------------------------- -m6m80011ap_device::m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6m80011ap_device::m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, M6M80011AP, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_latch(0), m_reset_line(0), m_cmd_stream_pos(0), m_current_cmd(0), m_read_latch(0), m_current_addr(0), m_eeprom_we(0), m_eeprom_state() diff --git a/src/devices/machine/m6m80011ap.h b/src/devices/machine/m6m80011ap.h index c288b9da633..b8eddb4cc61 100644 --- a/src/devices/machine/m6m80011ap.h +++ b/src/devices/machine/m6m80011ap.h @@ -10,7 +10,7 @@ class m6m80011ap_device : public device_t, { public: // construction/destruction - m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); /* TODO: frequency */ + m6m80011ap_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 32'768); /* TODO: frequency */ // I/O operations DECLARE_READ_LINE_MEMBER( read_bit ); diff --git a/src/devices/machine/m950x0.cpp b/src/devices/machine/m950x0.cpp index 9d42166804c..2f8bd3e2aad 100644 --- a/src/devices/machine/m950x0.cpp +++ b/src/devices/machine/m950x0.cpp @@ -43,18 +43,18 @@ m950x0_device::m950x0_device(const machine_config &mconfig, device_type type, co size(capacity, 8); } -m95010_device::m95010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : m950x0_device(mconfig, M95010, tag, owner, 0x80) +m95010_device::m95010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : m950x0_device(mconfig, M95010, tag, ownerx80) { } -m95020_device::m95020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : m950x0_device(mconfig, M95020, tag, owner, 0x100) +m95020_device::m95020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : m950x0_device(mconfig, M95020, tag, ownerx100) { } -m95040_device::m95040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : m950x0_device(mconfig, M95040, tag, owner, 0x200) +m95040_device::m95040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : m950x0_device(mconfig, M95040, tag, ownerx200) { } diff --git a/src/devices/machine/m950x0.h b/src/devices/machine/m950x0.h index 0eceb6fab21..e045ad8f7c1 100644 --- a/src/devices/machine/m950x0.h +++ b/src/devices/machine/m950x0.h @@ -75,19 +75,19 @@ protected: class m95010_device : public m950x0_device { public: - m95010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + m95010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class m95020_device : public m950x0_device { public: - m95020_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + m95020_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class m95040_device : public m950x0_device { public: - m95040_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + m95040_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(M95010, m95010_device) diff --git a/src/devices/machine/mb14241.cpp b/src/devices/machine/mb14241.cpp index c9d08eb503e..0cdd87a7b57 100644 --- a/src/devices/machine/mb14241.cpp +++ b/src/devices/machine/mb14241.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(MB14241, mb14241_device, "mb14241", "MB14241 Data Shifter") -mb14241_device::mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mb14241_device::mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB14241, tag, owner, clock), m_shift_data(0), m_shift_count(0) { } diff --git a/src/devices/machine/mb14241.h b/src/devices/machine/mb14241.h index 00bc2a55949..673c787bafa 100644 --- a/src/devices/machine/mb14241.h +++ b/src/devices/machine/mb14241.h @@ -14,7 +14,7 @@ class mb14241_device : public device_t { public: - mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mb14241_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void shift_count_w(u8 data); void shift_data_w(u8 data); diff --git a/src/devices/machine/mb3773.cpp b/src/devices/machine/mb3773.cpp index e5ce23e13e6..39c51959fe8 100644 --- a/src/devices/machine/mb3773.cpp +++ b/src/devices/machine/mb3773.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(MB3773, mb3773_device, "mb3773", "MB3773 Power Supply Monitor // mb3773_device - constructor //------------------------------------------------- -mb3773_device::mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +mb3773_device::mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, MB3773, tag, owner, clock), m_watchdog_timer(nullptr), m_ck(0) { } diff --git a/src/devices/machine/mb3773.h b/src/devices/machine/mb3773.h index 5955c1fa372..8f641bfc2c6 100644 --- a/src/devices/machine/mb3773.h +++ b/src/devices/machine/mb3773.h @@ -17,7 +17,7 @@ class mb3773_device : public device_t { public: // construction/destruction - mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mb3773_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // I/O operations WRITE_LINE_MEMBER( write_line_ck ); diff --git a/src/devices/machine/mb8421.h b/src/devices/machine/mb8421.h index f112f1e1484..c7bd387c7d0 100644 --- a/src/devices/machine/mb8421.h +++ b/src/devices/machine/mb8421.h @@ -150,7 +150,7 @@ public: DECLARE_READ_LINE_MEMBER(busy_r) { return 0; } // _BUSY pin - not emulated protected: - dual_port_mailbox_ram_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + dual_port_mailbox_ram_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) , m_intl_callback(*this) , m_intr_callback(*this) @@ -229,7 +229,7 @@ private: class cy7c131_device : public dual_port_mailbox_ram_base<u8, 10, 8> { public: - cy7c131_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + cy7c131_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : dual_port_mailbox_ram_base<u8, 10, 8>(mconfig, CY7C131, tag, owner, clock) // 1kx8 { } @@ -240,7 +240,7 @@ public: class idt7130_device : public dual_port_mailbox_ram_base<u8, 10, 8> { public: - idt7130_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + idt7130_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : dual_port_mailbox_ram_base<u8, 10, 8>(mconfig, IDT7130, tag, owner, clock) // 1kx8 { } @@ -251,7 +251,7 @@ public: class idt71321_device : public dual_port_mailbox_ram_base<u8, 11, 8> { public: - idt71321_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + idt71321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : dual_port_mailbox_ram_base<u8, 11, 8>(mconfig, IDT71321, tag, owner, clock) // 2kx8 { } @@ -262,7 +262,7 @@ public: class mb8421_device : public dual_port_mailbox_ram_base<u8, 11, 8> { public: - mb8421_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + mb8421_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : dual_port_mailbox_ram_base<u8, 11, 8>(mconfig, MB8421, tag, owner, clock) // 2kx8 { } @@ -273,7 +273,7 @@ public: class mb8421_mb8431_16_device : public dual_port_mailbox_ram_base<u16, 11, 16> { public: - mb8421_mb8431_16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + mb8421_mb8431_16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : dual_port_mailbox_ram_base<u16, 11, 16>(mconfig, MB8421_MB8431_16BIT, tag, owner, clock) // 2kx16 { } diff --git a/src/devices/machine/mb87030.cpp b/src/devices/machine/mb87030.cpp index 1898f69ec67..13ce1eeff68 100644 --- a/src/devices/machine/mb87030.cpp +++ b/src/devices/machine/mb87030.cpp @@ -10,13 +10,13 @@ DEFINE_DEVICE_TYPE(MB87030, mb87030_device, "mb87030", "Fujitsu MB87030 SCSI controller") -mb87030_device::mb87030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mb87030_device::mb87030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mb87030_device(mconfig, MB87030, tag, owner, clock) { } -mb87030_device::mb87030_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +mb87030_device::mb87030_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, type, tag, owner, clock), nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF), m_irq_handler(*this), diff --git a/src/devices/machine/mb87030.h b/src/devices/machine/mb87030.h index d2e90a506f4..e7a1684a405 100644 --- a/src/devices/machine/mb87030.h +++ b/src/devices/machine/mb87030.h @@ -11,7 +11,7 @@ class mb87030_device : public nscsi_device, public nscsi_slot_card_interface { public: - mb87030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb87030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map); @@ -58,7 +58,7 @@ public: void ctrl_write(uint32_t value, uint32_t mask) { scsi_bus->ctrl_w(scsi_refid, value, mask); scsi_ctrl_changed(); } uint32_t data_read() { return scsi_bus->data_r(); } protected: - mb87030_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mb87030_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; diff --git a/src/devices/machine/mb87078.cpp b/src/devices/machine/mb87078.cpp index eed6f53297a..9be63b8a552 100644 --- a/src/devices/machine/mb87078.cpp +++ b/src/devices/machine/mb87078.cpp @@ -79,7 +79,7 @@ DEFINE_DEVICE_TYPE(MB87078, mb87078_device, "mb87078", "MB87078 Volume Controller") -mb87078_device::mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mb87078_device::mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB87078, tag, owner, clock), m_gain_changed_cb(*this) { diff --git a/src/devices/machine/mb87078.h b/src/devices/machine/mb87078.h index 500a53b02a6..975a1139878 100644 --- a/src/devices/machine/mb87078.h +++ b/src/devices/machine/mb87078.h @@ -14,7 +14,7 @@ class mb87078_device : public device_t { public: - mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mb87078_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto gain_changed() { return m_gain_changed_cb.bind(); } diff --git a/src/devices/machine/mb8795.cpp b/src/devices/machine/mb8795.cpp index 957b53a2655..04288290256 100644 --- a/src/devices/machine/mb8795.cpp +++ b/src/devices/machine/mb8795.cpp @@ -19,7 +19,7 @@ void mb8795_device::map(address_map &map) map(0x8, 0xf).rw(FUNC(mb8795_device::mac_r), FUNC(mb8795_device::mac_w)); // Mapping limitation, real is up to 0xd } -mb8795_device::mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mb8795_device::mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB8795, tag, owner, clock), device_network_interface(mconfig, *this, 10), txstat(0), txmask(0), rxstat(0), rxmask(0), txmode(0), rxmode(0), txlen(0), rxlen(0), txcount(0), diff --git a/src/devices/machine/mb8795.h b/src/devices/machine/mb8795.h index 57daf378f66..638363a3450 100644 --- a/src/devices/machine/mb8795.h +++ b/src/devices/machine/mb8795.h @@ -9,7 +9,7 @@ class mb8795_device : public device_t, public device_network_interface { public: - mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto tx_irq() { return irq_tx_cb.bind(); } auto rx_irq() { return irq_rx_cb.bind(); } diff --git a/src/devices/machine/mb89352.cpp b/src/devices/machine/mb89352.cpp index 24777cd0289..921c451f398 100644 --- a/src/devices/machine/mb89352.cpp +++ b/src/devices/machine/mb89352.cpp @@ -155,7 +155,7 @@ DEFINE_DEVICE_TYPE(MB89352A, mb89352_device, "mb89352", "Fujitsu MB89352A") * Device */ -mb89352_device::mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mb89352_device::mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : legacy_scsi_host_adapter(mconfig, MB89352A, tag, owner, clock), m_irq_cb(*this), m_drq_cb(*this) diff --git a/src/devices/machine/mb89352.h b/src/devices/machine/mb89352.h index 1032dd547d7..43cb6d4a023 100644 --- a/src/devices/machine/mb89352.h +++ b/src/devices/machine/mb89352.h @@ -15,7 +15,7 @@ class mb89352_device : public legacy_scsi_host_adapter { public: // construction/destruction - mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mb89352_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_cb() { return m_irq_cb.bind(); } auto drq_cb() { return m_drq_cb.bind(); } diff --git a/src/devices/machine/mb89363b.cpp b/src/devices/machine/mb89363b.cpp index dae0d4a3372..3cf04bbe40d 100644 --- a/src/devices/machine/mb89363b.cpp +++ b/src/devices/machine/mb89363b.cpp @@ -83,7 +83,7 @@ DEFINE_DEVICE_TYPE(MB89363B, mb89363b_device, "mb89363b", "Fujitsu MB89363B I/O") -mb89363b_device::mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mb89363b_device::mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MB89363B, tag, owner, clock), m_i8255_a(*this, "i8255_a"), m_i8255_b(*this, "i8255_b"), diff --git a/src/devices/machine/mb89363b.h b/src/devices/machine/mb89363b.h index 273642f96f5..71efc26d4cf 100644 --- a/src/devices/machine/mb89363b.h +++ b/src/devices/machine/mb89363b.h @@ -21,7 +21,7 @@ class mb89363b_device : public device_t { public: // construction/destruction - mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mb89363b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mb89371.cpp b/src/devices/machine/mb89371.cpp index 7393bd7d529..deffdfa8108 100644 --- a/src/devices/machine/mb89371.cpp +++ b/src/devices/machine/mb89371.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(MB89371, mb89371_device, "mb89371", "MB89371 Dual Serial UART") -mb89371_device::mb89371_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +mb89371_device::mb89371_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, MB89371, tag, owner, clock) { } diff --git a/src/devices/machine/mb89371.h b/src/devices/machine/mb89371.h index 4fe1c8158d2..79d05d787fa 100644 --- a/src/devices/machine/mb89371.h +++ b/src/devices/machine/mb89371.h @@ -18,7 +18,7 @@ class mb89371_device : public device_t { public: // construction/destruction - mb89371_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb89371_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint8_t data, uint8_t mem_mask = ~0); uint8_t read(offs_t offset, uint8_t mem_mask = ~0); diff --git a/src/devices/machine/mb89374.cpp b/src/devices/machine/mb89374.cpp index 7cad4c899d6..74ac6c08910 100644 --- a/src/devices/machine/mb89374.cpp +++ b/src/devices/machine/mb89374.cpp @@ -99,7 +99,7 @@ enum // mb89374_device - constructor //------------------------------------------------- -mb89374_device::mb89374_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) : +mb89374_device::mb89374_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t(mconfig, MB89374, tag, owner, clock), device_execute_interface(mconfig, *this), m_icount(0), diff --git a/src/devices/machine/mb89374.h b/src/devices/machine/mb89374.h index 4ea6878641f..1229e0bb181 100644 --- a/src/devices/machine/mb89374.h +++ b/src/devices/machine/mb89374.h @@ -43,7 +43,7 @@ class mb89374_device : public device_t, { public: // construction/destruction - mb89374_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb89374_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_irq_callback() { return m_out_irq_cb.bind(); } template <unsigned N> auto out_po_callback() { return m_out_po_cb[N].bind(); } diff --git a/src/devices/machine/mc14411.cpp b/src/devices/machine/mc14411.cpp index 722de11b35e..f7fab924077 100644 --- a/src/devices/machine/mc14411.cpp +++ b/src/devices/machine/mc14411.cpp @@ -89,12 +89,12 @@ DEFINE_DEVICE_TYPE(MC14411, mc14411_device, "mc14411", "MC14411 Bit Rate Generat // LIVE DEVICE //************************************************************************** -mc14411_device::mc14411_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc14411_device::mc14411_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc14411_device(mconfig, MC14411, tag, owner, clock) { } -mc14411_device::mc14411_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mc14411_device::mc14411_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_out_fx_cbs(*this) , m_divider(0) diff --git a/src/devices/machine/mc14411.h b/src/devices/machine/mc14411.h index 422e381bcb2..e9b25e89585 100644 --- a/src/devices/machine/mc14411.h +++ b/src/devices/machine/mc14411.h @@ -58,7 +58,7 @@ public: }; // construction/destruction - mc14411_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc14411_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <std::size_t Line> auto out_f() { return m_out_fx_cbs[Line-1].bind(); } @@ -71,7 +71,7 @@ public: void timer_disable_all(); protected: - mc14411_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mc14411_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/machine/mc146818.cpp b/src/devices/machine/mc146818.cpp index c5cabdfd528..f89261875e5 100644 --- a/src/devices/machine/mc146818.cpp +++ b/src/devices/machine/mc146818.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(DS1287, ds1287_device, "ds1287", "DS1287 RTC") // mc146818_device - constructor //------------------------------------------------- -mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc146818_device(mconfig, MC146818, tag, owner, clock) { switch (clock) @@ -44,12 +44,12 @@ mc146818_device::mc146818_device(const machine_config &mconfig, const char *tag, } } -ds1287_device::ds1287_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ds1287_device::ds1287_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc146818_device(mconfig, DS1287, tag, owner, clock) { } -mc146818_device::mc146818_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mc146818_device::mc146818_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_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), diff --git a/src/devices/machine/mc146818.h b/src/devices/machine/mc146818.h index 44eb0a54337..bb566919077 100644 --- a/src/devices/machine/mc146818.h +++ b/src/devices/machine/mc146818.h @@ -22,7 +22,7 @@ class mc146818_device : public device_t, { public: // construction/destruction - mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc146818_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto irq() { return m_write_irq.bind(); } @@ -48,7 +48,7 @@ public: void write_direct(offs_t offset, uint8_t data); protected: - mc146818_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mc146818_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; @@ -175,7 +175,7 @@ protected: class ds1287_device : public mc146818_device { public: - ds1287_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1287_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/mc68328.cpp b/src/devices/machine/mc68328.cpp index e1753110d56..e58e8055ac6 100644 --- a/src/devices/machine/mc68328.cpp +++ b/src/devices/machine/mc68328.cpp @@ -210,7 +210,7 @@ void mc68328_device::cpu_space_map(address_map &map) } -mc68328_device::mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68328_device::mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_device(mconfig, tag, owner, clock, MC68328, 16, 24, address_map_constructor(FUNC(mc68328_device::internal_map), this)) , m_rtc(nullptr), m_pwm(nullptr) , m_out_port_a_cb(*this) diff --git a/src/devices/machine/mc68328.h b/src/devices/machine/mc68328.h index da28189db18..4ece2accddb 100644 --- a/src/devices/machine/mc68328.h +++ b/src/devices/machine/mc68328.h @@ -93,7 +93,7 @@ class mc68328_device : public m68000_device { public: - mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68328_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_port_a() { return m_out_port_a_cb.bind(); } auto out_port_b() { return m_out_port_b_cb.bind(); } diff --git a/src/devices/machine/mc6843.cpp b/src/devices/machine/mc6843.cpp index 0987b494a27..7c9a0df5839 100644 --- a/src/devices/machine/mc6843.cpp +++ b/src/devices/machine/mc6843.cpp @@ -8,7 +8,7 @@ DEFINE_DEVICE_TYPE(MC6843, mc6843_device, "mc6843", "Motorola MC6843 FDC") -mc6843_device::mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6843_device::mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC6843, tag, owner, clock), m_irq(*this), m_force_ready(false) diff --git a/src/devices/machine/mc6843.h b/src/devices/machine/mc6843.h index 86a92757279..a2522d9bc0e 100644 --- a/src/devices/machine/mc6843.h +++ b/src/devices/machine/mc6843.h @@ -16,7 +16,7 @@ class mc6843_device : public device_t { public: - mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void force_ready() { m_force_ready = true; } diff --git a/src/devices/machine/mc6844.cpp b/src/devices/machine/mc6844.cpp index a88b497a271..96a8a5b9ed6 100644 --- a/src/devices/machine/mc6844.cpp +++ b/src/devices/machine/mc6844.cpp @@ -77,7 +77,7 @@ DEFINE_DEVICE_TYPE(MC6844, mc6844_device, "mc6844", "MC6844 DMA") //------------------------------------------------- // mc6844_device - constructor //------------------------------------------------- -mc6844_device::mc6844_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6844_device::mc6844_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC6844, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_out_int_cb(*this) diff --git a/src/devices/machine/mc6844.h b/src/devices/machine/mc6844.h index 242528454a6..16561b73bbc 100644 --- a/src/devices/machine/mc6844.h +++ b/src/devices/machine/mc6844.h @@ -48,7 +48,7 @@ class mc6844_device : public device_t, public device_execute_interface { public: // construction/destruction - mc6844_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6844_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_int_callback() { return m_out_int_cb.bind(); } auto out_txak_callback() { return m_out_txak_cb.bind(); } diff --git a/src/devices/machine/mc6846.cpp b/src/devices/machine/mc6846.cpp index 7cacedc9656..5fcd5f7c9e7 100644 --- a/src/devices/machine/mc6846.cpp +++ b/src/devices/machine/mc6846.cpp @@ -46,7 +46,7 @@ DEFINE_DEVICE_TYPE(MC6846, mc6846_device, "mc6846", "MC6846 Programmable Timer") -mc6846_device::mc6846_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc6846_device::mc6846_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC6846, tag, owner, clock), m_out_port_cb(*this), m_out_cp2_cb(*this), diff --git a/src/devices/machine/mc6846.h b/src/devices/machine/mc6846.h index 3569e78bb98..c4601dec045 100644 --- a/src/devices/machine/mc6846.h +++ b/src/devices/machine/mc6846.h @@ -17,7 +17,7 @@ class mc6846_device : public device_t { public: - mc6846_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6846_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_port() { return m_out_port_cb.bind(); } auto in_port() { return m_in_port_cb.bind(); } diff --git a/src/devices/machine/mc6852.cpp b/src/devices/machine/mc6852.cpp index 714e093aed3..996b31eca2b 100644 --- a/src/devices/machine/mc6852.cpp +++ b/src/devices/machine/mc6852.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(MC6852, mc6852_device, "mc6852", "Motorola MC6852 SSDA") // mc6852_device - constructor //------------------------------------------------- -mc6852_device::mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mc6852_device::mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC6852, tag, owner, clock), device_serial_interface(mconfig, *this), m_write_tx_data(*this), diff --git a/src/devices/machine/mc6852.h b/src/devices/machine/mc6852.h index 27e7ec9f962..8d954d2e507 100644 --- a/src/devices/machine/mc6852.h +++ b/src/devices/machine/mc6852.h @@ -42,7 +42,7 @@ class mc6852_device : public device_t, { public: // construction/destruction - mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_rx_clock(int clock) { m_rx_clock = clock; } void set_tx_clock(int clock) { m_tx_clock = clock; } diff --git a/src/devices/machine/mc6854.cpp b/src/devices/machine/mc6854.cpp index 55418ee0d23..569d3dfd813 100644 --- a/src/devices/machine/mc6854.cpp +++ b/src/devices/machine/mc6854.cpp @@ -139,7 +139,7 @@ static const int word_length[4] = { 5, 6, 7, 8 }; /* transmit / receive word len DEFINE_DEVICE_TYPE(MC6854, mc6854_device, "mc6854", "Motorola MC6854 ADLC") -mc6854_device::mc6854_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mc6854_device::mc6854_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC6854, tag, owner, clock), m_out_irq_cb(*this), m_out_rdsr_cb(*this), diff --git a/src/devices/machine/mc6854.h b/src/devices/machine/mc6854.h index 2e2fe6fa663..bc68e4137ae 100644 --- a/src/devices/machine/mc6854.h +++ b/src/devices/machine/mc6854.h @@ -21,7 +21,7 @@ public: typedef device_delegate<void (uint8_t *data, int length)> out_frame_delegate; - mc6854_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mc6854_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto out_irq_cb() { return m_out_irq_cb.bind(); } auto out_rdsr_cb() { return m_out_rdsr_cb.bind(); } diff --git a/src/devices/machine/mc68681.cpp b/src/devices/machine/mc68681.cpp index 8e647f4c2ab..ce33d8fbc79 100644 --- a/src/devices/machine/mc68681.cpp +++ b/src/devices/machine/mc68681.cpp @@ -112,7 +112,7 @@ DEFINE_DEVICE_TYPE(DUART_CHANNEL, duart_channel, "duart_channel", "DUART channel // LIVE DEVICE //************************************************************************** -duart_base_device::duart_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +duart_base_device::duart_base_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_chanA(*this, CHANA_TAG), m_chanB(*this, CHANB_TAG), @@ -134,23 +134,23 @@ duart_base_device::duart_base_device(const machine_config &mconfig, device_type { } -scn2681_device::scn2681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scn2681_device::scn2681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duart_base_device(mconfig, SCN2681, tag, owner, clock) { } -mc68681_device::mc68681_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mc68681_device::mc68681_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : duart_base_device(mconfig, type, tag, owner, clock), m_read_vector(false) { } -mc68681_device::mc68681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68681_device::mc68681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68681_device(mconfig, MC68681, tag, owner, clock) { } -sc28c94_device::sc28c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sc28c94_device::sc28c94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duart_base_device(mconfig, SC28C94, tag, owner, clock) { } @@ -162,17 +162,17 @@ sc28c94_device::sc28c94_device(const machine_config &mconfig, const char *tag, d // that the code knows all of this and will not warn if those registers are accessed as it could be ported code. // TODO: A lot of subtle differences and also detect misuse of unavailable registers as they should be ignored //-------------------------------------------------------------------------------------------------------------------- -mc68340_duart_device::mc68340_duart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mc68340_duart_device::mc68340_duart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : duart_base_device(mconfig, type, tag, owner, clock) { } -mc68340_duart_device::mc68340_duart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mc68340_duart_device::mc68340_duart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68340_duart_device(mconfig, MC68340_DUART, tag, owner, clock) { } -xr68c681_device::xr68c681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +xr68c681_device::xr68c681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mc68681_device(mconfig, XR68C681, tag, owner, clock), m_XTXA(false), m_XRXA(false), @@ -277,22 +277,22 @@ void xr68c681_device::device_reset() void duart_base_device::device_add_mconfig(machine_config &config) { - DUART_CHANNEL(config, CHANA_TAG, 0); - DUART_CHANNEL(config, CHANB_TAG, 0); + DUART_CHANNEL(config, CHANA_TAG); + DUART_CHANNEL(config, CHANB_TAG); } void sc28c94_device::device_add_mconfig(machine_config &config) { - DUART_CHANNEL(config, CHANA_TAG, 0); - DUART_CHANNEL(config, CHANB_TAG, 0); - DUART_CHANNEL(config, CHANC_TAG, 0); - DUART_CHANNEL(config, CHAND_TAG, 0); + DUART_CHANNEL(config, CHANA_TAG); + DUART_CHANNEL(config, CHANB_TAG); + DUART_CHANNEL(config, CHANC_TAG); + DUART_CHANNEL(config, CHAND_TAG); } void mc68340_duart_device::device_add_mconfig(machine_config &config) { - DUART_CHANNEL(config, CHANA_TAG, 0); - DUART_CHANNEL(config, CHANB_TAG, 0); + DUART_CHANNEL(config, CHANA_TAG); + DUART_CHANNEL(config, CHANB_TAG); } void duart_base_device::update_interrupts() @@ -1160,7 +1160,7 @@ void duart_base_device::set_ISR_bits(int mask) // DUART channel class stuff -duart_channel::duart_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duart_channel::duart_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DUART_CHANNEL, tag, owner, clock) , device_serial_interface(mconfig, *this) , MR1(0) diff --git a/src/devices/machine/mc68681.h b/src/devices/machine/mc68681.h index b47e7276cd8..30d7f1c9b6d 100644 --- a/src/devices/machine/mc68681.h +++ b/src/devices/machine/mc68681.h @@ -16,7 +16,7 @@ class duart_base_device; class duart_channel : public device_t, public device_serial_interface { public: - duart_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duart_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -98,7 +98,6 @@ public: optional_device<duart_channel> m_chanD; // inline configuration helpers - void set_clocks(int clk3, int clk4, int clk5, int clk6); void set_clocks(const XTAL &clk3, const XTAL &clk4, const XTAL &clk5, const XTAL &clk6) { set_clocks(clk3.value(), clk4.value(), clk5.value(), clk6.value()); } @@ -128,7 +127,7 @@ public: bool irq_pending() const { return (ISR & IMR) != 0; } protected: - duart_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + duart_base_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; @@ -167,6 +166,7 @@ private: bool m_irq_state; + void set_clocks(int clk3, int clk4, int clk5, int clk6); uint32_t get_ct_rate(); uint16_t get_ct_count(); void start_ct(int count); @@ -198,13 +198,13 @@ private: class scn2681_device : public duart_base_device { public: - scn2681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scn2681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mc68681_device : public duart_base_device { public: - mc68681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; @@ -214,7 +214,7 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual void update_interrupts() override; - mc68681_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mc68681_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: bool m_read_vector; // if this is read and IRQ is active, it counts as pulling IACK @@ -225,7 +225,7 @@ private: class sc28c94_device : public duart_base_device { public: - sc28c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sc28c94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto c_tx_cb() { return write_c_tx.bind(); } auto d_tx_cb() { return write_d_tx.bind(); } @@ -245,14 +245,14 @@ private: class mc68340_duart_device : public duart_base_device { public: - mc68340_duart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mc68340_duart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; protected: virtual void device_add_mconfig(machine_config &config) override; - mc68340_duart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mc68340_duart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: virtual int calc_baud(int ch, bool rx, uint8_t data) override; @@ -261,7 +261,7 @@ private: class xr68c681_device : public mc68681_device { public: - xr68c681_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xr68c681_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read(offs_t offset) override; virtual void write(offs_t offset, uint8_t data) override; diff --git a/src/devices/machine/mc68901.cpp b/src/devices/machine/mc68901.cpp index ed0282770e9..cf235cb43a7 100644 --- a/src/devices/machine/mc68901.cpp +++ b/src/devices/machine/mc68901.cpp @@ -345,7 +345,7 @@ void mc68901_device::gpio_output() // mc68901_device - constructor //------------------------------------------------- -mc68901_device::mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mc68901_device::mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MC68901, tag, owner, clock), m_timer_clock(0), m_out_irq_cb(*this), diff --git a/src/devices/machine/mc68901.h b/src/devices/machine/mc68901.h index 0e992c78941..2291f046559 100644 --- a/src/devices/machine/mc68901.h +++ b/src/devices/machine/mc68901.h @@ -50,7 +50,7 @@ class mc68901_device : public device_t { public: // construction/destruction - mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mc68901_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_timer_clock(int timer_clock) { m_timer_clock = timer_clock; } void set_timer_clock(const XTAL &xtal) { set_timer_clock(xtal.value()); } diff --git a/src/devices/machine/mccs1850.cpp b/src/devices/machine/mccs1850.cpp index 367b58af135..7072b09729f 100644 --- a/src/devices/machine/mccs1850.cpp +++ b/src/devices/machine/mccs1850.cpp @@ -280,7 +280,7 @@ TIMER_CALLBACK_MEMBER(mccs1850_device::advance_seconds) // mccs1850_device - constructor //------------------------------------------------- -mccs1850_device::mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mccs1850_device::mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MCCS1850, tag, owner, clock), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/machine/mccs1850.h b/src/devices/machine/mccs1850.h index cdd3b2853bc..48c9941d7c0 100644 --- a/src/devices/machine/mccs1850.h +++ b/src/devices/machine/mccs1850.h @@ -37,7 +37,7 @@ class mccs1850_device : public device_t, { public: // construction/destruction - mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mccs1850_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_wr_callback() { return int_cb.bind(); } auto pse_wr_callback() { return pse_cb.bind(); } diff --git a/src/devices/machine/mcf5206e.cpp b/src/devices/machine/mcf5206e.cpp index eb4695be03a..6ef44232748 100644 --- a/src/devices/machine/mcf5206e.cpp +++ b/src/devices/machine/mcf5206e.cpp @@ -823,7 +823,7 @@ DEFINE_DEVICE_TYPE(MCF5206E_PERIPHERAL, mcf5206e_peripheral_device, "mcf5206e_pe // mcf5206e_peripheral_device - constructor //------------------------------------------------- -mcf5206e_peripheral_device::mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mcf5206e_peripheral_device::mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MCF5206E_PERIPHERAL, tag, owner, clock), device_memory_interface(mconfig, *this), m_maincpu(*this, finder_base::DUMMY_TAG), diff --git a/src/devices/machine/mcf5206e.h b/src/devices/machine/mcf5206e.h index d4ec0dd7980..f2799e16a5c 100644 --- a/src/devices/machine/mcf5206e.h +++ b/src/devices/machine/mcf5206e.h @@ -24,13 +24,13 @@ class mcf5206e_peripheral_device : public device_t, public: // construction/destruction template <typename T> - mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) - : mcf5206e_peripheral_device(mconfig, tag, owner, clock) + mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) + : mcf5206e_peripheral_device(mconfig, tag, owner) { m_maincpu.set_tag(std::forward<T>(cpu_tag)); } - mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint32_t dev_r(offs_t offset, uint32_t mem_mask = ~0); void dev_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/meters.cpp b/src/devices/machine/meters.cpp index 93ab6fd7fdc..28bc542cdf3 100644 --- a/src/devices/machine/meters.cpp +++ b/src/devices/machine/meters.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(METERS, meters_device, "meters", "Electromechanical meters") -meters_device::meters_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +meters_device::meters_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, METERS, tag, owner, clock) , m_number_mtr(0) { diff --git a/src/devices/machine/meters.h b/src/devices/machine/meters.h index c8dc68a5800..681e32de009 100644 --- a/src/devices/machine/meters.h +++ b/src/devices/machine/meters.h @@ -15,7 +15,7 @@ class meters_device : public device_t { public: - meters_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + meters_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_number(int number) { m_number_mtr = number; } diff --git a/src/devices/machine/microtch.cpp b/src/devices/machine/microtch.cpp index 7f4562f02f1..2d25a36fa4e 100644 --- a/src/devices/machine/microtch.cpp +++ b/src/devices/machine/microtch.cpp @@ -63,7 +63,7 @@ COM8 3F0-3F7 ON : ON : : ON DEFINE_DEVICE_TYPE(MICROTOUCH, microtouch_device, "microtouch", "Microtouch Touchscreen") -microtouch_device::microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +microtouch_device::microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MICROTOUCH, tag, owner, clock), device_serial_interface(mconfig, *this), m_rx_buffer_ptr(0), m_tx_buffer_num(0), m_tx_buffer_ptr(0), m_reset_done(0), m_format(0), m_mode(0), m_last_touch_state(0), diff --git a/src/devices/machine/microtch.h b/src/devices/machine/microtch.h index b7242f4cca3..929ee3c585c 100644 --- a/src/devices/machine/microtch.h +++ b/src/devices/machine/microtch.h @@ -14,7 +14,7 @@ class microtouch_device : public: typedef device_delegate<int (int *, int *)> touch_cb; - microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto stx() { return m_out_stx_func.bind(); } DECLARE_WRITE_LINE_MEMBER(rx) { device_serial_interface::rx_w(state); } diff --git a/src/devices/machine/mm5307.cpp b/src/devices/machine/mm5307.cpp index 30032913ad0..c7614089a80 100644 --- a/src/devices/machine/mm5307.cpp +++ b/src/devices/machine/mm5307.cpp @@ -88,7 +88,7 @@ const std::array<u16, 16> mm5307ab_device::s_divisors_x2 = { // mm5307_device - constructor //------------------------------------------------- -mm5307_device::mm5307_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const std::array<u16, 16> &divisors_x2) +mm5307_device::mm5307_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const std::array<u16, 16> &divisors_x2) : device_t(mconfig, type, tag, owner, clock) , m_divisors_x2(divisors_x2) , m_output_cb(*this) @@ -104,7 +104,7 @@ mm5307_device::mm5307_device(const machine_config &mconfig, device_type type, co // mm5307aa_device - constructor //------------------------------------------------- -mm5307aa_device::mm5307aa_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mm5307aa_device::mm5307aa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm5307_device(mconfig, MM5307AA, tag, owner, clock, s_divisors_x2) { } @@ -114,7 +114,7 @@ mm5307aa_device::mm5307aa_device(const machine_config &mconfig, const char *tag, // mm5307ab_device - constructor //------------------------------------------------- -mm5307ab_device::mm5307ab_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mm5307ab_device::mm5307ab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm5307_device(mconfig, MM5307AB, tag, owner, clock, s_divisors_x2) { } diff --git a/src/devices/machine/mm5307.h b/src/devices/machine/mm5307.h index c1e6dad8f89..75dfb171080 100644 --- a/src/devices/machine/mm5307.h +++ b/src/devices/machine/mm5307.h @@ -40,7 +40,7 @@ public: protected: // base class constructor - mm5307_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const std::array<u16, 16> &divisors_x2); + mm5307_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const std::array<u16, 16> &divisors_x2); // device-specific overrides virtual void device_resolve_objects() override; @@ -74,7 +74,7 @@ class mm5307aa_device : public mm5307_device { public: // construction/destruction - mm5307aa_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm5307aa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static const std::array<u16, 16> s_divisors_x2; @@ -86,7 +86,7 @@ class mm5307ab_device : public mm5307_device { public: // construction/destruction - mm5307ab_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + mm5307ab_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: static const std::array<u16, 16> s_divisors_x2; diff --git a/src/devices/machine/mm5740.cpp b/src/devices/machine/mm5740.cpp index feabf787fe0..5d6cb821f27 100644 --- a/src/devices/machine/mm5740.cpp +++ b/src/devices/machine/mm5740.cpp @@ -43,7 +43,7 @@ const tiny_rom_entry *mm5740_device::device_rom_region() const // mm5740_device - constructor //------------------------------------------------- -mm5740_device::mm5740_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mm5740_device::mm5740_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MM5740, tag, owner, clock), m_read_x(*this), m_read_shift(*this), diff --git a/src/devices/machine/mm5740.h b/src/devices/machine/mm5740.h index c1e4eb81f70..4c352f7371b 100644 --- a/src/devices/machine/mm5740.h +++ b/src/devices/machine/mm5740.h @@ -89,7 +89,7 @@ class mm5740_device : public device_t { public: // construction/destruction - mm5740_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm5740_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // public interface uint16_t b_r(); diff --git a/src/devices/machine/mm58167.cpp b/src/devices/machine/mm58167.cpp index 9363a80c6f4..ae30c51ff09 100644 --- a/src/devices/machine/mm58167.cpp +++ b/src/devices/machine/mm58167.cpp @@ -52,7 +52,7 @@ typedef enum // mm58167_device - constructor //------------------------------------------------- -mm58167_device::mm58167_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mm58167_device::mm58167_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MM58167, tag, owner, clock), device_rtc_interface(mconfig, *this), m_irq_w(*this) diff --git a/src/devices/machine/mm58167.h b/src/devices/machine/mm58167.h index 82cf173ca95..8fcd6776945 100644 --- a/src/devices/machine/mm58167.h +++ b/src/devices/machine/mm58167.h @@ -25,7 +25,7 @@ class mm58167_device : public device_t, { public: // construction/destruction - mm58167_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm58167_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mm58174.cpp b/src/devices/machine/mm58174.cpp index 3d15060666a..4b0e0bb1f88 100644 --- a/src/devices/machine/mm58174.cpp +++ b/src/devices/machine/mm58174.cpp @@ -34,7 +34,7 @@ enum DEFINE_DEVICE_TYPE(MM58174, mm58174_device, "mm58174", "National Semiconductor MM58174 RTC") -mm58174_device::mm58174_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mm58174_device::mm58174_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MM58174, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_control(0) diff --git a/src/devices/machine/mm58174.h b/src/devices/machine/mm58174.h index 72fbfc85502..a084ca4bbb8 100644 --- a/src/devices/machine/mm58174.h +++ b/src/devices/machine/mm58174.h @@ -15,7 +15,7 @@ class mm58174_device : public device_t, public device_rtc_interface { public: - mm58174_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm58174_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mm58274c.cpp b/src/devices/machine/mm58274c.cpp index cfc50472653..66b7b4c49c6 100644 --- a/src/devices/machine/mm58274c.cpp +++ b/src/devices/machine/mm58274c.cpp @@ -47,7 +47,7 @@ enum DEFINE_DEVICE_TYPE(MM58274C, mm58274c_device, "mm58274c", "National Semiconductor MM58274C RTC") -mm58274c_device::mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mm58274c_device::mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MM58274C, tag, owner, clock) , m_mode24(0) , m_day1(0) diff --git a/src/devices/machine/mm58274c.h b/src/devices/machine/mm58274c.h index c6fcbee3c46..2d838b221c3 100644 --- a/src/devices/machine/mm58274c.h +++ b/src/devices/machine/mm58274c.h @@ -10,7 +10,7 @@ class mm58274c_device : public device_t { public: - mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm58274c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_mode24(int mode) { m_mode24 = mode; } void set_day1(int day) { m_day1 = day; } diff --git a/src/devices/machine/mm74c922.cpp b/src/devices/machine/mm74c922.cpp index add765a1b1e..42cb30146ae 100644 --- a/src/devices/machine/mm74c922.cpp +++ b/src/devices/machine/mm74c922.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(MM74C923, mm74c923_device, "mm74c923", "MM74C923 20-Key Encod // mm74c922_device - constructor //------------------------------------------------- -mm74c922_device::mm74c922_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int max_y) : +mm74c922_device::mm74c922_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int max_y) : device_t(mconfig, type, tag, owner, clock), m_write_da(*this), m_read_x(*this), m_tristate_data(*this), m_cap_osc(0), m_cap_debounce(0), @@ -46,12 +46,12 @@ mm74c922_device::mm74c922_device(const machine_config &mconfig, device_type type { } -mm74c922_device::mm74c922_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mm74c922_device::mm74c922_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm74c922_device(mconfig, MM74C922, tag, owner, clock, 4) { } -mm74c923_device::mm74c923_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mm74c923_device::mm74c923_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mm74c922_device(mconfig, MM74C923, tag, owner, clock, 5) { } diff --git a/src/devices/machine/mm74c922.h b/src/devices/machine/mm74c922.h index 43c958bb4b7..74ecc1c68e5 100644 --- a/src/devices/machine/mm74c922.h +++ b/src/devices/machine/mm74c922.h @@ -46,7 +46,7 @@ class mm74c922_device : public device_t { public: // construction/destruction - mm74c922_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm74c922_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_cap_osc(double value) { m_cap_osc = value; } void set_cap_debounce(double value) { m_cap_debounce = value; } @@ -63,7 +63,7 @@ public: DECLARE_READ_LINE_MEMBER(da_r) { return m_da; } protected: - mm74c922_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int max_y); + mm74c922_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int max_y); // device-level overrides virtual void device_start() override; @@ -104,7 +104,7 @@ class mm74c923_device : public mm74c922_device { public: // construction/destruction - mm74c923_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mm74c923_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/mos6526.cpp b/src/devices/machine/mos6526.cpp index a35d9a9c573..c743ec440d1 100644 --- a/src/devices/machine/mos6526.cpp +++ b/src/devices/machine/mos6526.cpp @@ -587,7 +587,7 @@ void mos6526_device::synchronize() // mos6526_device - constructor //------------------------------------------------- -mos6526_device::mos6526_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +mos6526_device::mos6526_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_execute_interface(mconfig, *this), m_icount(0), @@ -604,17 +604,17 @@ mos6526_device::mos6526_device(const machine_config &mconfig, device_type type, { } -mos6526_device::mos6526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6526_device::mos6526_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6526_device(mconfig, MOS6526, tag, owner, clock, TYPE_6526) { } -mos6526a_device::mos6526a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6526a_device::mos6526a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6526_device(mconfig, MOS6526A, tag, owner, clock, TYPE_6526A) { } -mos8520_device::mos8520_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8520_device::mos8520_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6526_device(mconfig, MOS8520, tag, owner, clock, TYPE_8520) { } -mos5710_device::mos5710_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos5710_device::mos5710_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6526_device(mconfig, MOS5710, tag, owner, clock, TYPE_5710) { } diff --git a/src/devices/machine/mos6526.h b/src/devices/machine/mos6526.h index 1f515271537..17fb72a4a49 100644 --- a/src/devices/machine/mos6526.h +++ b/src/devices/machine/mos6526.h @@ -72,7 +72,7 @@ class mos6526_device : public device_t, { public: // construction/destruction - mos6526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6526_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_tod_clock(int clock) { m_tod_clock = clock; } @@ -108,7 +108,7 @@ protected: TYPE_5710 }; - mos6526_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + mos6526_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; @@ -218,7 +218,7 @@ protected: class mos6526a_device : public mos6526_device { public: - mos6526a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6526a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -227,7 +227,7 @@ public: class mos8520_device : public mos6526_device { public: - mos8520_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8520_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); @@ -242,7 +242,7 @@ protected: class mos5710_device : public mos6526_device { public: - mos5710_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos5710_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); //uint8_t read(offs_t offset); //void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mos6529.cpp b/src/devices/machine/mos6529.cpp index 46bbf3bc0b8..3fbdd2dce5e 100644 --- a/src/devices/machine/mos6529.cpp +++ b/src/devices/machine/mos6529.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(MOS6529, mos6529_device, "mos6529", "MOS 6529") // mos6529_device - constructor //------------------------------------------------- -mos6529_device::mos6529_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mos6529_device::mos6529_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS6529, tag, owner, clock), m_input(0), m_p_handler(*this) diff --git a/src/devices/machine/mos6529.h b/src/devices/machine/mos6529.h index 67806441d57..780e69db95c 100644 --- a/src/devices/machine/mos6529.h +++ b/src/devices/machine/mos6529.h @@ -37,7 +37,7 @@ class mos6529_device : public device_t { public: // construction/destruction - mos6529_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6529_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <std::size_t Bit> auto p_handler() { return m_p_handler[Bit].bind(); } diff --git a/src/devices/machine/mos6530.cpp b/src/devices/machine/mos6530.cpp index 3862b0699e8..4efa3b915c7 100644 --- a/src/devices/machine/mos6530.cpp +++ b/src/devices/machine/mos6530.cpp @@ -41,7 +41,7 @@ enum DEFINE_DEVICE_TYPE(MOS6530, mos6530_device, "mos6530", "MOS 6530 MIOT") -mos6530_device::mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6530_device::mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS6530, tag, owner, clock), m_in_pa_cb(*this), m_out_pa_cb(*this), diff --git a/src/devices/machine/mos6530.h b/src/devices/machine/mos6530.h index 25e11a38f97..88015ee878d 100644 --- a/src/devices/machine/mos6530.h +++ b/src/devices/machine/mos6530.h @@ -46,7 +46,7 @@ class mos6530_device : public device_t { public: - mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_pa_callback() { return m_in_pa_cb.bind(); } auto out_pa_callback() { return m_out_pa_cb.bind(); } diff --git a/src/devices/machine/mos6530n.cpp b/src/devices/machine/mos6530n.cpp index fab3833e387..e91868babd8 100644 --- a/src/devices/machine/mos6530n.cpp +++ b/src/devices/machine/mos6530n.cpp @@ -84,7 +84,7 @@ void mos6532_new_device::io_map(address_map &map) // mos6530_device_base - constructor //------------------------------------------------- -mos6530_device_base::mos6530_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, u32 rsize) : +mos6530_device_base::mos6530_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 rsize) : device_t(mconfig, type, tag, owner, clock), m_ram(*this, finder_base::DUMMY_TAG, rsize, ENDIANNESS_LITTLE), m_rom(*this, DEVICE_SELF), @@ -120,7 +120,7 @@ mos6530_device_base::mos6530_device_base(const machine_config &mconfig, device_t // mos6530_new_device - constructor //------------------------------------------------- -mos6530_new_device::mos6530_new_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6530_new_device::mos6530_new_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6530_device_base(mconfig, MOS6530_NEW, tag, owner, clock, 0x40) { } @@ -128,7 +128,7 @@ mos6530_new_device::mos6530_new_device(const machine_config &mconfig, const char // mos6532_new_device - constructor //------------------------------------------------- -mos6532_new_device::mos6532_new_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6532_new_device::mos6532_new_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : mos6530_device_base(mconfig, MOS6532_NEW, tag, owner, clock, 0x80) { } diff --git a/src/devices/machine/mos6530n.h b/src/devices/machine/mos6530n.h index 164a07031b0..d1c6476b5d6 100644 --- a/src/devices/machine/mos6530n.h +++ b/src/devices/machine/mos6530n.h @@ -96,7 +96,7 @@ public: protected: // construction/destruction - mos6530_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, u32 rsize); + mos6530_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 rsize); // device-level overrides virtual void device_start() override; @@ -200,7 +200,7 @@ class mos6530_new_device : public mos6530_device_base { public: // construction/destruction - mos6530_new_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6530_new_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void rom_map(address_map &map); virtual void ram_map(address_map &map); @@ -218,7 +218,7 @@ class mos6532_new_device : public mos6530_device_base { public: // construction/destruction - mos6532_new_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6532_new_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void ram_map(address_map &map); virtual void io_map(address_map &map); diff --git a/src/devices/machine/mos6551.cpp b/src/devices/machine/mos6551.cpp index 56302c75050..528646f1a5a 100644 --- a/src/devices/machine/mos6551.cpp +++ b/src/devices/machine/mos6551.cpp @@ -15,7 +15,7 @@ DEFINE_DEVICE_TYPE(MOS6551, mos6551_device, "mos6551", "MOS 6551 ACIA") -mos6551_device::mos6551_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mos6551_device::mos6551_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS6551, tag, owner, clock), m_internal_clock(*this, "clock"), m_irq_handler(*this), @@ -65,7 +65,7 @@ const int mos6551_device::transmitter_controls[4][3] = void mos6551_device::device_add_mconfig(machine_config &config) { - CLOCK(config, m_internal_clock, 0); + CLOCK(config, m_internal_clock); m_internal_clock->signal_handler().set(FUNC(mos6551_device::internal_clock)); } diff --git a/src/devices/machine/mos6551.h b/src/devices/machine/mos6551.h index b7afabfa603..8a893346eed 100644 --- a/src/devices/machine/mos6551.h +++ b/src/devices/machine/mos6551.h @@ -33,7 +33,7 @@ class mos6551_device : public device_t { public: - mos6551_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mos6551_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_handler() { return m_irq_handler.bind(); } auto txd_handler() { return m_txd_handler.bind(); } diff --git a/src/devices/machine/mos6702.cpp b/src/devices/machine/mos6702.cpp index 1b552054cb4..5960bf7359f 100644 --- a/src/devices/machine/mos6702.cpp +++ b/src/devices/machine/mos6702.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(MOS6702, mos6702_device, "mos6702", "MOS 6702") // mos6702_device - constructor //------------------------------------------------- -mos6702_device::mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos6702_device::mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS6702, tag, owner, clock) { } diff --git a/src/devices/machine/mos6702.h b/src/devices/machine/mos6702.h index ab1ea945e6e..fa5fa39c29f 100644 --- a/src/devices/machine/mos6702.h +++ b/src/devices/machine/mos6702.h @@ -35,7 +35,7 @@ class mos6702_device : public device_t { public: // construction/destruction - mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos6702_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mos8706.cpp b/src/devices/machine/mos8706.cpp index 3ac0a976310..e8db0974bd9 100644 --- a/src/devices/machine/mos8706.cpp +++ b/src/devices/machine/mos8706.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(MOS8706, mos8706_device, "mos8706", "MOS 8706") // mos8706_device - constructor //------------------------------------------------- -mos8706_device::mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8706_device::mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS8706, tag, owner, clock) { } diff --git a/src/devices/machine/mos8706.h b/src/devices/machine/mos8706.h index a1d1a225e0e..ce9320b37cc 100644 --- a/src/devices/machine/mos8706.h +++ b/src/devices/machine/mos8706.h @@ -38,7 +38,7 @@ class mos8706_device : public device_t { public: - mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8706_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mos8722.cpp b/src/devices/machine/mos8722.cpp index 0364460b63e..d766e385492 100644 --- a/src/devices/machine/mos8722.cpp +++ b/src/devices/machine/mos8722.cpp @@ -69,7 +69,7 @@ static const offs_t RCR_TOP_ADDRESS[4] = { 0xf000, 0xf000, 0xe000, 0xc000 }; // mos8722_device - constructor //------------------------------------------------- -mos8722_device::mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mos8722_device::mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS8722, tag, owner, clock), m_write_z80en(*this), m_write_fsdir(*this), diff --git a/src/devices/machine/mos8722.h b/src/devices/machine/mos8722.h index 2b80aa846c2..18c44e047c6 100644 --- a/src/devices/machine/mos8722.h +++ b/src/devices/machine/mos8722.h @@ -48,7 +48,7 @@ class mos8722_device : public device_t { public: // construction/destruction - mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8722_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto z80en() { return m_write_z80en.bind(); } auto fsdir() { return m_write_fsdir.bind(); } diff --git a/src/devices/machine/mos8726.cpp b/src/devices/machine/mos8726.cpp index e1f167d70d3..70f83b32a1a 100644 --- a/src/devices/machine/mos8726.cpp +++ b/src/devices/machine/mos8726.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(MOS8726, mos8726_device, "mos8726", "MOS 8726 DMA Controller" // mos8726_device - constructor //------------------------------------------------- -mos8726_device::mos8726_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8726_device::mos8726_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MOS8726, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_icount(0) diff --git a/src/devices/machine/mos8726.h b/src/devices/machine/mos8726.h index 90b78ec8412..1773a051c45 100644 --- a/src/devices/machine/mos8726.h +++ b/src/devices/machine/mos8726.h @@ -58,7 +58,7 @@ class mos8726_device : public device_t, { public: // construction/destruction - mos8726_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mos8726_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t read(offs_t offset); void write(offs_t offset, uint8_t data); diff --git a/src/devices/machine/mpu401.cpp b/src/devices/machine/mpu401.cpp index e2959a432a9..11c735dbfba 100644 --- a/src/devices/machine/mpu401.cpp +++ b/src/devices/machine/mpu401.cpp @@ -83,7 +83,7 @@ DEFINE_DEVICE_TYPE(MPU401, mpu401_device, "mpu401", "Roland MPU-401 I/O box") void mpu401_device::device_add_mconfig(machine_config &config) { - M6801(config, m_ourcpu, 4000000); /* 4 MHz as per schematics */ + M6801(config, m_ourcpu, XTAL::u(4000000)); /* 4 MHz as per schematics */ m_ourcpu->set_addrmap(AS_PROGRAM, &mpu401_device::mpu401_map); m_ourcpu->in_p1_cb().set(FUNC(mpu401_device::port1_r)); m_ourcpu->out_p1_cb().set(FUNC(mpu401_device::port1_w)); @@ -113,7 +113,7 @@ const tiny_rom_entry *mpu401_device::device_rom_region() const // mpu401_device - constructor //------------------------------------------------- -mpu401_device::mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mpu401_device::mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MPU401, tag, owner, clock), m_ourcpu(*this, M6801_TAG), write_irq(*this) diff --git a/src/devices/machine/mpu401.h b/src/devices/machine/mpu401.h index a76cc53dcdd..c84dc3469fc 100644 --- a/src/devices/machine/mpu401.h +++ b/src/devices/machine/mpu401.h @@ -15,7 +15,7 @@ class mpu401_device : public device_t { public: // construction/destruction - mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mpu401_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_cb() { return write_irq.bind(); } diff --git a/src/devices/machine/msm5832.cpp b/src/devices/machine/msm5832.cpp index 65db2dda469..477a0beb730 100644 --- a/src/devices/machine/msm5832.cpp +++ b/src/devices/machine/msm5832.cpp @@ -88,7 +88,7 @@ inline void msm5832_device::write_counter(int counter, int value) // msm5832_device - constructor //------------------------------------------------- -msm5832_device::msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msm5832_device::msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSM5832, tag, owner, clock), device_rtc_interface(mconfig, *this), m_hold(0), diff --git a/src/devices/machine/msm5832.h b/src/devices/machine/msm5832.h index 2e55dc21b97..6f33e904049 100644 --- a/src/devices/machine/msm5832.h +++ b/src/devices/machine/msm5832.h @@ -38,7 +38,7 @@ class msm5832_device : public device_t, { public: // construction/destruction - msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t data_r(); void data_w(uint8_t data); diff --git a/src/devices/machine/msm58321.cpp b/src/devices/machine/msm58321.cpp index 72aa2b09d33..bc8b8e13c8c 100644 --- a/src/devices/machine/msm58321.cpp +++ b/src/devices/machine/msm58321.cpp @@ -161,7 +161,7 @@ inline void msm58321_device::write_counter(int address, int data) // msm58321_device - constructor //------------------------------------------------- -msm58321_device::msm58321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +msm58321_device::msm58321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSM58321, tag, owner, clock), device_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), diff --git a/src/devices/machine/msm58321.h b/src/devices/machine/msm58321.h index 6f28b05eecf..cb0cec53db1 100644 --- a/src/devices/machine/msm58321.h +++ b/src/devices/machine/msm58321.h @@ -47,7 +47,7 @@ class msm58321_device : public device_t, { public: // construction/destruction - msm58321_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msm58321_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto d0_handler() { return m_d0_handler.bind(); } diff --git a/src/devices/machine/msm6242.cpp b/src/devices/machine/msm6242.cpp index a4f566c3cd2..31e758e4ce8 100644 --- a/src/devices/machine/msm6242.cpp +++ b/src/devices/machine/msm6242.cpp @@ -76,12 +76,12 @@ DEFINE_DEVICE_TYPE(RTC72423, rtc72423_device, "rtc72423", "Epson RTC-72423 RTC") // msm6242_device - constructor //------------------------------------------------- -msm6242_device::msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +msm6242_device::msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm6242_device(mconfig, MSM6242, tag, owner, clock) { } -msm6242_device::msm6242_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +msm6242_device::msm6242_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_rtc_interface(mconfig, *this) , m_out_int_handler(*this) @@ -592,7 +592,7 @@ void msm6242_device::write(offs_t offset, u8 data) // rtc62421_device - constructor //------------------------------------------------- -rtc62421_device::rtc62421_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rtc62421_device::rtc62421_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm6242_device(mconfig, RTC62421, tag, owner, clock) { } @@ -602,7 +602,7 @@ rtc62421_device::rtc62421_device(const machine_config &mconfig, const char *tag, // rtc62423_device - constructor //------------------------------------------------- -rtc62423_device::rtc62423_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rtc62423_device::rtc62423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm6242_device(mconfig, RTC62423, tag, owner, clock) { } @@ -612,7 +612,7 @@ rtc62423_device::rtc62423_device(const machine_config &mconfig, const char *tag, // rtc72421_device - constructor //------------------------------------------------- -rtc72421_device::rtc72421_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rtc72421_device::rtc72421_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm6242_device(mconfig, RTC72421, tag, owner, clock) { } @@ -622,7 +622,7 @@ rtc72421_device::rtc72421_device(const machine_config &mconfig, const char *tag, // rtc72423_device - constructor //------------------------------------------------- -rtc72423_device::rtc72423_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rtc72423_device::rtc72423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : msm6242_device(mconfig, RTC72423, tag, owner, clock) { } diff --git a/src/devices/machine/msm6242.h b/src/devices/machine/msm6242.h index 216c66fc5b5..e67300bfa85 100644 --- a/src/devices/machine/msm6242.h +++ b/src/devices/machine/msm6242.h @@ -46,7 +46,7 @@ class msm6242_device : public device_t, public device_rtc_interface { public: // construction/destruction - msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + msm6242_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_int_handler() { return m_out_int_handler.bind(); } @@ -55,7 +55,7 @@ public: u8 read(offs_t offset); protected: - msm6242_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + msm6242_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; @@ -105,7 +105,7 @@ class rtc62421_device : public msm6242_device { public: // construction/destruction - rtc62421_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rtc62421_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> rtc62423_device @@ -114,7 +114,7 @@ class rtc62423_device : public msm6242_device { public: // construction/destruction - rtc62423_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rtc62423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> rtc72421_device @@ -123,7 +123,7 @@ class rtc72421_device : public msm6242_device { public: // construction/destruction - rtc72421_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rtc72421_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> rtc72423_device @@ -132,7 +132,7 @@ class rtc72423_device : public msm6242_device { public: // construction/destruction - rtc72423_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + rtc72423_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/msm6253.cpp b/src/devices/machine/msm6253.cpp index 53a47b2152e..9a2fbe523f2 100644 --- a/src/devices/machine/msm6253.cpp +++ b/src/devices/machine/msm6253.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(MSM6253, msm6253_device, "msm6253", "OKI MSM6253 A/D Converte // msm6253_device - constructor //------------------------------------------------- -msm6253_device::msm6253_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +msm6253_device::msm6253_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MSM6253, tag, owner, clock) , m_analog_ports(*this, {finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG, finder_base::DUMMY_TAG}) , m_analog_input_cb(*this) diff --git a/src/devices/machine/msm6253.h b/src/devices/machine/msm6253.h index b784bb9aec3..e9c7c262bd6 100644 --- a/src/devices/machine/msm6253.h +++ b/src/devices/machine/msm6253.h @@ -35,7 +35,7 @@ public: typedef device_delegate<ioport_value ()> port_read_delegate; // construction/destruction - msm6253_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + msm6253_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template <unsigned P> void set_input_tag(const char *tag) { m_analog_ports[P].set_tag(tag); } diff --git a/src/devices/machine/mv_sonora.cpp b/src/devices/machine/mv_sonora.cpp index bab95cccb0f..87399ff98b3 100644 --- a/src/devices/machine/mv_sonora.cpp +++ b/src/devices/machine/mv_sonora.cpp @@ -20,7 +20,7 @@ const mac_video_sonora_device::modeline mac_video_sonora_device::modelines[5] = { 0x0b, "640x480 VGA", 25175000, 800, 16, 96, 48, 525, 10, 2, 33, false }, }; -mac_video_sonora_device::mac_video_sonora_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mac_video_sonora_device::mac_video_sonora_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, MAC_VIDEO_SONORA, tag, owner, clock), m_screen(*this, "screen"), m_palette(*this, "palette"), @@ -57,7 +57,7 @@ void mac_video_sonora_device::device_add_mconfig(machine_config &config) { SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // dot clock, htotal, hstart, hend, vtotal, vstart, vend - m_screen->set_raw(31334400, 896, 0, 640, 525, 0, 480); + m_screen->set_raw(XTAL::u(31334400), 896, 0, 640, 525, 0, 480); m_screen->set_screen_update(FUNC(mac_video_sonora_device::screen_update)); m_screen->screen_vblank().set([this](int state) { m_screen_vblank(state && (m_modeline_id != -1)); }); diff --git a/src/devices/machine/mv_sonora.h b/src/devices/machine/mv_sonora.h index 5d3e2c87cb9..9bc8d92ad0f 100644 --- a/src/devices/machine/mv_sonora.h +++ b/src/devices/machine/mv_sonora.h @@ -17,7 +17,7 @@ class mac_video_sonora_device : public device_t { public: - mac_video_sonora_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mac_video_sonora_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~mac_video_sonora_device() = default; uint8_t vctrl_r(offs_t offset); diff --git a/src/devices/machine/myb3k_kbd.cpp b/src/devices/machine/myb3k_kbd.cpp index 768ae3bda91..a2fc2919fc8 100644 --- a/src/devices/machine/myb3k_kbd.cpp +++ b/src/devices/machine/myb3k_kbd.cpp @@ -342,7 +342,7 @@ myb3k_keyboard_device::myb3k_keyboard_device( { } -myb3k_keyboard_device::myb3k_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +myb3k_keyboard_device::myb3k_keyboard_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : myb3k_keyboard_device(mconfig, MYB3K_KEYBOARD, tag, owner, clock) { } diff --git a/src/devices/machine/ncr5380.cpp b/src/devices/machine/ncr5380.cpp index 56fefc4f97f..54ad053e0eb 100644 --- a/src/devices/machine/ncr5380.cpp +++ b/src/devices/machine/ncr5380.cpp @@ -31,7 +31,7 @@ DEFINE_DEVICE_TYPE(CXD1180, cxd1180_device, "cxd1180", "Sony CXD1180") ALLOW_SAVE_TYPE(ncr5380_device::state); -ncr5380_device::ncr5380_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, bool has_lbs) +ncr5380_device::ncr5380_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, bool has_lbs) : nscsi_device(mconfig, type, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_irq_handler(*this) @@ -40,17 +40,17 @@ ncr5380_device::ncr5380_device(machine_config const &mconfig, device_type type, { } -ncr5380_device::ncr5380_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ncr5380_device::ncr5380_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : ncr5380_device(mconfig, NCR5380, tag, owner, clock) { } -ncr53c80_device::ncr53c80_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ncr53c80_device::ncr53c80_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : ncr5380_device(mconfig, NCR53C80, tag, owner, clock, true) { } -cxd1180_device::cxd1180_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +cxd1180_device::cxd1180_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : ncr5380_device(mconfig, CXD1180, tag, owner, clock, true) { } diff --git a/src/devices/machine/ncr5380.h b/src/devices/machine/ncr5380.h index e7107ae285e..406b820e3da 100644 --- a/src/devices/machine/ncr5380.h +++ b/src/devices/machine/ncr5380.h @@ -13,7 +13,7 @@ class ncr5380_device , public nscsi_slot_card_interface { public: - ncr5380_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + ncr5380_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // device configuration auto irq_handler() { return m_irq_handler.bind(); } @@ -30,7 +30,7 @@ public: void dma_w(u8 val); protected: - ncr5380_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, bool has_lbs = false); + ncr5380_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, bool has_lbs = false); // device_t overrides virtual void device_start() override; @@ -170,13 +170,13 @@ private: class ncr53c80_device : public ncr5380_device { public: - ncr53c80_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + ncr53c80_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); }; class cxd1180_device : public ncr5380_device { public: - cxd1180_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + cxd1180_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(NCR5380, ncr5380_device) diff --git a/src/devices/machine/ncr5385.cpp b/src/devices/machine/ncr5385.cpp index 6c1f4a3bb4e..c759d7f434b 100644 --- a/src/devices/machine/ncr5385.cpp +++ b/src/devices/machine/ncr5385.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(NCR5385, ncr5385_device, "ncr5385", "NCR 5385E SCSI Controller") -ncr5385_device::ncr5385_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr5385_device::ncr5385_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NCR5385, tag, owner, clock) , m_int(*this) { diff --git a/src/devices/machine/ncr5385.h b/src/devices/machine/ncr5385.h index a1dec052045..ec4ab1c44e2 100644 --- a/src/devices/machine/ncr5385.h +++ b/src/devices/machine/ncr5385.h @@ -54,7 +54,7 @@ class ncr5385_device : public device_t { public: // construction/destruction - ncr5385_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr5385_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq() { return m_int.bind(); } diff --git a/src/devices/machine/ncr5390.cpp b/src/devices/machine/ncr5390.cpp index 7a52d237982..4eb82715677 100644 --- a/src/devices/machine/ncr5390.cpp +++ b/src/devices/machine/ncr5390.cpp @@ -122,7 +122,7 @@ void ncr53c94_device::write(offs_t offset, uint8_t data) ncr53c90a_device::write(offset, data); } -ncr5390_device::ncr5390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ncr5390_device::ncr5390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, type, tag, owner, clock) , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , tm(nullptr), config(0), status(0), istatus(0), clock_conv(0), sync_offset(0), sync_period(0), bus_id(0) @@ -132,35 +132,35 @@ ncr5390_device::ncr5390_device(const machine_config &mconfig, device_type type, { } -ncr53c90a_device::ncr53c90a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ncr53c90a_device::ncr53c90a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ncr5390_device(mconfig, type, tag, owner, clock) , config2(0) { } -ncr5390_device::ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr5390_device::ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ncr5390_device(mconfig, NCR5390, tag, owner, clock) { } -ncr53c90a_device::ncr53c90a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr53c90a_device::ncr53c90a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ncr53c90a_device(mconfig, NCR53C90A, tag, owner, clock) { } -ncr53c94_device::ncr53c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr53c94_device::ncr53c94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ncr53c94_device(mconfig, NCR53C94, tag, owner, clock) { } -ncr53c94_device::ncr53c94_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ncr53c94_device::ncr53c94_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : ncr53c90a_device(mconfig, type, tag, owner, clock) , config3(0) , m_busmd(BUSMD_0) { } -ncr53cf94_device::ncr53cf94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ncr53cf94_device::ncr53cf94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ncr53c94_device(mconfig, NCR53CF94, tag, owner, clock) { } diff --git a/src/devices/machine/ncr5390.h b/src/devices/machine/ncr5390.h index ba38e1b52cf..a50cd560756 100644 --- a/src/devices/machine/ncr5390.h +++ b/src/devices/machine/ncr5390.h @@ -10,7 +10,7 @@ class ncr5390_device : public nscsi_device, public nscsi_slot_card_interface { public: - ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto irq_handler_cb() { return m_irq_handler.bind(); } @@ -48,7 +48,7 @@ public: void dma_w(uint8_t val); protected: - ncr5390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ncr5390_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; @@ -240,7 +240,7 @@ protected: class ncr53c90a_device : public ncr5390_device { public: - ncr53c90a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr53c90a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -253,7 +253,7 @@ public: virtual void write(offs_t offset, uint8_t data) override; protected: - ncr53c90a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ncr53c90a_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; @@ -284,7 +284,7 @@ private: class ncr53c94_device : public ncr53c90a_device { public: - ncr53c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr53c94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); enum busmd_t : u8 { @@ -308,7 +308,7 @@ public: void dma16_w(u16 data); protected: - ncr53c94_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ncr53c94_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); enum conf3_mask : u8 { @@ -330,7 +330,7 @@ private: class ncr53cf94_device : public ncr53c94_device { public: - ncr53cf94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr53cf94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(NCR5390, ncr5390_device) diff --git a/src/devices/machine/ncr539x.cpp b/src/devices/machine/ncr539x.cpp index 67cfdadae76..2a962059927 100644 --- a/src/devices/machine/ncr539x.cpp +++ b/src/devices/machine/ncr539x.cpp @@ -118,7 +118,7 @@ DEFINE_DEVICE_TYPE(NCR539X, ncr539x_device, "ncr539x", "NCR/AMD 5394/5396 SCSI") // ncr539x_device - constructor/destructor //------------------------------------------------- -ncr539x_device::ncr539x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ncr539x_device::ncr539x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : legacy_scsi_host_adapter(mconfig, NCR539X, tag, owner, clock), m_out_irq_cb(*this), m_out_drq_cb(*this) diff --git a/src/devices/machine/ncr539x.h b/src/devices/machine/ncr539x.h index 9ba24b3ba47..040e9ff9013 100644 --- a/src/devices/machine/ncr539x.h +++ b/src/devices/machine/ncr539x.h @@ -19,7 +19,7 @@ class ncr539x_device : public legacy_scsi_host_adapter { public: // construction/destruction - ncr539x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ncr539x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_callback() { return m_out_irq_cb.bind(); } auto drq_callback() { return m_out_drq_cb.bind(); } diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp index 48d81cacbdb..99e2537017c 100644 --- a/src/devices/machine/netlist.cpp +++ b/src/devices/machine/netlist.cpp @@ -424,7 +424,7 @@ void netlist_mame_sub_interface::set_mult_offset(const double mult, const double netlist_mame_analog_input_device::netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *param_name) - : device_t(mconfig, NETLIST_ANALOG_INPUT, tag, owner, 0) + : device_t(mconfig, NETLIST_ANALOG_INPUT, tag, owner) , netlist_mame_sub_interface(*owner) , m_param(nullptr) , m_auto_port(true) @@ -433,7 +433,7 @@ netlist_mame_analog_input_device::netlist_mame_analog_input_device(const machine { } -netlist_mame_analog_input_device::netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_analog_input_device::netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_ANALOG_INPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_param(nullptr) @@ -475,7 +475,7 @@ void netlist_mame_analog_input_device::validity_helper(validity_checker &valid, // netlist_mame_analog_output_device // ---------------------------------------------------------------------------------------- -netlist_mame_analog_output_device::netlist_mame_analog_output_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_analog_output_device::netlist_mame_analog_output_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_ANALOG_OUTPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_in("") @@ -527,7 +527,7 @@ void netlist_mame_analog_output_device::device_start() // netlist_mame_logic_output_device // ---------------------------------------------------------------------------------------- -netlist_mame_logic_output_device::netlist_mame_logic_output_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_logic_output_device::netlist_mame_logic_output_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_LOGIC_OUTPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_in("") @@ -578,7 +578,7 @@ void netlist_mame_logic_output_device::device_start() // netlist_mame_int_input_device // ---------------------------------------------------------------------------------------- -netlist_mame_int_input_device::netlist_mame_int_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_int_input_device::netlist_mame_int_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_INT_INPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_param(nullptr) @@ -622,7 +622,7 @@ void netlist_mame_int_input_device::validity_helper(validity_checker &valid, // netlist_mame_logic_input_device // ---------------------------------------------------------------------------------------- -netlist_mame_logic_input_device::netlist_mame_logic_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_logic_input_device::netlist_mame_logic_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_LOGIC_INPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_param(nullptr) @@ -665,7 +665,7 @@ void netlist_mame_logic_input_device::validity_helper(validity_checker &valid, // netlist_mame_ram_pointer_device // ---------------------------------------------------------------------------------------- -netlist_mame_ram_pointer_device::netlist_mame_ram_pointer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_ram_pointer_device::netlist_mame_ram_pointer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_RAM_POINTER, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_param(nullptr) @@ -675,7 +675,7 @@ netlist_mame_ram_pointer_device::netlist_mame_ram_pointer_device(const machine_c } netlist_mame_ram_pointer_device::netlist_mame_ram_pointer_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *pname) - : device_t(mconfig, NETLIST_RAM_POINTER, tag, owner, 0) + : device_t(mconfig, NETLIST_RAM_POINTER, tag, owner) , netlist_mame_sub_interface(*owner) , m_param(nullptr) , m_param_name(pname) @@ -717,7 +717,7 @@ void netlist_mame_ram_pointer_device::validity_helper(validity_checker &valid, // netlist_mame_stream_input_device // ---------------------------------------------------------------------------------------- -netlist_mame_stream_input_device::netlist_mame_stream_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_stream_input_device::netlist_mame_stream_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_STREAM_INPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_channel(0) @@ -752,7 +752,7 @@ void netlist_mame_stream_input_device::custom_netlist_additions(netlist::nlparse // netlist_mame_stream_output_device // ---------------------------------------------------------------------------------------- -netlist_mame_stream_output_device::netlist_mame_stream_output_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_stream_output_device::netlist_mame_stream_output_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NETLIST_STREAM_OUTPUT, tag, owner, clock) , netlist_mame_sub_interface(*owner) , m_channel(0) @@ -872,12 +872,12 @@ void netlist_mame_stream_output_device::process(netlist::netlist_time_ext tim, n // netlist_mame_device // ---------------------------------------------------------------------------------------- -netlist_mame_device::netlist_mame_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_device::netlist_mame_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : netlist_mame_device(mconfig, NETLIST_CORE, tag, owner, clock) { } -netlist_mame_device::netlist_mame_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_device::netlist_mame_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_setup_func(nullptr) , m_device_reset_called(false) @@ -1167,7 +1167,7 @@ void netlist_mame_device::save_state() // netlist_mame_cpu_device // ---------------------------------------------------------------------------------------- -netlist_mame_cpu_device::netlist_mame_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +netlist_mame_cpu_device::netlist_mame_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : netlist_mame_device(mconfig, NETLIST_CPU, tag, owner, clock) , device_execute_interface(mconfig, *this) , device_state_interface(mconfig, *this) @@ -1313,8 +1313,8 @@ offs_t netlist_disassembler::disassemble(std::ostream &stream, offs_t pc, const // netlist_mame_sound_device // ---------------------------------------------------------------------------------------- -netlist_mame_sound_device::netlist_mame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : netlist_mame_device(mconfig, NETLIST_SOUND, tag, owner, 0) +netlist_mame_sound_device::netlist_mame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) + : netlist_mame_device(mconfig, NETLIST_SOUND, tag, owner) , device_sound_interface(mconfig, *this) , m_stream(nullptr) , m_cur_time(attotime::zero) diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h index ff9adf7d332..ce2ce4c4c08 100644 --- a/src/devices/machine/netlist.h +++ b/src/devices/machine/netlist.h @@ -112,7 +112,7 @@ public: using func_type = std::function<void(netlist::nlparse_t &)>; // construction/destruction - netlist_mame_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + netlist_mame_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~netlist_mame_device(); @@ -126,7 +126,7 @@ public: auto &log_csv() { return m_log_csv; } protected: - netlist_mame_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + netlist_mame_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // Custom to netlist ... virtual void nl_register_devices(netlist::nlparse_t &parser) const { } @@ -168,7 +168,7 @@ public: static constexpr const unsigned MDIV_SHIFT = 16; // construction/destruction - netlist_mame_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + netlist_mame_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(1'000'000'000)); ~netlist_mame_cpu_device() { @@ -273,7 +273,7 @@ class netlist_mame_sound_device : public netlist_mame_device, { public: // construction/destruction - netlist_mame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + netlist_mame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); netlist_mame_sound_device & set_source(void (*setup_func)(netlist::nlparse_t &)) { @@ -378,7 +378,7 @@ public: // construction/destruction netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *param_name); - netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_analog_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_name(const char *param_name) { m_param_name = param_name; } @@ -422,7 +422,7 @@ public: typedef device_delegate<void (const double, const attotime &)> output_delegate; // construction/destruction - netlist_mame_analog_output_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_analog_output_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <typename... T> void set_params(const char *in_name, T &&... args) @@ -452,7 +452,7 @@ public: typedef device_delegate<void(const int, const attotime &)> output_delegate; // construction/destruction - netlist_mame_logic_output_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_logic_output_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <typename... T> void set_params(const char *in_name, T &&... args) { @@ -481,11 +481,11 @@ public: // construction/destruction netlist_mame_int_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *param_name, const uint32_t shift, const uint32_t mask) - : netlist_mame_int_input_device(mconfig, tag, owner, (uint32_t)0) + : netlist_mame_int_input_device(mconfig, tag, owner) { set_params(param_name, mask, shift); } - netlist_mame_int_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_int_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_params(const char *param_name, const uint32_t mask, const uint32_t shift); @@ -523,11 +523,11 @@ class netlist_mame_logic_input_device : public device_t, public netlist_mame_sub public: // construction/destruction netlist_mame_logic_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *param_name, const uint32_t shift) - : netlist_mame_logic_input_device(mconfig, tag, owner, (uint32_t)0) + : netlist_mame_logic_input_device(mconfig, tag, owner) { set_params(param_name, shift); } - netlist_mame_logic_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_logic_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_params(const char *param_name, const uint32_t shift); @@ -562,7 +562,7 @@ class netlist_mame_ram_pointer_device : public device_t, public netlist_mame_sub { public: // construction/destruction - netlist_mame_ram_pointer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_ram_pointer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); netlist_mame_ram_pointer_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *pname); uint8_t* ptr() const { return m_data; } @@ -592,11 +592,11 @@ class netlist_mame_stream_input_device : public device_t, public netlist_mame_su public: // construction/destruction netlist_mame_stream_input_device(const machine_config &mconfig, const char *tag, device_t *owner, int channel, const char *param_name) - : netlist_mame_stream_input_device(mconfig, tag, owner, (uint32_t)0) + : netlist_mame_stream_input_device(mconfig, tag, owner) { set_params(channel, param_name); } - netlist_mame_stream_input_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_stream_input_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_params(int channel, const char *param_name); @@ -618,11 +618,11 @@ class netlist_mame_stream_output_device : public device_t, public netlist_mame_s public: // construction/destruction netlist_mame_stream_output_device(const machine_config &mconfig, const char *tag, device_t *owner, int channel, const char *out_name) - : netlist_mame_stream_output_device(mconfig, tag, owner, (uint32_t)0) + : netlist_mame_stream_output_device(mconfig, tag, owner) { set_params(channel, out_name); } - netlist_mame_stream_output_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + netlist_mame_stream_output_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void set_params(int channel, const char *out_name); diff --git a/src/devices/machine/nmc9306.cpp b/src/devices/machine/nmc9306.cpp index b2fd50626f9..b85e13a860b 100644 --- a/src/devices/machine/nmc9306.cpp +++ b/src/devices/machine/nmc9306.cpp @@ -104,7 +104,7 @@ inline void nmc9306_device::erase(offs_t offset) // nmc9306_device - constructor //------------------------------------------------- -nmc9306_device::nmc9306_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nmc9306_device::nmc9306_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NMC9306, tag, owner, clock), device_nvram_interface(mconfig, *this), m_state(STATE_IDLE), diff --git a/src/devices/machine/nmc9306.h b/src/devices/machine/nmc9306.h index 98566a9ab82..06c9ca9b82a 100644 --- a/src/devices/machine/nmc9306.h +++ b/src/devices/machine/nmc9306.h @@ -31,7 +31,7 @@ class nmc9306_device : public device_t, { public: // construction/destruction - nmc9306_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nmc9306_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( cs_w ); DECLARE_WRITE_LINE_MEMBER( sk_w ); diff --git a/src/devices/machine/nmk112.cpp b/src/devices/machine/nmk112.cpp index 4de5062ac14..31d03399b26 100644 --- a/src/devices/machine/nmk112.cpp +++ b/src/devices/machine/nmk112.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(NMK112, nmk112_device, "nmk112", "NMK112") -nmk112_device::nmk112_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nmk112_device::nmk112_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NMK112, tag, owner, clock) , m_page_mask(0xff) , m_rom0(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/nmk112.h b/src/devices/machine/nmk112.h index 5535d94899b..72cea1c841b 100644 --- a/src/devices/machine/nmk112.h +++ b/src/devices/machine/nmk112.h @@ -18,7 +18,7 @@ class nmk112_device : public device_t { public: - nmk112_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nmk112_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template <typename T> nmk112_device &set_rom0_tag(T &&tag) { m_rom0.set_tag(std::forward<T>(tag)); return *this; } diff --git a/src/devices/machine/ns32081.cpp b/src/devices/machine/ns32081.cpp index a436a823582..2face6ef7c4 100644 --- a/src/devices/machine/ns32081.cpp +++ b/src/devices/machine/ns32081.cpp @@ -81,7 +81,7 @@ enum size_code : unsigned SIZE_D = 3, }; -ns32081_device::ns32081_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ns32081_device::ns32081_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NS32081, tag, owner, clock) , ns32000_slow_slave_interface(mconfig, *this) { diff --git a/src/devices/machine/ns32081.h b/src/devices/machine/ns32081.h index e73fa8013f6..6dfa03fca24 100644 --- a/src/devices/machine/ns32081.h +++ b/src/devices/machine/ns32081.h @@ -13,7 +13,7 @@ class ns32081_device , public ns32000_slow_slave_interface { public: - ns32081_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ns32081_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual void state_add(device_state_interface &parent, int &index) override; diff --git a/src/devices/machine/ns32082.cpp b/src/devices/machine/ns32082.cpp index fa70331b584..b0f7f41181e 100644 --- a/src/devices/machine/ns32082.cpp +++ b/src/devices/machine/ns32082.cpp @@ -145,7 +145,7 @@ enum st_mask : unsigned ST_SID = 0xf, // slave ID }; -ns32082_device::ns32082_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ns32082_device::ns32082_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NS32082, tag, owner, clock) , ns32000_slow_slave_interface(mconfig, *this) , ns32000_mmu_interface(mconfig, *this) diff --git a/src/devices/machine/ns32082.h b/src/devices/machine/ns32082.h index 83238529e6b..b6ebe06dad3 100644 --- a/src/devices/machine/ns32082.h +++ b/src/devices/machine/ns32082.h @@ -14,7 +14,7 @@ class ns32082_device , public ns32000_mmu_interface { public: - ns32082_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ns32082_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); virtual void state_add(device_state_interface &parent, int &index) override; diff --git a/src/devices/machine/ns32202.cpp b/src/devices/machine/ns32202.cpp index ba97c22ab06..27603886eac 100644 --- a/src/devices/machine/ns32202.cpp +++ b/src/devices/machine/ns32202.cpp @@ -61,7 +61,7 @@ enum cictl_mask : u8 CICTL_CERH = 0x80, // h-counter error flag }; -ns32202_device::ns32202_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ns32202_device::ns32202_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NS32202, tag, owner, clock) , m_out_int(*this) , m_out_cout(*this) diff --git a/src/devices/machine/ns32202.h b/src/devices/machine/ns32202.h index 7795b205e91..b0e0abe3ffe 100644 --- a/src/devices/machine/ns32202.h +++ b/src/devices/machine/ns32202.h @@ -16,7 +16,7 @@ public: template <unsigned Number> void ir_w(int state); template <unsigned ST1> void map(address_map &map); - ns32202_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ns32202_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); protected: // device_t overrides diff --git a/src/devices/machine/ns32382.cpp b/src/devices/machine/ns32382.cpp index 132c37c7b3f..218dce0634f 100644 --- a/src/devices/machine/ns32382.cpp +++ b/src/devices/machine/ns32382.cpp @@ -143,7 +143,7 @@ enum st_mask : unsigned ST_SID = 0xf, // slave ID }; -ns32382_device::ns32382_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +ns32382_device::ns32382_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NS32382, tag, owner, clock) , ns32000_fast_slave_interface(mconfig, *this) , ns32000_mmu_interface(mconfig, *this) diff --git a/src/devices/machine/ns32382.h b/src/devices/machine/ns32382.h index d7730a70d68..e0083295b92 100644 --- a/src/devices/machine/ns32382.h +++ b/src/devices/machine/ns32382.h @@ -14,7 +14,7 @@ class ns32382_device , public ns32000_mmu_interface { public: - ns32382_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + ns32382_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // ns32000_slave_interface overrides virtual void state_add(device_state_interface &parent, int &index) override; diff --git a/src/devices/machine/nsc810.cpp b/src/devices/machine/nsc810.cpp index a416e6ccca4..dcbf5cc2ff6 100644 --- a/src/devices/machine/nsc810.cpp +++ b/src/devices/machine/nsc810.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(NSC810, nsc810_device, "nsc810", "National Semiconductor NSC810 RAM-I/O-Timer") -nsc810_device::nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nsc810_device::nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NSC810, tag, owner, clock), m_portA_latch(0), m_portB_latch(0), m_portC_latch(0), m_ddrA(0), m_ddrB(0), m_ddrC(0), diff --git a/src/devices/machine/nsc810.h b/src/devices/machine/nsc810.h index 08a35465cc4..f039d5ccffc 100644 --- a/src/devices/machine/nsc810.h +++ b/src/devices/machine/nsc810.h @@ -16,21 +16,14 @@ class nsc810_device : public device_t { public: // construction/destruction - nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t clk0, uint32_t clk1) - : nsc810_device(mconfig, tag, owner, clock) - { - set_timer0_clock(clk0); - set_timer1_clock(clk1); - } - - nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const XTAL &clk0, const XTAL &clk1) - : nsc810_device(mconfig, tag, owner, clock) + nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clk0, const XTAL &clk1) + : nsc810_device(mconfig, tag, owner) { set_timer0_clock(clk0.value()); set_timer1_clock(clk1.value()); } - nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nsc810_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto portA_read_callback() { return m_portA_r.bind(); } auto portB_read_callback() { return m_portB_r.bind(); } diff --git a/src/devices/machine/nscsi_bus.cpp b/src/devices/machine/nscsi_bus.cpp index eeaf2c2722a..a9596d6b52a 100644 --- a/src/devices/machine/nscsi_bus.cpp +++ b/src/devices/machine/nscsi_bus.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(NSCSI_BUS, nscsi_bus_device, "nscsi_bus", "SCSI B DEFINE_DEVICE_TYPE(NSCSI_CONNECTOR, nscsi_connector, "nscsi_connector", "SCSI Connector Abstraction (new)") -nscsi_bus_device::nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_bus_device::nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NSCSI_BUS, tag, owner, clock), data(0), ctrl(0) { devcnt = 0; @@ -139,7 +139,7 @@ void nscsi_bus_device::device_resolve_objects() } -nscsi_connector::nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nscsi_connector::nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NSCSI_CONNECTOR, tag, owner, clock), device_single_card_slot_interface<nscsi_slot_card_interface>(mconfig, *this) { @@ -168,7 +168,7 @@ nscsi_slot_card_interface::nscsi_slot_card_interface(const machine_config &mconf { } -nscsi_device::nscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nscsi_device::nscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock) { scsi_id = scsi_refid = -1; @@ -192,7 +192,7 @@ void nscsi_device::device_start() } -nscsi_full_device::nscsi_full_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +nscsi_full_device::nscsi_full_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, type, tag, owner, clock), nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) { diff --git a/src/devices/machine/nscsi_bus.h b/src/devices/machine/nscsi_bus.h index 6cd99732bf9..62a6394b6e7 100644 --- a/src/devices/machine/nscsi_bus.h +++ b/src/devices/machine/nscsi_bus.h @@ -12,7 +12,7 @@ class nscsi_slot_card_interface; class nscsi_bus_device : public device_t { public: - nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void ctrl_w(int refid, uint32_t lines, uint32_t mask); void data_w(int refid, uint32_t lines); @@ -48,14 +48,14 @@ class nscsi_connector: public device_t, public: template <typename T> nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, T &&opts, const char *dflt, bool fixed = false) - : nscsi_connector(mconfig, tag, owner, 0) + : nscsi_connector(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(fixed); } - nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nscsi_connector(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~nscsi_connector(); nscsi_device *get_device(); @@ -131,7 +131,7 @@ public: virtual void scsi_ctrl_changed(); protected: - nscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; @@ -311,7 +311,7 @@ protected: SBUF_SENSE }; - nscsi_full_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nscsi_full_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; diff --git a/src/devices/machine/nscsi_cb.cpp b/src/devices/machine/nscsi_cb.cpp index 5d42caf8265..afd54b4465d 100644 --- a/src/devices/machine/nscsi_cb.cpp +++ b/src/devices/machine/nscsi_cb.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(NSCSI_CB, nscsi_callback_device, "nscsi_cb", "SCSI callback (new)") -nscsi_callback_device::nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nscsi_callback_device::nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device(mconfig, NSCSI_CB, tag, owner, clock), nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF), m_write_rst(*this), diff --git a/src/devices/machine/nscsi_cb.h b/src/devices/machine/nscsi_cb.h index 5cc96b83862..551174e8a8f 100644 --- a/src/devices/machine/nscsi_cb.h +++ b/src/devices/machine/nscsi_cb.h @@ -11,7 +11,7 @@ class nscsi_callback_device : public nscsi_device, public nscsi_slot_card_interface { public: - nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto rst_callback() { return m_write_rst.bind(); } auto atn_callback() { return m_write_atn.bind(); } diff --git a/src/devices/machine/nvram.cpp b/src/devices/machine/nvram.cpp index 84c07477e9a..49f4875e375 100644 --- a/src/devices/machine/nvram.cpp +++ b/src/devices/machine/nvram.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(NVRAM, nvram_device, "nvram", "NVRAM") // nvram_device - constructor //------------------------------------------------- -nvram_device::nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nvram_device::nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, NVRAM, tag, owner, clock), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), diff --git a/src/devices/machine/nvram.h b/src/devices/machine/nvram.h index 58bde56bece..d6ba521c699 100644 --- a/src/devices/machine/nvram.h +++ b/src/devices/machine/nvram.h @@ -32,11 +32,11 @@ public: // construction/destruction nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, default_value value) - : nvram_device(mconfig, tag, owner, 0) + : nvram_device(mconfig, tag, owner) { set_default_value(value); } - nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + nvram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers void set_default_value(default_value value) { m_default_value = value; } diff --git a/src/devices/machine/output_latch.cpp b/src/devices/machine/output_latch.cpp index 7ed407d68f8..58b90b19018 100644 --- a/src/devices/machine/output_latch.cpp +++ b/src/devices/machine/output_latch.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(OUTPUT_LATCH, output_latch_device, "output_latch", "Output Latch") -output_latch_device::output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +output_latch_device::output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, OUTPUT_LATCH, tag, owner, clock) , m_bit_handlers(*this) , m_bits{ -1, -1, -1, -1, -1, -1, -1, -1 } diff --git a/src/devices/machine/output_latch.h b/src/devices/machine/output_latch.h index 0e6a87ff6dc..5339af1df2f 100644 --- a/src/devices/machine/output_latch.h +++ b/src/devices/machine/output_latch.h @@ -9,7 +9,7 @@ class output_latch_device : public device_t { public: - output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + output_latch_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <unsigned Bit> auto bit_handler() { return m_bit_handlers[Bit].bind(); } diff --git a/src/devices/machine/pc_fdc.cpp b/src/devices/machine/pc_fdc.cpp index d1668f2381d..8ed951aebdb 100644 --- a/src/devices/machine/pc_fdc.cpp +++ b/src/devices/machine/pc_fdc.cpp @@ -38,7 +38,7 @@ void pc_fdc_xt_device::map(address_map &map) } -pc_fdc_family_device::pc_fdc_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +pc_fdc_family_device::pc_fdc_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), fdc(*this, "upd765"), intrq_cb(*this), drq_cb(*this) @@ -62,7 +62,7 @@ void pc_fdc_family_device::dma_w(uint8_t data) void pc_fdc_family_device::device_add_mconfig(machine_config &config) { - UPD765A(config, fdc, 8'000'000, false, false); + UPD765A(config, fdc, XTAL::u(8'000'000), false, false); fdc->intrq_wr_callback().set(FUNC(pc_fdc_family_device::irq_w)); fdc->drq_wr_callback().set(FUNC(pc_fdc_family_device::drq_w)); } @@ -166,6 +166,6 @@ void pc_fdc_family_device::check_drq() drq_cb(drq); } -pc_fdc_xt_device::pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : pc_fdc_family_device(mconfig, PC_FDC_XT, tag, owner, clock) +pc_fdc_xt_device::pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_fdc_family_device(mconfig, PC_FDC_XT, tag, owner, clock) { } diff --git a/src/devices/machine/pc_fdc.h b/src/devices/machine/pc_fdc.h index bbb2f0a9068..da2898e7dba 100644 --- a/src/devices/machine/pc_fdc.h +++ b/src/devices/machine/pc_fdc.h @@ -32,7 +32,7 @@ public: required_device<upd765a_device> fdc; protected: - pc_fdc_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pc_fdc_family_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; @@ -54,7 +54,7 @@ private: class pc_fdc_xt_device : public pc_fdc_family_device { public: - pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; void dor_fifo_w(uint8_t data); diff --git a/src/devices/machine/pc_lpt.cpp b/src/devices/machine/pc_lpt.cpp index 26d2357a72b..f8a20439670 100644 --- a/src/devices/machine/pc_lpt.cpp +++ b/src/devices/machine/pc_lpt.cpp @@ -12,7 +12,7 @@ DEFINE_DEVICE_TYPE(PC_LPT, pc_lpt_device, "pc_lpt", "PC LPT") -pc_lpt_device::pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc_lpt_device::pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PC_LPT, tag, owner, clock), m_irq(1), m_data(0xff), m_control(0), diff --git a/src/devices/machine/pc_lpt.h b/src/devices/machine/pc_lpt.h index 911c657baa4..d72545a13df 100644 --- a/src/devices/machine/pc_lpt.h +++ b/src/devices/machine/pc_lpt.h @@ -21,7 +21,7 @@ class pc_lpt_device : public device_t { public: - pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pc_lpt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/machine/pccard.cpp b/src/devices/machine/pccard.cpp index 83a05b99421..d095712b3b9 100644 --- a/src/devices/machine/pccard.cpp +++ b/src/devices/machine/pccard.cpp @@ -40,7 +40,7 @@ void device_pccard_interface::write_reg(offs_t offset, uint16_t data, uint16_t m DEFINE_DEVICE_TYPE(PCCARD_SLOT, pccard_slot_device, "pccard", "PC Card Slot") -pccard_slot_device::pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pccard_slot_device::pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCCARD_SLOT, tag, owner, clock), device_single_card_slot_interface<device_pccard_interface>(mconfig, *this), m_pccard(nullptr) diff --git a/src/devices/machine/pccard.h b/src/devices/machine/pccard.h index 9e06018f005..294d9c27403 100644 --- a/src/devices/machine/pccard.h +++ b/src/devices/machine/pccard.h @@ -27,14 +27,14 @@ class pccard_slot_device : public device_t, public device_single_card_slot_inter public: template <typename T> pccard_slot_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : pccard_slot_device(mconfig, tag, owner, (uint32_t)0) + : pccard_slot_device(mconfig, tag, owner) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_READ_LINE_MEMBER(read_line_inserted); uint16_t read_memory(offs_t offset, uint16_t mem_mask = ~0); diff --git a/src/devices/machine/pcf8573.cpp b/src/devices/machine/pcf8573.cpp index 791336b4bf5..2b4e630c790 100644 --- a/src/devices/machine/pcf8573.cpp +++ b/src/devices/machine/pcf8573.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(PCF8573, pcf8573_device, "pcf8573", "PCF8573 RTC with Power F // pcf8573_device - constructor //------------------------------------------------- -pcf8573_device::pcf8573_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcf8573_device::pcf8573_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCF8573, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_comp_cb(*this) diff --git a/src/devices/machine/pcf8573.h b/src/devices/machine/pcf8573.h index a6b31e83ed7..00e7211c809 100644 --- a/src/devices/machine/pcf8573.h +++ b/src/devices/machine/pcf8573.h @@ -46,7 +46,7 @@ class pcf8573_device : public device_rtc_interface { public: - pcf8573_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcf8573_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto comp_cb() { return m_comp_cb.bind(); } auto min_cb() { return m_min_cb.bind(); } diff --git a/src/devices/machine/pcf8583.cpp b/src/devices/machine/pcf8583.cpp index c09a6fce138..a543714eb7c 100644 --- a/src/devices/machine/pcf8583.cpp +++ b/src/devices/machine/pcf8583.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(PCF8583, pcf8583_device, "pcf8583", "PCF8583 RTC with 240x8 R // pcf8583_device - constructor //------------------------------------------------- -pcf8583_device::pcf8583_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcf8583_device::pcf8583_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCF8583, tag, owner, clock) , device_rtc_interface(mconfig, *this) , device_nvram_interface(mconfig, *this) diff --git a/src/devices/machine/pcf8583.h b/src/devices/machine/pcf8583.h index d5018160788..6f128a0d1e6 100644 --- a/src/devices/machine/pcf8583.h +++ b/src/devices/machine/pcf8583.h @@ -74,7 +74,7 @@ class pcf8583_device : public device_nvram_interface { public: - pcf8583_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pcf8583_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/machine/pcf8584.cpp b/src/devices/machine/pcf8584.cpp index 31d78e73008..f4b4de45f1a 100644 --- a/src/devices/machine/pcf8584.cpp +++ b/src/devices/machine/pcf8584.cpp @@ -52,7 +52,7 @@ const char *const pcf8584_device::s_bus_function[4] = { "NOP", "stop", "start", // pcf8584_device - constructor //------------------------------------------------- -pcf8584_device::pcf8584_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +pcf8584_device::pcf8584_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCF8584, tag, owner, clock) , m_sda_callback(*this) , m_sda_out_callback(*this) diff --git a/src/devices/machine/pcf8584.h b/src/devices/machine/pcf8584.h index 68886a7affc..3f59e856b59 100644 --- a/src/devices/machine/pcf8584.h +++ b/src/devices/machine/pcf8584.h @@ -39,7 +39,7 @@ class pcf8584_device : public device_t public: // device type constructor - pcf8584_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + pcf8584_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto sda_cb() { return m_sda_callback.bind(); } diff --git a/src/devices/machine/pcf8593.cpp b/src/devices/machine/pcf8593.cpp index 3ba4f1af89b..0e052492d2f 100644 --- a/src/devices/machine/pcf8593.cpp +++ b/src/devices/machine/pcf8593.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(PCF8593, pcf8593_device, "pcf8593", "PCF8593 RTC") // pcf8593_device - constructor //------------------------------------------------- -pcf8593_device::pcf8593_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pcf8593_device::pcf8593_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCF8593, tag, owner, clock) , device_rtc_interface(mconfig, *this) , device_nvram_interface(mconfig, *this) diff --git a/src/devices/machine/pcf8593.h b/src/devices/machine/pcf8593.h index 3720ac1bb53..ca9302594fb 100644 --- a/src/devices/machine/pcf8593.h +++ b/src/devices/machine/pcf8593.h @@ -22,7 +22,7 @@ class pcf8593_device : public device_t, public device_nvram_interface { public: - pcf8593_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pcf8593_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER(scl_w); DECLARE_WRITE_LINE_MEMBER(sda_w); diff --git a/src/devices/machine/pci-apic.cpp b/src/devices/machine/pci-apic.cpp index 2a7c1a26261..b4818b12607 100644 --- a/src/devices/machine/pci-apic.cpp +++ b/src/devices/machine/pci-apic.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(APIC, apic_device, "apic", "I/O Advanced Programmable Interrupt Controller") -apic_device::apic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +apic_device::apic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, APIC, tag, owner, clock) { } diff --git a/src/devices/machine/pci-apic.h b/src/devices/machine/pci-apic.h index ede3d80baf3..8d0056bb53d 100644 --- a/src/devices/machine/pci-apic.h +++ b/src/devices/machine/pci-apic.h @@ -9,12 +9,12 @@ class apic_device : public pci_device { public: - apic_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) + apic_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) : apic_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x080010, subdevice_id); } - apic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + apic_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/machine/pci-ide.cpp b/src/devices/machine/pci-ide.cpp index b24a944eb3b..6e37acfc321 100644 --- a/src/devices/machine/pci-ide.cpp +++ b/src/devices/machine/pci-ide.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(IDE_PCI, ide_pci_device, "ide_pci", "PCI IDE interface") -ide_pci_device::ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +ide_pci_device::ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, IDE_PCI, tag, owner, clock), m_ide(*this, "ide"), m_ide2(*this, "ide2"), diff --git a/src/devices/machine/pci-ide.h b/src/devices/machine/pci-ide.h index af3d7ae0a4d..1cad2df5bff 100644 --- a/src/devices/machine/pci-ide.h +++ b/src/devices/machine/pci-ide.h @@ -21,14 +21,14 @@ TODO: class ide_pci_device : public pci_device { public: - ide_pci_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 + ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t main_id, uint32_t revision, uint32_t subdevice_id , const char *bmtag = ":pci:00.0", uint32_t bmspace = AS_DATA) - : ide_pci_device(mconfig, tag, owner, clock) + : ide_pci_device(mconfig, tag, owner) { set_ids(main_id, revision, 0x01018a, subdevice_id); m_bus_master_space.set_tag(bmtag, bmspace); } - ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ide_pci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto irq_handler() { return m_irq_handler.bind(); } diff --git a/src/devices/machine/pci-sata.cpp b/src/devices/machine/pci-sata.cpp index 1332fea71d5..78ef30f631a 100644 --- a/src/devices/machine/pci-sata.cpp +++ b/src/devices/machine/pci-sata.cpp @@ -5,7 +5,7 @@ DEFINE_DEVICE_TYPE(SATA, sata_device, "sata", "SATA AHCI interface") -sata_device::sata_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sata_device::sata_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SATA, tag, owner, clock) { } diff --git a/src/devices/machine/pci-sata.h b/src/devices/machine/pci-sata.h index edf3545c1d7..803e034cdc4 100644 --- a/src/devices/machine/pci-sata.h +++ b/src/devices/machine/pci-sata.h @@ -9,12 +9,12 @@ class sata_device : public pci_device { public: - sata_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) + sata_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) : sata_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x01018a, subdevice_id); } - sata_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sata_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/machine/pci-smbus.cpp b/src/devices/machine/pci-smbus.cpp index 62a4f99cbb7..15f218ae8cb 100644 --- a/src/devices/machine/pci-smbus.cpp +++ b/src/devices/machine/pci-smbus.cpp @@ -28,7 +28,7 @@ void smbus_device::map(address_map &map) map(0x17, 0x17).r(FUNC(smbus_device::notify_dhigh_r)); } -smbus_device::smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +smbus_device::smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SMBUS, tag, owner, clock) { } diff --git a/src/devices/machine/pci-smbus.h b/src/devices/machine/pci-smbus.h index 9c7cd79aa74..fa834666b46 100644 --- a/src/devices/machine/pci-smbus.h +++ b/src/devices/machine/pci-smbus.h @@ -7,12 +7,12 @@ class smbus_device : public pci_device { public: - smbus_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) + smbus_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) : smbus_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x0c0500, subdevice_id); } - smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smbus_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/machine/pci-usb.cpp b/src/devices/machine/pci-usb.cpp index 0b45c1bd9ee..28523013576 100644 --- a/src/devices/machine/pci-usb.cpp +++ b/src/devices/machine/pci-usb.cpp @@ -11,7 +11,7 @@ void usb_ohci_device::map(address_map &map) { } -usb_ohci_device::usb_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +usb_ohci_device::usb_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, USB_OHCI, tag, owner, clock) { } @@ -31,7 +31,7 @@ void usb_uhci_device::map(address_map &map) { } -usb_uhci_device::usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +usb_uhci_device::usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, USB_UHCI, tag, owner, clock) { } @@ -51,7 +51,7 @@ void usb_ehci_device::map(address_map &map) { } -usb_ehci_device::usb_ehci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +usb_ehci_device::usb_ehci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, USB_EHCI, tag, owner, clock) { } diff --git a/src/devices/machine/pci-usb.h b/src/devices/machine/pci-usb.h index 388fa28b24d..d5dca213873 100644 --- a/src/devices/machine/pci-usb.h +++ b/src/devices/machine/pci-usb.h @@ -9,12 +9,12 @@ class usb_ohci_device : public pci_device { public: - usb_ohci_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) + usb_ohci_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) : usb_ohci_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x0c0310, subdevice_id); } - usb_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + usb_ohci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -26,12 +26,12 @@ private: class usb_uhci_device : public pci_device { public: - usb_uhci_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) + usb_uhci_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) : usb_uhci_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x0c0300, subdevice_id); } - usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + usb_uhci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -43,12 +43,12 @@ private: class usb_ehci_device : public pci_device { public: - usb_ehci_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) + usb_ehci_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) : usb_ehci_device(mconfig, tag, owner, clock) { set_ids(main_id, revision, 0x0c0320, subdevice_id); } - usb_ehci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + usb_ehci_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/machine/pci.cpp b/src/devices/machine/pci.cpp index c0f2676ca56..3016307ee19 100644 --- a/src/devices/machine/pci.cpp +++ b/src/devices/machine/pci.cpp @@ -69,7 +69,7 @@ void pci_bridge_device::config_map(address_map &map) map(0x3e, 0x3f).rw(FUNC(pci_bridge_device::bridge_control_r), FUNC(pci_bridge_device::bridge_control_w)); } -pci_device::pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pci_device::pci_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_region(*this, DEVICE_SELF) { @@ -446,7 +446,7 @@ void pci_device::set_map_flags(int id, int flags) remap_cb(); } -agp_device::agp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +agp_device::agp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, type, tag, owner, clock) { } @@ -463,12 +463,12 @@ void agp_device::device_reset() -pci_bridge_device::pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pci_bridge_device::pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_bridge_device(mconfig, PCI_BRIDGE, tag, owner, clock) { } -pci_bridge_device::pci_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pci_bridge_device::pci_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, type, tag, owner, clock) , device_memory_interface(mconfig, *this) , configure_space_config("configuration_space", ENDIANNESS_LITTLE, 32, 20) @@ -844,7 +844,7 @@ void pci_bridge_device::bridge_control_w(offs_t offset, uint16_t data, uint16_t } -agp_bridge_device::agp_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +agp_bridge_device::agp_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pci_bridge_device(mconfig, type, tag, owner, clock) { } @@ -868,7 +868,7 @@ void pci_host_device::io_configuration_access_map(address_map &map) } -pci_host_device::pci_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pci_host_device::pci_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : pci_bridge_device(mconfig, type, tag, owner, clock) { } @@ -956,7 +956,7 @@ void pci_host_device::root_config_write(uint8_t bus, uint8_t device, uint16_t re } -pci_root_device::pci_root_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pci_root_device::pci_root_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PCI_ROOT, tag, owner, clock) { } diff --git a/src/devices/machine/pci.h b/src/devices/machine/pci.h index 53e1a6be3d1..7f14ef1df84 100644 --- a/src/devices/machine/pci.h +++ b/src/devices/machine/pci.h @@ -72,7 +72,7 @@ public: void interrupt_pin_w(offs_t offset, uint8_t data, uint8_t mem_mask = ~0); protected: - pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); optional_memory_region m_region; @@ -136,7 +136,7 @@ protected: class agp_device : public pci_device { protected: - agp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + agp_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; @@ -144,12 +144,12 @@ protected: class pci_bridge_device : public pci_device, public device_memory_interface { public: - pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, uint32_t main_id, uint32_t revision) + pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, uint32_t main_id, uint32_t revision) : pci_bridge_device(mconfig, tag, owner, clock) { set_ids_bridge(main_id, revision); } - pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void set_remap_cb(mapper_cb _remap_cb) override; virtual void map_device(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, @@ -201,7 +201,7 @@ protected: AS_PCI_CONFIG = 0 }; - pci_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pci_bridge_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; @@ -232,7 +232,7 @@ private: class agp_bridge_device : public pci_bridge_device { protected: - agp_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + agp_bridge_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; @@ -243,7 +243,7 @@ public: void io_configuration_access_map(address_map &map); protected: - pci_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pci_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); uint32_t config_address_r(); void config_address_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); @@ -271,7 +271,7 @@ protected: class pci_root_device : public device_t { public: - pci_root_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pci_root_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/machine/pci9050.cpp b/src/devices/machine/pci9050.cpp index 9f5c63c621e..280a7559a52 100644 --- a/src/devices/machine/pci9050.cpp +++ b/src/devices/machine/pci9050.cpp @@ -39,7 +39,7 @@ void pci9050_device::map(address_map &map) map(0x50, 0x53).rw(FUNC(pci9050_device::cntrl_r), FUNC(pci9050_device::cntrl_w)); } -pci9050_device::pci9050_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pci9050_device::pci9050_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, PCI9050, tag, owner, clock) , m_user_input_handler(*this), m_user_output_handler(*this) { diff --git a/src/devices/machine/pckeybrd.cpp b/src/devices/machine/pckeybrd.cpp index c2b46fbe4b7..76a77753799 100644 --- a/src/devices/machine/pckeybrd.cpp +++ b/src/devices/machine/pckeybrd.cpp @@ -278,20 +278,20 @@ const at_keyboard_device::extended_keyboard_code at_keyboard_device::m_extended_ DEFINE_DEVICE_TYPE(PC_KEYB, pc_keyboard_device, "pc_keyb", "PC Keyboard") DEFINE_DEVICE_TYPE(AT_KEYB, at_keyboard_device, "at_keyb", "AT Keyboard") -pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_keyboard_device(mconfig, PC_KEYB, tag, owner, clock) { m_type = KEYBOARD_TYPE::PC; } -pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +pc_keyboard_device::pc_keyboard_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_ioport(*this, "pc_keyboard_%u", 0), m_out_keypress_func(*this) { } -at_keyboard_device::at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +at_keyboard_device::at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pc_keyboard_device(mconfig, AT_KEYB, tag, owner, clock), m_leds(*this, "led%u", 0U), m_scan_code_set(1) diff --git a/src/devices/machine/pckeybrd.h b/src/devices/machine/pckeybrd.h index e52981b10c4..a3a2ee77d70 100644 --- a/src/devices/machine/pckeybrd.h +++ b/src/devices/machine/pckeybrd.h @@ -20,7 +20,7 @@ class pc_keyboard_device : public device_t { public: - pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); uint8_t read(); void enable(int state); @@ -35,7 +35,7 @@ public: }; protected: - pc_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pc_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; @@ -80,12 +80,12 @@ class at_keyboard_device : public pc_keyboard_device { public: at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, KEYBOARD_TYPE type, int default_set) - : at_keyboard_device(mconfig, tag, owner, 0) + : at_keyboard_device(mconfig, tag, owner) { set_type(type, default_set); } - at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void write(uint8_t data); diff --git a/src/devices/machine/pdc.cpp b/src/devices/machine/pdc.cpp index 2a482d8a236..6e2fd04a001 100644 --- a/src/devices/machine/pdc.cpp +++ b/src/devices/machine/pdc.cpp @@ -256,7 +256,7 @@ void pdc_device::device_add_mconfig(machine_config &config) //config.m_perfect_cpu_quantum = subtag(M6502_TAG); /* Floppy Disk Controller - uPD765a - NEC D765AC-2 */ - UPD765A(config, m_fdc, 4'000'000, true, true); + UPD765A(config, m_fdc, XTAL::u(4'000'000), true, true); m_fdc->intrq_wr_callback().set(FUNC(pdc_device::fdc_irq)); m_fdc->drq_wr_callback().set(m_dma8237, FUNC(am9517a_device::dreq0_w)); //.invert(); @@ -279,7 +279,7 @@ void pdc_device::device_add_mconfig(machine_config &config) /* Hard Disk Controller - HDC9224 */ // TODO: connect the HDC lines - HDC9224(config, HDC_TAG, 0); + HDC9224(config, HDC_TAG); MFM_HD_CONNECTOR(config, "h1", pdc_harddisks, nullptr, MFM_BYTE, 3000, 20, MFMHD_GEN_FORMAT); } @@ -297,7 +297,7 @@ ioport_constructor pdc_device::device_input_ports() const // pdc_device - constructor //------------------------------------------------- -pdc_device::pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pdc_device::pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PDC, tag, owner, clock), m_pdccpu(*this, Z80_TAG), m_dma8237(*this, FDCDMA_TAG), @@ -347,7 +347,7 @@ void pdc_device::device_reset() /* Reset CPU */ m_pdccpu->reset(); - m_fdc->set_rate(500000) ; + m_fdc->set_rate(XTAL::u(500000)) ; } //------------------------------------------------- diff --git a/src/devices/machine/pdc.h b/src/devices/machine/pdc.h index 416354b9c48..b301ad1aa13 100644 --- a/src/devices/machine/pdc.h +++ b/src/devices/machine/pdc.h @@ -34,7 +34,7 @@ class pdc_device : public device_t { public: /* Constructor and Destructor */ - pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); /* Callbacks */ auto m68k_r_callback() { return m_m68k_r_cb.bind(); } diff --git a/src/devices/machine/phi.cpp b/src/devices/machine/phi.cpp index 7659a0359a1..38aafef40f9 100644 --- a/src/devices/machine/phi.cpp +++ b/src/devices/machine/phi.cpp @@ -187,7 +187,7 @@ constexpr uint8_t CONTROLLER_ADDR = 0x1e; // PHI always has this address when DEFINE_DEVICE_TYPE(PHI, phi_device, "hp_phi", "HP Processor-to-HPIB Interface") // Constructors -phi_device::phi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +phi_device::phi_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_dio_read_func(*this), m_dio_write_func(*this), @@ -198,7 +198,7 @@ phi_device::phi_device(const machine_config &mconfig, device_type type, const ch { } -phi_device::phi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +phi_device::phi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : phi_device(mconfig, PHI, tag, owner, clock) { } diff --git a/src/devices/machine/phi.h b/src/devices/machine/phi.h index 4eb74b6bbca..bdb73bc5ed6 100644 --- a/src/devices/machine/phi.h +++ b/src/devices/machine/phi.h @@ -16,7 +16,7 @@ class phi_device : public device_t { public: // construction/destruction - phi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + phi_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // See ieee488.h enum phi_488_signal_t @@ -90,7 +90,7 @@ public: uint8_t reg8_r(offs_t offset); protected: - phi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + phi_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/machine/pic8259.cpp b/src/devices/machine/pic8259.cpp index 385f38cfbdb..8abb6271055 100644 --- a/src/devices/machine/pic8259.cpp +++ b/src/devices/machine/pic8259.cpp @@ -468,7 +468,7 @@ DEFINE_DEVICE_TYPE(PIC8259, pic8259_device, "pic8259", "Intel 8259 PIC") DEFINE_DEVICE_TYPE(V5X_ICU, v5x_icu_device, "v5x_icu", "NEC V5X ICU") DEFINE_DEVICE_TYPE(MK98PIC, mk98pic_device, "mk98pic", "Elektronika MK-98 PIC") -pic8259_device::pic8259_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pic8259_device::pic8259_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_out_int_func(*this) , m_in_sp_func(*this) @@ -479,17 +479,17 @@ pic8259_device::pic8259_device(const machine_config &mconfig, device_type type, { } -pic8259_device::pic8259_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pic8259_device::pic8259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic8259_device(mconfig, PIC8259, tag, owner, clock) { } -v5x_icu_device::v5x_icu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v5x_icu_device::v5x_icu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic8259_device(mconfig, V5X_ICU, tag, owner, clock) { } -mk98pic_device::mk98pic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mk98pic_device::mk98pic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pic8259_device(mconfig, MK98PIC, tag, owner, clock) { } diff --git a/src/devices/machine/pic8259.h b/src/devices/machine/pic8259.h index 333cadced09..02bfd57935f 100644 --- a/src/devices/machine/pic8259.h +++ b/src/devices/machine/pic8259.h @@ -31,7 +31,7 @@ class pic8259_device : public device_t { public: - pic8259_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pic8259_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto out_int_callback() { return m_out_int_func.bind(); } // Interrupt request output to CPU or master 8259 (active high) auto in_sp_callback() { return m_in_sp_func.bind(); } // Slave program select (VCC = master; GND = slave; pin becomes EN output in buffered mode) @@ -53,7 +53,7 @@ public: IRQ_CALLBACK_MEMBER(inta_cb); protected: - pic8259_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pic8259_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -119,7 +119,7 @@ private: class v5x_icu_device : public pic8259_device { public: - v5x_icu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + v5x_icu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual bool is_x86() const override { return true; } @@ -128,7 +128,7 @@ protected: class mk98pic_device : public pic8259_device { public: - mk98pic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mk98pic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual bool is_x86() const override { return true; } diff --git a/src/devices/machine/pit8253.cpp b/src/devices/machine/pit8253.cpp index fc7c79cc289..8778a6b9f1a 100644 --- a/src/devices/machine/pit8253.cpp +++ b/src/devices/machine/pit8253.cpp @@ -46,17 +46,17 @@ DEFINE_DEVICE_TYPE(PIT8253, pit8253_device, "pit8253", "Intel 8253 PIT") DEFINE_DEVICE_TYPE(PIT8254, pit8254_device, "pit8254", "Intel 8254 PIT") DEFINE_DEVICE_TYPE(FE2010_PIT, fe2010_pit_device, "fe2010_pit", "Faraday FE2010 PIT") -pit_counter_device::pit_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pit_counter_device::pit_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PIT_COUNTER, tag, owner, clock) { } -pit8253_device::pit8253_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pit8253_device::pit8253_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pit8253_device(mconfig, PIT8253, tag, owner, clock, pit_type::I8253) { } -pit8253_device::pit8253_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, pit_type chip_type) : +pit8253_device::pit8253_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, pit_type chip_type) : device_t(mconfig, type, tag, owner, clock), m_clk{0, 0, 0}, m_out_handler(*this), @@ -66,12 +66,12 @@ pit8253_device::pit8253_device(const machine_config &mconfig, device_type type, } -pit8254_device::pit8254_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pit8254_device::pit8254_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pit8253_device(mconfig, PIT8254, tag, owner, clock, pit_type::I8254) { } -fe2010_pit_device::fe2010_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +fe2010_pit_device::fe2010_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pit8253_device(mconfig, FE2010_PIT, tag, owner, clock, pit_type::FE2010) { } @@ -82,9 +82,9 @@ fe2010_pit_device::fe2010_pit_device(const machine_config &mconfig, const char * void pit8253_device::device_add_mconfig(machine_config &config) { - PIT_COUNTER(config, "counter0", 0); - PIT_COUNTER(config, "counter1", 0); - PIT_COUNTER(config, "counter2", 0); + PIT_COUNTER(config, "counter0"); + PIT_COUNTER(config, "counter1"); + PIT_COUNTER(config, "counter2"); } diff --git a/src/devices/machine/pit8253.h b/src/devices/machine/pit8253.h index 0c069a217d8..64b164ff851 100644 --- a/src/devices/machine/pit8253.h +++ b/src/devices/machine/pit8253.h @@ -44,7 +44,7 @@ class pit_counter_device : public device_t public: // construction/destruction - pit_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pit_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides @@ -109,7 +109,7 @@ class pit8253_device : public device_t public: // construction/destruction - pit8253_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pit8253_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers template <unsigned N> void set_clk(double clk) { m_clk[N] = clk; } @@ -140,7 +140,7 @@ public: void set_clockin(int timer, double new_clockin) { m_counter[timer]->set_clockin(new_clockin); } protected: - pit8253_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, pit_type chip_type); + pit8253_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, pit_type chip_type); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -162,7 +162,7 @@ DECLARE_DEVICE_TYPE(PIT8253, pit8253_device) class pit8254_device : public pit8253_device { public: - pit8254_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pit8254_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void readback_command(uint8_t data) override; @@ -173,7 +173,7 @@ DECLARE_DEVICE_TYPE(PIT8254, pit8254_device) class fe2010_pit_device : public pit8253_device { public: - fe2010_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + fe2010_pit_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(FE2010_PIT, fe2010_pit_device) diff --git a/src/devices/machine/pla.cpp b/src/devices/machine/pla.cpp index fe72d5b12c8..a0f395c2d7c 100644 --- a/src/devices/machine/pla.cpp +++ b/src/devices/machine/pla.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(MOS8721, mos8721_device, "mos8721", "MOS 8721 PLA") // pla_device - constructor //------------------------------------------------- -pla_device::pla_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +pla_device::pla_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_region(*this, DEVICE_SELF) , m_format(FMT::JEDBIN) @@ -37,12 +37,12 @@ pla_device::pla_device(const machine_config &mconfig, device_type type, const ch { } -pla_device::pla_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pla_device::pla_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pla_device(mconfig, PLA, tag, owner, clock) { } -pls100_device::pls100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pls100_device::pls100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pla_device(mconfig, PLS100, tag, owner, clock) { set_num_inputs(16); @@ -50,7 +50,7 @@ pls100_device::pls100_device(const machine_config &mconfig, const char *tag, dev set_num_terms(48); } -mos8721_device::mos8721_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mos8721_device::mos8721_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pla_device(mconfig, MOS8721, tag, owner, clock) { // TODO: actual number of terms is unknown diff --git a/src/devices/machine/pla.h b/src/devices/machine/pla.h index 548ab4bf16b..0c201b28e73 100644 --- a/src/devices/machine/pla.h +++ b/src/devices/machine/pla.h @@ -48,10 +48,10 @@ public: }; // construction/destruction - pla_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - pla_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + pla_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); + pla_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); pla_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t inputs, uint32_t outputs, uint32_t terms) - : pla_device(mconfig, tag, owner, (uint32_t)0) + : pla_device(mconfig, tag, owner) { set_num_inputs(inputs); set_num_outputs(outputs); @@ -107,13 +107,13 @@ private: class pls100_device : public pla_device { public: - pls100_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + pls100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class mos8721_device : public pla_device { public: - mos8721_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mos8721_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; DECLARE_DEVICE_TYPE(PLA, pla_device) diff --git a/src/devices/machine/ps2dma.cpp b/src/devices/machine/ps2dma.cpp index 6e143123fb0..0c7db188a48 100644 --- a/src/devices/machine/ps2dma.cpp +++ b/src/devices/machine/ps2dma.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_DMAC, ps2_dmac_device, "ps2dmac", "PlayStation 2 EE DMAC") -ps2_dmac_device::ps2_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_dmac_device::ps2_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_DMAC, tag, owner, clock) , device_execute_interface(mconfig, *this) , m_ee(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/ps2dma.h b/src/devices/machine/ps2dma.h index b602999de28..8b40bad7975 100644 --- a/src/devices/machine/ps2dma.h +++ b/src/devices/machine/ps2dma.h @@ -22,7 +22,7 @@ class ps2_dmac_device : public device_t, public device_execute_interface { public: template <typename T, typename U, typename V, typename W, typename X> - ps2_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&ee_tag, U &&ram_tag, V &&sif_tag, W &&gs_tag, X &&vu1_tag) + ps2_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&ee_tag, U &&ram_tag, V &&sif_tag, W &&gs_tag, X &&vu1_tag) : ps2_dmac_device(mconfig, tag, owner, clock) { m_ee.set_tag(std::forward<T>(ee_tag)); @@ -32,7 +32,7 @@ public: m_vu1.set_tag(std::forward<X>(vu1_tag)); } - ps2_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_dmac_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual ~ps2_dmac_device() override; enum channel_type : uint32_t diff --git a/src/devices/machine/ps2intc.cpp b/src/devices/machine/ps2intc.cpp index 10b6602606e..0ea4d1b414c 100644 --- a/src/devices/machine/ps2intc.cpp +++ b/src/devices/machine/ps2intc.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_INTC, ps2_intc_device, "ps2intc", "PlayStation 2 EE INTC") -ps2_intc_device::ps2_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_intc_device::ps2_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_INTC, tag, owner, clock) , m_ee(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/ps2intc.h b/src/devices/machine/ps2intc.h index 111c343372f..fa97d6a5693 100644 --- a/src/devices/machine/ps2intc.h +++ b/src/devices/machine/ps2intc.h @@ -23,12 +23,12 @@ class ps2_intc_device : public device_t public: template <typename T> ps2_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&ee_tag) - : ps2_intc_device(mconfig, tag, owner, (uint32_t)0) + : ps2_intc_device(mconfig, tag, owner) { m_ee.set_tag(std::forward<T>(ee_tag)); } - ps2_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~ps2_intc_device() override; uint32_t read(offs_t offset, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/ps2mc.cpp b/src/devices/machine/ps2mc.cpp index b253f6153b7..5c80c1da8a4 100644 --- a/src/devices/machine/ps2mc.cpp +++ b/src/devices/machine/ps2mc.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_MC, ps2_mc_device, "ps2mc", "PlayStation 2 Memory Car /*static*/ const size_t ps2_mc_device::BUFFER_SIZE = 512; // Total guess /*static*/ const uint8_t ps2_mc_device::DEFAULT_TERMINATOR = 0x55; -ps2_mc_device::ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_mc_device::ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_MC, tag, owner, clock) { } diff --git a/src/devices/machine/ps2mc.h b/src/devices/machine/ps2mc.h index ef38dea72c2..fe79fb0baaa 100644 --- a/src/devices/machine/ps2mc.h +++ b/src/devices/machine/ps2mc.h @@ -17,12 +17,7 @@ class ps2_mc_device : public device_t { public: - ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner) - : ps2_mc_device(mconfig, tag, owner, (uint32_t)0) - { - } - - ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~ps2_mc_device() override; void recv_fifo_push(uint8_t data); // TODO: Turn me into a bus interface! diff --git a/src/devices/machine/ps2pad.cpp b/src/devices/machine/ps2pad.cpp index 64e1009a331..17afcca7e4d 100644 --- a/src/devices/machine/ps2pad.cpp +++ b/src/devices/machine/ps2pad.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_PAD, ps2_pad_device, "ps2pad", "Sony DualShock 2") /*static*/ const size_t ps2_pad_device::BUFFER_SIZE = 64; // Total guess -ps2_pad_device::ps2_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_pad_device::ps2_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_PAD, tag, owner, clock) { } diff --git a/src/devices/machine/ps2pad.h b/src/devices/machine/ps2pad.h index 2b384fd0818..7e3962727dc 100644 --- a/src/devices/machine/ps2pad.h +++ b/src/devices/machine/ps2pad.h @@ -17,12 +17,7 @@ class ps2_pad_device : public device_t { public: - ps2_pad_device(const machine_config &mconfig, const char *tag, device_t *owner) - : ps2_pad_device(mconfig, tag, owner, (uint32_t)0) - { - } - - ps2_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_pad_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~ps2_pad_device() override; void recv_fifo_push(uint8_t data); // TODO: Turn me into a bus interface! diff --git a/src/devices/machine/ps2sif.cpp b/src/devices/machine/ps2sif.cpp index b6fd6d5cfe7..a5ab0b46949 100644 --- a/src/devices/machine/ps2sif.cpp +++ b/src/devices/machine/ps2sif.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_SIF, ps2_sif_device, "ps2sif", "PlayStation 2 SIF") /*static*/ const size_t ps2_sif_device::MAX_FIFO_DEPTH = 0x20; -ps2_sif_device::ps2_sif_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_sif_device::ps2_sif_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_SIF, tag, owner, clock) , m_intc(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/ps2sif.h b/src/devices/machine/ps2sif.h index 83fe5f4a076..63686bd9714 100644 --- a/src/devices/machine/ps2sif.h +++ b/src/devices/machine/ps2sif.h @@ -21,12 +21,12 @@ class ps2_sif_device : public device_t public: template <typename T> ps2_sif_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&intc_tag) - : ps2_sif_device(mconfig, tag, owner, (uint32_t)0) + : ps2_sif_device(mconfig, tag, owner) { m_intc.set_tag(std::forward<T>(intc_tag)); } - ps2_sif_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_sif_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~ps2_sif_device() override; uint32_t ee_r(offs_t offset, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/ps2timer.cpp b/src/devices/machine/ps2timer.cpp index 667fed7622c..f2c44c274a0 100644 --- a/src/devices/machine/ps2timer.cpp +++ b/src/devices/machine/ps2timer.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_TIMER, ps2_timer_device, "ps2timer", "PlayStation 2 EE Core Timer") -ps2_timer_device::ps2_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ps2_timer_device::ps2_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SONYPS2_TIMER, tag, owner, clock) , m_compare_timer(nullptr) , m_overflow_timer(nullptr) diff --git a/src/devices/machine/ps2timer.h b/src/devices/machine/ps2timer.h index f7cd398f938..5761467ca62 100644 --- a/src/devices/machine/ps2timer.h +++ b/src/devices/machine/ps2timer.h @@ -17,13 +17,13 @@ class ps2_timer_device : public device_t { public: - ps2_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool can_hold) + ps2_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool can_hold) : ps2_timer_device(mconfig, tag, owner, clock) { m_can_hold = can_hold; } - ps2_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ps2_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(offs_t offset, uint32_t mem_mask = ~0); void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/pxa255.cpp b/src/devices/machine/pxa255.cpp index d387347dd98..e86ea8d607c 100644 --- a/src/devices/machine/pxa255.cpp +++ b/src/devices/machine/pxa255.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(PXA255_PERIPHERALS, pxa255_periphs_device, "pxa255_periphs", "Intel XScale PXA255 Peripherals") -pxa255_periphs_device::pxa255_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +pxa255_periphs_device::pxa255_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, PXA255_PERIPHERALS, tag, owner, clock) , m_gpio0_w(*this) , m_gpio1_w(*this) diff --git a/src/devices/machine/pxa255.h b/src/devices/machine/pxa255.h index 75eadbac2c5..4c4d5c8b742 100644 --- a/src/devices/machine/pxa255.h +++ b/src/devices/machine/pxa255.h @@ -26,13 +26,13 @@ class pxa255_periphs_device : public device_t { public: template <typename T> - pxa255_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + pxa255_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : pxa255_periphs_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(std::forward<T>(cpu_tag)); } - pxa255_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pxa255_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto gpio0_write() { return m_gpio0_w.bind(); } auto gpio0_read() { return m_gpio0_r.bind(); } diff --git a/src/devices/machine/r10696.cpp b/src/devices/machine/r10696.cpp index ce9140ef7d5..8f9c6a20ce6 100644 --- a/src/devices/machine/r10696.cpp +++ b/src/devices/machine/r10696.cpp @@ -44,7 +44,7 @@ DEFINE_DEVICE_TYPE(R10696, r10696_device, "r10696", "Rockwell 10696 GPIO") -r10696_device::r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +r10696_device::r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, R10696, tag, owner, clock) , m_io_a(0), m_io_b(0), m_io_c(0) , m_iord(*this), m_iowr(*this) diff --git a/src/devices/machine/r10696.h b/src/devices/machine/r10696.h index dc33c4519f3..394fab6d36b 100644 --- a/src/devices/machine/r10696.h +++ b/src/devices/machine/r10696.h @@ -22,7 +22,7 @@ class r10696_device : public device_t { public: - r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + r10696_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t io_r(offs_t offset); void io_w(offs_t offset, uint8_t data); diff --git a/src/devices/machine/r10788.cpp b/src/devices/machine/r10788.cpp index 4a8a8161ad5..2244098c4cc 100644 --- a/src/devices/machine/r10788.cpp +++ b/src/devices/machine/r10788.cpp @@ -54,7 +54,7 @@ DEFINE_DEVICE_TYPE(R10788, r10788_device, "r10788", "Rockwell 10788 KDC") -r10788_device::r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +r10788_device::r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, R10788, tag, owner, clock) , m_ktr(0), m_kts(0), m_kla(0), m_klb(0), m_mask_a(15), m_mask_b(15), m_ker(0) , m_io_counter(0), m_scan_counter(0) diff --git a/src/devices/machine/r10788.h b/src/devices/machine/r10788.h index 9a94ad65b5c..7dea3287001 100644 --- a/src/devices/machine/r10788.h +++ b/src/devices/machine/r10788.h @@ -21,7 +21,7 @@ class r10788_device : public device_t { public: - r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + r10788_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); enum { KTR = 0xc, //!< Transfer Keyboard Return diff --git a/src/devices/machine/ra17xx.cpp b/src/devices/machine/ra17xx.cpp index eebdc134727..24d50fdcd21 100644 --- a/src/devices/machine/ra17xx.cpp +++ b/src/devices/machine/ra17xx.cpp @@ -52,7 +52,7 @@ DEFINE_DEVICE_TYPE(RA17XX, ra17xx_device, "ra17xx", "Rockwell A17xx") -ra17xx_device::ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ra17xx_device::ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RA17XX, tag, owner, clock) , m_enable(false) , m_iord(*this) diff --git a/src/devices/machine/ra17xx.h b/src/devices/machine/ra17xx.h index 54e4fc9028f..28a6b04c71d 100644 --- a/src/devices/machine/ra17xx.h +++ b/src/devices/machine/ra17xx.h @@ -22,7 +22,7 @@ class ra17xx_device : public device_t { public: - ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ra17xx_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t io_r(offs_t offset); void io_w(address_space &space, offs_t offset, uint8_t data); diff --git a/src/devices/machine/ram.cpp b/src/devices/machine/ram.cpp index 40b361bdc6a..826db0c6cec 100644 --- a/src/devices/machine/ram.cpp +++ b/src/devices/machine/ram.cpp @@ -120,7 +120,7 @@ DEFINE_DEVICE_TYPE(RAM, ram_device, "ram", "RAM") // ram_device - constructor //------------------------------------------------- -ram_device::ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ram_device::ram_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RAM, tag, owner, clock) , m_size(0) , m_default_size(0) diff --git a/src/devices/machine/ram.h b/src/devices/machine/ram.h index 8b17b3eadc5..3375f39938b 100644 --- a/src/devices/machine/ram.h +++ b/src/devices/machine/ram.h @@ -36,7 +36,7 @@ public: using extra_option_vector = std::vector<extra_option>; // construction/destruction - ram_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); + ram_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock = XTAL()); // accessors u32 size() const { return m_size; } diff --git a/src/devices/machine/rf5c296.cpp b/src/devices/machine/rf5c296.cpp index 37a0adf3a3b..f040c9f16f9 100644 --- a/src/devices/machine/rf5c296.cpp +++ b/src/devices/machine/rf5c296.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(RF5C296, rf5c296_device, "rf5c296", "RF5C296 PC Card controller") -rf5c296_device::rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rf5c296_device::rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RF5C296, tag, owner, clock) , m_rf5c296_reg(0) , m_pccard(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/rf5c296.h b/src/devices/machine/rf5c296.h index b5f3beea7fc..312defb262c 100644 --- a/src/devices/machine/rf5c296.h +++ b/src/devices/machine/rf5c296.h @@ -11,7 +11,7 @@ class rf5c296_device : public device_t { public: - rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rf5c296_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers template <typename T> void set_pccard(T &&tag) { m_pccard.set_tag(std::forward<T>(tag)); } diff --git a/src/devices/machine/ripple_counter.cpp b/src/devices/machine/ripple_counter.cpp index 25639eb6bb3..47dcc36b789 100644 --- a/src/devices/machine/ripple_counter.cpp +++ b/src/devices/machine/ripple_counter.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(RIPPLE_COUNTER, ripple_counter_device, "ripple_counter", "Gen // ripple_counter_device - constructor //------------------------------------------------- -ripple_counter_device::ripple_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +ripple_counter_device::ripple_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RIPPLE_COUNTER, tag, owner, clock), device_rom_interface(mconfig, *this), m_count_out_cb(*this), diff --git a/src/devices/machine/ripple_counter.h b/src/devices/machine/ripple_counter.h index fb7648334e3..dc1e80f7375 100644 --- a/src/devices/machine/ripple_counter.h +++ b/src/devices/machine/ripple_counter.h @@ -23,7 +23,7 @@ class ripple_counter_device : public device_t, public device_rom_interface<14> { public: // construction/destruction - ripple_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + ripple_counter_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration void set_stages(u8 stages) { m_count_mask = (1U << stages) - 1; override_address_width(stages); } diff --git a/src/devices/machine/roc10937.cpp b/src/devices/machine/roc10937.cpp index e9c44ab822b..becac7e1a0c 100644 --- a/src/devices/machine/roc10937.cpp +++ b/src/devices/machine/roc10937.cpp @@ -129,7 +129,7 @@ static const int roc10937poslut[]= 0//15 }; -rocvfd_device::rocvfd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +rocvfd_device::rocvfd_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_outputs(), m_cursor_pos(0), @@ -252,22 +252,22 @@ DEFINE_DEVICE_TYPE(MIC10937, mic10937_device, "mic10937", "Micrel MIC10937 VFD c DEFINE_DEVICE_TYPE(ROC10957, roc10957_device, "roc10957", "Rockwell 10957 VFD controller") // and compatible DEFINE_DEVICE_TYPE(S16LF01, s16lf01_device, "s16lf01", "Samsung 16LF01 Series VFD") // and compatible, basically the MSC1937 on a 16 seg display -roc10937_device::roc10937_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +roc10937_device::roc10937_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rocvfd_device(mconfig, ROC10937, tag, owner, clock) { } -msc1937_device::msc1937_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msc1937_device::msc1937_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rocvfd_device(mconfig, MSC1937, tag, owner, clock) { } -mic10937_device::mic10937_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mic10937_device::mic10937_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rocvfd_device(mconfig, MIC10937, tag, owner, clock) { } -s16lf01_device::s16lf01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s16lf01_device::s16lf01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rocvfd_device(mconfig, S16LF01, tag, owner, clock) { } @@ -324,7 +324,7 @@ void rocvfd_device::write_char(int data) } } -roc10957_device::roc10957_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +roc10957_device::roc10957_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rocvfd_device(mconfig, ROC10957, tag, owner, clock) { } diff --git a/src/devices/machine/roc10937.h b/src/devices/machine/roc10937.h index da0f21eb808..ac775e3c831 100644 --- a/src/devices/machine/roc10937.h +++ b/src/devices/machine/roc10937.h @@ -27,7 +27,7 @@ public: protected: - rocvfd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rocvfd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); std::unique_ptr<output_finder<16> > m_outputs; std::unique_ptr<output_finder<1> > m_brightness; @@ -59,29 +59,29 @@ private: class roc10937_device : public rocvfd_device { public: - roc10937_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 60); + roc10937_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(60)); }; class msc1937_device : public rocvfd_device { public: - msc1937_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 60); + msc1937_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(60)); }; class mic10937_device : public rocvfd_device { public: - mic10937_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 60); + mic10937_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(60)); }; class roc10957_device : public rocvfd_device { public: - roc10957_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 60); + roc10957_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(60)); void write_char(int data); }; class s16lf01_device : public rocvfd_device { public: - s16lf01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 60); + s16lf01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(60)); }; diff --git a/src/devices/machine/rp5c01.cpp b/src/devices/machine/rp5c01.cpp index 8a59f07e9f8..a628a8975aa 100644 --- a/src/devices/machine/rp5c01.cpp +++ b/src/devices/machine/rp5c01.cpp @@ -169,12 +169,12 @@ inline void rp5c01_device::check_alarm() // rp5c01_device - constructor //------------------------------------------------- -rp5c01_device::rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rp5c01_device::rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rp5c01_device(mconfig, RP5C01, tag, owner, clock) { } -rp5c01_device::rp5c01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rp5c01_device::rp5c01_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_rtc_interface(mconfig, *this), device_nvram_interface(mconfig, *this), @@ -428,7 +428,7 @@ void rp5c01_device::write(offs_t offset, uint8_t data) // tc8521_device - constructor //------------------------------------------------- -tc8521_device::tc8521_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tc8521_device::tc8521_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rp5c01_device(mconfig, TC8521, tag, owner, clock) { } diff --git a/src/devices/machine/rp5c01.h b/src/devices/machine/rp5c01.h index 7e48269b72c..2c8aa2c9851 100644 --- a/src/devices/machine/rp5c01.h +++ b/src/devices/machine/rp5c01.h @@ -38,7 +38,7 @@ class rp5c01_device : public device_t, { public: // construction/destruction - rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp5c01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_alarm_callback() { return m_out_alarm_cb.bind(); } void remove_battery() { m_battery_backed = false; nvram_enable_backup(false); } @@ -50,7 +50,7 @@ public: protected: // construction/destruction - rp5c01_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rp5c01_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; @@ -98,7 +98,7 @@ class tc8521_device : public rp5c01_device { public: // construction/destruction - tc8521_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc8521_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/rp5c15.cpp b/src/devices/machine/rp5c15.cpp index a37b779c6fd..9708a996e0d 100644 --- a/src/devices/machine/rp5c15.cpp +++ b/src/devices/machine/rp5c15.cpp @@ -183,7 +183,7 @@ inline void rp5c15_device::check_alarm() // rp5c15_device - constructor //------------------------------------------------- -rp5c15_device::rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rp5c15_device::rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RP5C15, tag, owner, clock), device_rtc_interface(mconfig, *this), m_out_alarm_cb(*this), diff --git a/src/devices/machine/rp5c15.h b/src/devices/machine/rp5c15.h index 15936a02445..3359e766ff0 100644 --- a/src/devices/machine/rp5c15.h +++ b/src/devices/machine/rp5c15.h @@ -30,7 +30,7 @@ class rp5c15_device : public device_t, { public: // construction/destruction - rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp5c15_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto alarm() { return m_out_alarm_cb.bind(); } auto clkout() { return m_out_clkout_cb.bind(); } diff --git a/src/devices/machine/rp5h01.cpp b/src/devices/machine/rp5h01.cpp index 655ffd5f841..f8e2658bcb9 100644 --- a/src/devices/machine/rp5h01.cpp +++ b/src/devices/machine/rp5h01.cpp @@ -32,7 +32,7 @@ uint8_t const rp5h01_device::s_initial_data[0x10] = DEFINE_DEVICE_TYPE(RP5H01, rp5h01_device, "rp5h01", "RP5H01 6/7-bit Counter") -rp5h01_device::rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rp5h01_device::rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RP5H01, tag, owner, clock) , m_data(nullptr) , m_rom(*this, DEVICE_SELF) diff --git a/src/devices/machine/rp5h01.h b/src/devices/machine/rp5h01.h index 686367c694e..46fa4c5d6b0 100644 --- a/src/devices/machine/rp5h01.h +++ b/src/devices/machine/rp5h01.h @@ -31,7 +31,7 @@ class rp5h01_device : public device_t { public: - rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( enable_w ); /* /CE */ DECLARE_WRITE_LINE_MEMBER( reset_w ); /* RESET */ diff --git a/src/devices/machine/rstbuf.cpp b/src/devices/machine/rstbuf.cpp index 9e13d72743a..b321bc0c9ef 100644 --- a/src/devices/machine/rstbuf.cpp +++ b/src/devices/machine/rstbuf.cpp @@ -71,7 +71,7 @@ DEFINE_DEVICE_TYPE(RST_NEG_BUFFER, rst_neg_buffer_device, "rst_neg_buffer", "RST // rst_buffer_device - constructor //------------------------------------------------- -rst_buffer_device::rst_buffer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +rst_buffer_device::rst_buffer_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_int_cb(*this) , m_input_buffer(0) @@ -83,7 +83,7 @@ rst_buffer_device::rst_buffer_device(const machine_config &mconfig, device_type // rst_pos_buffer_device - constructor //------------------------------------------------- -rst_pos_buffer_device::rst_pos_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rst_pos_buffer_device::rst_pos_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rst_buffer_device(mconfig, RST_POS_BUFFER, tag, owner, clock) { } @@ -93,7 +93,7 @@ rst_pos_buffer_device::rst_pos_buffer_device(const machine_config &mconfig, cons // rst_neg_buffer_device - constructor //------------------------------------------------- -rst_neg_buffer_device::rst_neg_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rst_neg_buffer_device::rst_neg_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rst_buffer_device(mconfig, RST_NEG_BUFFER, tag, owner, clock) { } diff --git a/src/devices/machine/rstbuf.h b/src/devices/machine/rstbuf.h index 718a96f4861..f4cb6006acb 100644 --- a/src/devices/machine/rstbuf.h +++ b/src/devices/machine/rstbuf.h @@ -30,7 +30,7 @@ public: protected: // device base class constructor - rst_buffer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + rst_buffer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_resolve_objects() override; @@ -54,7 +54,7 @@ class rst_pos_buffer_device : public rst_buffer_device { public: // device constructor - rst_pos_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + rst_pos_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // set RST 1/RST 08H request line (modifies bit 3 of vector) DECLARE_WRITE_LINE_MEMBER(rst1_w) { sync_input(state, 0x08); } @@ -76,7 +76,7 @@ class rst_neg_buffer_device : public rst_buffer_device { public: // device constructor - rst_neg_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + rst_neg_buffer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // set RST 30H request line (modifies bit 3 of vector) DECLARE_WRITE_LINE_MEMBER(rst30_w) { sync_input(state, 0x08); } diff --git a/src/devices/machine/rtc4543.cpp b/src/devices/machine/rtc4543.cpp index 773724a4170..c57affcce15 100644 --- a/src/devices/machine/rtc4543.cpp +++ b/src/devices/machine/rtc4543.cpp @@ -49,12 +49,12 @@ DEFINE_DEVICE_TYPE(RTC4543, rtc4543_device, "rtc4543", "Epson R4543 RTC") // rtc4543_device - constructor //------------------------------------------------- -rtc4543_device::rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rtc4543_device::rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rtc4543_device(mconfig, RTC4543, tag, owner, clock) { } -rtc4543_device::rtc4543_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rtc4543_device::rtc4543_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_rtc_interface(mconfig, *this) , m_data_cb(*this) @@ -350,7 +350,7 @@ DEFINE_DEVICE_TYPE(JRC6355E, jrc6355e_device, "jrc6355e", "JRC 6355E RTC") // jrc6355e_device - constructor //------------------------------------------------- -jrc6355e_device::jrc6355e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +jrc6355e_device::jrc6355e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rtc4543_device(mconfig, JRC6355E, tag, owner, clock) { } diff --git a/src/devices/machine/rtc4543.h b/src/devices/machine/rtc4543.h index a29cbb9ec30..8a8d7e397f4 100644 --- a/src/devices/machine/rtc4543.h +++ b/src/devices/machine/rtc4543.h @@ -28,7 +28,7 @@ class rtc4543_device : public device_t, public: // construction/destruction - rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rtc4543_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( ce_w ); DECLARE_WRITE_LINE_MEMBER( wr_w ); @@ -39,7 +39,7 @@ public: auto data_cb() { return m_data_cb.bind(); } protected: - rtc4543_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rtc4543_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 @@ class jrc6355e_device : public rtc4543_device { public: // construction/destruction - jrc6355e_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + jrc6355e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // rtc4543 overrides diff --git a/src/devices/machine/rtc65271.cpp b/src/devices/machine/rtc65271.cpp index dc7aad8d210..3f56da9773a 100644 --- a/src/devices/machine/rtc65271.cpp +++ b/src/devices/machine/rtc65271.cpp @@ -669,7 +669,7 @@ DEFINE_DEVICE_TYPE(RTC65271, rtc65271_device, "rtc65271", "Epson RTC-65271 RTC") // rtc65271_device - constructor //------------------------------------------------- -rtc65271_device::rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rtc65271_device::rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RTC65271, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_interrupt_cb(*this) diff --git a/src/devices/machine/rtc65271.h b/src/devices/machine/rtc65271.h index a3d77bf3fa9..aa1443cc6b6 100644 --- a/src/devices/machine/rtc65271.h +++ b/src/devices/machine/rtc65271.h @@ -17,7 +17,7 @@ class rtc65271_device : public device_t, { public: // construction/destruction - rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rtc65271_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto interrupt_cb() { return m_interrupt_cb.bind(); } diff --git a/src/devices/machine/rtc9701.cpp b/src/devices/machine/rtc9701.cpp index 3dab4bd1835..89c145ef4ac 100644 --- a/src/devices/machine/rtc9701.cpp +++ b/src/devices/machine/rtc9701.cpp @@ -34,7 +34,7 @@ DEFINE_DEVICE_TYPE(RTC9701, rtc9701_device, "rtc9701", "Epson RTC-9701-JE RTC/EE // rtc9701_device - constructor //------------------------------------------------- -rtc9701_device::rtc9701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rtc9701_device::rtc9701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, RTC9701, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_latch(0) diff --git a/src/devices/machine/rtc9701.h b/src/devices/machine/rtc9701.h index 49d8e56582d..3f51c02ce0e 100644 --- a/src/devices/machine/rtc9701.h +++ b/src/devices/machine/rtc9701.h @@ -26,7 +26,7 @@ class rtc9701_device : public device_t, { public: // construction/destruction - rtc9701_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); + rtc9701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = 32'768); // I/O operations diff --git a/src/devices/machine/s2636.cpp b/src/devices/machine/s2636.cpp index 8ad26690bcf..c76e167dafb 100644 --- a/src/devices/machine/s2636.cpp +++ b/src/devices/machine/s2636.cpp @@ -157,7 +157,7 @@ uint16_t const s2636_device::SCORE_FONT[16][5] = DEFINE_DEVICE_TYPE(S2636, s2636_device, "s2636", "Signetics 2636 PVI") -s2636_device::s2636_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s2636_device::s2636_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S2636, tag, owner, clock) , device_video_interface(mconfig, *this) , device_sound_interface(mconfig, *this) diff --git a/src/devices/machine/s2636.h b/src/devices/machine/s2636.h index 8803c629015..7116fb57102 100644 --- a/src/devices/machine/s2636.h +++ b/src/devices/machine/s2636.h @@ -27,7 +27,7 @@ class s2636_device : public device_t, public device_sound_interface { public: - s2636_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s2636_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_offsets(int y_offset, int x_offset) { m_x_offset = x_offset; m_y_offset = y_offset; } diff --git a/src/devices/machine/s3520cf.cpp b/src/devices/machine/s3520cf.cpp index 86676ca3d2b..6a147852d81 100644 --- a/src/devices/machine/s3520cf.cpp +++ b/src/devices/machine/s3520cf.cpp @@ -36,12 +36,12 @@ DEFINE_DEVICE_TYPE(RTC4553, rtc4553_device, "rtc4553", "Epson RTC-4553 RTC/SRAM" // s3520cf_device - constructor //------------------------------------------------- -s3520cf_device::s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +s3520cf_device::s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s3520cf_device(mconfig, S3520CF, tag, owner, clock) { } -s3520cf_device::s3520cf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +s3520cf_device::s3520cf_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_nvram_interface(mconfig, *this) , m_region(*this, DEVICE_SELF) @@ -334,7 +334,7 @@ WRITE_LINE_MEMBER( s3520cf_device::set_clock_line ) } } -rtc4553_device::rtc4553_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +rtc4553_device::rtc4553_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : s3520cf_device(mconfig, RTC4553, tag, owner, clock) { } diff --git a/src/devices/machine/s3520cf.h b/src/devices/machine/s3520cf.h index 5c8f0c8614b..c3efa1bc940 100644 --- a/src/devices/machine/s3520cf.h +++ b/src/devices/machine/s3520cf.h @@ -23,7 +23,7 @@ class s3520cf_device : public device_t, { public: // construction/destruction - s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32'768); + s3520cf_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); // I/O operations DECLARE_READ_LINE_MEMBER( read_bit ); @@ -34,7 +34,7 @@ public: TIMER_CALLBACK_MEMBER(timer_callback); protected: - s3520cf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + s3520cf_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); struct rtc_regs_t { @@ -79,7 +79,7 @@ Epson RTC-4553 class rtc4553_device : public s3520cf_device { public: - rtc4553_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 32'768); + rtc4553_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); }; // device type definition diff --git a/src/devices/machine/s3c2400.cpp b/src/devices/machine/s3c2400.cpp index 69649d04db0..cbffe4eda79 100644 --- a/src/devices/machine/s3c2400.cpp +++ b/src/devices/machine/s3c2400.cpp @@ -161,7 +161,7 @@ uint32_t s3c2400_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm DEFINE_DEVICE_TYPE(S3C2400, s3c2400_device, "s3c2400", "Samsung S3C2400 SoC") -s3c2400_device::s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s3c2400_device::s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S3C2400, tag, owner, clock) , m_cpu(*this, ":maincpu") , m_palette(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/s3c2400.h b/src/devices/machine/s3c2400.h index b5390419a93..0f509404ce3 100644 --- a/src/devices/machine/s3c2400.h +++ b/src/devices/machine/s3c2400.h @@ -116,7 +116,7 @@ enum class s3c2400_device : public device_t, protected s3c24xx_peripheral_types { public: - s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s3c2400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~s3c2400_device(); // configuration diff --git a/src/devices/machine/s3c2410.cpp b/src/devices/machine/s3c2410.cpp index e630174b326..8d1aa87124e 100644 --- a/src/devices/machine/s3c2410.cpp +++ b/src/devices/machine/s3c2410.cpp @@ -217,7 +217,7 @@ uint32_t s3c2410_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm DEFINE_DEVICE_TYPE(S3C2410, s3c2410_device, "s3c2410", "Samsung S3C2410 SoC") -s3c2410_device::s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s3c2410_device::s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S3C2410, tag, owner, clock) , m_cpu(*this, ":maincpu") , m_palette(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/s3c2410.h b/src/devices/machine/s3c2410.h index 9146baa7e7f..0ac17a9246a 100644 --- a/src/devices/machine/s3c2410.h +++ b/src/devices/machine/s3c2410.h @@ -134,7 +134,7 @@ enum class s3c2410_device : public device_t, protected s3c24xx_peripheral_types { public: - s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s3c2410_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~s3c2410_device(); // configuration diff --git a/src/devices/machine/s3c2440.cpp b/src/devices/machine/s3c2440.cpp index 801c21dd01d..55e81fd38b9 100644 --- a/src/devices/machine/s3c2440.cpp +++ b/src/devices/machine/s3c2440.cpp @@ -232,7 +232,7 @@ uint32_t s3c2440_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm DEFINE_DEVICE_TYPE(S3C2440, s3c2440_device, "s3c2440", "Samsung S3C2440 SoC") -s3c2440_device::s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s3c2440_device::s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S3C2440, tag, owner, clock) , m_cpu(*this, ":maincpu") , m_palette(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/s3c2440.h b/src/devices/machine/s3c2440.h index c4db773a475..97c34b6d8b5 100644 --- a/src/devices/machine/s3c2440.h +++ b/src/devices/machine/s3c2440.h @@ -154,7 +154,7 @@ enum class s3c2440_device : public device_t, protected s3c24xx_peripheral_types { public: - s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s3c2440_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); ~s3c2440_device(); // configuration diff --git a/src/devices/machine/s3c44b0.cpp b/src/devices/machine/s3c44b0.cpp index dc5e52c31f0..df567201f99 100644 --- a/src/devices/machine/s3c44b0.cpp +++ b/src/devices/machine/s3c44b0.cpp @@ -223,7 +223,7 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t &device, int n_level, c DEFINE_DEVICE_TYPE(S3C44B0, s3c44b0_device, "s3c44b0", "Samsung S3C44B0 SoC") -s3c44b0_device::s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +s3c44b0_device::s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, S3C44B0, tag, owner, clock) , device_video_interface(mconfig, *this) , m_cpu(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/s3c44b0.h b/src/devices/machine/s3c44b0.h index e082937ea83..8bdacecbcbe 100644 --- a/src/devices/machine/s3c44b0.h +++ b/src/devices/machine/s3c44b0.h @@ -114,7 +114,7 @@ enum class s3c44b0_device : public device_t, public device_video_interface { public: - s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + s3c44b0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <class T> void set_cpu(T &&tag) { m_cpu.set_tag(std::forward<T>(tag)); } auto gpio_port_r_cb() { return m_port_r_cb.bind(); } diff --git a/src/devices/machine/s_smp.cpp b/src/devices/machine/s_smp.cpp index 9be87af48d5..b3547d2b28a 100644 --- a/src/devices/machine/s_smp.cpp +++ b/src/devices/machine/s_smp.cpp @@ -57,7 +57,7 @@ void s_smp_device::internal_map(address_map &map) DEFINE_DEVICE_TYPE(S_SMP, s_smp_device, "s_smp", "Nintendo/Sony S-SMP") -s_smp_device::s_smp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +s_smp_device::s_smp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spc700_device(mconfig, S_SMP, tag, owner, clock, address_map_constructor(FUNC(s_smp_device::internal_map), this)) , m_data_config("data", ENDIANNESS_LITTLE, 8, 16) , m_ipl_region(*this, "sound_ipl") diff --git a/src/devices/machine/s_smp.h b/src/devices/machine/s_smp.h index 45f83755507..17c4238eac5 100644 --- a/src/devices/machine/s_smp.h +++ b/src/devices/machine/s_smp.h @@ -18,7 +18,7 @@ class s_smp_device : public spc700_device { public: - s_smp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + s_smp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto dsp_io_read_callback() { return m_dsp_io_r_cb.bind(); } auto dsp_io_write_callback() { return m_dsp_io_w_cb.bind(); } diff --git a/src/devices/machine/sa1110.cpp b/src/devices/machine/sa1110.cpp index 5bcc62ba456..505108eb0bd 100644 --- a/src/devices/machine/sa1110.cpp +++ b/src/devices/machine/sa1110.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(SA1110_PERIPHERALS, sa1110_periphs_device, "sa1110_periphs", "Intel XScale SA1110 Peripherals") -sa1110_periphs_device::sa1110_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sa1110_periphs_device::sa1110_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SA1110_PERIPHERALS, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_maincpu(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/sa1110.h b/src/devices/machine/sa1110.h index 3ef8e79042b..4a704562716 100644 --- a/src/devices/machine/sa1110.h +++ b/src/devices/machine/sa1110.h @@ -23,13 +23,13 @@ class sa1110_periphs_device : public device_t, public device_serial_interface { public: template <typename T> - sa1110_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + sa1110_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : sa1110_periphs_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(std::forward<T>(cpu_tag)); } - sa1110_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sa1110_periphs_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename T> void set_codec_tag(T &&tag) { m_codec.set_tag(std::forward<T>(tag)); } diff --git a/src/devices/machine/sa1111.cpp b/src/devices/machine/sa1111.cpp index 3a2dd300f78..848b4b59892 100644 --- a/src/devices/machine/sa1111.cpp +++ b/src/devices/machine/sa1111.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(SA1111, sa1111_device, "sa1111", "Intel SA1111 Microprocessor Companion Chip") -sa1111_device::sa1111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sa1111_device::sa1111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SA1111, tag, owner, clock) , m_maincpu(*this, finder_base::DUMMY_TAG) , m_audio_codec(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/sa1111.h b/src/devices/machine/sa1111.h index 3804c06a30c..f18f7486d0a 100644 --- a/src/devices/machine/sa1111.h +++ b/src/devices/machine/sa1111.h @@ -18,13 +18,13 @@ class sa1111_device : public device_t { public: template <typename T> - sa1111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + sa1111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : sa1111_device(mconfig, tag, owner, clock) { m_maincpu.set_tag(std::forward<T>(cpu_tag)); } - sa1111_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sa1111_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename T> void set_audio_codec_tag(T &&tag) { m_audio_codec.set_tag(std::forward<T>(tag)); } diff --git a/src/devices/machine/saa1043.cpp b/src/devices/machine/saa1043.cpp index 053945c9a7e..1c0c89ccf8c 100644 --- a/src/devices/machine/saa1043.cpp +++ b/src/devices/machine/saa1043.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SAA1043, saa1043_device, "saa1043", "Philips SAA1043") /*static*/ const uint32_t saa1043_device::s_line_counts[4] = { 624, 624, 524, 524 }; -saa1043_device::saa1043_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saa1043_device::saa1043_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAA1043, tag, owner, clock) , m_outputs(*this) , m_type(PAL) diff --git a/src/devices/machine/saa1043.h b/src/devices/machine/saa1043.h index 3a5851d0f42..cd5d6e9d899 100644 --- a/src/devices/machine/saa1043.h +++ b/src/devices/machine/saa1043.h @@ -42,7 +42,7 @@ class saa1043_device : public device_t { public: // construction/destruction - saa1043_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + saa1043_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); enum outputs : uint32_t { diff --git a/src/devices/machine/saa7191.cpp b/src/devices/machine/saa7191.cpp index a879506e84b..4f798dcad0e 100644 --- a/src/devices/machine/saa7191.cpp +++ b/src/devices/machine/saa7191.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(SAA7191, saa7191_device, "saa7191", "Philips SAA7191 DMSD") -saa7191_device::saa7191_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +saa7191_device::saa7191_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SAA7191, tag, owner, clock) , m_chr_in(*this) , m_cvbs_in(*this) diff --git a/src/devices/machine/saa7191.h b/src/devices/machine/saa7191.h index 907edfdc3b0..cf1f6a6d6a3 100644 --- a/src/devices/machine/saa7191.h +++ b/src/devices/machine/saa7191.h @@ -19,7 +19,7 @@ class saa7191_device : public device_t { public: - saa7191_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); + saa7191_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void i2c_data_w(uint8_t data); uint8_t i2c_data_r(); diff --git a/src/devices/machine/scc2698b.cpp b/src/devices/machine/scc2698b.cpp index 892c37c24bf..19285500ecc 100644 --- a/src/devices/machine/scc2698b.cpp +++ b/src/devices/machine/scc2698b.cpp @@ -67,7 +67,7 @@ void scc2698b_device::map(address_map &map) #define CHANH_TAG "chh" -scc2698b_channel::scc2698b_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +scc2698b_channel::scc2698b_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCC2698B_CHANNEL, tag, owner, clock), device_serial_interface(mconfig, *this) { @@ -352,7 +352,7 @@ void scc2698b_channel::mpi1_w(int state) } -scc2698b_device::scc2698b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +scc2698b_device::scc2698b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCC2698B, tag, owner, clock), m_channel(*this, "channel_%u",1), write_intr_A(*this), @@ -746,5 +746,5 @@ attotime scc2698b_device::generate_baudrate(int block, int tx, int table_index) void scc2698b_device::device_add_mconfig(machine_config &config) { for (required_device<scc2698b_channel> &channel : m_channel) - SCC2698B_CHANNEL(config, channel, 0); + SCC2698B_CHANNEL(config, channel); } diff --git a/src/devices/machine/scc2698b.h b/src/devices/machine/scc2698b.h index d883b45d0b9..e18b1473a3b 100644 --- a/src/devices/machine/scc2698b.h +++ b/src/devices/machine/scc2698b.h @@ -15,7 +15,7 @@ class scc2698b_channel : public device_t, public device_serial_interface { friend class scc2698b_device; public: - scc2698b_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc2698b_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void mpi0_w(int state); void mpi1_w(int state); @@ -76,7 +76,7 @@ protected: class scc2698b_device : public device_t { public: - scc2698b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc2698b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map); diff --git a/src/devices/machine/scc68070.cpp b/src/devices/machine/scc68070.cpp index a732b024ee6..ceca998c4e3 100644 --- a/src/devices/machine/scc68070.cpp +++ b/src/devices/machine/scc68070.cpp @@ -238,7 +238,7 @@ void scc68070_device::cpu_space_map(address_map &map) // scc68070_device - constructor //------------------------------------------------- -scc68070_device::scc68070_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc68070_device::scc68070_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scc68070_base_device(mconfig, tag, owner, clock, SCC68070, address_map_constructor(FUNC(scc68070_device::internal_map), this)) , m_iack2_callback(*this) , m_iack4_callback(*this) diff --git a/src/devices/machine/scc68070.h b/src/devices/machine/scc68070.h index 430ed781c27..5c7bb00102a 100644 --- a/src/devices/machine/scc68070.h +++ b/src/devices/machine/scc68070.h @@ -46,7 +46,7 @@ enum scc68070_ocr_bits class scc68070_device : public scc68070_base_device { public: - scc68070_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc68070_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto iack2_callback() { return m_iack2_callback.bind(); } auto iack4_callback() { return m_iack4_callback.bind(); } diff --git a/src/devices/machine/scn_pci.cpp b/src/devices/machine/scn_pci.cpp index 43d450c4738..dbb80027839 100644 --- a/src/devices/machine/scn_pci.cpp +++ b/src/devices/machine/scn_pci.cpp @@ -157,7 +157,7 @@ ALLOW_SAVE_TYPE(scn_pci_device::xmtr_state); // scn_pci_device - constructor //------------------------------------------------- -scn_pci_device::scn_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const u16 *br_div, bool is_enhanced, bool is_aci) +scn_pci_device::scn_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const u16 *br_div, bool is_enhanced, bool is_aci) : device_t(mconfig, type, tag, owner, clock) , m_dtr_callback(*this) , m_rts_callback(*this) @@ -210,7 +210,7 @@ scn_pci_device::scn_pci_device(const machine_config &mconfig, device_type type, // scn2651_device - constructor //------------------------------------------------- -scn2651_device::scn2651_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +scn2651_device::scn2651_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scn_pci_device(mconfig, SCN2651, tag, owner, clock, s_br_divisors_3, false, false) { } @@ -219,7 +219,7 @@ scn2651_device::scn2651_device(const machine_config &mconfig, const char *tag, d // scn2661a_device - constructor //------------------------------------------------- -scn2661a_device::scn2661a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +scn2661a_device::scn2661a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scn_pci_device(mconfig, SCN2661A, tag, owner, clock, s_br_divisors_1, true, false) { } @@ -228,7 +228,7 @@ scn2661a_device::scn2661a_device(const machine_config &mconfig, const char *tag, // scn2661b_device - constructor //------------------------------------------------- -scn2661b_device::scn2661b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +scn2661b_device::scn2661b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scn_pci_device(mconfig, SCN2661B, tag, owner, clock, s_br_divisors_2, true, false) { } @@ -237,7 +237,7 @@ scn2661b_device::scn2661b_device(const machine_config &mconfig, const char *tag, // scn2661c_device - constructor //------------------------------------------------- -scn2661c_device::scn2661c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +scn2661c_device::scn2661c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scn_pci_device(mconfig, SCN2661C, tag, owner, clock, s_br_divisors_3, true, false) { } @@ -246,7 +246,7 @@ scn2661c_device::scn2661c_device(const machine_config &mconfig, const char *tag, // scn2641_device - constructor //------------------------------------------------- -scn2641_device::scn2641_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +scn2641_device::scn2641_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : scn_pci_device(mconfig, SCN2641, tag, owner, clock, s_br_divisors, true, true) , m_intr_callback(*this) { diff --git a/src/devices/machine/scn_pci.h b/src/devices/machine/scn_pci.h index acb16e90f72..86898859799 100644 --- a/src/devices/machine/scn_pci.h +++ b/src/devices/machine/scn_pci.h @@ -100,7 +100,7 @@ protected: }; // construction/destruction - scn_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const u16 *br_div, bool is_enhanced, bool is_aci); + scn_pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const u16 *br_div, bool is_enhanced, bool is_aci); // device-level overrides virtual void device_resolve_objects() override; @@ -215,7 +215,7 @@ class scn2651_device : public scn_pci_device { public: // device type constructor - scn2651_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + scn2651_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> scn2661a_device @@ -224,7 +224,7 @@ class scn2661a_device : public scn_pci_device { public: // device type constructor - scn2661a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + scn2661a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> scn2661b_device @@ -233,7 +233,7 @@ class scn2661b_device : public scn_pci_device { public: // device type constructor - scn2661b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + scn2661b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> scn2661c_device @@ -242,7 +242,7 @@ class scn2661c_device : public scn_pci_device { public: // device type constructor - scn2661c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + scn2661c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // ======================> scn2641_device @@ -251,7 +251,7 @@ class scn2641_device : public scn_pci_device { public: // device type constructor - scn2641_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + scn2641_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callback configuration auto intr_handler() { return m_intr_callback.bind(); } diff --git a/src/devices/machine/scnxx562.cpp b/src/devices/machine/scnxx562.cpp index 4f2da74c258..de337101675 100644 --- a/src/devices/machine/scnxx562.cpp +++ b/src/devices/machine/scnxx562.cpp @@ -129,8 +129,8 @@ DEFINE_DEVICE_TYPE(DUSCC68C562, duscc68c562_device, "duscc68c562", "Philips //------------------------------------------------- void duscc_device::device_add_mconfig(machine_config &config) { - DUSCC_CHANNEL(config, CHANA_TAG, 0); - DUSCC_CHANNEL(config, CHANB_TAG, 0); + DUSCC_CHANNEL(config, CHANA_TAG); + DUSCC_CHANNEL(config, CHANB_TAG); } //************************************************************************** @@ -140,7 +140,7 @@ void duscc_device::device_add_mconfig(machine_config &config) //------------------------------------------------- // duscc_device - constructor //------------------------------------------------- -duscc_device::duscc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +duscc_device::duscc_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_z80daisy_interface(mconfig, *this) , m_chanA(*this, CHANA_TAG) @@ -174,27 +174,27 @@ duscc_device::duscc_device(const machine_config &mconfig, device_type type, cons elem = 0; } -duscc_device::duscc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duscc_device::duscc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duscc_device(mconfig, DUSCC, tag, owner, clock, TYPE_DUSCC) { } -duscc26562_device::duscc26562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duscc26562_device::duscc26562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duscc_device(mconfig, DUSCC26562, tag, owner, clock, TYPE_DUSCC26562) { } -duscc26c562_device::duscc26c562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duscc26c562_device::duscc26c562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duscc_device(mconfig, DUSCC26C562, tag, owner, clock, TYPE_DUSCC26C562) { } -duscc68562_device::duscc68562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duscc68562_device::duscc68562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duscc_device(mconfig, DUSCC68562, tag, owner, clock, TYPE_DUSCC68562) { } -duscc68c562_device::duscc68c562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duscc68c562_device::duscc68c562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : duscc_device(mconfig, DUSCC68C562, tag, owner, clock, TYPE_DUSCC68C562) { } @@ -556,7 +556,7 @@ void duscc_device::write(offs_t offset, uint8_t data) //************************************************************************** // DUSCC CHANNEL //************************************************************************** -duscc_channel::duscc_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +duscc_channel::duscc_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, DUSCC_CHANNEL, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_brg_rx_rate(0) @@ -1968,7 +1968,7 @@ void duscc_channel::do_dusccreg_ccr_w(uint8_t data) status bit (GSR[I] or GSR[5] for Channels A and B, respectively). The counter/timer and other registers are not affected*/ case REG_CCR_RESET_TX: LOGINT("- Reset Tx\n"); - set_tra_rate(0); + set_tra_rate(XTAL::u(0)); m_tx_fifo_wp = m_tx_fifo_rp = 0; m_trsr &= 0x0f; m_uart->m_gsr &= ~(m_index == duscc_device::CHANNEL_A ? REG_GSR_CHAN_A_TXREADY : REG_GSR_CHAN_B_TXREADY); @@ -1990,7 +1990,7 @@ void duscc_channel::do_dusccreg_ccr_w(uint8_t data) will be transmitted. TODO: let all the chararcters be transmitted before shutting down shifter */ case REG_CCR_DISABLE_TX: LOGINT("- Disable Tx\n"); - set_tra_rate(0); + set_tra_rate(XTAL::u(0)); m_tra = 0; m_uart->m_gsr &= ~(m_index == duscc_device::CHANNEL_A ? REG_GSR_CHAN_A_TXREADY : REG_GSR_CHAN_B_TXREADY); m_uart->clear_interrupt(m_index, INT_TXREADY); @@ -2003,7 +2003,7 @@ void duscc_channel::do_dusccreg_ccr_w(uint8_t data) GSR[O] or GSR[4] for Channels A and B, respectively). The counter/timer and other registers are not affected.*/ case REG_CCR_RESET_RX: LOGINT("- Reset Rx\n"); - set_rcv_rate(0); + set_rcv_rate(XTAL::u(0)); m_rx_fifo_wp = m_rx_fifo_rp = 0; m_trsr &= 0xf0; m_rsr = 0; diff --git a/src/devices/machine/scnxx562.h b/src/devices/machine/scnxx562.h index c9ac458b44c..c6155e90b7e 100644 --- a/src/devices/machine/scnxx562.h +++ b/src/devices/machine/scnxx562.h @@ -58,7 +58,7 @@ class duscc_channel : public device_t, public device_serial_interface friend class duscc_device; public: - duscc_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duscc_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // read register handlers uint8_t do_dusccreg_cmr1_r(); @@ -530,7 +530,7 @@ class duscc_device : public device_t, public device_z80daisy_interface public: // construction/destruction - duscc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duscc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_txda_callback() { return m_out_txda_cb.bind(); } auto out_dtra_callback() { return m_out_dtra_cb.bind(); } @@ -547,13 +547,13 @@ public: auto out_trxcb_callback() { return m_out_trxcb_cb.bind(); } auto out_int_callback() { return m_out_int_cb.bind(); } - void configure_channels(int rxa, int txa, int rxb, int txb) + void configure_channels(const XTAL &rxa, const XTAL &txa, const XTAL &rxb, const XTAL &txb) { #if 0 // TODO: Fix this, need a way to set external rx/tx clocks for the channels - m_chanA->m_rxc = rxa; - m_chanA->m_txc = txa; - m_chanB->m_rxc = rxb; - m_chanB->m_txc = txb; + m_chanA->m_rxc = rxa.value(); + m_chanA->m_txc = txa.value(); + m_chanB->m_rxc = rxb.value(); + m_chanB->m_txc = txb.value(); #endif } @@ -587,7 +587,7 @@ public: void syncb_w(int state) { m_chanB->sync_w(state); } protected: - duscc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + duscc_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; @@ -684,25 +684,25 @@ DECLARE_DEVICE_TYPE(DUSCC68C562, duscc68c562_device) class duscc26562_device : public duscc_device { public : - duscc26562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duscc26562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class duscc26c562_device : public duscc_device { public : - duscc26c562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duscc26c562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class duscc68562_device : public duscc_device { public : - duscc68562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duscc68562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class duscc68c562_device : public duscc_device { public : - duscc68c562_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + duscc68c562_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; #endif // MAME_MACHINE_SCNXX562_H diff --git a/src/devices/machine/scoop.cpp b/src/devices/machine/scoop.cpp index 1a254169f93..2d73f7f936b 100644 --- a/src/devices/machine/scoop.cpp +++ b/src/devices/machine/scoop.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SCOOP, scoop_device, "scoop", "Sharp SCOOP peripheral interface") -scoop_device::scoop_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scoop_device::scoop_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SCOOP, tag, owner, clock) , m_gpio_out(*this) { diff --git a/src/devices/machine/scoop.h b/src/devices/machine/scoop.h index 1fb0edaae66..24d93cced81 100644 --- a/src/devices/machine/scoop.h +++ b/src/devices/machine/scoop.h @@ -14,7 +14,7 @@ class scoop_device : public device_t { public: - scoop_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + scoop_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <unsigned Line> auto gpio_out() { return m_gpio_out[Line].bind(); } template <unsigned Line> void gpio_in(int state) { gpio_in((uint16_t)Line, state); } diff --git a/src/devices/machine/sda2006.cpp b/src/devices/machine/sda2006.cpp index 815cb829d85..b78a136a8af 100644 --- a/src/devices/machine/sda2006.cpp +++ b/src/devices/machine/sda2006.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(SDA2006, sda2006_device, "sda2006", "SDA2006 EEPROM") // sda2006_device - constructor //------------------------------------------------- -sda2006_device::sda2006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sda2006_device::sda2006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SDA2006, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_latch(0) diff --git a/src/devices/machine/sda2006.h b/src/devices/machine/sda2006.h index 1ae1748f5c2..7e77c60dc03 100644 --- a/src/devices/machine/sda2006.h +++ b/src/devices/machine/sda2006.h @@ -14,7 +14,7 @@ class sda2006_device : public device_t, { public: // construction/destruction - sda2006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + sda2006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // I/O operations DECLARE_READ_LINE_MEMBER(read_data); diff --git a/src/devices/machine/sdlc.cpp b/src/devices/machine/sdlc.cpp index 7a7303b9e73..b5b96c1b60e 100644 --- a/src/devices/machine/sdlc.cpp +++ b/src/devices/machine/sdlc.cpp @@ -126,7 +126,7 @@ void device_sdlc_consumer_interface::rx_reset() } -sdlc_logger_device::sdlc_logger_device(machine_config const &mconfig, char const *tag, device_t *owner, std::uint32_t clock) : +sdlc_logger_device::sdlc_logger_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SDLC_LOGGER, tag, owner, clock), device_sdlc_consumer_interface(mconfig, *this), m_data_nrzi(0U), diff --git a/src/devices/machine/sdlc.h b/src/devices/machine/sdlc.h index 5dd7b177c3e..9bd589ea7ce 100644 --- a/src/devices/machine/sdlc.h +++ b/src/devices/machine/sdlc.h @@ -54,7 +54,7 @@ private: class sdlc_logger_device : public device_t, public device_sdlc_consumer_interface { public: - sdlc_logger_device(machine_config const &mconfig, char const *tag, device_t *owner, std::uint32_t clock); + sdlc_logger_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // input signals DECLARE_WRITE_LINE_MEMBER(data_w) { m_current_data = state ? 1U : 0U; } diff --git a/src/devices/machine/sega_scu.cpp b/src/devices/machine/sega_scu.cpp index c2e7191d7cb..990e0cda791 100644 --- a/src/devices/machine/sega_scu.cpp +++ b/src/devices/machine/sega_scu.cpp @@ -145,7 +145,7 @@ void sega_scu_device::regs_map(address_map &map) // sega_scu_device - constructor //------------------------------------------------- -sega_scu_device::sega_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sega_scu_device::sega_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SEGA_SCU, tag, owner, clock), m_scudsp(*this, "scudsp"), m_hostcpu(*this, finder_base::DUMMY_TAG) diff --git a/src/devices/machine/sega_scu.h b/src/devices/machine/sega_scu.h index 4ee8dd1f08d..0d4da8b9b7c 100644 --- a/src/devices/machine/sega_scu.h +++ b/src/devices/machine/sega_scu.h @@ -41,7 +41,7 @@ class sega_scu_device : public device_t { public: // construction/destruction - sega_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sega_scu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void regs_map(address_map &map); diff --git a/src/devices/machine/segacrp2_device.cpp b/src/devices/machine/segacrp2_device.cpp index 1a2676bd631..52254072344 100644 --- a/src/devices/machine/segacrp2_device.cpp +++ b/src/devices/machine/segacrp2_device.cpp @@ -92,7 +92,7 @@ DEFINE_DEVICE_TYPE(SEGA_317_0006, sega_317_0006_device, "sega_317_0006", "Sega 3 DEFINE_DEVICE_TYPE(SEGA_317_0007, sega_317_0007_device, "sega_317_0007", "Sega 317-0007") -segacrp2_z80_device::segacrp2_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +segacrp2_z80_device::segacrp2_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, type, tag, owner, clock), m_decrypted(*this, finder_base::DUMMY_TAG) { @@ -104,7 +104,7 @@ void segacrp2_z80_device::device_start() decrypt(); } -nec_315_5136_device::nec_315_5136_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +nec_315_5136_device::nec_315_5136_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, NEC_315_5136, tag, owner, clock) { } @@ -145,7 +145,7 @@ void nec_315_5136_device::decrypt() } -sega_315_5177_device::sega_315_5177_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5177_device::sega_315_5177_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_315_5177, tag, owner, clock) { } @@ -202,7 +202,7 @@ void sega_315_5177_device::decrypt() } -sega_315_5176_device::sega_315_5176_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5176_device::sega_315_5176_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_315_5176, tag, owner, clock) { } @@ -247,7 +247,7 @@ void sega_315_5176_device::decrypt() } -sega_315_5162_device::sega_315_5162_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5162_device::sega_315_5162_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_315_5162, tag, owner, clock) { } @@ -282,7 +282,7 @@ void sega_315_5162_device::decrypt() -sega_315_5178_device::sega_315_5178_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5178_device::sega_315_5178_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_315_5178, tag, owner, clock) { } @@ -329,7 +329,7 @@ void sega_315_5178_device::decrypt() } -sega_315_5179_device::sega_315_5179_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_315_5179_device::sega_315_5179_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_315_5179, tag, owner, clock) { } @@ -407,7 +407,7 @@ static void sega_decode_317(uint8_t *rom, uint8_t *decrypted, int shift) } -sega_317_0004_device::sega_317_0004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_317_0004_device::sega_317_0004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_317_0004, tag, owner, clock) { } @@ -418,7 +418,7 @@ void sega_317_0004_device::decrypt() } -sega_317_0005_device::sega_317_0005_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_317_0005_device::sega_317_0005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_317_0005, tag, owner, clock) { } @@ -429,7 +429,7 @@ void sega_317_0005_device::decrypt() } -sega_317_0006_device::sega_317_0006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_317_0006_device::sega_317_0006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_317_0006, tag, owner, clock) { } @@ -440,7 +440,7 @@ void sega_317_0006_device::decrypt() } -sega_317_0007_device::sega_317_0007_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sega_317_0007_device::sega_317_0007_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrp2_z80_device(mconfig, SEGA_317_0007, tag, owner, clock) { } diff --git a/src/devices/machine/segacrp2_device.h b/src/devices/machine/segacrp2_device.h index a64f3fa5fe0..14e78acf367 100644 --- a/src/devices/machine/segacrp2_device.h +++ b/src/devices/machine/segacrp2_device.h @@ -15,7 +15,7 @@ public: template <typename T> void set_decrypted_tag(T &&decrypted_tag) { m_decrypted.set_tag(std::forward<T>(decrypted_tag)); } protected: - segacrp2_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + segacrp2_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_start() override; virtual void decrypt() = 0; @@ -29,7 +29,7 @@ protected: class nec_315_5136_device : public segacrp2_z80_device { public: - nec_315_5136_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + nec_315_5136_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -37,7 +37,7 @@ protected: class sega_315_5179_device : public segacrp2_z80_device { public: - sega_315_5179_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5179_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -46,7 +46,7 @@ protected: class sega_315_5178_device : public segacrp2_z80_device { public: - sega_315_5178_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5178_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -54,7 +54,7 @@ protected: class sega_315_5177_device : public segacrp2_z80_device { public: - sega_315_5177_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5177_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -62,7 +62,7 @@ protected: class sega_315_5176_device : public segacrp2_z80_device { public: - sega_315_5176_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5176_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -70,7 +70,7 @@ protected: class sega_315_5162_device : public segacrp2_z80_device { public: - sega_315_5162_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5162_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -78,7 +78,7 @@ protected: class sega_317_0004_device : public segacrp2_z80_device { public: - sega_317_0004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_317_0004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -87,7 +87,7 @@ protected: class sega_317_0005_device : public segacrp2_z80_device { public: - sega_317_0005_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_317_0005_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -96,7 +96,7 @@ protected: class sega_317_0006_device : public segacrp2_z80_device { public: - sega_317_0006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_317_0006_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -104,7 +104,7 @@ protected: class sega_317_0007_device : public segacrp2_z80_device { public: - sega_317_0007_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_317_0007_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; diff --git a/src/devices/machine/segacrpt_device.cpp b/src/devices/machine/segacrpt_device.cpp index 330193aa2b9..2374819c018 100644 --- a/src/devices/machine/segacrpt_device.cpp +++ b/src/devices/machine/segacrpt_device.cpp @@ -284,7 +284,7 @@ DEFINE_DEVICE_TYPE(SEGA_315_5128, sega_315_5128_device, "sega_315_5128", "Sega 3 -segacrpt_z80_device::segacrpt_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +segacrpt_z80_device::segacrpt_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, type, tag, owner, clock), m_decrypted_ptr(nullptr), m_region_ptr(nullptr), @@ -335,7 +335,7 @@ void segacrpt_z80_device::set_decrypted_p(uint8_t* ptr) -sega_315_5132_device::sega_315_5132_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5132, tag, owner, clock) {} +sega_315_5132_device::sega_315_5132_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5132, tag, owner, clock) {} void sega_315_5132_device::decrypt() { static const uint8_t convtable[32][4] = @@ -366,7 +366,7 @@ void sega_315_5132_device::decrypt() -sega_315_5155_device::sega_315_5155_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5155, tag, owner, clock) {} +sega_315_5155_device::sega_315_5155_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5155, tag, owner, clock) {} void sega_315_5155_device::decrypt() { static const uint8_t convtable[32][4] = @@ -397,7 +397,7 @@ void sega_315_5155_device::decrypt() -sega_315_5110_device::sega_315_5110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5110, tag, owner, clock) {} +sega_315_5110_device::sega_315_5110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5110, tag, owner, clock) {} void sega_315_5110_device::decrypt() { static const uint8_t convtable[32][4] = @@ -427,7 +427,7 @@ void sega_315_5110_device::decrypt() -sega_315_5135_device::sega_315_5135_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5135, tag, owner, clock) {} +sega_315_5135_device::sega_315_5135_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5135, tag, owner, clock) {} void sega_315_5135_device::decrypt() { static const uint8_t convtable[32][4] = @@ -458,7 +458,7 @@ void sega_315_5135_device::decrypt() -sega_315_5051_device::sega_315_5051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5051, tag, owner, clock) {} +sega_315_5051_device::sega_315_5051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5051, tag, owner, clock) {} void sega_315_5051_device::decrypt() { static const uint8_t convtable[32][4] = @@ -488,7 +488,7 @@ void sega_315_5051_device::decrypt() -sega_315_5098_device::sega_315_5098_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5098, tag, owner, clock) {} +sega_315_5098_device::sega_315_5098_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5098, tag, owner, clock) {} void sega_315_5098_device::decrypt() { // also 315-5030 ? @@ -520,7 +520,7 @@ void sega_315_5098_device::decrypt() -sega_315_5102_device::sega_315_5102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5102, tag, owner, clock) {} +sega_315_5102_device::sega_315_5102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5102, tag, owner, clock) {} void sega_315_5102_device::decrypt() { static const uint8_t convtable[32][4] = @@ -549,7 +549,7 @@ void sega_315_5102_device::decrypt() } -sega_315_5065_device::sega_315_5065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5065, tag, owner, clock) {} +sega_315_5065_device::sega_315_5065_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5065, tag, owner, clock) {} void sega_315_5065_device::decrypt() { static const uint8_t convtable[32][4] = @@ -578,7 +578,7 @@ void sega_315_5065_device::decrypt() } -sega_315_5064_device::sega_315_5064_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5064, tag, owner, clock) {} +sega_315_5064_device::sega_315_5064_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5064, tag, owner, clock) {} void sega_315_5064_device::decrypt() { static const uint8_t convtable[32][4] = @@ -608,7 +608,7 @@ void sega_315_5064_device::decrypt() -sega_315_5033_device::sega_315_5033_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5033, tag, owner, clock) {} +sega_315_5033_device::sega_315_5033_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5033, tag, owner, clock) {} void sega_315_5033_device::decrypt() { static const uint8_t convtable[32][4] = @@ -637,7 +637,7 @@ void sega_315_5033_device::decrypt() } -sega_315_5041_device::sega_315_5041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5041, tag, owner, clock) {} +sega_315_5041_device::sega_315_5041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5041, tag, owner, clock) {} void sega_315_5041_device::decrypt() { static const uint8_t convtable[32][4] = @@ -667,8 +667,8 @@ void sega_315_5041_device::decrypt() -sega_315_5048_device::sega_315_5048_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5048, tag, owner, clock) {} -sega_315_5048_device::sega_315_5048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, type, tag, owner, clock) {} +sega_315_5048_device::sega_315_5048_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5048, tag, owner, clock) {} +sega_315_5048_device::sega_315_5048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, type, tag, owner, clock) {} void sega_315_5048_device::decrypt() { static const uint8_t convtable[32][4] = @@ -697,7 +697,7 @@ void sega_315_5048_device::decrypt() } -sega_315_5093_device::sega_315_5093_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5093, tag, owner, clock) {} +sega_315_5093_device::sega_315_5093_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5093, tag, owner, clock) {} void sega_315_5093_device::decrypt() { static const uint8_t convtable[32][4] = @@ -727,7 +727,7 @@ void sega_315_5093_device::decrypt() -sega_315_5099_device::sega_315_5099_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5099, tag, owner, clock) {} +sega_315_5099_device::sega_315_5099_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5099, tag, owner, clock) {} void sega_315_5099_device::decrypt() { static const uint8_t convtable[32][4] = @@ -758,7 +758,7 @@ void sega_315_5099_device::decrypt() -sega_315_spat_device::sega_315_spat_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_SPAT, tag, owner, clock) {} +sega_315_spat_device::sega_315_spat_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_SPAT, tag, owner, clock) {} void sega_315_spat_device::decrypt() { static const uint8_t convtable[32][4] = @@ -786,7 +786,7 @@ void sega_315_spat_device::decrypt() decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize); } -sega_315_5015_device::sega_315_5015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5015, tag, owner, clock) {} +sega_315_5015_device::sega_315_5015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5015, tag, owner, clock) {} void sega_315_5015_device::decrypt() { static const uint8_t convtable[32][4] = @@ -816,11 +816,11 @@ void sega_315_5015_device::decrypt() } -sega_315_5133_device::sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : sega_315_5048_device(mconfig, SEGA_315_5133, tag, owner, clock) {} +sega_315_5133_device::sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sega_315_5048_device(mconfig, SEGA_315_5133, tag, owner, clock) {} // == sega_315_5048_device -sega_315_5014_device::sega_315_5014_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5014, tag, owner, clock) {} +sega_315_5014_device::sega_315_5014_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5014, tag, owner, clock) {} void sega_315_5014_device::decrypt() { static const uint8_t convtable[32][4] = @@ -849,7 +849,7 @@ void sega_315_5014_device::decrypt() -sega_315_5013_device::sega_315_5013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5013, tag, owner, clock) {} +sega_315_5013_device::sega_315_5013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5013, tag, owner, clock) {} void sega_315_5013_device::decrypt() { static const uint8_t convtable[32][4] = @@ -878,7 +878,7 @@ void sega_315_5013_device::decrypt() } -sega_315_5061_device::sega_315_5061_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5061, tag, owner, clock) {} +sega_315_5061_device::sega_315_5061_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5061, tag, owner, clock) {} void sega_315_5061_device::decrypt() { static const uint8_t convtable[32][4] = @@ -908,7 +908,7 @@ void sega_315_5061_device::decrypt() -sega_315_5018_device::sega_315_5018_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5018, tag, owner, clock) {} +sega_315_5018_device::sega_315_5018_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5018, tag, owner, clock) {} void sega_315_5018_device::decrypt() { static const uint8_t convtable[32][4] = @@ -938,7 +938,7 @@ void sega_315_5018_device::decrypt() } -sega_315_5010_device::sega_315_5010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5010, tag, owner, clock) {} +sega_315_5010_device::sega_315_5010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5010, tag, owner, clock) {} void sega_315_5010_device::decrypt() { static const uint8_t convtable[32][4] = @@ -969,7 +969,7 @@ void sega_315_5010_device::decrypt() -sega_315_5128_device::sega_315_5128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5128, tag, owner, clock) {} +sega_315_5128_device::sega_315_5128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5128, tag, owner, clock) {} void sega_315_5128_device::decrypt() { static const uint8_t convtable[32][4] = @@ -998,7 +998,7 @@ void sega_315_5128_device::decrypt() } -sega_315_5028_device::sega_315_5028_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5028, tag, owner, clock) {} +sega_315_5028_device::sega_315_5028_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5028, tag, owner, clock) {} void sega_315_5028_device::decrypt() { static const uint8_t convtable[32][4] = @@ -1027,7 +1027,7 @@ void sega_315_5028_device::decrypt() } -sega_315_5084_device::sega_315_5084_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5084, tag, owner, clock) {} +sega_315_5084_device::sega_315_5084_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : segacrpt_z80_device(mconfig, SEGA_315_5084, tag, owner, clock) {} void sega_315_5084_device::decrypt() { static const uint8_t convtable[32][4] = diff --git a/src/devices/machine/segacrpt_device.h b/src/devices/machine/segacrpt_device.h index 63b50bde2d0..3bc9a6a7946 100644 --- a/src/devices/machine/segacrpt_device.h +++ b/src/devices/machine/segacrpt_device.h @@ -22,7 +22,7 @@ public: void set_region_p(uint8_t* ptr); protected: - segacrpt_z80_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + segacrpt_z80_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; @@ -44,7 +44,7 @@ private: class sega_315_5132_device : public segacrpt_z80_device { public: - sega_315_5132_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5132_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -52,7 +52,7 @@ protected: class sega_315_5155_device : public segacrpt_z80_device { public: - sega_315_5155_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5155_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -60,7 +60,7 @@ protected: class sega_315_5110_device : public segacrpt_z80_device { public: - sega_315_5110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -68,7 +68,7 @@ protected: class sega_315_5135_device : public segacrpt_z80_device { public: - sega_315_5135_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5135_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -76,7 +76,7 @@ protected: class sega_315_5051_device : public segacrpt_z80_device { public: - sega_315_5051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -84,7 +84,7 @@ protected: class sega_315_5098_device : public segacrpt_z80_device { public: - sega_315_5098_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5098_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -92,7 +92,7 @@ protected: class sega_315_5102_device : public segacrpt_z80_device { public: - sega_315_5102_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5102_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -100,7 +100,7 @@ protected: class sega_315_5065_device : public segacrpt_z80_device { public: - sega_315_5065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5065_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -109,7 +109,7 @@ protected: class sega_315_5064_device : public segacrpt_z80_device { public: - sega_315_5064_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5064_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -118,7 +118,7 @@ protected: class sega_315_5033_device : public segacrpt_z80_device { public: - sega_315_5033_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5033_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -126,7 +126,7 @@ protected: class sega_315_5041_device : public segacrpt_z80_device { public: - sega_315_5041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5041_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -134,8 +134,8 @@ protected: class sega_315_5048_device : public segacrpt_z80_device { public: - sega_315_5048_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); - sega_315_5048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sega_315_5048_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); + sega_315_5048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; @@ -144,7 +144,7 @@ protected: class sega_315_5093_device : public segacrpt_z80_device { public: - sega_315_5093_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5093_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -152,7 +152,7 @@ protected: class sega_315_5099_device : public segacrpt_z80_device { public: - sega_315_5099_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5099_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -160,7 +160,7 @@ protected: class sega_315_spat_device : public segacrpt_z80_device { public: - sega_315_spat_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_spat_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -168,7 +168,7 @@ protected: class sega_315_5015_device : public segacrpt_z80_device { public: - sega_315_5015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5015_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -177,13 +177,13 @@ protected: class sega_315_5133_device : public sega_315_5048_device { public: - sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class sega_315_5014_device : public segacrpt_z80_device { public: - sega_315_5014_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5014_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -191,7 +191,7 @@ protected: class sega_315_5013_device : public segacrpt_z80_device { public: - sega_315_5013_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5013_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -199,7 +199,7 @@ protected: class sega_315_5061_device : public segacrpt_z80_device { public: - sega_315_5061_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5061_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -209,7 +209,7 @@ protected: class sega_315_5018_device : public segacrpt_z80_device { public: - sega_315_5018_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5018_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -217,7 +217,7 @@ protected: class sega_315_5010_device : public segacrpt_z80_device { public: - sega_315_5010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -227,7 +227,7 @@ protected: class sega_315_5128_device : public segacrpt_z80_device { public: - sega_315_5128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -235,7 +235,7 @@ protected: class sega_315_5028_device : public segacrpt_z80_device { public: - sega_315_5028_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5028_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; @@ -243,7 +243,7 @@ protected: class sega_315_5084_device : public segacrpt_z80_device { public: - sega_315_5084_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5084_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void decrypt() override; }; diff --git a/src/devices/machine/sensorboard.cpp b/src/devices/machine/sensorboard.cpp index c7786a0c4d5..163e5497180 100644 --- a/src/devices/machine/sensorboard.cpp +++ b/src/devices/machine/sensorboard.cpp @@ -66,7 +66,7 @@ DEFINE_DEVICE_TYPE(SENSORBOARD, sensorboard_device, "sensorboard", "Sensorboard" // constructor //------------------------------------------------- -sensorboard_device::sensorboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +sensorboard_device::sensorboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SENSORBOARD, tag, owner, clock), device_nvram_interface(mconfig, *this), m_out_piece(*this, "piece_%c%u", 0U + 'a', 1U), diff --git a/src/devices/machine/sensorboard.h b/src/devices/machine/sensorboard.h index b2d12e8a3d1..af51a51542e 100644 --- a/src/devices/machine/sensorboard.h +++ b/src/devices/machine/sensorboard.h @@ -14,7 +14,7 @@ class sensorboard_device : public device_t, public device_nvram_interface { public: - sensorboard_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + sensorboard_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); enum sb_type { diff --git a/src/devices/machine/serflash.cpp b/src/devices/machine/serflash.cpp index c7589e6f58e..f28e4a0d478 100644 --- a/src/devices/machine/serflash.cpp +++ b/src/devices/machine/serflash.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(SERFLASH, serflash_device, "serflash", "Serial Flash") // serflash_device - constructor //------------------------------------------------- -serflash_device::serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +serflash_device::serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SERFLASH, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_length(0) diff --git a/src/devices/machine/serflash.h b/src/devices/machine/serflash.h index 1c9e5ab7afc..b536f7a7648 100644 --- a/src/devices/machine/serflash.h +++ b/src/devices/machine/serflash.h @@ -21,7 +21,7 @@ public: typedef device_delegate<void (serflash_device &, void *, size_t)> init_delegate; // construction/destruction - serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + serflash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration void set_flash_page_size(uint16_t size) { m_flash_page_size = size; } diff --git a/src/devices/machine/sis5513_ide.cpp b/src/devices/machine/sis5513_ide.cpp index 99a9541f80e..e5111689235 100644 --- a/src/devices/machine/sis5513_ide.cpp +++ b/src/devices/machine/sis5513_ide.cpp @@ -28,7 +28,7 @@ DEFINE_DEVICE_TYPE(SIS5513_IDE, sis5513_ide_device, "sis5513_ide", "SiS 5513 IDE Controller") -sis5513_ide_device::sis5513_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis5513_ide_device::sis5513_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SIS5513_IDE, tag, owner, clock) , m_ide1(*this, "ide1") , m_ide2(*this, "ide2") diff --git a/src/devices/machine/sis5513_ide.h b/src/devices/machine/sis5513_ide.h index 89d4916c47b..21b5a7f6cb0 100644 --- a/src/devices/machine/sis5513_ide.h +++ b/src/devices/machine/sis5513_ide.h @@ -13,7 +13,7 @@ class sis5513_ide_device : public pci_device { public: template <typename T> sis5513_ide_device( - const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, + const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&host_tag, uint32_t bmspace = AS_PROGRAM ) : sis5513_ide_device(mconfig, tag, owner, clock) { @@ -23,7 +23,7 @@ public: set_ids(0x10395513, 0xd0, 0x010180, 0x00); m_bus_master_space.set_tag(host_tag, bmspace); } - sis5513_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis5513_ide_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_pri() { return m_irq_pri_callback.bind(); } auto irq_sec() { return m_irq_sec_callback.bind(); } diff --git a/src/devices/machine/sis630_gui.cpp b/src/devices/machine/sis630_gui.cpp index 24270f95e02..9b19f0a90eb 100644 --- a/src/devices/machine/sis630_gui.cpp +++ b/src/devices/machine/sis630_gui.cpp @@ -66,7 +66,7 @@ // (definitely doesn't have dual segment mode for instance) DEFINE_DEVICE_TYPE(SIS630_SVGA, sis630_svga_device, "sis630_svga", "SiS 630 SVGA") -sis630_svga_device::sis630_svga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis630_svga_device::sis630_svga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : svga_device(mconfig, SIS630_SVGA, tag, owner, clock) { @@ -361,7 +361,7 @@ void sis630_svga_device::mem_w(offs_t offset, uint8_t data) DEFINE_DEVICE_TYPE(SIS630_GUI, sis630_gui_device, "sis630_gui", "SiS 630 GUI") -sis630_gui_device::sis630_gui_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis630_gui_device::sis630_gui_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SIS630_GUI, tag, owner, clock) , m_svga(*this, "svga") , m_gui_rom(*this, "gui_rom") @@ -395,7 +395,7 @@ void sis630_gui_device::device_add_mconfig(machine_config &config) screen.set_raw(XTAL(25'174'800), 900, 0, 640, 526, 0, 480); screen.set_screen_update(m_svga, FUNC(sis630_svga_device::screen_update)); - SIS630_SVGA(config, m_svga, 0); + SIS630_SVGA(config, m_svga); m_svga->set_screen("screen"); // 64MB according to POST // documentation claims 128MB, assume being wrong @@ -663,7 +663,7 @@ void sis630_gui_device::vga_3d0_w(offs_t offset, uint32_t data, uint32_t mem_mas DEFINE_DEVICE_TYPE(SIS630_BRIDGE, sis630_bridge_device, "sis630_bridge", "SiS 630 Virtual PCI-to-PCI bridge") -sis630_bridge_device::sis630_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis630_bridge_device::sis630_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_bridge_device(mconfig, SIS630_BRIDGE, tag, owner, clock) , m_vga(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/sis630_gui.h b/src/devices/machine/sis630_gui.h index 79690f81575..b84326bdc69 100644 --- a/src/devices/machine/sis630_gui.h +++ b/src/devices/machine/sis630_gui.h @@ -12,7 +12,7 @@ class sis630_svga_device : public svga_device { public: - sis630_svga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis630_svga_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t mem_r(offs_t offset) override; virtual void mem_w(offs_t offset, uint8_t data) override; @@ -50,7 +50,7 @@ DECLARE_DEVICE_TYPE(SIS630_SVGA, sis630_svga_device) class sis630_gui_device : public pci_device { public: - sis630_gui_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis630_gui_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void legacy_memory_map(address_map &map); void legacy_io_map(address_map &map); @@ -111,7 +111,7 @@ class sis630_bridge_device : public pci_bridge_device { public: template <typename T> sis630_bridge_device( - const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, + const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&gui_tag ) : sis630_bridge_device(mconfig, tag, owner, clock) { @@ -121,7 +121,7 @@ public: m_vga.set_tag(std::forward<T>(gui_tag)); } - sis630_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis630_bridge_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/machine/sis630_host.cpp b/src/devices/machine/sis630_host.cpp index 5088585aa5f..a6171a38ad6 100644 --- a/src/devices/machine/sis630_host.cpp +++ b/src/devices/machine/sis630_host.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(SIS630_HOST, sis630_host_device, "sis630_host", "SiS 630 Host-to-PCI Bridge") -sis630_host_device::sis630_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis630_host_device::sis630_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, SIS630_HOST, tag, owner, clock) , m_host_cpu(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/sis630_host.h b/src/devices/machine/sis630_host.h index 46efc0ed803..4bce6026d13 100644 --- a/src/devices/machine/sis630_host.h +++ b/src/devices/machine/sis630_host.h @@ -13,7 +13,7 @@ class sis630_host_device : public pci_host_device { public: template <typename T> sis630_host_device( - const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, + const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, int ram_size ) : sis630_host_device(mconfig, tag, owner, clock) { @@ -24,7 +24,7 @@ public: set_ram_size(ram_size); } - sis630_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis630_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_ram_size(int ram_size) { m_ram_size = ram_size; } diff --git a/src/devices/machine/sis7001_usb.cpp b/src/devices/machine/sis7001_usb.cpp index c54f62d9713..b59874e335a 100644 --- a/src/devices/machine/sis7001_usb.cpp +++ b/src/devices/machine/sis7001_usb.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(SIS7001_USB, sis7001_usb_device, "sis7001_usb", "SiS 7001 USB Host Controller") -sis7001_usb_device::sis7001_usb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis7001_usb_device::sis7001_usb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SIS7001_USB, tag, owner, clock) { diff --git a/src/devices/machine/sis7001_usb.h b/src/devices/machine/sis7001_usb.h index 1087b06ce30..82a02e0dc69 100644 --- a/src/devices/machine/sis7001_usb.h +++ b/src/devices/machine/sis7001_usb.h @@ -12,7 +12,7 @@ class sis7001_usb_device : public pci_device { public: sis7001_usb_device( - const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, + const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, int num_ports ) : sis7001_usb_device(mconfig, tag, owner, clock) { @@ -22,7 +22,7 @@ public: // TODO: should really read from a std::list interface m_downstream_ports = num_ports; } - sis7001_usb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis7001_usb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::MEDIA; } diff --git a/src/devices/machine/sis7018_audio.cpp b/src/devices/machine/sis7018_audio.cpp index ac87ab46ac2..0e30ce12f3d 100644 --- a/src/devices/machine/sis7018_audio.cpp +++ b/src/devices/machine/sis7018_audio.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(SIS7018_AUDIO, sis7018_audio_device, "sis7018_audio", "SiS 7018 Audio AC97") -sis7018_audio_device::sis7018_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis7018_audio_device::sis7018_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SIS7018_AUDIO, tag, owner, clock) { diff --git a/src/devices/machine/sis7018_audio.h b/src/devices/machine/sis7018_audio.h index d72794e05c6..8c2ff7131aa 100644 --- a/src/devices/machine/sis7018_audio.h +++ b/src/devices/machine/sis7018_audio.h @@ -11,7 +11,7 @@ class sis7018_audio_device : public pci_device { public: - sis7018_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis7018_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::SOUND; } diff --git a/src/devices/machine/sis85c496.cpp b/src/devices/machine/sis85c496.cpp index 66bab2adbda..73de49b49dd 100644 --- a/src/devices/machine/sis85c496.cpp +++ b/src/devices/machine/sis85c496.cpp @@ -47,7 +47,7 @@ void sis85c496_host_device::internal_io_map(address_map &map) void sis85c496_host_device::device_add_mconfig(machine_config &config) { - PIT8254(config, m_pit8254, 0); + PIT8254(config, m_pit8254); m_pit8254->set_clk<0>(4772720/4); // heartbeat IRQ m_pit8254->out_handler<0>().set(FUNC(sis85c496_host_device::at_pit8254_out0_changed)); m_pit8254->set_clk<1>(4772720/4); // DRAM refresh @@ -88,12 +88,12 @@ void sis85c496_host_device::device_add_mconfig(machine_config &config) m_dma8237_2->out_dack_callback<2>().set(FUNC(sis85c496_host_device::pc_dack6_w)); m_dma8237_2->out_dack_callback<3>().set(FUNC(sis85c496_host_device::pc_dack7_w)); - PIC8259(config, m_pic8259_master, 0); + PIC8259(config, m_pic8259_master); m_pic8259_master->out_int_callback().set(FUNC(sis85c496_host_device::cpu_int_w)); m_pic8259_master->in_sp_callback().set_constant(1); m_pic8259_master->read_slave_ack_callback().set(FUNC(sis85c496_host_device::get_slave_ack)); - PIC8259(config, m_pic8259_slave, 0); + PIC8259(config, m_pic8259_slave); m_pic8259_slave->out_int_callback().set(m_pic8259_master, FUNC(pic8259_device::ir2_w)); m_pic8259_slave->in_sp_callback().set_constant(0); @@ -118,7 +118,7 @@ void sis85c496_host_device::device_add_mconfig(machine_config &config) } -sis85c496_host_device::sis85c496_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis85c496_host_device::sis85c496_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, SIS85C496, tag, owner, clock), m_maincpu(*this, finder_base::DUMMY_TAG), m_pic8259_master(*this, "pic8259_master"), diff --git a/src/devices/machine/sis85c496.h b/src/devices/machine/sis85c496.h index 05bd11d5d56..d8dd06873ac 100644 --- a/src/devices/machine/sis85c496.h +++ b/src/devices/machine/sis85c496.h @@ -32,7 +32,7 @@ class sis85c496_host_device : public pci_host_device { public: - sis85c496_host_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis85c496_host_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_cpu_tag(const char *tag); void set_ram_size(int ram_size); diff --git a/src/devices/machine/sis900_eth.cpp b/src/devices/machine/sis900_eth.cpp index d960c4b0293..560e0006c2f 100644 --- a/src/devices/machine/sis900_eth.cpp +++ b/src/devices/machine/sis900_eth.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(SIS900_ETH, sis900_eth_device, "sis900_eth", "SiS 900 Fast Ethernet Adapter") -sis900_eth_device::sis900_eth_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis900_eth_device::sis900_eth_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SIS900_ETH, tag, owner, clock) , m_eeprom(*this, "eeprom") , m_eth_rom(*this, "eth_rom") diff --git a/src/devices/machine/sis900_eth.h b/src/devices/machine/sis900_eth.h index 4d5fb46f2bd..db801407758 100644 --- a/src/devices/machine/sis900_eth.h +++ b/src/devices/machine/sis900_eth.h @@ -12,7 +12,7 @@ class sis900_eth_device : public pci_device { public: - sis900_eth_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis900_eth_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::LAN; } diff --git a/src/devices/machine/sis950_lpc.cpp b/src/devices/machine/sis950_lpc.cpp index fa62813840b..a161f458ac0 100644 --- a/src/devices/machine/sis950_lpc.cpp +++ b/src/devices/machine/sis950_lpc.cpp @@ -51,7 +51,7 @@ DEFINE_DEVICE_TYPE(SIS950_LPC, sis950_lpc_device, "sis950_lpc", "SiS 950 LPC Super-South Bridge") -sis950_lpc_device::sis950_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis950_lpc_device::sis950_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_device(mconfig, SIS950_LPC, tag, owner, clock) , m_host_cpu(*this, finder_base::DUMMY_TAG) , m_flash_rom(*this, finder_base::DUMMY_TAG) @@ -121,7 +121,7 @@ void sis950_lpc_device::device_add_mconfig(machine_config &config) constexpr XTAL lpc_pit_clock = XTAL(14'318'181); // confirmed 82C54 - PIT8254(config, m_pit, 0); + PIT8254(config, m_pit); // heartbeat IRQ m_pit->set_clk<0>(lpc_pit_clock / 12); m_pit->out_handler<0>().set(FUNC(sis950_lpc_device::pit_out0)); @@ -147,7 +147,7 @@ void sis950_lpc_device::device_add_mconfig(machine_config &config) // TODO: ior/iow/dack callbacks // Confirmed 82C59s - PIC8259(config, m_pic_master, 0); + PIC8259(config, m_pic_master); m_pic_master->out_int_callback().set_inputline(m_host_cpu, 0); m_pic_master->in_sp_callback().set_constant(1); m_pic_master->read_slave_ack_callback().set( @@ -159,7 +159,7 @@ void sis950_lpc_device::device_add_mconfig(machine_config &config) return 0; }); - PIC8259(config, m_pic_slave, 0); + PIC8259(config, m_pic_slave); m_pic_slave->out_int_callback().set(m_pic_master, FUNC(pic8259_device::ir2_w)); m_pic_slave->in_sp_callback().set_constant(0); diff --git a/src/devices/machine/sis950_lpc.h b/src/devices/machine/sis950_lpc.h index a91f442a653..c8fafc47b44 100644 --- a/src/devices/machine/sis950_lpc.h +++ b/src/devices/machine/sis950_lpc.h @@ -36,7 +36,7 @@ class sis950_lpc_device : public pci_device { public: template <typename T, typename U> sis950_lpc_device( - const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, + const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&flash_tag ) : sis950_lpc_device(mconfig, tag, owner, clock) { @@ -47,7 +47,7 @@ public: m_flash_rom.set_tag(std::forward<U>(flash_tag)); } - sis950_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis950_lpc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); static constexpr feature_type unemulated_features() { return feature::MOUSE; } diff --git a/src/devices/machine/sis950_smbus.cpp b/src/devices/machine/sis950_smbus.cpp index b96898cbbe0..aa57416063f 100644 --- a/src/devices/machine/sis950_smbus.cpp +++ b/src/devices/machine/sis950_smbus.cpp @@ -50,7 +50,7 @@ void sis950_smbus_device::map(address_map &map) #endif } -sis950_smbus_device::sis950_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sis950_smbus_device::sis950_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SIS950_SMBUS, tag, owner, clock) { } diff --git a/src/devices/machine/sis950_smbus.h b/src/devices/machine/sis950_smbus.h index a474fe10914..cf9609c1043 100644 --- a/src/devices/machine/sis950_smbus.h +++ b/src/devices/machine/sis950_smbus.h @@ -9,7 +9,7 @@ class sis950_smbus_device : public device_t { public: - sis950_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sis950_smbus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void map(address_map &map); diff --git a/src/devices/machine/smartboard.cpp b/src/devices/machine/smartboard.cpp index ac18fd34534..55b7a92cd39 100644 --- a/src/devices/machine/smartboard.cpp +++ b/src/devices/machine/smartboard.cpp @@ -67,7 +67,7 @@ DEFINE_DEVICE_TYPE(TASC_SB30, tasc_sb30_device, "tasc_sb30", "Tasc SmartBoard SB // tasc_sb30_device - constructor //------------------------------------------------- -tasc_sb30_device::tasc_sb30_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tasc_sb30_device::tasc_sb30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TASC_SB30, tag, owner, clock) , m_board(*this, "board") , m_out_leds(*this, "sb30_led_%u.%u", 0U, 0U) diff --git a/src/devices/machine/smartboard.h b/src/devices/machine/smartboard.h index cb87bc36966..6d6a71b5409 100644 --- a/src/devices/machine/smartboard.h +++ b/src/devices/machine/smartboard.h @@ -16,7 +16,7 @@ class tasc_sb30_device : public device_t { public: - tasc_sb30_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + tasc_sb30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto data_out() { return m_data_out.bind(); } // data_r diff --git a/src/devices/machine/smartmed.cpp b/src/devices/machine/smartmed.cpp index 1c54d36d174..fd0fb440233 100644 --- a/src/devices/machine/smartmed.cpp +++ b/src/devices/machine/smartmed.cpp @@ -74,12 +74,12 @@ enum DEFINE_DEVICE_TYPE(NAND, nand_device, "nand", "NAND Flash Memory") -nand_device::nand_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nand_device::nand_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nand_device(mconfig, NAND, tag, owner, clock) { } -nand_device::nand_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +nand_device::nand_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_page_data_size(0) , m_page_total_size(0) @@ -777,7 +777,7 @@ void nand_device::device_reset() DEFINE_DEVICE_TYPE(SMARTMEDIA, smartmedia_image_device, "smartmedia", "SmartMedia Flash card") -smartmedia_image_device::smartmedia_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +smartmedia_image_device::smartmedia_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : nand_device(mconfig, SMARTMEDIA, tag, owner, clock) , device_memcard_image_interface(mconfig, *this) { diff --git a/src/devices/machine/smartmed.h b/src/devices/machine/smartmed.h index 77c7d53b209..63e2874113c 100644 --- a/src/devices/machine/smartmed.h +++ b/src/devices/machine/smartmed.h @@ -34,7 +34,7 @@ public: }; // construction/destruction - nand_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nand_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto rnb_wr_callback() { return m_write_rnb.bind(); } @@ -143,7 +143,7 @@ protected: SM_PM_C // accessing spare field }; - nand_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + nand_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; @@ -199,7 +199,7 @@ class smartmedia_image_device : public nand_device, public device_memcard_image_ { public: // construction/destruction - smartmedia_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smartmedia_image_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // image-level overrides virtual bool is_creatable() const noexcept override { return false; } diff --git a/src/devices/machine/smc91c9x.cpp b/src/devices/machine/smc91c9x.cpp index 3ca3fbeed13..59e36521beb 100644 --- a/src/devices/machine/smc91c9x.cpp +++ b/src/devices/machine/smc91c9x.cpp @@ -46,7 +46,7 @@ static const char *const ethernet_regname[64] = DEFINE_DEVICE_TYPE(SMC91C94, smc91c94_device, "smc91c94", "SMC91C94 Ethernet Controller") -smc91c94_device::smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +smc91c94_device::smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : smc91c9x_device(mconfig, SMC91C94, tag, owner, clock, dev_type::SMC91C94) { m_num_ebuf = 18; @@ -54,13 +54,13 @@ smc91c94_device::smc91c94_device(const machine_config &mconfig, const char *tag, DEFINE_DEVICE_TYPE(SMC91C96, smc91c96_device, "smc91c96", "SMC91C96 Ethernet Controller") -smc91c96_device::smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +smc91c96_device::smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : smc91c9x_device(mconfig, SMC91C96, tag, owner, clock, dev_type::SMC91C96) { m_num_ebuf = 24; } -smc91c9x_device::smc91c9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, dev_type device_type) +smc91c9x_device::smc91c9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, dev_type device_type) : device_t(mconfig, type, tag, owner, clock) , device_network_interface(mconfig, *this, 10) , m_device_type(device_type) diff --git a/src/devices/machine/smc91c9x.h b/src/devices/machine/smc91c9x.h index e1c91a3e566..8dae538ce54 100644 --- a/src/devices/machine/smc91c9x.h +++ b/src/devices/machine/smc91c9x.h @@ -35,7 +35,7 @@ protected: SMC91C96 }; - smc91c9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, dev_type device_type); + smc91c9x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, dev_type device_type); // device-level overrides virtual void device_start() override; @@ -305,13 +305,13 @@ private: class smc91c94_device : public smc91c9x_device { public: - smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smc91c94_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class smc91c96_device : public smc91c9x_device { public: - smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smc91c96_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/smioc.cpp b/src/devices/machine/smioc.cpp index 06c3e03adb1..f9b13ae9f86 100644 --- a/src/devices/machine/smioc.cpp +++ b/src/devices/machine/smioc.cpp @@ -192,7 +192,7 @@ void smioc_device::device_add_mconfig(machine_config &config) // smioc_device - constructor //------------------------------------------------- -smioc_device::smioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +smioc_device::smioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMIOC, tag, owner, clock), m_smioccpu(*this, I188_TAG), m_dma8237(*this, "dma8237_%u", 1), diff --git a/src/devices/machine/smioc.h b/src/devices/machine/smioc.h index 73dd874d149..ae3e7f24596 100644 --- a/src/devices/machine/smioc.h +++ b/src/devices/machine/smioc.h @@ -38,7 +38,7 @@ class smioc_device : public device_t { public: /* Constructor and Destructor */ - smioc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smioc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto m68k_r_callback() { return m_m68k_r_cb.bind(); } auto m68k_w_callback() { return m_m68k_w_cb.bind(); } diff --git a/src/devices/machine/smpc.cpp b/src/devices/machine/smpc.cpp index 7161d97b7f9..271d4440544 100644 --- a/src/devices/machine/smpc.cpp +++ b/src/devices/machine/smpc.cpp @@ -202,7 +202,7 @@ void smpc_hle_device::smpc_regs(address_map &map) // smpc_hle_device - constructor //------------------------------------------------- -smpc_hle_device::smpc_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +smpc_hle_device::smpc_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SMPC_HLE, tag, owner, clock) , device_memory_interface(mconfig, *this) , m_space_config("regs", ENDIANNESS_LITTLE, 8, 7, 0, address_map_constructor(FUNC(smpc_hle_device::smpc_regs), this)) diff --git a/src/devices/machine/smpc.h b/src/devices/machine/smpc.h index 60b461b6ad3..491bba38618 100644 --- a/src/devices/machine/smpc.h +++ b/src/devices/machine/smpc.h @@ -27,7 +27,7 @@ class smpc_hle_device : public device_t, { public: // construction/destruction - smpc_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smpc_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations // void io_map(address_map &map); diff --git a/src/devices/machine/spchrom.cpp b/src/devices/machine/spchrom.cpp index 3cd95b87c2e..14d9a5fbd4e 100644 --- a/src/devices/machine/spchrom.cpp +++ b/src/devices/machine/spchrom.cpp @@ -25,7 +25,7 @@ // device type definition DEFINE_DEVICE_TYPE(SPEECHROM, speechrom_device, "speechrom", "TI Speech ROM") -speechrom_device::speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +speechrom_device::speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPEECHROM, tag, owner, clock), m_speechrom_data(nullptr), m_speechROMlen(0), m_speechROMaddr(0), m_load_pointer(0), diff --git a/src/devices/machine/spchrom.h b/src/devices/machine/spchrom.h index f84350da358..ad086e659e6 100644 --- a/src/devices/machine/spchrom.h +++ b/src/devices/machine/spchrom.h @@ -15,7 +15,7 @@ class speechrom_device : public device_t { public: // construction/destruction - speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + speechrom_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); /// TODO: implement bus behaviour int read(int count); diff --git a/src/devices/machine/spg110.cpp b/src/devices/machine/spg110.cpp index b4dbb4e8de8..72003dd2938 100644 --- a/src/devices/machine/spg110.cpp +++ b/src/devices/machine/spg110.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(SPG110, spg110_device, "spg110", "SPG110 System-on-a-Chip") -spg110_device::spg110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal) : +spg110_device::spg110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal) : unsp_device(mconfig, type, tag, owner, clock, internal), device_mixer_interface(mconfig, *this, 2), m_screen(*this, finder_base::DUMMY_TAG), @@ -36,7 +36,7 @@ spg110_device::spg110_device(const machine_config &mconfig, device_type type, co } -spg110_device::spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg110_device::spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg110_device(mconfig, SPG110, tag, owner, clock, address_map_constructor(FUNC(spg110_device::internal_map), this)) { } diff --git a/src/devices/machine/spg110.h b/src/devices/machine/spg110.h index 8ecee9dea75..e38f4d7dc5e 100644 --- a/src/devices/machine/spg110.h +++ b/src/devices/machine/spg110.h @@ -17,10 +17,10 @@ class spg110_device : public unsp_device, public device_mixer_interface { public: - spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename T> - spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + spg110_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : spg110_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward<T>(screen_tag)); @@ -43,7 +43,7 @@ public: DECLARE_WRITE_LINE_MEMBER(vblank) { m_spg_video->vblank(state); } protected: - spg110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal); + spg110_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal); void internal_map(address_map &map); diff --git a/src/devices/machine/spg110_video.cpp b/src/devices/machine/spg110_video.cpp index e89bd5488ec..246ce34c472 100644 --- a/src/devices/machine/spg110_video.cpp +++ b/src/devices/machine/spg110_video.cpp @@ -9,7 +9,7 @@ DEFINE_DEVICE_TYPE(SPG110_VIDEO, spg110_video_device, "spg110_video", "SPG110 System-on-a-Chip (Video)") -spg110_video_device::spg110_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +spg110_video_device::spg110_video_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_memory_interface(mconfig, *this), m_space_config("spg110_video", ENDIANNESS_BIG, 16, 32, 0, address_map_constructor(FUNC(spg110_video_device::map_video), this)), @@ -26,7 +26,7 @@ spg110_video_device::spg110_video_device(const machine_config &mconfig, device_t { } -spg110_video_device::spg110_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg110_video_device::spg110_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg110_video_device(mconfig, SPG110_VIDEO, tag, owner, clock) { } diff --git a/src/devices/machine/spg110_video.h b/src/devices/machine/spg110_video.h index 6f8e0db0b5c..a39f02cba01 100644 --- a/src/devices/machine/spg110_video.h +++ b/src/devices/machine/spg110_video.h @@ -16,11 +16,11 @@ class spg110_video_device : public device_t, public device_memory_interface { public: - spg110_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - spg110_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg110_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + spg110_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename T, typename U> - spg110_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&screen_tag) + spg110_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&screen_tag) : spg110_video_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward<T>(cpu_tag)); diff --git a/src/devices/machine/spg290_cdservo.cpp b/src/devices/machine/spg290_cdservo.cpp index 7d03836a486..26d4f885e2d 100644 --- a/src/devices/machine/spg290_cdservo.cpp +++ b/src/devices/machine/spg290_cdservo.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(SPG290_CDSERVO, spg290_cdservo_device, "spg290_cdservo", "SPG290 CDServo HLE") -spg290_cdservo_device::spg290_cdservo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg290_cdservo_device::spg290_cdservo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPG290_CDSERVO, tag, owner, clock) , m_cdrom(*this, finder_base::DUMMY_TAG) , m_irq_cb(*this) diff --git a/src/devices/machine/spg290_cdservo.h b/src/devices/machine/spg290_cdservo.h index aa1d8077407..70b67522f33 100644 --- a/src/devices/machine/spg290_cdservo.h +++ b/src/devices/machine/spg290_cdservo.h @@ -13,10 +13,10 @@ class spg290_cdservo_device : public device_t { public: - spg290_cdservo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg290_cdservo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename T> - spg290_cdservo_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cdrom_tag) + spg290_cdservo_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cdrom_tag) : spg290_cdservo_device(mconfig, tag, owner, clock) { m_cdrom.set_tag(std::forward<T>(cdrom_tag)); diff --git a/src/devices/machine/spg290_i2c.cpp b/src/devices/machine/spg290_i2c.cpp index e360a451736..bfc81b26942 100644 --- a/src/devices/machine/spg290_i2c.cpp +++ b/src/devices/machine/spg290_i2c.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(SPG290_I2C, spg290_i2c_device, "spg290_i2c", "SPG290 I2C") -spg290_i2c_device::spg290_i2c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg290_i2c_device::spg290_i2c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPG290_I2C, tag, owner, clock) , m_irq_cb(*this) , m_i2c_read_cb(*this) diff --git a/src/devices/machine/spg290_i2c.h b/src/devices/machine/spg290_i2c.h index 2dca1d145f4..7bdff611303 100644 --- a/src/devices/machine/spg290_i2c.h +++ b/src/devices/machine/spg290_i2c.h @@ -10,7 +10,7 @@ class spg290_i2c_device : public device_t { public: - spg290_i2c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg290_i2c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint32_t data, uint32_t mem_mask); uint32_t read(offs_t offset, uint32_t mem_mask); diff --git a/src/devices/machine/spg290_ppu.cpp b/src/devices/machine/spg290_ppu.cpp index 37f0def0f84..00da588f306 100644 --- a/src/devices/machine/spg290_ppu.cpp +++ b/src/devices/machine/spg290_ppu.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(SPG290_PPU, spg290_ppu_device, "spg290_ppu", "SPG290 PPU") -spg290_ppu_device::spg290_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg290_ppu_device::spg290_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPG290_PPU, tag, owner, clock) , m_screen(*this, finder_base::DUMMY_TAG) , m_sprite_palette_ram(*this, "sprite_palette_ram") diff --git a/src/devices/machine/spg290_ppu.h b/src/devices/machine/spg290_ppu.h index 83960abe6d6..3e1cdc65b2e 100644 --- a/src/devices/machine/spg290_ppu.h +++ b/src/devices/machine/spg290_ppu.h @@ -13,10 +13,10 @@ class spg290_ppu_device : public device_t { public: - spg290_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg290_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename T> - spg290_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + spg290_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : spg290_ppu_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward<T>(screen_tag)); diff --git a/src/devices/machine/spg290_timer.cpp b/src/devices/machine/spg290_timer.cpp index ce3754079d3..0ee5161071d 100644 --- a/src/devices/machine/spg290_timer.cpp +++ b/src/devices/machine/spg290_timer.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(SPG290_TIMER, spg290_timer_device, "spg290_timer", "SPG290 Timer") -spg290_timer_device::spg290_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg290_timer_device::spg290_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPG290_TIMER, tag, owner, clock) , m_irq_cb(*this) , m_enabled(false) diff --git a/src/devices/machine/spg290_timer.h b/src/devices/machine/spg290_timer.h index 486011cb90b..6a85bcdf5b4 100644 --- a/src/devices/machine/spg290_timer.h +++ b/src/devices/machine/spg290_timer.h @@ -10,7 +10,7 @@ class spg290_timer_device : public device_t { public: - spg290_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg290_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void write(offs_t offset, uint32_t data, uint32_t mem_mask); uint32_t read(offs_t offset, uint32_t mem_mask); diff --git a/src/devices/machine/spg2xx.cpp b/src/devices/machine/spg2xx.cpp index 412b2d20a14..83609676db9 100644 --- a/src/devices/machine/spg2xx.cpp +++ b/src/devices/machine/spg2xx.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SPG2XX_128, spg2xx_128_device, "spg2xx_128", "SPG2xx-series S DEFINE_DEVICE_TYPE(SPG28X, spg28x_device, "spg28x", "SPG280-series System-on-a-Chip") // 64 sprites -spg2xx_device::spg2xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal) : +spg2xx_device::spg2xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t sprite_limit, address_map_constructor internal) : unsp_device(mconfig, type, tag, owner, clock, internal), device_mixer_interface(mconfig, *this, 2), m_spg_audio(*this, "spgaudio"), @@ -45,23 +45,23 @@ spg2xx_device::spg2xx_device(const machine_config &mconfig, device_type type, co { } -spg24x_device::spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg24x_device::spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_device(mconfig, SPG24X, tag, owner, clock, 256, address_map_constructor(FUNC(spg24x_device::internal_map), this)) { } -spg24x_device::spg24x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal) : +spg24x_device::spg24x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t sprite_limit, address_map_constructor internal) : spg2xx_device(mconfig, type, tag, owner, clock, sprite_limit, internal) { } -spg2xx_128_device::spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg2xx_128_device::spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg24x_device(mconfig, SPG2XX_128, tag, owner, clock, 128, address_map_constructor(FUNC(spg2xx_128_device::internal_map), this)) { } -spg28x_device::spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg28x_device::spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg24x_device(mconfig, SPG28X, tag, owner, clock, 64, address_map_constructor(FUNC(spg28x_device::internal_map), this)) { } diff --git a/src/devices/machine/spg2xx.h b/src/devices/machine/spg2xx.h index 6b6bfd0d560..541ded1dcfd 100644 --- a/src/devices/machine/spg2xx.h +++ b/src/devices/machine/spg2xx.h @@ -78,7 +78,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return m_spg_video->screen_update(screen, bitmap, cliprect); } protected: - spg2xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal); + spg2xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t sprite_limit, address_map_constructor internal); void internal_map(address_map &map); @@ -151,15 +151,15 @@ class spg24x_device : public spg2xx_device { public: template <typename T> - spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : spg24x_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward<T>(screen_tag)); } - spg24x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint16_t sprite_limit, address_map_constructor internal); + spg24x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint16_t sprite_limit, address_map_constructor internal); - spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg24x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void device_add_mconfig(machine_config &config) override; @@ -169,26 +169,26 @@ class spg2xx_128_device : public spg24x_device { public: template <typename T> - spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : spg2xx_128_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward<T>(screen_tag)); } - spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg2xx_128_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class spg28x_device : public spg24x_device { public: template <typename T> - spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&screen_tag) + spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&screen_tag) : spg28x_device(mconfig, tag, owner, clock) { m_screen.set_tag(std::forward<T>(screen_tag)); } - spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg28x_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/machine/spg2xx_audio.cpp b/src/devices/machine/spg2xx_audio.cpp index e8518bdaa59..7bdb2d3a3af 100644 --- a/src/devices/machine/spg2xx_audio.cpp +++ b/src/devices/machine/spg2xx_audio.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(SUNPLUS_GCM394_AUDIO, sunplus_gcm394_audio_device, "gcm394_au static FILE *adpcm_file[16] = {}; #endif -spg2xx_audio_device::spg2xx_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +spg2xx_audio_device::spg2xx_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_space_read_cb(*this) @@ -56,17 +56,17 @@ spg2xx_audio_device::spg2xx_audio_device(const machine_config &mconfig, device_t { } -spg2xx_audio_device::spg2xx_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg2xx_audio_device::spg2xx_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_audio_device(mconfig, SPG2XX_AUDIO, tag, owner, clock) { } -spg110_audio_device::spg110_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg110_audio_device::spg110_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_audio_device(mconfig, SPG110_AUDIO, tag, owner, clock) { } -sunplus_gcm394_audio_device::sunplus_gcm394_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sunplus_gcm394_audio_device::sunplus_gcm394_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_audio_device(mconfig, SUNPLUS_GCM394_AUDIO, tag, owner, clock) { } diff --git a/src/devices/machine/spg2xx_audio.h b/src/devices/machine/spg2xx_audio.h index d0712139134..dd785f44cfe 100644 --- a/src/devices/machine/spg2xx_audio.h +++ b/src/devices/machine/spg2xx_audio.h @@ -17,8 +17,8 @@ class spg2xx_audio_device : public device_t, public device_sound_interface { public: - spg2xx_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - spg2xx_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg2xx_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + spg2xx_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto space_read_callback() { return m_space_read_cb.bind(); } auto write_irq_callback() { return m_irq_cb.bind(); } @@ -381,7 +381,7 @@ private: class spg110_audio_device : public spg2xx_audio_device { public: - spg110_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg110_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void audio_w(offs_t offset, uint16_t data) override; @@ -395,7 +395,7 @@ public: class sunplus_gcm394_audio_device : public spg2xx_audio_device { public: - sunplus_gcm394_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sunplus_gcm394_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t control_r(offs_t offset); void control_w(offs_t offset, uint16_t data); diff --git a/src/devices/machine/spg2xx_io.cpp b/src/devices/machine/spg2xx_io.cpp index 13fa8a04c4f..8999375ffad 100644 --- a/src/devices/machine/spg2xx_io.cpp +++ b/src/devices/machine/spg2xx_io.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(SPG28X_IO, spg28x_io_device, "spg28x_io", "SPG280-series Syst #define IO_IRQ_ENABLE m_io_regs[REG_INT_CTRL] #define IO_IRQ_STATUS m_io_regs[REG_INT_CLEAR] -spg2xx_io_device::spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +spg2xx_io_device::spg2xx_io_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_porta_out(*this), m_portb_out(*this), @@ -64,12 +64,12 @@ spg2xx_io_device::spg2xx_io_device(const machine_config &mconfig, device_type ty { } -spg24x_io_device::spg24x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg24x_io_device::spg24x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_io_device(mconfig, SPG24X_IO, tag, owner, clock, 256) { } -spg28x_io_device::spg28x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg28x_io_device::spg28x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_io_device(mconfig, SPG28X_IO, tag, owner, clock, 64) { } diff --git a/src/devices/machine/spg2xx_io.h b/src/devices/machine/spg2xx_io.h index c674ae72e6b..dc97813640a 100644 --- a/src/devices/machine/spg2xx_io.h +++ b/src/devices/machine/spg2xx_io.h @@ -12,7 +12,7 @@ class spg2xx_io_device : public device_t { public: - spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); auto porta_out() { return m_porta_out.bind(); } auto portb_out() { return m_portb_out.bind(); } @@ -54,7 +54,7 @@ public: template <size_t Line> uint16_t adc_r() { return m_adc_in[Line](); } protected: - spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const uint32_t sprite_limit) + spg2xx_io_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const uint32_t sprite_limit) : spg2xx_io_device(mconfig, type, tag, owner, clock) { } @@ -275,28 +275,28 @@ class spg24x_io_device : public spg2xx_io_device { public: template <typename T, typename U> - spg24x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&screen_tag) + spg24x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&screen_tag) : spg24x_io_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward<T>(cpu_tag)); m_screen.set_tag(std::forward<U>(screen_tag)); } - spg24x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg24x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class spg28x_io_device : public spg2xx_io_device { public: template <typename T, typename U> - spg28x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&screen_tag) + spg28x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&screen_tag) : spg28x_io_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward<T>(cpu_tag)); m_screen.set_tag(std::forward<U>(screen_tag)); } - spg28x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg28x_io_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void io_extended_w(offs_t offset, uint16_t data) override; }; diff --git a/src/devices/machine/spg2xx_sysdma.cpp b/src/devices/machine/spg2xx_sysdma.cpp index d48eee75fdf..14c65dd0be9 100644 --- a/src/devices/machine/spg2xx_sysdma.cpp +++ b/src/devices/machine/spg2xx_sysdma.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SPG2XX_SYSDMA, spg2xx_sysdma_device, "spg2xx_sysdma", "SPG240 -spg2xx_sysdma_device::spg2xx_sysdma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +spg2xx_sysdma_device::spg2xx_sysdma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, SPG2XX_SYSDMA, tag, owner, clock) , m_cpu(*this, finder_base::DUMMY_TAG) { diff --git a/src/devices/machine/spg2xx_sysdma.h b/src/devices/machine/spg2xx_sysdma.h index 3264d97ce66..4ba4e85410d 100644 --- a/src/devices/machine/spg2xx_sysdma.h +++ b/src/devices/machine/spg2xx_sysdma.h @@ -20,13 +20,13 @@ class spg2xx_sysdma_device : public device_t { public: template <typename T> - spg2xx_sysdma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + spg2xx_sysdma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : spg2xx_sysdma_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward<T>(cpu_tag)); } - spg2xx_sysdma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg2xx_sysdma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint16_t dma_r(offs_t offset); void dma_w(offs_t offset, uint16_t data); diff --git a/src/devices/machine/spg2xx_video.cpp b/src/devices/machine/spg2xx_video.cpp index b8d9fa2d22d..b894d3f7300 100644 --- a/src/devices/machine/spg2xx_video.cpp +++ b/src/devices/machine/spg2xx_video.cpp @@ -26,7 +26,7 @@ DEFINE_DEVICE_TYPE(SPG24X_VIDEO, spg24x_video_device, "spg24x_video", "SPG240-se #define VIDEO_IRQ_ENABLE m_video_regs[0x62] #define VIDEO_IRQ_STATUS m_video_regs[0x63] -spg2xx_video_device::spg2xx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +spg2xx_video_device::spg2xx_video_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_guny_in(*this), m_gunx_in(*this), @@ -42,7 +42,7 @@ spg2xx_video_device::spg2xx_video_device(const machine_config &mconfig, device_t { } -spg24x_video_device::spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg24x_video_device::spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg2xx_video_device(mconfig, SPG24X_VIDEO, tag, owner, clock) { } @@ -479,5 +479,5 @@ TIMER_CALLBACK_MEMBER(spg2xx_video_device::screenpos_hit) void spg2xx_video_device::device_add_mconfig(machine_config &config) { - SPG_RENDERER(config, m_renderer, 0); + SPG_RENDERER(config, m_renderer); } diff --git a/src/devices/machine/spg2xx_video.h b/src/devices/machine/spg2xx_video.h index b484c42d1af..eca0e9ae960 100644 --- a/src/devices/machine/spg2xx_video.h +++ b/src/devices/machine/spg2xx_video.h @@ -18,7 +18,7 @@ class spg2xx_video_device : public device_t { public: - spg2xx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spg2xx_video_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); auto guny_in() { return m_guny_in.bind(); } auto gunx_in() { return m_gunx_in.bind(); } @@ -65,14 +65,14 @@ class spg24x_video_device : public spg2xx_video_device { public: template <typename T, typename U> - spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag, U &&screen_tag) + spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag, U &&screen_tag) : spg24x_video_device(mconfig, tag, owner, clock) { m_cpu.set_tag(std::forward<T>(cpu_tag)); m_screen.set_tag(std::forward<U>(screen_tag)); } - spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg24x_video_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(SPG24X_VIDEO, spg24x_video_device) diff --git a/src/devices/machine/spg_renderer.cpp b/src/devices/machine/spg_renderer.cpp index 6dd526a902a..a0a127ecf5d 100644 --- a/src/devices/machine/spg_renderer.cpp +++ b/src/devices/machine/spg_renderer.cpp @@ -6,13 +6,13 @@ DEFINE_DEVICE_TYPE(SPG_RENDERER, spg_renderer_device, "spg_renderer", "SunPlus / GeneralPlus video rendering") -spg_renderer_device::spg_renderer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +spg_renderer_device::spg_renderer_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_space_read_cb(*this) { } -spg_renderer_device::spg_renderer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spg_renderer_device::spg_renderer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spg_renderer_device(mconfig, SPG_RENDERER, tag, owner, clock) { } diff --git a/src/devices/machine/spg_renderer.h b/src/devices/machine/spg_renderer.h index 23a6a515106..0b04252981a 100644 --- a/src/devices/machine/spg_renderer.h +++ b/src/devices/machine/spg_renderer.h @@ -11,8 +11,8 @@ class spg_renderer_device : public device_t { public: - spg_renderer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - spg_renderer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spg_renderer_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); + spg_renderer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void draw_sprites(bool read_from_csspace, int extended_sprites_mode, bool alt_extrasprite_hack, uint32_t palbank, bool highres, const rectangle& cliprect, uint32_t scanline, int priority, uint32_t spritegfxdata_addr, address_space& spc, uint16_t* paletteram, uint16_t* spriteram, int sprlimit); void draw_page(bool read_from_csspace, bool has_extended_tilemaps, bool use_alt_tile_addressing, uint32_t palbank, const rectangle& cliprect, uint32_t scanline, int priority, uint32_t tilegfxdata_addr, uint16_t* scrollregs, uint16_t* tilemapregs, address_space& spc, uint16_t* paletteram, uint16_t* scrollram, uint32_t which); diff --git a/src/devices/machine/spi_sdcard.cpp b/src/devices/machine/spi_sdcard.cpp index 9166cf8be64..1a36a13c9dc 100644 --- a/src/devices/machine/spi_sdcard.cpp +++ b/src/devices/machine/spi_sdcard.cpp @@ -44,7 +44,7 @@ static constexpr u8 DATA_RESPONSE_IO_ERROR = 0x0d; DEFINE_DEVICE_TYPE(SPI_SDCARD, spi_sdcard_sdhc_device, "spi_sdhccard", "SDHC Card (SPI Interface)") DEFINE_DEVICE_TYPE(SPI_SDCARDV2, spi_sdcard_sdv2_device, "spi_sdv2card", "SDV2 Card (SPI Interface)") -spi_sdcard_device::spi_sdcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +spi_sdcard_device::spi_sdcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), write_miso(*this), m_image(*this, "image"), @@ -57,13 +57,13 @@ spi_sdcard_device::spi_sdcard_device(const machine_config &mconfig, device_type { } -spi_sdcard_sdv2_device::spi_sdcard_sdv2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spi_sdcard_sdv2_device::spi_sdcard_sdv2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spi_sdcard_device(mconfig, SPI_SDCARDV2, tag, owner, clock) { m_type = SD_TYPE_V2; } -spi_sdcard_sdhc_device::spi_sdcard_sdhc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +spi_sdcard_sdhc_device::spi_sdcard_sdhc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : spi_sdcard_device(mconfig, SPI_SDCARD, tag, owner, clock) { m_type = SD_TYPE_HC; diff --git a/src/devices/machine/spi_sdcard.h b/src/devices/machine/spi_sdcard.h index 4aa81078685..3ca1be1d68e 100644 --- a/src/devices/machine/spi_sdcard.h +++ b/src/devices/machine/spi_sdcard.h @@ -27,7 +27,7 @@ protected: SD_TYPE_HC }; - spi_sdcard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + spi_sdcard_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; @@ -82,13 +82,13 @@ private: class spi_sdcard_sdhc_device : public spi_sdcard_device { public: - spi_sdcard_sdhc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spi_sdcard_sdhc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class spi_sdcard_sdv2_device : public spi_sdcard_device { public: - spi_sdcard_sdv2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + spi_sdcard_sdv2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(SPI_SDCARD, spi_sdcard_sdhc_device) diff --git a/src/devices/machine/steppers.cpp b/src/devices/machine/steppers.cpp index 98e67916f01..d6ab72da3a2 100644 --- a/src/devices/machine/steppers.cpp +++ b/src/devices/machine/steppers.cpp @@ -44,12 +44,12 @@ DEFINE_DEVICE_TYPE(STEPPER, stepper_device, "stepper", "Stepper Motor") DEFINE_DEVICE_TYPE(REEL, reel_device, "reel", "Fruit Machine Reel") -stepper_device::stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +stepper_device::stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : stepper_device(mconfig, STEPPER, tag, owner, clock) { } -stepper_device::stepper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +stepper_device::stepper_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_max_steps(48*2) , m_optic_cb(*this) @@ -509,7 +509,7 @@ reel_device::reel_device(const machine_config &mconfig, const char *tag, device_ } /////////////////////////////////////////////////////////////////////////// -reel_device::reel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +reel_device::reel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : stepper_device(mconfig, REEL, tag, owner, clock) { } diff --git a/src/devices/machine/steppers.h b/src/devices/machine/steppers.h index 3a07de01d62..dedfe94c838 100644 --- a/src/devices/machine/steppers.h +++ b/src/devices/machine/steppers.h @@ -40,12 +40,12 @@ class stepper_device : public device_t { public: stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint8_t init_phase) - : stepper_device(mconfig, tag, owner, (uint32_t)0) + : stepper_device(mconfig, tag, owner) { set_init_phase(init_phase); } - stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + stepper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto optic_handler() { return m_optic_cb.bind(); } @@ -77,7 +77,7 @@ public: int get_max() { return m_max_steps; } protected: - stepper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + stepper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // device-level overrides virtual void device_start() override; @@ -107,7 +107,7 @@ public: reel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint8_t type, int16_t start_index, int16_t end_index , int16_t index_pattern, uint8_t init_phase, int16_t max_steps = 48*2); - reel_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + reel_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/machine/strata.cpp b/src/devices/machine/strata.cpp index 15841fe4597..437bd7558ee 100644 --- a/src/devices/machine/strata.cpp +++ b/src/devices/machine/strata.cpp @@ -45,7 +45,7 @@ DEFINE_DEVICE_TYPE(STRATAFLASH, strataflash_device, "strataflash", "Intel 28F640J5") -strataflash_device::strataflash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +strataflash_device::strataflash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, STRATAFLASH, tag, owner, clock) , device_nvram_interface(mconfig, *this) { diff --git a/src/devices/machine/strata.h b/src/devices/machine/strata.h index 0c6f487c50e..8fed63319bf 100644 --- a/src/devices/machine/strata.h +++ b/src/devices/machine/strata.h @@ -9,7 +9,7 @@ class strataflash_device : public device_t, public device_nvram_interface { public: - strataflash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + strataflash_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // 8-bit access uint8_t read8(offs_t offset); diff --git a/src/devices/machine/stvcd.cpp b/src/devices/machine/stvcd.cpp index 23720aa1277..4e29146e141 100644 --- a/src/devices/machine/stvcd.cpp +++ b/src/devices/machine/stvcd.cpp @@ -85,7 +85,7 @@ DASM notes: DEFINE_DEVICE_TYPE(STVCD, stvcd_device, "stvcd", "Sega Saturn/ST-V CD Block HLE") -stvcd_device::stvcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +stvcd_device::stvcd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, STVCD, tag, owner, clock) , device_mixer_interface(mconfig, *this, 2) , device_memory_interface(mconfig, *this) diff --git a/src/devices/machine/stvcd.h b/src/devices/machine/stvcd.h index 78ad1392c24..509b00c4439 100644 --- a/src/devices/machine/stvcd.h +++ b/src/devices/machine/stvcd.h @@ -20,7 +20,7 @@ class stvcd_device : public device_t, static constexpr uint32_t MAX_DIR_SIZE = 256*1024; public: - stvcd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + stvcd_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t stvcd_r(offs_t offset, uint32_t mem_mask = ~0); void stvcd_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/devices/machine/sun4c_mmu.cpp b/src/devices/machine/sun4c_mmu.cpp index 91686a42fdf..6b78d0b495f 100644 --- a/src/devices/machine/sun4c_mmu.cpp +++ b/src/devices/machine/sun4c_mmu.cpp @@ -49,7 +49,7 @@ static FILE* s_mem_log = nullptr; #define VERBOSE (0) #include "logmacro.h" -sun4_mmu_base_device::sun4_mmu_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +sun4_mmu_base_device::sun4_mmu_base_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_cpu(*this, finder_base::DUMMY_TAG) , m_ram(*this, finder_base::DUMMY_TAG) @@ -71,12 +71,12 @@ sun4_mmu_base_device::sun4_mmu_base_device(const machine_config &mconfig, device { } -sun4_mmu_device::sun4_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sun4_mmu_device::sun4_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sun4_mmu_base_device(mconfig, SUN4_MMU, tag, owner, clock, 7, 0x7f, 0x7ff, 11, 0x1f, 0x7ffff, 0xfff) { } -sun4c_mmu_device::sun4c_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +sun4c_mmu_device::sun4c_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : sun4_mmu_base_device(mconfig, SUN4C_MMU, tag, owner, clock, 7, 0x7f, 0x3ff, 10, 0x3f, 0xffff, 0x3fff) { } diff --git a/src/devices/machine/sun4c_mmu.h b/src/devices/machine/sun4c_mmu.h index bd9b1201fbf..3ba13fbff97 100644 --- a/src/devices/machine/sun4c_mmu.h +++ b/src/devices/machine/sun4c_mmu.h @@ -20,7 +20,7 @@ class sun4_mmu_base_device : public device_t, public sparc_mmu_interface { public: - sun4_mmu_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock + sun4_mmu_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock , uint8_t ctx_mask, uint8_t pmeg_mask, uint32_t page_mask, uint32_t seg_entry_shift, uint32_t seg_entry_mask , uint32_t page_entry_mask, uint32_t cache_mask) : sun4_mmu_base_device(mconfig, type, tag, owner, clock) @@ -105,7 +105,7 @@ public: void hw_flush_all_w(uint32_t offset, uint32_t data, uint32_t mem_mask); protected: - sun4_mmu_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + sun4_mmu_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); struct page_entry { @@ -225,13 +225,13 @@ protected: class sun4_mmu_device : public sun4_mmu_base_device { public: - sun4_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sun4_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class sun4c_mmu_device : public sun4_mmu_base_device { public: - sun4c_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + sun4c_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(SUN4_MMU, sun4_mmu_device) diff --git a/src/devices/machine/swim1.cpp b/src/devices/machine/swim1.cpp index 2d0adc04c60..9a66f991641 100644 --- a/src/devices/machine/swim1.cpp +++ b/src/devices/machine/swim1.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(SWIM1, swim1_device, "swim1", "Apple SWIM1 (Sander/Wozniak Integrated Machine) version 1 floppy controller") -swim1_device::swim1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +swim1_device::swim1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : applefdintf_device(mconfig, SWIM1, tag, owner, clock), m_floppy(nullptr), m_timer(nullptr) diff --git a/src/devices/machine/swim1.h b/src/devices/machine/swim1.h index dd0b372d54f..0c515ff5fe6 100644 --- a/src/devices/machine/swim1.h +++ b/src/devices/machine/swim1.h @@ -22,7 +22,7 @@ class swim1_device : public applefdintf_device { public: // construction/destruction - swim1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + swim1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read(offs_t offset) override; virtual void write(offs_t offset, u8 data) override; diff --git a/src/devices/machine/swim2.cpp b/src/devices/machine/swim2.cpp index d1834aad676..9181a2311ae 100644 --- a/src/devices/machine/swim2.cpp +++ b/src/devices/machine/swim2.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(SWIM2, swim2_device, "swim2", "Apple SWIM2 (Sander/Wozniak Integrated Machine) version 2 floppy controller") -swim2_device::swim2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +swim2_device::swim2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : applefdintf_device(mconfig, SWIM2, tag, owner, clock), m_floppy(nullptr) { diff --git a/src/devices/machine/swim2.h b/src/devices/machine/swim2.h index bab440e4ec9..edcea871909 100644 --- a/src/devices/machine/swim2.h +++ b/src/devices/machine/swim2.h @@ -23,7 +23,7 @@ class swim2_device : public applefdintf_device { public: // construction/destruction - swim2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + swim2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u8 read(offs_t offset) override; virtual void write(offs_t offset, u8 data) override; diff --git a/src/devices/machine/swim3.cpp b/src/devices/machine/swim3.cpp index 6c93ee6b0c4..5e4db4bc62d 100644 --- a/src/devices/machine/swim3.cpp +++ b/src/devices/machine/swim3.cpp @@ -11,7 +11,7 @@ DEFINE_DEVICE_TYPE(SWIM3, swim3_device, "swim3", "Apple SWIM3 (Sander/Wozniak Integrated Machine) version 3 floppy controller") -swim3_device::swim3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +swim3_device::swim3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : applefdintf_device(mconfig, SWIM3, tag, owner, clock), m_irq_cb(*this), m_drq_cb(*this) diff --git a/src/devices/machine/swim3.h b/src/devices/machine/swim3.h index 61e280850e0..3bbfcda44ee 100644 --- a/src/devices/machine/swim3.h +++ b/src/devices/machine/swim3.h @@ -22,7 +22,7 @@ class swim3_device : public applefdintf_device { public: // construction/destruction - swim3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + swim3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto irq_cb() { return m_irq_cb.bind(); } auto drq_cb() { return m_drq_cb.bind(); } diff --git a/src/devices/machine/swtpc8212.cpp b/src/devices/machine/swtpc8212.cpp index 4d214e43175..1870d4424e7 100644 --- a/src/devices/machine/swtpc8212.cpp +++ b/src/devices/machine/swtpc8212.cpp @@ -141,7 +141,7 @@ swtp|ct8212|southwest technical products ct8212, #include "screen.h" #include "speaker.h" -swtpc8212_device::swtpc8212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +swtpc8212_device::swtpc8212_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_maincpu(*this, "maincpu") , m_pia0(*this, "pia0") @@ -163,7 +163,7 @@ swtpc8212_device::swtpc8212_device(const machine_config &mconfig, device_type ty { } -swtpc8212_device::swtpc8212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +swtpc8212_device::swtpc8212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : swtpc8212_device(mconfig, SWTPC8212, tag, owner, clock) { } @@ -547,14 +547,14 @@ void swtpc8212_device::device_add_mconfig(machine_config &config) m_crtc->set_show_border_area(false); m_crtc->set_update_row_callback(FUNC(swtpc8212_device::update_row)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard", 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, "keyboard")); keyboard.set_keyboard_callback(FUNC(swtpc8212_device::keyboard_put)); SPEAKER(config, "bell").front_center(); - BEEP(config, m_beeper, 2000); + BEEP(config, m_beeper, XTAL::u(2000)); m_beeper->add_route(ALL_OUTPUTS, "bell", 0.25); - PRINTER(config, m_printer, 0); + PRINTER(config, m_printer); } ioport_constructor swtpc8212_device::device_input_ports() const diff --git a/src/devices/machine/swtpc8212.h b/src/devices/machine/swtpc8212.h index 0d363860c14..4107ce359ba 100644 --- a/src/devices/machine/swtpc8212.h +++ b/src/devices/machine/swtpc8212.h @@ -19,7 +19,7 @@ INPUT_PORTS_EXTERN(swtpc8212); class swtpc8212_device : public device_t { public: - swtpc8212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + swtpc8212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_INPUT_CHANGED_MEMBER(keypad_changed); @@ -34,7 +34,7 @@ public: void rs232_conn_rxd_w(int state); protected: - swtpc8212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + swtpc8212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; virtual void device_start() override; diff --git a/src/devices/machine/tc009xlvc.cpp b/src/devices/machine/tc009xlvc.cpp index 8d4b762f53a..363cc9cb7cf 100644 --- a/src/devices/machine/tc009xlvc.cpp +++ b/src/devices/machine/tc009xlvc.cpp @@ -109,12 +109,12 @@ void tc0090lvc_device::vram_map(address_map &map) map(0x080000, 0x0801ff).ram().mirror(0x00e00).w("palette", FUNC(palette_device::write8)).share("palette"); } -tc0090lvc_device::tc0090lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tc0090lvc_device::tc0090lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tc0090lvc_device(mconfig, TC0090LVC, tag, owner, clock) { } -tc0090lvc_device::tc0090lvc_device(const machine_config &mconfig, device_type &type, const char *tag, device_t *owner, u32 clock) +tc0090lvc_device::tc0090lvc_device(const machine_config &mconfig, device_type &type, const char *tag, device_t *owner, const XTAL &clock) : z80_device(mconfig, type, tag, owner, clock) , device_gfx_interface(mconfig, *this, gfxinfo, "palette") , m_program_space_config("program", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(tc0090lvc_device::cpu_map), this)) @@ -132,7 +132,7 @@ tc0090lvc_device::tc0090lvc_device(const machine_config &mconfig, device_type &t { } -tc0091lvc_device::tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tc0091lvc_device::tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tc0090lvc_device(mconfig, TC0091LVC, tag, owner, clock) { } diff --git a/src/devices/machine/tc009xlvc.h b/src/devices/machine/tc009xlvc.h index c4be5989a78..2123ed2bb1b 100644 --- a/src/devices/machine/tc009xlvc.h +++ b/src/devices/machine/tc009xlvc.h @@ -19,7 +19,7 @@ class tc0090lvc_device : public z80_device, public device_gfx_interface public: typedef device_delegate<void (u32 &code)> tc009xlvc_cb_delegate; - tc0090lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tc0090lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration template <typename... T> void set_tile_callback(T &&... args) { m_tile_cb.set(std::forward<T>(args)...); } @@ -54,7 +54,7 @@ public: void cpu_map(address_map &map); protected: - tc0090lvc_device(const machine_config &mconfig, device_type &type, const char *tag, device_t *owner, u32 clock); + tc0090lvc_device(const machine_config &mconfig, device_type &type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -123,7 +123,7 @@ protected: class tc0091lvc_device : public tc0090lvc_device { public: - tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) override; virtual void screen_eof() override; diff --git a/src/devices/machine/tdc1008.cpp b/src/devices/machine/tdc1008.cpp index 33966e08063..58d7b0a4f36 100644 --- a/src/devices/machine/tdc1008.cpp +++ b/src/devices/machine/tdc1008.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(TDC1008, tdc1008_device, "tdc1008", "TRW TDC1008 Multiplier-A // tdc1008_device - constructor //------------------------------------------------- -tdc1008_device::tdc1008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tdc1008_device::tdc1008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TDC1008, tag, owner, clock) , m_x_in(0) , m_y_in(0) diff --git a/src/devices/machine/tdc1008.h b/src/devices/machine/tdc1008.h index dcb8d21c9d5..8760d212824 100644 --- a/src/devices/machine/tdc1008.h +++ b/src/devices/machine/tdc1008.h @@ -22,7 +22,7 @@ class tdc1008_device : public device_t { public: // construction/destruction - tdc1008_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tdc1008_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void x_w(uint8_t data); void y_w(uint8_t data); diff --git a/src/devices/machine/te7750.cpp b/src/devices/machine/te7750.cpp index 540b3b27cf5..4b96ddd9cad 100644 --- a/src/devices/machine/te7750.cpp +++ b/src/devices/machine/te7750.cpp @@ -188,7 +188,7 @@ DEFINE_DEVICE_TYPE(TE7752, te7752_device, "te7752", "TE7752 Super I/O Expander") // te7750_device - constructor //------------------------------------------------- -te7750_device::te7750_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +te7750_device::te7750_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_input_cb(*this) , m_output_cb(*this) @@ -197,7 +197,7 @@ te7750_device::te7750_device(const machine_config &mconfig, device_type type, co std::fill(std::begin(m_data_dir), std::end(m_data_dir), 0xff); } -te7750_device::te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +te7750_device::te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : te7750_device(mconfig, TE7750, tag, owner, clock) { } @@ -206,7 +206,7 @@ te7750_device::te7750_device(const machine_config &mconfig, const char *tag, dev // te7751_device - constructor //------------------------------------------------- -te7751_device::te7751_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +te7751_device::te7751_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : te7750_device(mconfig, TE7751, tag, owner, clock) { } @@ -215,7 +215,7 @@ te7751_device::te7751_device(const machine_config &mconfig, const char *tag, dev // te7752_device - constructor //------------------------------------------------- -te7752_device::te7752_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +te7752_device::te7752_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : te7750_device(mconfig, TE7752, tag, owner, clock) { } diff --git a/src/devices/machine/te7750.h b/src/devices/machine/te7750.h index 8417fbce51a..cd79352cefe 100644 --- a/src/devices/machine/te7750.h +++ b/src/devices/machine/te7750.h @@ -22,7 +22,7 @@ class te7750_device : public device_t { public: // construction/destruction - te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration auto in_port1_cb() { return m_input_cb[0].bind(); } @@ -50,7 +50,7 @@ public: void write(offs_t offset, u8 data); protected: - te7750_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + te7750_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 @@ private: class te7751_device : public te7750_device { public: - te7751_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + te7751_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // ======================> te7752_device @@ -86,7 +86,7 @@ public: class te7752_device : public te7750_device { public: - te7752_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + te7752_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // device type definitions diff --git a/src/devices/machine/terminal.cpp b/src/devices/machine/terminal.cpp index fc1b5cf3092..0d173723a8b 100644 --- a/src/devices/machine/terminal.cpp +++ b/src/devices/machine/terminal.cpp @@ -143,7 +143,7 @@ static const uint8_t terminal_font[256*16] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -generic_terminal_device::generic_terminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, unsigned w, unsigned h) +generic_terminal_device::generic_terminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, unsigned w, unsigned h) : device_t(mconfig, type, tag, owner, clock) , m_io_term_conf(*this, "TERM_CONF") , m_width(w) @@ -158,7 +158,7 @@ generic_terminal_device::generic_terminal_device(const machine_config &mconfig, { } -generic_terminal_device::generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +generic_terminal_device::generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : generic_terminal_device(mconfig, GENERIC_TERMINAL, tag, owner, clock, TERMINAL_WIDTH, TERMINAL_HEIGHT) { } @@ -335,11 +335,11 @@ void generic_terminal_device::device_add_mconfig(machine_config &config) screen.set_visarea(0, generic_terminal_device::TERMINAL_WIDTH*8-1, 0, generic_terminal_device::TERMINAL_HEIGHT*10-1); screen.set_screen_update(FUNC(generic_terminal_device::update)); - generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, KEYBOARD_TAG, 0)); + generic_keyboard_device &keyboard(GENERIC_KEYBOARD(config, KEYBOARD_TAG)); keyboard.set_keyboard_callback(FUNC(generic_terminal_device::kbd_put)); SPEAKER(config, "bell").front_center(); - BEEP(config, m_beeper, 2'000); + BEEP(config, m_beeper, XTAL::u(2'000)); m_beeper->add_route(ALL_OUTPUTS, "bell", 0.25); } diff --git a/src/devices/machine/terminal.h b/src/devices/machine/terminal.h index 5ebf1468b22..257c66f9f86 100644 --- a/src/devices/machine/terminal.h +++ b/src/devices/machine/terminal.h @@ -21,7 +21,7 @@ INPUT_PORTS_EXTERN( generic_terminal ); class generic_terminal_device : public device_t { public: - generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename... T> void set_keyboard_callback(T &&... args) @@ -34,7 +34,7 @@ public: void kbd_put(u8 data); protected: - generic_terminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, unsigned w, unsigned h); + generic_terminal_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, unsigned w, unsigned h); virtual void term_write(uint8_t data); virtual void device_start() override; diff --git a/src/devices/machine/ticket.cpp b/src/devices/machine/ticket.cpp index cdc0385827d..2dcfbdac6e0 100644 --- a/src/devices/machine/ticket.cpp +++ b/src/devices/machine/ticket.cpp @@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(HOPPER, hopper_device, "coin_hopper", "Coin Hopper") // ticket_dispenser_device - constructor //------------------------------------------------- -ticket_dispenser_device::ticket_dispenser_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +ticket_dispenser_device::ticket_dispenser_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_motor_sense(TICKET_MOTOR_ACTIVE_LOW) , m_status_sense(TICKET_STATUS_ACTIVE_LOW) @@ -58,12 +58,12 @@ ticket_dispenser_device::ticket_dispenser_device(const machine_config &mconfig, { } -ticket_dispenser_device::ticket_dispenser_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ticket_dispenser_device::ticket_dispenser_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ticket_dispenser_device(mconfig, TICKET_DISPENSER, tag, owner, clock) { } -hopper_device::hopper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hopper_device::hopper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ticket_dispenser_device(mconfig, HOPPER, tag, owner, clock) { } diff --git a/src/devices/machine/ticket.h b/src/devices/machine/ticket.h index ac1cd01c029..fc4d45f4674 100644 --- a/src/devices/machine/ticket.h +++ b/src/devices/machine/ticket.h @@ -49,7 +49,7 @@ public: set_period(period); set_senses(motor_sense, status_sense, false); } - ticket_dispenser_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ticket_dispenser_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual ~ticket_dispenser_device(); // inline configuration helpers @@ -68,7 +68,7 @@ public: DECLARE_WRITE_LINE_MEMBER( motor_w ); protected: - ticket_dispenser_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + ticket_dispenser_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // device-level overrides virtual void device_start() override; @@ -104,10 +104,7 @@ public: set_period(period); set_senses(motor_sense, status_sense, true); } - hopper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - -private: - + hopper_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; #endif // MAME_MACHINE_TICKET_H diff --git a/src/devices/machine/timekpr.cpp b/src/devices/machine/timekpr.cpp index 5825aa72100..7f21a6b76c0 100644 --- a/src/devices/machine/timekpr.cpp +++ b/src/devices/machine/timekpr.cpp @@ -88,7 +88,7 @@ inline int counter_from_ram(u8 const *data, s32 offset, u8 unmap = 0) // timekeeper_device_config - constructor //------------------------------------------------- -timekeeper_device::timekeeper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 size) +timekeeper_device::timekeeper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 size) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_reset_cb(*this) @@ -98,7 +98,7 @@ timekeeper_device::timekeeper_device(const machine_config &mconfig, device_type { } -m48t02_device::m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m48t02_device::m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timekeeper_device(mconfig, M48T02, tag, owner, clock, 0x800) { m_offset_watchdog = -1; @@ -114,7 +114,7 @@ m48t02_device::m48t02_device(const machine_config &mconfig, const char *tag, dev m_offset_flags = -1; } -m48t35_device::m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m48t35_device::m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timekeeper_device(mconfig, M48T35, tag, owner, clock, 0x8000) { m_offset_watchdog = -1; @@ -130,7 +130,7 @@ m48t35_device::m48t35_device(const machine_config &mconfig, const char *tag, dev m_offset_flags = -1; } -m48t37_device::m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m48t37_device::m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timekeeper_device(mconfig, M48T37, tag, owner, clock, 0x8000) { m_offset_watchdog = 0x7ff7; @@ -146,7 +146,7 @@ m48t37_device::m48t37_device(const machine_config &mconfig, const char *tag, dev m_offset_flags = 0x7ff0; } -m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timekeeper_device(mconfig, M48T58, tag, owner, clock, 0x2000) { m_offset_watchdog = -1; @@ -162,7 +162,7 @@ m48t58_device::m48t58_device(const machine_config &mconfig, const char *tag, dev m_offset_flags = -1; } -mk48t08_device::mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mk48t08_device::mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timekeeper_device(mconfig, MK48T08, tag, owner, clock, 0x2000) { m_offset_watchdog = -1; @@ -178,7 +178,7 @@ mk48t08_device::mk48t08_device(const machine_config &mconfig, const char *tag, d m_offset_flags = 0x1ff0; } -mk48t12_device::mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +mk48t12_device::mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : timekeeper_device(mconfig, MK48T12, tag, owner, clock, 0x800) { m_offset_watchdog = -1; diff --git a/src/devices/machine/timekpr.h b/src/devices/machine/timekpr.h index 9d6d04fafb4..e61adf8e578 100644 --- a/src/devices/machine/timekpr.h +++ b/src/devices/machine/timekpr.h @@ -41,7 +41,7 @@ public: protected: // construction/destruction - timekeeper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 size); + timekeeper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 size); // device-level overrides virtual void device_start() override; @@ -95,37 +95,37 @@ protected: class m48t02_device : public timekeeper_device { public: - m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + m48t02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class m48t35_device : public timekeeper_device { public: - m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + m48t35_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class m48t37_device : public timekeeper_device { public: - m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + m48t37_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class m48t58_device : public timekeeper_device { public: - m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + m48t58_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class mk48t08_device : public timekeeper_device { public: - mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mk48t08_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class mk48t12_device : public timekeeper_device { public: - mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + mk48t12_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; // device type definition diff --git a/src/devices/machine/timer.cpp b/src/devices/machine/timer.cpp index 67621f1085f..871cb3ff87c 100644 --- a/src/devices/machine/timer.cpp +++ b/src/devices/machine/timer.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(TIMER, timer_device, "timer", "Timer") // timer_device - constructor //------------------------------------------------- -timer_device::timer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +timer_device::timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TIMER, tag, owner, clock), m_type(TIMER_TYPE_GENERIC), m_callback(*this), diff --git a/src/devices/machine/timer.h b/src/devices/machine/timer.h index 2c138a1565c..aca06860c77 100644 --- a/src/devices/machine/timer.h +++ b/src/devices/machine/timer.h @@ -35,7 +35,7 @@ public: typedef device_delegate<void (timer_device &, s32)> expired_delegate; // construction/destruction - timer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers template <typename... T> void configure_generic(T &&... args) diff --git a/src/devices/machine/tmc0430.cpp b/src/devices/machine/tmc0430.cpp index 76e53c88ded..89505b39ac1 100644 --- a/src/devices/machine/tmc0430.cpp +++ b/src/devices/machine/tmc0430.cpp @@ -107,7 +107,7 @@ /* Constructor. */ -tmc0430_device::tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tmc0430_device::tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMC0430, tag, owner, clock), m_gromready(*this), m_current_clock_level(CLEAR_LINE), diff --git a/src/devices/machine/tmc0430.h b/src/devices/machine/tmc0430.h index 09800f2f514..b934cbc6823 100644 --- a/src/devices/machine/tmc0430.h +++ b/src/devices/machine/tmc0430.h @@ -28,12 +28,12 @@ class tmc0430_device : public device_t { public: tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, const char *regionname, int offset, int ident) : - tmc0430_device(mconfig, tag, owner, 0) + tmc0430_device(mconfig, tag, owner) { set_region_and_ident(regionname, offset, ident); } - tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmc0430_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto ready_cb() { return m_gromready.bind(); } diff --git a/src/devices/machine/tmc0999.cpp b/src/devices/machine/tmc0999.cpp index e270e871524..456d212b672 100644 --- a/src/devices/machine/tmc0999.cpp +++ b/src/devices/machine/tmc0999.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(TMC0999, tmc0999_device, "tmc0999", "TI TMC0999 RAM") // constructor //------------------------------------------------- -tmc0999_device::tmc0999_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +tmc0999_device::tmc0999_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMC0999, tag, owner, clock) { } diff --git a/src/devices/machine/tmc0999.h b/src/devices/machine/tmc0999.h index 24305b8d8ee..df5766cb27b 100644 --- a/src/devices/machine/tmc0999.h +++ b/src/devices/machine/tmc0999.h @@ -27,7 +27,7 @@ quick pinout reference (18-pin DIP) class tmc0999_device : public device_t { public: - tmc0999_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + tmc0999_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void di_w(u8 data); u8 do_r(); diff --git a/src/devices/machine/tmc208k.cpp b/src/devices/machine/tmc208k.cpp index fe275fd693c..52e1c31d241 100644 --- a/src/devices/machine/tmc208k.cpp +++ b/src/devices/machine/tmc208k.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(TMC28KU, tmc28ku_device, "tmc28ku", "TRW TMC28KU 8x8-bit Mult //------------------------------------------------- template <typename RegType, typename OutType> -tmc208_base_device<RegType, OutType>::tmc208_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +tmc208_base_device<RegType, OutType>::tmc208_base_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_a_in(0) , m_a(0) @@ -44,12 +44,12 @@ tmc208_base_device<RegType, OutType>::tmc208_base_device(const machine_config &m { } -tmc208k_device::tmc208k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmc208k_device::tmc208k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tmc208_base_device<int8_t, int16_t>(mconfig, TMC208K, tag, owner, clock) { } -tmc28ku_device::tmc28ku_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmc28ku_device::tmc28ku_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tmc208_base_device<uint8_t, uint16_t>(mconfig, TMC28KU, tag, owner, clock) { } diff --git a/src/devices/machine/tmc208k.h b/src/devices/machine/tmc208k.h index eb077934eb2..29ececfe8b0 100644 --- a/src/devices/machine/tmc208k.h +++ b/src/devices/machine/tmc208k.h @@ -26,7 +26,7 @@ class tmc208_base_device : public device_t { public: // construction/destruction - tmc208_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0); + tmc208_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock = XTAL()); void a_w(uint8_t data); void b_w(uint8_t data); @@ -79,7 +79,7 @@ class tmc208k_device : public tmc208_base_device<int8_t, int16_t> { public: // construction/destruction - tmc208k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tmc208k_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; @@ -89,7 +89,7 @@ class tmc28ku_device : public tmc208_base_device<uint8_t, uint16_t> { public: // construction/destruction - tmc28ku_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tmc28ku_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: virtual void clock_b() override; diff --git a/src/devices/machine/tmp68301.cpp b/src/devices/machine/tmp68301.cpp index bd3d2dc06f1..9967ecde7d4 100644 --- a/src/devices/machine/tmp68301.cpp +++ b/src/devices/machine/tmp68301.cpp @@ -134,7 +134,7 @@ void tmp68301_device::icr_w(offs_t offset, uint8_t data) m_icr[offset] = data; } -tmp68301_device::tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tmp68301_device::tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m68000_device(mconfig, TMP68301, tag, owner, clock), m_in_parallel_cb(*this), m_out_parallel_cb(*this), diff --git a/src/devices/machine/tmp68301.h b/src/devices/machine/tmp68301.h index 060519ebd1b..17113306f3c 100644 --- a/src/devices/machine/tmp68301.h +++ b/src/devices/machine/tmp68301.h @@ -19,7 +19,7 @@ class tmp68301_device : public m68000_device { public: - tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tmp68301_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_parallel_callback() { return m_in_parallel_cb.bind(); } auto out_parallel_callback() { return m_out_parallel_cb.bind(); } diff --git a/src/devices/machine/tms1024.cpp b/src/devices/machine/tms1024.cpp index a17fe1811e9..bd067f6aec6 100644 --- a/src/devices/machine/tms1024.cpp +++ b/src/devices/machine/tms1024.cpp @@ -21,7 +21,7 @@ DEFINE_DEVICE_TYPE(TMS1025, tms1025_device, "tms1025", "TMS1025 I/O Expander") // constructor //------------------------------------------------- -tms1024_device::tms1024_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +tms1024_device::tms1024_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_h(0), m_s(0), m_std(0), m_ms(0) , m_read_port(*this) @@ -29,12 +29,12 @@ tms1024_device::tms1024_device(const machine_config &mconfig, device_type type, { } -tms1024_device::tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tms1024_device::tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1024_device(mconfig, TMS1024, tag, owner, clock) { } -tms1025_device::tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tms1025_device::tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms1024_device(mconfig, TMS1025, tag, owner, clock) { } diff --git a/src/devices/machine/tms1024.h b/src/devices/machine/tms1024.h index 49193191bfa..ee61cb7563d 100644 --- a/src/devices/machine/tms1024.h +++ b/src/devices/machine/tms1024.h @@ -57,7 +57,7 @@ public: PORT7 }; - tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + tms1024_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration helpers auto read_port4_callback() { return m_read_port[3].bind(); } @@ -77,7 +77,7 @@ public: void write_ms(int state); protected: - tms1024_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + tms1024_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; @@ -96,7 +96,7 @@ protected: class tms1025_device : public tms1024_device { public: - tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + tms1025_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); auto read_port1_callback() { return m_read_port[0].bind(); } auto read_port2_callback() { return m_read_port[1].bind(); } diff --git a/src/devices/machine/tms5501.cpp b/src/devices/machine/tms5501.cpp index f5844d1c8bf..752466049e3 100644 --- a/src/devices/machine/tms5501.cpp +++ b/src/devices/machine/tms5501.cpp @@ -55,7 +55,7 @@ void tms5501_device::io_map(address_map &map) // tms5501_device - constructor //------------------------------------------------- -tms5501_device::tms5501_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +tms5501_device::tms5501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMS5501, tag, owner, clock), device_serial_interface(mconfig, *this), m_write_int(*this), diff --git a/src/devices/machine/tms5501.h b/src/devices/machine/tms5501.h index e916141d12c..d2a0f23dc2d 100644 --- a/src/devices/machine/tms5501.h +++ b/src/devices/machine/tms5501.h @@ -49,7 +49,7 @@ class tms5501_device : public device_t, { public: // construction/destruction - tms5501_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms5501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto int_callback() { return m_write_int.bind(); } auto xmt_callback() { return m_write_xmt.bind(); } diff --git a/src/devices/machine/tms6100.cpp b/src/devices/machine/tms6100.cpp index 62bfc994b1f..06babec0ef6 100644 --- a/src/devices/machine/tms6100.cpp +++ b/src/devices/machine/tms6100.cpp @@ -30,7 +30,7 @@ DEFINE_DEVICE_TYPE(TMS6100, tms6100_device, "tms6100", "TMS6100 VSM") DEFINE_DEVICE_TYPE(M58819, m58819_device, "m58819s", "M68819S") -tms6100_device::tms6100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) +tms6100_device::tms6100_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_rom(*this, DEVICE_SELF) , m_reverse_bits(false) @@ -38,13 +38,13 @@ tms6100_device::tms6100_device(const machine_config &mconfig, device_type type, { } -tms6100_device::tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +tms6100_device::tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms6100_device(mconfig, TMS6100, tag, owner, clock) { } -m58819_device::m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m58819_device::m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : tms6100_device(mconfig, M58819, tag, owner, clock) { } diff --git a/src/devices/machine/tms6100.h b/src/devices/machine/tms6100.h index b7bfd7b3b45..d2e4da6b162 100644 --- a/src/devices/machine/tms6100.h +++ b/src/devices/machine/tms6100.h @@ -82,7 +82,7 @@ class tms6100_device : public device_t { public: - tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + tms6100_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // 4-bit mode (mask option) // note: in 4-bit mode, use data_r, otherwise use data_line_r @@ -99,7 +99,7 @@ public: int data_line_r(); protected: - tms6100_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + tms6100_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; @@ -131,7 +131,7 @@ protected: class m58819_device : public tms6100_device { public: - m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m58819_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: // device-level overrides diff --git a/src/devices/machine/tms9901.cpp b/src/devices/machine/tms9901.cpp index 6714945fa2a..966562f144b 100644 --- a/src/devices/machine/tms9901.cpp +++ b/src/devices/machine/tms9901.cpp @@ -167,7 +167,7 @@ Clock mode: /* Constructor */ -tms9901_device::tms9901_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9901_device::tms9901_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMS9901, tag, owner, clock), m_int_level(0), m_last_level(0), diff --git a/src/devices/machine/tms9901.h b/src/devices/machine/tms9901.h index 3d4808654a3..064dd01e86f 100644 --- a/src/devices/machine/tms9901.h +++ b/src/devices/machine/tms9901.h @@ -56,7 +56,7 @@ public: P6 } pins; - tms9901_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9901_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_int_line(int pin_number, int state); diff --git a/src/devices/machine/tms9902.cpp b/src/devices/machine/tms9902.cpp index 68c0f671155..cddbe599922 100644 --- a/src/devices/machine/tms9902.cpp +++ b/src/devices/machine/tms9902.cpp @@ -72,7 +72,7 @@ /* Constructor */ -tms9902_device::tms9902_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9902_device::tms9902_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TMS9902, tag, owner, clock) , m_int_cb(*this) , m_rcv_cb(*this) diff --git a/src/devices/machine/tms9902.h b/src/devices/machine/tms9902.h index c784687bbe8..2679f7d1067 100644 --- a/src/devices/machine/tms9902.h +++ b/src/devices/machine/tms9902.h @@ -48,7 +48,7 @@ public: static constexpr unsigned DTR = 0x02; static constexpr unsigned RI = 0x01; - tms9902_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9902_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // Callbacks auto int_cb() { return m_int_cb.bind(); } diff --git a/src/devices/machine/tms9914.cpp b/src/devices/machine/tms9914.cpp index 14cfcb7b039..dec9870d9f9 100644 --- a/src/devices/machine/tms9914.cpp +++ b/src/devices/machine/tms9914.cpp @@ -174,7 +174,7 @@ constexpr uint8_t IFCMD_UNT = 0x5f; // Untalk DEFINE_DEVICE_TYPE(TMS9914, tms9914_device, "tms9914", "TMS9914 GPIB Controller") // Constructors -tms9914_device::tms9914_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tms9914_device::tms9914_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig , TMS9914 , tag , owner , clock), m_dio_read_func(*this), m_dio_write_func(*this), diff --git a/src/devices/machine/tms9914.h b/src/devices/machine/tms9914.h index d67b85de025..4dddcab3dda 100644 --- a/src/devices/machine/tms9914.h +++ b/src/devices/machine/tms9914.h @@ -39,7 +39,7 @@ class tms9914_device : public device_t { public: // construction/destruction - tms9914_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tms9914_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // See ieee488.h enum ieee_488_signal_t { diff --git a/src/devices/machine/tsb12lv01a.cpp b/src/devices/machine/tsb12lv01a.cpp index b893eafeefe..3fd4484d55d 100644 --- a/src/devices/machine/tsb12lv01a.cpp +++ b/src/devices/machine/tsb12lv01a.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(TSB12LV01A, tsb12lv01a_device, "tsb12lv01a", "TSB12LV01A IEEE 1394 Link Controller") -tsb12lv01a_device::tsb12lv01a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tsb12lv01a_device::tsb12lv01a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TSB12LV01A, tag, owner, clock) , m_int_cb(*this) , m_phy_read_cb(*this) diff --git a/src/devices/machine/tsb12lv01a.h b/src/devices/machine/tsb12lv01a.h index 4f47fd31815..57de0b41da9 100644 --- a/src/devices/machine/tsb12lv01a.h +++ b/src/devices/machine/tsb12lv01a.h @@ -17,7 +17,7 @@ class tsb12lv01a_device : public device_t { public: - tsb12lv01a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tsb12lv01a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint32_t read(offs_t offset); void write(offs_t offset, uint32_t data, uint32_t mem_mask); diff --git a/src/devices/machine/tube.cpp b/src/devices/machine/tube.cpp index f16fed18da5..28177c9b1dc 100644 --- a/src/devices/machine/tube.cpp +++ b/src/devices/machine/tube.cpp @@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(TUBE, tube_device, "tube", "Acorn Tube ULA") // bbc_tube_slot_device - constructor //------------------------------------------------- -tube_device::tube_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tube_device::tube_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, TUBE, tag, owner, clock) , m_hirq_handler(*this) , m_pnmi_handler(*this) diff --git a/src/devices/machine/tube.h b/src/devices/machine/tube.h index 079c89cf86d..eb6171c50e5 100644 --- a/src/devices/machine/tube.h +++ b/src/devices/machine/tube.h @@ -24,7 +24,7 @@ class tube_device : public device_t { public: // construction/destruction - tube_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + tube_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // callbacks auto hirq_handler() { return m_hirq_handler.bind(); } diff --git a/src/devices/machine/ucb1200.cpp b/src/devices/machine/ucb1200.cpp index 54e68321523..555959d507f 100644 --- a/src/devices/machine/ucb1200.cpp +++ b/src/devices/machine/ucb1200.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(UCB1200, ucb1200_device, "ucb1200", "Philips UCB1200 modem/audio codec") -ucb1200_device::ucb1200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ucb1200_device::ucb1200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UCB1200, tag, owner, clock) , m_gpio_out(*this) , m_audio_out(*this) diff --git a/src/devices/machine/ucb1200.h b/src/devices/machine/ucb1200.h index 19cf474917b..84f133d25c1 100644 --- a/src/devices/machine/ucb1200.h +++ b/src/devices/machine/ucb1200.h @@ -14,7 +14,7 @@ class ucb1200_device : public device_t { public: - ucb1200_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + ucb1200_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <unsigned Line> auto gpio_out() { return m_gpio_out[Line].bind(); } template <unsigned Line> void gpio_in(int state) { gpio_in((uint16_t)Line, state); } diff --git a/src/devices/machine/upc82c710.cpp b/src/devices/machine/upc82c710.cpp index bf6352a69c7..c3685d3d7a1 100644 --- a/src/devices/machine/upc82c710.cpp +++ b/src/devices/machine/upc82c710.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(UPC82C710, upc82c710_device, "upc82c710", "Universal Peripheral Controller 82C710") -upc82c710_device::upc82c710_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upc82c710_device::upc82c710_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPC82C710, tag, owner, clock) , m_ide(*this, "ide") , m_fdc(*this, "fdc") diff --git a/src/devices/machine/upc82c710.h b/src/devices/machine/upc82c710.h index 7868fec6b2f..966ec12b482 100644 --- a/src/devices/machine/upc82c710.h +++ b/src/devices/machine/upc82c710.h @@ -22,7 +22,7 @@ class upc82c710_device : public device_t { public: // construction/destruction - upc82c710_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upc82c710_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u16 io_r(offs_t offset, u16 mem_mask = ~0); void io_w(offs_t offset, u16 data, u16 mem_mask = ~0); diff --git a/src/devices/machine/upc82c711.cpp b/src/devices/machine/upc82c711.cpp index b162029daa0..33c0bd5391e 100644 --- a/src/devices/machine/upc82c711.cpp +++ b/src/devices/machine/upc82c711.cpp @@ -22,7 +22,7 @@ DEFINE_DEVICE_TYPE(UPC82C711, upc82c711_device, "upc82c711", "Universal Peripheral Controller 82C711") -upc82c711_device::upc82c711_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upc82c711_device::upc82c711_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPC82C711, tag, owner, clock) , m_ide(*this, "ide") , m_fdc(*this, "fdc") diff --git a/src/devices/machine/upc82c711.h b/src/devices/machine/upc82c711.h index 543bb594337..17565f1186d 100644 --- a/src/devices/machine/upc82c711.h +++ b/src/devices/machine/upc82c711.h @@ -24,7 +24,7 @@ class upc82c711_device : public device_t { public: // construction/destruction - upc82c711_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upc82c711_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); u16 io_r(offs_t offset, u16 mem_mask = ~0); void io_w(offs_t offset, u16 data, u16 mem_mask = ~0); diff --git a/src/devices/machine/upd1990a.cpp b/src/devices/machine/upd1990a.cpp index 191d2b634cb..e56d4737de0 100644 --- a/src/devices/machine/upd1990a.cpp +++ b/src/devices/machine/upd1990a.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(UPD4990A, upd4990a_device, "upd4990a", "uPD4990A RTC") // upd1990a_device - constructor //------------------------------------------------- -upd1990a_device::upd1990a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +upd1990a_device::upd1990a_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_rtc_interface(mconfig, *this) , m_write_data(*this) @@ -49,12 +49,12 @@ upd1990a_device::upd1990a_device(const machine_config &mconfig, device_type type { } -upd1990a_device::upd1990a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd1990a_device::upd1990a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd1990a_device(mconfig, UPD1990A, tag, owner, clock, TYPE_1990A) { } -upd4990a_device::upd4990a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd4990a_device::upd4990a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd1990a_device(mconfig, UPD4990A, tag, owner, clock, TYPE_4990A) { } diff --git a/src/devices/machine/upd1990a.h b/src/devices/machine/upd1990a.h index 8a170a15021..d68703c446d 100644 --- a/src/devices/machine/upd1990a.h +++ b/src/devices/machine/upd1990a.h @@ -34,7 +34,7 @@ class upd1990a_device : public device_t, public device_rtc_interface { public: // construction/destruction - upd1990a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); + upd1990a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); auto data_callback() { return m_write_data.bind(); } auto tp_callback() { return m_write_tp.bind(); } @@ -52,7 +52,7 @@ public: protected: // device-level overrides - upd1990a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + upd1990a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, uint32_t variant); virtual void device_start() override; @@ -127,7 +127,7 @@ private: class upd4990a_device : public upd1990a_device { public: - upd4990a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); + upd4990a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); }; diff --git a/src/devices/machine/upd4701.cpp b/src/devices/machine/upd4701.cpp index d840492073b..824ed0a39cc 100644 --- a/src/devices/machine/upd4701.cpp +++ b/src/devices/machine/upd4701.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(UPD4701A, upd4701_device, "upd4701a", "uPD4701A Incremental Encoder") -upd4701_device::upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd4701_device::upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD4701A, tag, owner, clock) , m_cs(true) , m_xy(false) diff --git a/src/devices/machine/upd4701.h b/src/devices/machine/upd4701.h index 245ef7bf82c..41b7b9e7a42 100644 --- a/src/devices/machine/upd4701.h +++ b/src/devices/machine/upd4701.h @@ -30,7 +30,7 @@ class upd4701_device : public device_t { public: - upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + upd4701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // configuration template <typename T> void set_portx_tag(T &&tag) { m_portx.set_tag(std::forward<T>(tag)); } diff --git a/src/devices/machine/upd4991a.cpp b/src/devices/machine/upd4991a.cpp index 0f1419d7270..31e9b13b874 100644 --- a/src/devices/machine/upd4991a.cpp +++ b/src/devices/machine/upd4991a.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(UPD4991A, upd4991a_device, "upd4991a", "NEC uPD4991a parallel // upd4991a_device - constructor //------------------------------------------------- -upd4991a_device::upd4991a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd4991a_device::upd4991a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD4991A, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_timer_clock(nullptr) diff --git a/src/devices/machine/upd4991a.h b/src/devices/machine/upd4991a.h index 9a9da912279..a06abfde92b 100644 --- a/src/devices/machine/upd4991a.h +++ b/src/devices/machine/upd4991a.h @@ -24,7 +24,7 @@ class upd4991a_device : public device_t, public device_rtc_interface { public: // construction/destruction - upd4991a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd4991a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void address_w(offs_t offset, u8 data); diff --git a/src/devices/machine/upd4992.cpp b/src/devices/machine/upd4992.cpp index 52e3f8d9f10..eef85e61b7b 100644 --- a/src/devices/machine/upd4992.cpp +++ b/src/devices/machine/upd4992.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(UPD4992, upd4992_device, "upd4992", "uPD4992 RTC") // upd4992_device - constructor //------------------------------------------------- -upd4992_device::upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd4992_device::upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD4992, tag, owner, clock) , device_rtc_interface(mconfig, *this) , m_timer_clock(nullptr) diff --git a/src/devices/machine/upd4992.h b/src/devices/machine/upd4992.h index 3151aa12eaa..841220bc072 100644 --- a/src/devices/machine/upd4992.h +++ b/src/devices/machine/upd4992.h @@ -24,7 +24,7 @@ class upd4992_device : public device_t, public device_rtc_interface { public: // construction/destruction - upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // I/O operations void write(offs_t offset, u8 data); diff --git a/src/devices/machine/upd7001.cpp b/src/devices/machine/upd7001.cpp index a6ae938b64c..7b4ab21337c 100644 --- a/src/devices/machine/upd7001.cpp +++ b/src/devices/machine/upd7001.cpp @@ -38,7 +38,7 @@ DEFINE_DEVICE_TYPE(UPD7001, upd7001_device, "upd7001", "NEC uPD7001 A/D Converte // upd7001_device - constructor //------------------------------------------------- -upd7001_device::upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +upd7001_device::upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD7001, tag, owner, clock) , m_an_callback(*this) , m_eoc_callback(*this) diff --git a/src/devices/machine/upd7001.h b/src/devices/machine/upd7001.h index afc4b632293..db483851c42 100644 --- a/src/devices/machine/upd7001.h +++ b/src/devices/machine/upd7001.h @@ -33,9 +33,9 @@ class upd7001_device : public device_t { public: // device type constructors - upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); upd7001_device(const machine_config &mconfig, const char *tag, device_t *owner, double r, double c) - : upd7001_device(mconfig, tag, owner, 0U) + : upd7001_device(mconfig, tag, owner) { set_rc(r, c); } diff --git a/src/devices/machine/upd7002.cpp b/src/devices/machine/upd7002.cpp index da1036d109d..f67a474248a 100644 --- a/src/devices/machine/upd7002.cpp +++ b/src/devices/machine/upd7002.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(UPD7002, upd7002_device, "upd7002", "uPD7002 ADC") -upd7002_device::upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd7002_device::upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD7002, tag, owner, clock) , m_status(0) , m_data1(0) diff --git a/src/devices/machine/upd7002.h b/src/devices/machine/upd7002.h index 7069a68361d..f4cdccd33d7 100644 --- a/src/devices/machine/upd7002.h +++ b/src/devices/machine/upd7002.h @@ -25,7 +25,7 @@ public: typedef device_delegate<int (int channel_number)> get_analogue_delegate; typedef device_delegate<void (int data)> eoc_delegate; - upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename... T> void set_get_analogue_callback(T &&... args) { m_get_analogue_cb.set(std::forward<T>(args)...); } template <typename... T> void set_eoc_callback(T &&... args) { m_eoc_cb.set(std::forward<T>(args)...); } diff --git a/src/devices/machine/upd7004.cpp b/src/devices/machine/upd7004.cpp index a5fb2cba78f..40c80586728 100644 --- a/src/devices/machine/upd7004.cpp +++ b/src/devices/machine/upd7004.cpp @@ -37,7 +37,7 @@ ALLOW_SAVE_TYPE(upd7004_device::state); // upd7004_device - constructor //------------------------------------------------- -upd7004_device::upd7004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +upd7004_device::upd7004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD7004, tag, owner, clock), m_eoc_cb(*this), m_eoc_ff_cb(*this), m_in_cb(*this), diff --git a/src/devices/machine/upd7004.h b/src/devices/machine/upd7004.h index 78d7eae559c..da0979b5699 100644 --- a/src/devices/machine/upd7004.h +++ b/src/devices/machine/upd7004.h @@ -38,7 +38,7 @@ class upd7004_device : public device_t { public: // construction/destruction - upd7004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7004_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto eoc_callback() { return m_eoc_cb.bind(); } auto eoc_ff_callback() { return m_eoc_ff_cb.bind(); } diff --git a/src/devices/machine/upd71071.cpp b/src/devices/machine/upd71071.cpp index 0a928be5361..cf381c3cbc5 100644 --- a/src/devices/machine/upd71071.cpp +++ b/src/devices/machine/upd71071.cpp @@ -93,7 +93,7 @@ DEFINE_DEVICE_TYPE(UPD71071, upd71071_device, "upd71071", "NEC uPD71071 DMA Controller") -upd71071_device::upd71071_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +upd71071_device::upd71071_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, UPD71071, tag, owner, clock) , m_upd_clock(0) , m_out_hreq_cb(*this) diff --git a/src/devices/machine/upd71071.h b/src/devices/machine/upd71071.h index 0ccf146f931..b1b60129562 100644 --- a/src/devices/machine/upd71071.h +++ b/src/devices/machine/upd71071.h @@ -9,10 +9,10 @@ class upd71071_device : public device_t { public: - upd71071_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd71071_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_cpu_tag(const char *tag) { m_cpu.set_tag(tag); } - void set_clock(int clock) { m_upd_clock = clock; } + void set_clock(const XTAL &clock) { m_upd_clock = clock; } auto out_hreq_callback() { return m_out_hreq_cb.bind(); } auto out_eop_callback() { return m_out_eop_cb.bind(); } @@ -62,7 +62,7 @@ private: //int m_in_progress[4]; //int m_transfer_size[4]; int m_base; - int m_upd_clock; + XTAL m_upd_clock; devcb_write_line m_out_hreq_cb; devcb_write_line m_out_eop_cb; devcb_read16::array<4> m_dma_read_cb; diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp index acf4182fecc..603c2ffa119 100644 --- a/src/devices/machine/upd765.cpp +++ b/src/devices/machine/upd765.cpp @@ -182,7 +182,7 @@ void tc8566af_device::map(address_map &map) constexpr int upd765_family_device::rates[4]; -upd765_family_device::upd765_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +upd765_family_device::upd765_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), ready_connected(true), ready_polled(true), @@ -538,9 +538,9 @@ void upd765_family_device::dsr_w(uint8_t data) cur_rate = rates[dsr & 3]; } -void upd765_family_device::set_rate(int rate) +void upd765_family_device::set_rate(const XTAL &rate) { - cur_rate = rate; + cur_rate = rate.value(); } uint8_t upd765_family_device::fifo_r() @@ -2769,32 +2769,32 @@ bool upd765_family_device::sector_matches() const cur_live.idbuf[3] == command[5]; } -upd765a_device::upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, UPD765A, tag, owner, clock) +upd765a_device::upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, UPD765A, tag, owner, clock) { has_dor = false; } -upd765b_device::upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, UPD765B, tag, owner, clock) +upd765b_device::upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, UPD765B, tag, owner, clock) { has_dor = false; } -i8272a_device::i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, I8272A, tag, owner, clock) +i8272a_device::i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, I8272A, tag, owner, clock) { has_dor = false; } -upd72065_device::upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd72065_device(mconfig, UPD72065, tag, owner, clock) +upd72065_device::upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd72065_device(mconfig, UPD72065, tag, owner, clock) { } -upd72065_device::upd72065_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, type, tag, owner, clock) +upd72065_device::upd72065_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, type, tag, owner, clock) { has_dor = false; recalibrate_steps = 255; } -upd72067_device::upd72067_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd72065_device(mconfig, UPD72067, tag, owner, clock) +upd72067_device::upd72067_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd72065_device(mconfig, UPD72067, tag, owner, clock) { ready_polled = true; ready_connected = true; @@ -2802,7 +2802,7 @@ upd72067_device::upd72067_device(const machine_config &mconfig, const char *tag, select_multiplexed = false; } -upd72069_device::upd72069_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd72065_device(mconfig, UPD72069, tag, owner, clock) +upd72069_device::upd72069_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd72065_device(mconfig, UPD72069, tag, owner, clock) { ready_polled = true; ready_connected = true; @@ -2810,7 +2810,7 @@ upd72069_device::upd72069_device(const machine_config &mconfig, const char *tag, select_multiplexed = false; } -i82072_device::i82072_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, I82072, tag, owner, clock) +i82072_device::i82072_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, I82072, tag, owner, clock) { has_dor = false; recalibrate_steps = 255; @@ -3095,7 +3095,7 @@ void i82072_device::index_callback(floppy_image_device *floppy, int state) upd765_family_device::index_callback(floppy, state); } -ps2_fdc_device::ps2_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, type, tag, owner, clock) +ps2_fdc_device::ps2_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, type, tag, owner, clock) { } @@ -3120,7 +3120,7 @@ void ps2_fdc_device::soft_reset() perpmode &= 0x3c; } -smc37c78_device::smc37c78_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ps2_fdc_device(mconfig, SMC37C78, tag, owner, clock) +smc37c78_device::smc37c78_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ps2_fdc_device(mconfig, SMC37C78, tag, owner, clock) { ready_connected = false; select_connected = true; @@ -3128,14 +3128,14 @@ smc37c78_device::smc37c78_device(const machine_config &mconfig, const char *tag, recalibrate_steps = 80; } -n82077aa_device::n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ps2_fdc_device(mconfig, N82077AA, tag, owner, clock) +n82077aa_device::n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ps2_fdc_device(mconfig, N82077AA, tag, owner, clock) { ready_connected = false; select_connected = true; select_multiplexed = false; } -pc_fdc_superio_device::pc_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, PC_FDC_SUPERIO, tag, owner, clock) +pc_fdc_superio_device::pc_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, PC_FDC_SUPERIO, tag, owner, clock) { ready_polled = false; ready_connected = false; @@ -3143,7 +3143,7 @@ pc_fdc_superio_device::pc_fdc_superio_device(const machine_config &mconfig, cons select_multiplexed = false; } -dp8473_device::dp8473_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : upd765_family_device(mconfig, DP8473, tag, owner, clock) +dp8473_device::dp8473_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, DP8473, tag, owner, clock) { ready_polled = false; ready_connected = false; @@ -3160,7 +3160,7 @@ void dp8473_device::soft_reset() other_irq = true; } -pc8477a_device::pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ps2_fdc_device(mconfig, PC8477A, tag, owner, clock) +pc8477a_device::pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ps2_fdc_device(mconfig, PC8477A, tag, owner, clock) { ready_polled = true; ready_connected = false; @@ -3169,7 +3169,7 @@ pc8477a_device::pc8477a_device(const machine_config &mconfig, const char *tag, d recalibrate_steps = 85; // TODO: may also be programmed as 255, 3925 or 4095 by (unemulated) mode command } -pc8477b_device::pc8477b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ps2_fdc_device(mconfig, PC8477B, tag, owner, clock) +pc8477b_device::pc8477b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ps2_fdc_device(mconfig, PC8477B, tag, owner, clock) { ready_polled = true; ready_connected = false; @@ -3178,7 +3178,7 @@ pc8477b_device::pc8477b_device(const machine_config &mconfig, const char *tag, d recalibrate_steps = 85; // TODO: may also be programmed as 255, 3925 or 4095 by (unemulated) mode command } -wd37c65c_device::wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wd37c65c_device::wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, WD37C65C, tag, owner, clock), m_clock2(0) { @@ -3201,7 +3201,7 @@ uint8_t wd37c65c_device::get_st3(floppy_info &fi) return st3; } -mcs3201_device::mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mcs3201_device::mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, MCS3201, tag, owner, clock), m_input_handler(*this) { @@ -3223,7 +3223,7 @@ uint8_t mcs3201_device::input_r() return m_input_handler(); } -tc8566af_device::tc8566af_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +tc8566af_device::tc8566af_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : upd765_family_device(mconfig, TC8566AF, tag, owner, clock) , m_cr1(0) { diff --git a/src/devices/machine/upd765.h b/src/devices/machine/upd765.h index 0eba7da4b29..d0ff26ff544 100644 --- a/src/devices/machine/upd765.h +++ b/src/devices/machine/upd765.h @@ -51,7 +51,7 @@ public: DECLARE_WRITE_LINE_MEMBER(tc_line_w) { tc_w(state == ASSERT_LINE); } DECLARE_WRITE_LINE_MEMBER(reset_w); - void set_rate(int rate); // rate in bps, to be used when the fdc is externally frequency-controlled + void set_rate(const XTAL &rate); // rate in bps, to be used when the fdc is externally frequency-controlled void set_ready_line_connected(bool ready); void set_select_lines_connected(bool select); @@ -59,7 +59,7 @@ public: virtual void soft_reset(); protected: - upd765_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + upd765_family_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void device_resolve_objects() override; virtual void device_start() override; @@ -353,50 +353,50 @@ protected: class upd765a_device : public upd765_family_device { public: - upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool ready, bool select) + upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool ready, bool select) : upd765a_device(mconfig, tag, owner, clock) { set_ready_line_connected(ready); set_select_lines_connected(select); } - upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd765a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; class upd765b_device : public upd765_family_device { public: - upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool ready, bool select) + upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool ready, bool select) : upd765b_device(mconfig, tag, owner, clock) { set_ready_line_connected(ready); set_select_lines_connected(select); } - upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd765b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; class i8272a_device : public upd765_family_device { public: - i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool ready) + i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool ready) : i8272a_device(mconfig, tag, owner, clock) { set_ready_line_connected(ready); } - i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8272a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; class i82072_device : public upd765_family_device { public: - i82072_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool ready) + i82072_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool ready) : i82072_device(mconfig, tag, owner, clock) { set_ready_line_connected(ready); } - i82072_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i82072_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -437,7 +437,7 @@ public: uint8_t srb_r(); protected: - ps2_fdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + ps2_fdc_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; @@ -450,63 +450,63 @@ protected: class smc37c78_device : public ps2_fdc_device { public: - smc37c78_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + smc37c78_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; class upd72065_device : public upd765_family_device { public: - upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, bool ready, bool select) + upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool ready, bool select) : upd72065_device(mconfig, tag, owner, clock) { set_ready_line_connected(ready); set_select_lines_connected(select); } - upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd72065_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; virtual void auxcmd_w(uint8_t data); protected: - upd72065_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + upd72065_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; class upd72067_device : public upd72065_device { public: - upd72067_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd72067_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void auxcmd_w(uint8_t data) override; }; class upd72069_device : public upd72065_device { public: - upd72069_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd72069_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class n82077aa_device : public ps2_fdc_device { public: - n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, mode_t mode) + n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, mode_t mode) : n82077aa_device(mconfig, tag, owner, clock) { set_mode(mode); } - n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + n82077aa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; class pc_fdc_superio_device : public upd765_family_device { public: - pc_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; class dp8473_device : public upd765_family_device { public: - dp8473_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + dp8473_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; @@ -516,12 +516,12 @@ protected: class pc8477a_device : public ps2_fdc_device { public: - pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, mode_t mode) + pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, mode_t mode) : pc8477a_device(mconfig, tag, owner, clock) { set_mode(mode); } - pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + pc8477a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; }; @@ -540,10 +540,10 @@ public: class wd37c65c_device : public upd765_family_device { public: - wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); template <typename X> - wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, X &&clock2) + wd37c65c_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, X &&clock2) : wd37c65c_device(mconfig, tag, owner, clock) { set_clock2(std::forward<X>(clock2)); @@ -561,7 +561,7 @@ private: class mcs3201_device : public upd765_family_device { public: - mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mcs3201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto input_handler() { return m_input_handler.bind(); } @@ -578,7 +578,7 @@ private: class tc8566af_device : public upd765_family_device { public: - tc8566af_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + tc8566af_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual void map(address_map &map) override; diff --git a/src/devices/machine/v3021.cpp b/src/devices/machine/v3021.cpp index 6d84109e2ec..ae82249ef6a 100644 --- a/src/devices/machine/v3021.cpp +++ b/src/devices/machine/v3021.cpp @@ -114,7 +114,7 @@ DEFINE_DEVICE_TYPE(V3021, v3021_device, "v3021", "EM Microelectronic-Marin SA V3 // v3021_device - constructor //------------------------------------------------- -v3021_device::v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +v3021_device::v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, V3021, tag, owner, clock) , device_rtc_interface(mconfig, *this) { diff --git a/src/devices/machine/v3021.h b/src/devices/machine/v3021.h index cac5c6884d4..58fc96e74f1 100644 --- a/src/devices/machine/v3021.h +++ b/src/devices/machine/v3021.h @@ -27,7 +27,7 @@ class v3021_device : public device_t, public device_rtc_interface { public: // construction/destruction - v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 32'768); + v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL::u(32'768)); // parallel interface void write(u8 data); diff --git a/src/devices/machine/vic_pl192.cpp b/src/devices/machine/vic_pl192.cpp index 2e7a2f4ad85..3fcbc005fda 100644 --- a/src/devices/machine/vic_pl192.cpp +++ b/src/devices/machine/vic_pl192.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(PL190_VIC, vic_pl190_device, "vic_pl190", "ARM PL190 VIC") DEFINE_DEVICE_TYPE(UPD800468_VIC, vic_upd800468_device, "vic_upd800468", "NEC uPD800468 VIC") DEFINE_DEVICE_TYPE(PL192_VIC, vic_pl192_device, "vic_pl192", "ARM PL192 VIC") -vic_pl190_device::vic_pl190_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +vic_pl190_device::vic_pl190_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_memory_interface(mconfig, *this) , num_vectors(16) @@ -26,18 +26,18 @@ vic_pl190_device::vic_pl190_device(const machine_config &mconfig, device_type ty { } -vic_pl190_device::vic_pl190_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic_pl190_device::vic_pl190_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vic_pl190_device(mconfig, PL190_VIC, tag, owner, clock) { } -vic_upd800468_device::vic_upd800468_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic_upd800468_device::vic_upd800468_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vic_pl190_device(mconfig, UPD800468_VIC, tag, owner, clock) { num_vectors = 32; } -vic_pl192_device::vic_pl192_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vic_pl192_device::vic_pl192_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : vic_pl190_device(mconfig, PL192_VIC, tag, owner, clock) { num_vectors = 32; diff --git a/src/devices/machine/vic_pl192.h b/src/devices/machine/vic_pl192.h index 6ef01a3a935..0ede696b9f1 100644 --- a/src/devices/machine/vic_pl192.h +++ b/src/devices/machine/vic_pl192.h @@ -9,7 +9,7 @@ class vic_pl190_device : public device_t, public device_memory_interface { public: - vic_pl190_device(const machine_config &mconfig, const char* tag, device_t *owner, uint32_t clock = 0); + vic_pl190_device(const machine_config &mconfig, const char* tag, device_t *owner, const XTAL &clock = XTAL()); auto out_irq_cb() { return m_out_irq_func.bind(); } auto out_fiq_cb() { return m_out_fiq_func.bind(); } @@ -50,7 +50,7 @@ public: void vect_ctl_w(offs_t offset, u32 data); protected: - vic_pl190_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + vic_pl190_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; @@ -87,7 +87,7 @@ private: class vic_upd800468_device : public vic_pl190_device { public: - vic_upd800468_device(const machine_config &mconfig, const char* tag, device_t *owner, uint32_t clock = 0); + vic_upd800468_device(const machine_config &mconfig, const char* tag, device_t *owner, const XTAL &clock = XTAL()); void map(address_map &map); @@ -97,7 +97,7 @@ public: class vic_pl192_device : public vic_pl190_device { public: - vic_pl192_device(const machine_config &mconfig, const char* tag, device_t *owner, uint32_t clock = 0); + vic_pl192_device(const machine_config &mconfig, const char* tag, device_t *owner, const XTAL &clock = XTAL()); void map(address_map &map); diff --git a/src/devices/machine/vr0uart.cpp b/src/devices/machine/vr0uart.cpp index 1bfbf0ebf3d..dded790b186 100644 --- a/src/devices/machine/vr0uart.cpp +++ b/src/devices/machine/vr0uart.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(VRENDER0_UART, vr0uart_device, "vr0uart", "MagicEyes VRender0 // vr0uart_device - constructor //------------------------------------------------- -vr0uart_device::vr0uart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vr0uart_device::vr0uart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VRENDER0_UART, tag, owner, clock), device_serial_interface(mconfig, *this) { @@ -102,8 +102,8 @@ void vr0uart_device::update_serial_config() } else { - set_rcv_rate(0); - set_tra_rate(0); + set_rcv_rate(XTAL::u(0)); + set_tra_rate(XTAL::u(0)); } } diff --git a/src/devices/machine/vrc4373.cpp b/src/devices/machine/vrc4373.cpp index 1100df8b375..815813183db 100644 --- a/src/devices/machine/vrc4373.cpp +++ b/src/devices/machine/vrc4373.cpp @@ -94,7 +94,7 @@ void vrc4373_device::target2_map(address_map &map) map(0x00000000, 0xFFFFFFFF).rw(FUNC(vrc4373_device::target2_r), FUNC(vrc4373_device::target2_w)); } -vrc4373_device::vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vrc4373_device::vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, VRC4373, tag, owner, clock) , m_cpu_space(nullptr), m_irq_cb(*this), m_cpu(*this, finder_base::DUMMY_TAG), m_ram_size(0x0), m_simm0_size(0x0) , m_mem_config("memory_space", ENDIANNESS_LITTLE, 32, 32) diff --git a/src/devices/machine/vrc4373.h b/src/devices/machine/vrc4373.h index 7717a979e23..600825f0618 100644 --- a/src/devices/machine/vrc4373.h +++ b/src/devices/machine/vrc4373.h @@ -13,13 +13,13 @@ class vrc4373_device : public pci_host_device { public: template <typename T> - vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) - : vrc4373_device(mconfig, tag, owner, clock) + vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag) + : vrc4373_device(mconfig, tag, owner) { set_cpu_tag(std::forward<T>(cpu_tag)); } - vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vrc4373_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); virtual void reset_all_mappings() override; virtual void map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, diff --git a/src/devices/machine/vrc5074.cpp b/src/devices/machine/vrc5074.cpp index e812cf20d25..3c21b5e3351 100644 --- a/src/devices/machine/vrc5074.cpp +++ b/src/devices/machine/vrc5074.cpp @@ -157,7 +157,7 @@ void vrc5074_device::device_add_mconfig(machine_config &config) ttys00.cts_handler().set(m_uart, FUNC(ns16550_device::cts_w)); } -vrc5074_device::vrc5074_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vrc5074_device::vrc5074_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : pci_host_device(mconfig, VRC5074, tag, owner, clock), m_uart(*this, "uart"), m_cpu_space(nullptr), m_cpu(*this, finder_base::DUMMY_TAG), diff --git a/src/devices/machine/vrc5074.h b/src/devices/machine/vrc5074.h index 749068b1ff8..f54676724d4 100644 --- a/src/devices/machine/vrc5074.h +++ b/src/devices/machine/vrc5074.h @@ -15,13 +15,13 @@ class vrc5074_device : public pci_host_device { public: template <typename T> - vrc5074_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&cpu_tag) + vrc5074_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&cpu_tag) : vrc5074_device(mconfig, tag, owner, clock) { set_cpu_tag(std::forward<T>(cpu_tag)); } - vrc5074_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vrc5074_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); required_device<ns16550_device> m_uart; virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/machine/vrender0.cpp b/src/devices/machine/vrender0.cpp index f59edbe4a2e..d492e44d8fc 100644 --- a/src/devices/machine/vrender0.cpp +++ b/src/devices/machine/vrender0.cpp @@ -35,7 +35,7 @@ DEFINE_DEVICE_TYPE(VRENDER0_SOC, vrender0soc_device, "vrender0", "MagicEyes VRen // vrender0soc_device - constructor //------------------------------------------------- -vrender0soc_device::vrender0soc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vrender0soc_device::vrender0soc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VRENDER0_SOC, tag, owner, clock), m_host_cpu(*this, finder_base::DUMMY_TAG), m_screen(*this, "screen"), @@ -121,7 +121,7 @@ void vrender0soc_device::frame_map(address_map &map) void vrender0soc_device::device_add_mconfig(machine_config &config) { for (required_device<vr0uart_device> &uart : m_uart) - VRENDER0_UART(config, uart, 3579500); + VRENDER0_UART(config, uart, XTAL::u(3579500)); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // evolution soccer defaults @@ -130,7 +130,7 @@ void vrender0soc_device::device_add_mconfig(machine_config &config) m_screen->screen_vblank().set(FUNC(vrender0soc_device::screen_vblank)); m_screen->set_palette(m_palette); - VIDEO_VRENDER0(config, m_vr0vid, 14318180); + VIDEO_VRENDER0(config, m_vr0vid, XTAL::u(14318180)); #ifdef IDLE_LOOP_SPEEDUP m_vr0vid->idleskip_cb().set(FUNC(vrender0soc_device::idle_skip_speedup_w)); #endif diff --git a/src/devices/machine/vrender0.h b/src/devices/machine/vrender0.h index 8a3b19d59fb..7cb19ee39c8 100644 --- a/src/devices/machine/vrender0.h +++ b/src/devices/machine/vrender0.h @@ -40,7 +40,7 @@ class vr0uart_device : public device_t, { public: // construction/destruction - vr0uart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vr0uart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void regs_map(address_map &map); void set_channel_num(int ch) { m_channel_num = ch; } @@ -87,7 +87,7 @@ class vrender0soc_device : public device_t { public: // construction/destruction - vrender0soc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + vrender0soc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void regs_map(address_map &map); void audiovideo_map(address_map &map); diff --git a/src/devices/machine/vt82c496.cpp b/src/devices/machine/vt82c496.cpp index cf1632edd49..5bcbcd8dafa 100644 --- a/src/devices/machine/vt82c496.cpp +++ b/src/devices/machine/vt82c496.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(VT82C496, vt82c496_device, "vt82c496", "VIA VT82C496 system chipset") -vt82c496_device::vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +vt82c496_device::vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, VT82C496, tag, owner, clock), m_cpu(*this, finder_base::DUMMY_TAG), m_space(nullptr), m_ram(*this, finder_base::DUMMY_TAG), m_rom(*this, finder_base::DUMMY_TAG), m_bios_c0_r(*this, "bios_c0_r"), m_bios_c4_r(*this, "bios_c4_r"), diff --git a/src/devices/machine/vt82c496.h b/src/devices/machine/vt82c496.h index c73a0ace79a..9249689fe18 100644 --- a/src/devices/machine/vt82c496.h +++ b/src/devices/machine/vt82c496.h @@ -18,7 +18,7 @@ class vt82c496_device : public device_t { public: // construction/destruction - vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + vt82c496_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <typename T> void set_cputag(T &&tag) { m_cpu.set_tag(std::forward<T>(tag)); } template <typename T> void set_ramtag(T &&tag) { m_ram.set_tag(std::forward<T>(tag)); } diff --git a/src/devices/machine/vt83c461.cpp b/src/devices/machine/vt83c461.cpp index 005e41d2848..e15611eb733 100644 --- a/src/devices/machine/vt83c461.cpp +++ b/src/devices/machine/vt83c461.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(VT83C461, vt83c461_device, "vt83c461", "VIA VT83C461 IDE Controller") -vt83c461_device::vt83c461_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +vt83c461_device::vt83c461_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : ide_controller_32_device(mconfig, VT83C461, tag, owner, clock), m_config_unknown(0), m_config_register_num(0) diff --git a/src/devices/machine/vt83c461.h b/src/devices/machine/vt83c461.h index 97e4941dd56..54cea16041d 100644 --- a/src/devices/machine/vt83c461.h +++ b/src/devices/machine/vt83c461.h @@ -18,7 +18,7 @@ class vt83c461_device : public ide_controller_32_device { public: - vt83c461_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + vt83c461_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); template <typename T> vt83c461_device &master(T &&opts, const char *dflt = nullptr, bool fixed = false) { diff --git a/src/devices/machine/watchdog.cpp b/src/devices/machine/watchdog.cpp index 3d7e17178d4..62cfcf79b1d 100644 --- a/src/devices/machine/watchdog.cpp +++ b/src/devices/machine/watchdog.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(WATCHDOG_TIMER, watchdog_timer_device, "watchdog", "Watchdog // watchdog_timer_device - constructor //------------------------------------------------- -watchdog_timer_device::watchdog_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +watchdog_timer_device::watchdog_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WATCHDOG_TIMER, tag, owner, clock) , m_vblank_count(0) , m_time(attotime::zero) diff --git a/src/devices/machine/watchdog.h b/src/devices/machine/watchdog.h index aaeed0fa494..f9511bc0d36 100644 --- a/src/devices/machine/watchdog.h +++ b/src/devices/machine/watchdog.h @@ -18,7 +18,7 @@ class watchdog_timer_device : public device_t { public: // construction/destruction - watchdog_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + watchdog_timer_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // inline configuration helpers template <typename T> void set_vblank_count(T &&screen_tag, int32_t count) { m_screen.set_tag(std::forward<T>(screen_tag)); m_vblank_count = count; } diff --git a/src/devices/machine/wd1000.cpp b/src/devices/machine/wd1000.cpp index ba4c6a5c1a9..64a6b2996db 100644 --- a/src/devices/machine/wd1000.cpp +++ b/src/devices/machine/wd1000.cpp @@ -24,7 +24,7 @@ DEFINE_DEVICE_TYPE(WD1000, wd1000_device, "wd1000", "Western Digital WD1000 Winc // wd1000_device - constructor //------------------------------------------------- -wd1000_device::wd1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd1000_device::wd1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WD1000, tag, owner, clock) , m_intrq_cb(*this) , m_drq_cb(*this) diff --git a/src/devices/machine/wd1000.h b/src/devices/machine/wd1000.h index 4e2882ee81c..0b69a5ce19d 100644 --- a/src/devices/machine/wd1000.h +++ b/src/devices/machine/wd1000.h @@ -24,7 +24,7 @@ class wd1000_device : public device_t { public: // construction/destruction - wd1000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd1000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto intrq_wr_callback() { return m_intrq_cb.bind(); } auto drq_wr_callback() { return m_drq_cb.bind(); } diff --git a/src/devices/machine/wd1010.cpp b/src/devices/machine/wd1010.cpp index cef0b5d9dd2..f6f948840cc 100644 --- a/src/devices/machine/wd1010.cpp +++ b/src/devices/machine/wd1010.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(WD1010, wd1010_device, "wd1010", "Western Digital WD1010-05") // wd1010_device - constructor //------------------------------------------------- -wd1010_device::wd1010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wd1010_device::wd1010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WD1010, tag, owner, clock), m_out_intrq_cb(*this), m_out_bdrq_cb(*this), diff --git a/src/devices/machine/wd1010.h b/src/devices/machine/wd1010.h index 70d8a687163..59d73a9c7d0 100644 --- a/src/devices/machine/wd1010.h +++ b/src/devices/machine/wd1010.h @@ -24,7 +24,7 @@ class wd1010_device : public device_t { public: // construction/destruction - wd1010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd1010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_intrq_callback() { return m_out_intrq_cb.bind(); } auto out_bdrq_callback() { return m_out_bdrq_cb.bind(); } diff --git a/src/devices/machine/wd11c00_17.cpp b/src/devices/machine/wd11c00_17.cpp index 981672a70d9..43d034844a3 100644 --- a/src/devices/machine/wd11c00_17.cpp +++ b/src/devices/machine/wd11c00_17.cpp @@ -175,7 +175,7 @@ inline void wd11c00_17_device::select() // wd11c00_17_device - constructor //------------------------------------------------- -wd11c00_17_device::wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd11c00_17_device::wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WD11C00_17, tag, owner, clock) , m_out_irq5_cb(*this) , m_out_drq3_cb(*this) diff --git a/src/devices/machine/wd11c00_17.h b/src/devices/machine/wd11c00_17.h index 91175d2472d..64e081f5736 100644 --- a/src/devices/machine/wd11c00_17.h +++ b/src/devices/machine/wd11c00_17.h @@ -22,7 +22,7 @@ class wd11c00_17_device : public device_t { public: // construction/destruction - wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd11c00_17_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_irq5_callback() { return m_out_irq5_cb.bind(); } auto out_drq3_callback() { return m_out_drq3_cb.bind(); } diff --git a/src/devices/machine/wd2010.cpp b/src/devices/machine/wd2010.cpp index 840d0f6f4d8..ab3f7c7f4f8 100644 --- a/src/devices/machine/wd2010.cpp +++ b/src/devices/machine/wd2010.cpp @@ -153,7 +153,7 @@ DEFINE_DEVICE_TYPE(WD2010, wd2010_device, "wd2010", "Western Digital WD2010 Winc // wd2010_device - constructor //------------------------------------------------- -wd2010_device::wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd2010_device::wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WD2010, tag, owner, clock) , m_out_intrq_cb(*this) , m_out_bdrq_cb(*this) diff --git a/src/devices/machine/wd2010.h b/src/devices/machine/wd2010.h index a39935326ba..034a6466616 100644 --- a/src/devices/machine/wd2010.h +++ b/src/devices/machine/wd2010.h @@ -22,7 +22,7 @@ class wd2010_device : public device_t { public: // construction/destruction - wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd2010_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_intrq_callback() { return m_out_intrq_cb.bind(); } auto out_bdrq_callback() { return m_out_bdrq_cb.bind(); } diff --git a/src/devices/machine/wd33c9x.cpp b/src/devices/machine/wd33c9x.cpp index cb59256cea1..a2b8ab668d7 100644 --- a/src/devices/machine/wd33c9x.cpp +++ b/src/devices/machine/wd33c9x.cpp @@ -357,7 +357,7 @@ DEFINE_DEVICE_TYPE(WD33C93B, wd33c93b_device, "wd33c93b", "Western Digital WD33C // wd33c9x_base_device - constructor/destructor //------------------------------------------------- -wd33c9x_base_device::wd33c9x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +wd33c9x_base_device::wd33c9x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : nscsi_device{ mconfig, type, tag, owner, clock } , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_addr{ 0 } @@ -1723,22 +1723,22 @@ uint8_t wd33c9x_base_device::get_msg_out() const -wd33c92_device::wd33c92_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd33c92_device::wd33c92_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd33c9x_base_device(mconfig, WD33C92, tag, owner, clock) { } -wd33c93_device::wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd33c93_device::wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd33c9x_base_device(mconfig, WD33C93, tag, owner, clock) { } -wd33c93a_device::wd33c93a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd33c93a_device::wd33c93a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd33c9x_base_device(mconfig, WD33C93A, tag, owner, clock) { } -wd33c93b_device::wd33c93b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +wd33c93b_device::wd33c93b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd33c9x_base_device(mconfig, WD33C93B, tag, owner, clock) { } diff --git a/src/devices/machine/wd33c9x.h b/src/devices/machine/wd33c9x.h index 8fb9e8ea78a..6c539934ff5 100644 --- a/src/devices/machine/wd33c9x.h +++ b/src/devices/machine/wd33c9x.h @@ -39,7 +39,7 @@ public: void dma_w(const uint8_t data); protected: - wd33c9x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + wd33c9x_base_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; @@ -112,45 +112,25 @@ private: class wd33c92_device : public wd33c9x_base_device { public: - wd33c92_device(const machine_config &mconfig, const char *tag, device_t *owner) - : wd33c92_device(mconfig, tag, owner, 0) - { - } - - wd33c92_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd33c92_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class wd33c93_device : public wd33c9x_base_device { public: - wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner) - : wd33c93_device(mconfig, tag, owner, 0) - { - } - - wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd33c93_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class wd33c93a_device : public wd33c9x_base_device { public: - wd33c93a_device(const machine_config &mconfig, const char *tag, device_t *owner) - : wd33c93a_device(mconfig, tag, owner, 0) - { - } - - wd33c93a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd33c93a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; class wd33c93b_device : public wd33c9x_base_device { public: - wd33c93b_device(const machine_config &mconfig, const char *tag, device_t *owner) - : wd33c93b_device(mconfig, tag, owner, 0) - { - } - - wd33c93b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd33c93b_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/machine/wd7600.cpp b/src/devices/machine/wd7600.cpp index e1f81e0282b..d65943fae02 100644 --- a/src/devices/machine/wd7600.cpp +++ b/src/devices/machine/wd7600.cpp @@ -23,7 +23,7 @@ DEFINE_DEVICE_TYPE(WD7600, wd7600_device, "wd7600", "Western Digital WD7600 chip void wd7600_device::device_add_mconfig(machine_config & config) { - AM9517A(config, m_dma1, 0); + AM9517A(config, m_dma1); m_dma1->out_hreq_callback().set(m_dma2, FUNC(am9517a_device::dreq0_w)); m_dma1->out_eop_callback().set(FUNC(wd7600_device::dma1_eop_w)); m_dma1->in_memr_callback().set(FUNC(wd7600_device::dma_read_byte)); @@ -41,7 +41,7 @@ void wd7600_device::device_add_mconfig(machine_config & config) m_dma1->out_dack_callback<2>().set(FUNC(wd7600_device::dma1_dack2_w)); m_dma1->out_dack_callback<3>().set(FUNC(wd7600_device::dma1_dack3_w)); - AM9517A(config, m_dma2, 0); + AM9517A(config, m_dma2); m_dma2->out_hreq_callback().set(FUNC(wd7600_device::dma2_hreq_w)); m_dma2->in_memr_callback().set(FUNC(wd7600_device::dma_read_word)); m_dma2->out_memw_callback().set(FUNC(wd7600_device::dma_write_word)); @@ -56,16 +56,16 @@ void wd7600_device::device_add_mconfig(machine_config & config) m_dma2->out_dack_callback<2>().set(FUNC(wd7600_device::dma2_dack2_w)); m_dma2->out_dack_callback<3>().set(FUNC(wd7600_device::dma2_dack3_w)); - PIC8259(config, m_pic1, 0); + PIC8259(config, m_pic1); m_pic1->out_int_callback().set(FUNC(wd7600_device::pic1_int_w)); m_pic1->in_sp_callback().set_constant(1); m_pic1->read_slave_ack_callback().set(FUNC(wd7600_device::pic1_slave_ack_r)); - PIC8259(config, m_pic2, 0); + PIC8259(config, m_pic2); m_pic2->out_int_callback().set(m_pic1, FUNC(pic8259_device::ir2_w)); m_pic2->in_sp_callback().set_constant(0); - PIT8254(config, m_ctc, 0); + PIT8254(config, m_ctc); m_ctc->set_clk<0>(XTAL(14'318'181) / 12.0); m_ctc->out_handler<0>().set(m_pic1, FUNC(pic8259_device::ir0_w)); m_ctc->set_clk<1>(XTAL(14'318'181) / 12.0); @@ -79,7 +79,7 @@ void wd7600_device::device_add_mconfig(machine_config & config) } -wd7600_device::wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +wd7600_device::wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WD7600, tag, owner, clock), m_read_ior(*this), m_write_iow(*this), diff --git a/src/devices/machine/wd7600.h b/src/devices/machine/wd7600.h index 43ddb00b038..e9e137190c7 100644 --- a/src/devices/machine/wd7600.h +++ b/src/devices/machine/wd7600.h @@ -29,7 +29,7 @@ class wd7600_device : public device_t { public: // construction/destruction - wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto ior_callback() { return m_read_ior.bind(); } diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp index 253f9e5a19d..afab2249f2b 100644 --- a/src/devices/machine/wd_fdc.cpp +++ b/src/devices/machine/wd_fdc.cpp @@ -134,7 +134,7 @@ static const char *const states[] = "WRITE_SECTOR_PRE_BYTE" }; -wd_fdc_device_base::wd_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +wd_fdc_device_base::wd_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, type, tag, owner, clock), intrq_cb(*this), drq_cb(*this), @@ -2443,7 +2443,7 @@ int wd_fdc_device_base::settle_time() const return 60000; } -wd_fdc_analog_device_base::wd_fdc_analog_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +wd_fdc_analog_device_base::wd_fdc_analog_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_device_base(mconfig, type, tag, owner, clock) { clock_ratio = 1; @@ -2495,7 +2495,7 @@ bool wd_fdc_analog_device_base::pll_write_next_bit(bool bit, attotime &tm, flopp return cur_pll.write_next_bit(bit, tm, floppy, limit); } -wd_fdc_digital_device_base::wd_fdc_digital_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +wd_fdc_digital_device_base::wd_fdc_digital_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_device_base(mconfig, type, tag, owner, clock) { clock_ratio = 4; @@ -2704,7 +2704,7 @@ void wd_fdc_digital_device_base::digital_pll_t::commit(floppy_image_device *flop write_position = 0; } -fd1771_device::fd1771_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1771, tag, owner, clock) +fd1771_device::fd1771_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1771, tag, owner, clock) { constexpr static int fd1771_step_times[4] = { 12000, 12000, 20000, 40000 }; @@ -2731,7 +2731,7 @@ int fd1771_device::calc_sector_size(uint8_t size, uint8_t command) const return size ? size << 4 : 4096; } -fd1781_device::fd1781_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1781, tag, owner, clock) +fd1781_device::fd1781_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1781, tag, owner, clock) { constexpr static int fd1781_step_times[4] = { 6000, 12000, 20000, 40000 }; @@ -2759,7 +2759,7 @@ int fd1781_device::calc_sector_size(uint8_t size, uint8_t command) const constexpr int wd_fdc_device_base::fd179x_step_times[4]; constexpr int wd_fdc_device_base::fd176x_step_times[4]; -fd1791_device::fd1791_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1791, tag, owner, clock) +fd1791_device::fd1791_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1791, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2775,7 +2775,7 @@ fd1791_device::fd1791_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -fd1792_device::fd1792_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1792, tag, owner, clock) +fd1792_device::fd1792_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1792, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2791,7 +2791,7 @@ fd1792_device::fd1792_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -fd1793_device::fd1793_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1793, tag, owner, clock) +fd1793_device::fd1793_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1793, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2807,7 +2807,7 @@ fd1793_device::fd1793_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -kr1818vg93_device::kr1818vg93_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, KR1818VG93, tag, owner, clock) +kr1818vg93_device::kr1818vg93_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, KR1818VG93, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2823,7 +2823,7 @@ kr1818vg93_device::kr1818vg93_device(const machine_config &mconfig, const char * ready_hooked = true; } -fd1794_device::fd1794_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1794, tag, owner, clock) +fd1794_device::fd1794_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1794, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2839,7 +2839,7 @@ fd1794_device::fd1794_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -fd1795_device::fd1795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1795, tag, owner, clock) +fd1795_device::fd1795_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1795, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2863,7 +2863,7 @@ int fd1795_device::calc_sector_size(uint8_t size, uint8_t command) const return 128 << ((size + 1) & 3); } -fd1797_device::fd1797_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1797, tag, owner, clock) +fd1797_device::fd1797_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1797, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2887,7 +2887,7 @@ int fd1797_device::calc_sector_size(uint8_t size, uint8_t command) const return 128 << ((size + 1) & 3); } -mb8866_device::mb8866_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, MB8866, tag, owner, clock) +mb8866_device::mb8866_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, MB8866, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2903,7 +2903,7 @@ mb8866_device::mb8866_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -mb8876_device::mb8876_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, MB8876, tag, owner, clock) +mb8876_device::mb8876_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, MB8876, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2919,7 +2919,7 @@ mb8876_device::mb8876_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -mb8877_device::mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, MB8877, tag, owner, clock) +mb8877_device::mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, MB8877, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 4; @@ -2935,7 +2935,7 @@ mb8877_device::mb8877_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -fd1761_device::fd1761_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1761, tag, owner, clock) +fd1761_device::fd1761_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1761, tag, owner, clock) { step_times = fd176x_step_times; delay_register_commit = 16; @@ -2951,7 +2951,7 @@ fd1761_device::fd1761_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -fd1763_device::fd1763_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1763, tag, owner, clock) +fd1763_device::fd1763_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1763, tag, owner, clock) { step_times = fd176x_step_times; delay_register_commit = 16; @@ -2967,7 +2967,7 @@ fd1763_device::fd1763_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -fd1765_device::fd1765_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1765, tag, owner, clock) +fd1765_device::fd1765_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1765, tag, owner, clock) { step_times = fd176x_step_times; delay_register_commit = 16; @@ -2991,7 +2991,7 @@ int fd1765_device::calc_sector_size(uint8_t size, uint8_t command) const return 128 << ((size + 1) & 3); } -fd1767_device::fd1767_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, FD1767, tag, owner, clock) +fd1767_device::fd1767_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, FD1767, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -3015,7 +3015,7 @@ int fd1767_device::calc_sector_size(uint8_t size, uint8_t command) const return 128 << ((size + 1) & 3); } -wd2791_device::wd2791_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, WD2791, tag, owner, clock) +wd2791_device::wd2791_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, WD2791, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -3031,7 +3031,7 @@ wd2791_device::wd2791_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -wd2793_device::wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, WD2793, tag, owner, clock) +wd2793_device::wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, WD2793, tag, owner, clock) { step_times = fd179x_step_times; @@ -3048,7 +3048,7 @@ wd2793_device::wd2793_device(const machine_config &mconfig, const char *tag, dev ready_hooked = true; } -wd2795_device::wd2795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, WD2795, tag, owner, clock) +wd2795_device::wd2795_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, WD2795, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -3072,7 +3072,7 @@ int wd2795_device::calc_sector_size(uint8_t size, uint8_t command) const return 128 << ((size + 1) & 3); } -wd2797_device::wd2797_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_analog_device_base(mconfig, WD2797, tag, owner, clock) +wd2797_device::wd2797_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_analog_device_base(mconfig, WD2797, tag, owner, clock) { step_times = fd179x_step_times; delay_register_commit = 16; @@ -3096,7 +3096,7 @@ int wd2797_device::calc_sector_size(uint8_t size, uint8_t command) const return 128 << ((size + 1) & 3); } -wd1770_device::wd1770_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_digital_device_base(mconfig, WD1770, tag, owner, clock) +wd1770_device::wd1770_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_digital_device_base(mconfig, WD1770, tag, owner, clock) { step_times = wd_digital_step_times; delay_register_commit = 16; @@ -3112,7 +3112,7 @@ wd1770_device::wd1770_device(const machine_config &mconfig, const char *tag, dev ready_hooked = false; } -wd1772_device::wd1772_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_digital_device_base(mconfig, WD1772, tag, owner, clock) +wd1772_device::wd1772_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_digital_device_base(mconfig, WD1772, tag, owner, clock) { const static int wd1772_step_times[4] = { 12000, 24000, 4000, 6000 }; @@ -3140,7 +3140,7 @@ int wd1772_device::settle_time() const return 30000; } -wd1773_device::wd1773_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : wd_fdc_digital_device_base(mconfig, WD1773, tag, owner, clock) +wd1773_device::wd1773_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wd_fdc_digital_device_base(mconfig, WD1773, tag, owner, clock) { step_times = wd_digital_step_times; delay_register_commit = 16; diff --git a/src/devices/machine/wd_fdc.h b/src/devices/machine/wd_fdc.h index e870542fcbc..1ba959ec796 100644 --- a/src/devices/machine/wd_fdc.h +++ b/src/devices/machine/wd_fdc.h @@ -93,7 +93,7 @@ public: void index_callback(floppy_image_device *floppy, int state); protected: - wd_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + wd_fdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // Chip-specific configuration flags bool disable_mfm; @@ -373,7 +373,7 @@ private: class wd_fdc_analog_device_base : public wd_fdc_device_base { protected: - wd_fdc_analog_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + wd_fdc_analog_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void pll_reset(bool fm, bool enmf, const attotime &when) override; virtual void pll_start_writing(const attotime &tm) override; @@ -390,7 +390,7 @@ private: class wd_fdc_digital_device_base : public wd_fdc_device_base { protected: - wd_fdc_digital_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + wd_fdc_digital_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); static constexpr int wd_digital_step_times[4] = { 12000, 24000, 40000, 60000 }; @@ -433,7 +433,7 @@ private: class fd1771_device : public wd_fdc_analog_device_base { public: - fd1771_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1771_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -441,7 +441,7 @@ protected: class fd1781_device : public wd_fdc_analog_device_base { public: - fd1781_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1781_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -449,32 +449,32 @@ protected: class fd1791_device : public wd_fdc_analog_device_base { public: - fd1791_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1791_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1792_device : public wd_fdc_analog_device_base { public: - fd1792_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1792_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1793_device : public wd_fdc_analog_device_base { public: - fd1793_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1793_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class kr1818vg93_device : public wd_fdc_analog_device_base { public: - kr1818vg93_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + kr1818vg93_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1794_device : public wd_fdc_analog_device_base { public: - fd1794_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1794_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1795_device : public wd_fdc_analog_device_base { public: - fd1795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1795_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -482,7 +482,7 @@ protected: class fd1797_device : public wd_fdc_analog_device_base { public: - fd1797_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1797_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -490,32 +490,32 @@ protected: class mb8866_device : public wd_fdc_analog_device_base { public: - mb8866_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8866_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mb8876_device : public wd_fdc_analog_device_base { public: - mb8876_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8876_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mb8877_device : public wd_fdc_analog_device_base { public: - mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1761_device : public wd_fdc_analog_device_base { public: - fd1761_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1761_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1763_device : public wd_fdc_analog_device_base { public: - fd1763_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1763_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class fd1765_device : public wd_fdc_analog_device_base { public: - fd1765_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1765_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -523,7 +523,7 @@ protected: class fd1767_device : public wd_fdc_analog_device_base { public: - fd1767_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + fd1767_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -531,19 +531,19 @@ protected: class wd2791_device : public wd_fdc_analog_device_base { public: - wd2791_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd2791_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(enmf_w) { enmf = state ? false : true; } }; class wd2793_device : public wd_fdc_analog_device_base { public: - wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER(enmf_w) { enmf = state ? false : true; } }; class wd2795_device : public wd_fdc_analog_device_base { public: - wd2795_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd2795_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -551,7 +551,7 @@ protected: class wd2797_device : public wd_fdc_analog_device_base { public: - wd2797_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd2797_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int calc_sector_size(uint8_t size, uint8_t command) const override; @@ -559,12 +559,12 @@ protected: class wd1770_device : public wd_fdc_digital_device_base { public: - wd1770_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd1770_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class wd1772_device : public wd_fdc_digital_device_base { public: - wd1772_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd1772_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual int settle_time() const override; @@ -572,7 +572,7 @@ protected: class wd1773_device : public wd_fdc_digital_device_base { public: - wd1773_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + wd1773_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(FD1771, fd1771_device) diff --git a/src/devices/machine/wozfdc.cpp b/src/devices/machine/wozfdc.cpp index bee2f043e7e..fda72801509 100644 --- a/src/devices/machine/wozfdc.cpp +++ b/src/devices/machine/wozfdc.cpp @@ -56,18 +56,18 @@ void wozfdc_device::device_add_mconfig(machine_config &config) // LIVE DEVICE //************************************************************************** -wozfdc_device::wozfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +wozfdc_device::wozfdc_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_phaselatch(*this, "phaselatch") { } -diskii_fdc_device::diskii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +diskii_fdc_device::diskii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wozfdc_device(mconfig, DISKII_FDC, tag, owner, clock) { } -appleiii_fdc_device::appleiii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +appleiii_fdc_device::appleiii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : wozfdc_device(mconfig, APPLEIII_FDC, tag, owner, clock) { } diff --git a/src/devices/machine/wozfdc.h b/src/devices/machine/wozfdc.h index f92ccaec39f..ccc32cbde41 100644 --- a/src/devices/machine/wozfdc.h +++ b/src/devices/machine/wozfdc.h @@ -35,7 +35,7 @@ public: protected: // construction/destruction - wozfdc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + wozfdc_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; @@ -83,7 +83,7 @@ protected: class diskii_fdc_device : public wozfdc_device { public: - diskii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + diskii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_floppies(floppy_connector *f0, floppy_connector *f1); @@ -94,7 +94,7 @@ protected: class appleiii_fdc_device : public wozfdc_device { public: - appleiii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + appleiii_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_floppies_4(floppy_connector *f0, floppy_connector *f1, floppy_connector *f2, floppy_connector *f3); diff --git a/src/devices/machine/wtl3132.cpp b/src/devices/machine/wtl3132.cpp index 2e86798b878..28479af0b56 100644 --- a/src/devices/machine/wtl3132.cpp +++ b/src/devices/machine/wtl3132.cpp @@ -31,7 +31,7 @@ ALLOW_SAVE_TYPE(float32_t); DEFINE_DEVICE_TYPE(WTL3132, wtl3132_device, "wtl3132", "Weitek 3132") -wtl3132_device::wtl3132_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +wtl3132_device::wtl3132_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, WTL3132, tag, owner, clock) , m_fpcn_cb(*this) , m_fpex_cb(*this) diff --git a/src/devices/machine/wtl3132.h b/src/devices/machine/wtl3132.h index deca6dd7f26..cf676e62273 100644 --- a/src/devices/machine/wtl3132.h +++ b/src/devices/machine/wtl3132.h @@ -11,7 +11,7 @@ class wtl3132_device : public device_t { public: - wtl3132_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + wtl3132_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); // output lines auto out_fpcn() { return m_fpcn_cb.bind(); } diff --git a/src/devices/machine/x2201.cpp b/src/devices/machine/x2201.cpp index 30ee78a8cfd..57106c42ebe 100644 --- a/src/devices/machine/x2201.cpp +++ b/src/devices/machine/x2201.cpp @@ -43,7 +43,7 @@ DEFINE_DEVICE_TYPE(X2201, x2201_device, "x2201", "Xicor X2201 1024x1 NOVRAM") // x2201_device - constructor //------------------------------------------------- -x2201_device::x2201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +x2201_device::x2201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, X2201, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_default_data(*this, DEVICE_SELF) diff --git a/src/devices/machine/x2201.h b/src/devices/machine/x2201.h index 1e23493fdb7..d8b755d0ea2 100644 --- a/src/devices/machine/x2201.h +++ b/src/devices/machine/x2201.h @@ -34,7 +34,7 @@ class x2201_device : public device_t, public device_nvram_interface { public: // construction/destruction - x2201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + x2201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // read/write handlers u8 read(offs_t offset); diff --git a/src/devices/machine/x2212.cpp b/src/devices/machine/x2212.cpp index f8c7fb906e3..f52a60c1474 100644 --- a/src/devices/machine/x2212.cpp +++ b/src/devices/machine/x2212.cpp @@ -26,12 +26,12 @@ DEFINE_DEVICE_TYPE(X2210, x2210_device, "x2210", "Xicor X2210 64x4 NOVRAM") // x2212_device - constructor //------------------------------------------------- -x2212_device::x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +x2212_device::x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : x2212_device(mconfig, X2212, tag, owner, clock, 0x100) { } -x2212_device::x2212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int size_data) +x2212_device::x2212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int size_data) : device_t(mconfig, type, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_auto_save(false) @@ -183,7 +183,7 @@ void x2212_device::recall(int state) } -x2210_device::x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +x2210_device::x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : x2212_device(mconfig, X2210, tag, owner, clock, 0x40) { } diff --git a/src/devices/machine/x2212.h b/src/devices/machine/x2212.h index feeb91a0d23..a324bf1d7b3 100644 --- a/src/devices/machine/x2212.h +++ b/src/devices/machine/x2212.h @@ -38,7 +38,7 @@ class x2212_device : public device_t, public device_nvram_interface { public: // construction/destruction - x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); // some systems (like many early Atari games) wire up the /STORE signal // to fire on power-down, effectively creating an "auto-save" functionality @@ -52,7 +52,7 @@ public: void recall(int state); protected: - x2212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int size_data); + x2212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int size_data); // device-level overrides virtual void device_start() override; @@ -84,7 +84,7 @@ private: class x2210_device : public x2212_device { public: - x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); }; diff --git a/src/devices/machine/x76f041.cpp b/src/devices/machine/x76f041.cpp index 340cf224800..73e67032347 100644 --- a/src/devices/machine/x76f041.cpp +++ b/src/devices/machine/x76f041.cpp @@ -36,7 +36,7 @@ inline void ATTR_PRINTF( 3, 4 ) x76f041_device::verboselog( int n_level, const c // device type definition DEFINE_DEVICE_TYPE(X76F041, x76f041_device, "x76f041", "X76F041 Secure SerialFlash") -x76f041_device::x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +x76f041_device::x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t( mconfig, X76F041, tag, owner, clock ), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), diff --git a/src/devices/machine/x76f041.h b/src/devices/machine/x76f041.h index bd0a792cf9c..722d2e23081 100644 --- a/src/devices/machine/x76f041.h +++ b/src/devices/machine/x76f041.h @@ -18,7 +18,7 @@ class x76f041_device : public device_t, { public: // construction/destruction - x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + x76f041_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( write_cs ); DECLARE_WRITE_LINE_MEMBER( write_rst ); diff --git a/src/devices/machine/x76f100.cpp b/src/devices/machine/x76f100.cpp index 032020059d9..fefb2f4c878 100644 --- a/src/devices/machine/x76f100.cpp +++ b/src/devices/machine/x76f100.cpp @@ -34,7 +34,7 @@ inline void ATTR_PRINTF( 3, 4 ) x76f100_device::verboselog( int n_level, const c // device type definition DEFINE_DEVICE_TYPE(X76F100, x76f100_device, "x76f100", "X76F100 Secure SerialFlash") -x76f100_device::x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) +x76f100_device::x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock ) : device_t( mconfig, X76F100, tag, owner, clock ), device_nvram_interface(mconfig, *this), m_region(*this, DEVICE_SELF), diff --git a/src/devices/machine/x76f100.h b/src/devices/machine/x76f100.h index 38302f7caeb..eff43a514d5 100644 --- a/src/devices/machine/x76f100.h +++ b/src/devices/machine/x76f100.h @@ -17,7 +17,7 @@ class x76f100_device : public device_t, public device_nvram_interface { public: // construction/destruction - x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + x76f100_device( const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); DECLARE_WRITE_LINE_MEMBER( write_cs ); DECLARE_WRITE_LINE_MEMBER( write_rst ); diff --git a/src/devices/machine/xc1700e.cpp b/src/devices/machine/xc1700e.cpp index fe056664b07..e622ee90415 100644 --- a/src/devices/machine/xc1700e.cpp +++ b/src/devices/machine/xc1700e.cpp @@ -47,7 +47,7 @@ DEFINE_DEVICE_TYPE(XC1701, xc1701_device, "xc1701", "Xilinx 1,048,576 bit DEFINE_DEVICE_TYPE(XC1702L, xc1702l_device, "xc1702l", "Xilinx 2,097,152 bit Serial PROM") DEFINE_DEVICE_TYPE(XC1704L, xc1704l_device, "xc1704l", "Xilinx 4,194,304 bit Serial PROM") -base_xc1700e_device::base_xc1700e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 capacity) +base_xc1700e_device::base_xc1700e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 capacity) : device_t(mconfig, type, tag, owner, clock) , m_capacity(capacity) , m_region(*this, DEVICE_SELF) diff --git a/src/devices/machine/xc1700e.h b/src/devices/machine/xc1700e.h index 42a191c73ce..0ae51f4950f 100644 --- a/src/devices/machine/xc1700e.h +++ b/src/devices/machine/xc1700e.h @@ -17,7 +17,7 @@ public: int data_r(); protected: - base_xc1700e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u32 capacity); + base_xc1700e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, u32 capacity); // device_t overrides virtual void device_start() override; @@ -46,7 +46,7 @@ DECLARE_DEVICE_TYPE(XC1704L, xc1704l_device) class xc1736e_device : public base_xc1700e_device { public: - xc1736e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc1736e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC1736E, tag, owner, clock, 36'288UL) { } @@ -55,7 +55,7 @@ public: class xc1765e_device : public base_xc1700e_device { public: - xc1765e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc1765e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC1765E, tag, owner, clock, 65'536UL) { } @@ -64,7 +64,7 @@ public: class xc17128e_device : public base_xc1700e_device { public: - xc17128e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc17128e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC17128E, tag, owner, clock, 131'072UL) { } @@ -73,7 +73,7 @@ public: class xc17256e_device : public base_xc1700e_device { public: - xc17256e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc17256e_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC17256E, tag, owner, clock, 262'144UL) { } @@ -82,7 +82,7 @@ public: class xc17512l_device : public base_xc1700e_device { public: - xc17512l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc17512l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC17512L, tag, owner, clock, 524'288UL) { } @@ -91,7 +91,7 @@ public: class xc1701_device : public base_xc1700e_device { public: - xc1701_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc1701_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC1701, tag, owner, clock, 1'048'576UL) { } @@ -100,7 +100,7 @@ public: class xc1702l_device : public base_xc1700e_device { public: - xc1702l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc1702l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC1702L, tag, owner, clock, 2'097'152UL) { } @@ -109,7 +109,7 @@ public: class xc1704l_device : public base_xc1700e_device { public: - xc1704l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0) + xc1704l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()) : base_xc1700e_device(mconfig, XC1704L, tag, owner, clock, 4'194'304UL) { } diff --git a/src/devices/machine/ym2148.cpp b/src/devices/machine/ym2148.cpp index 88f7db02b1e..0c32b782924 100644 --- a/src/devices/machine/ym2148.cpp +++ b/src/devices/machine/ym2148.cpp @@ -16,7 +16,7 @@ TODO: DEFINE_DEVICE_TYPE(YM2148, ym2148_device, "ym2148", "Yamaha YM2148 MIDI/Keyboard Interface") -ym2148_device::ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ym2148_device::ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, YM2148, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_txd_handler(*this) diff --git a/src/devices/machine/ym2148.h b/src/devices/machine/ym2148.h index 07cacfbc589..525f5269c87 100644 --- a/src/devices/machine/ym2148.h +++ b/src/devices/machine/ym2148.h @@ -23,7 +23,7 @@ class ym2148_device : public device_t, public device_serial_interface { public: // construction/destruction - ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym2148_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // configuration helpers auto txd_handler() { return m_txd_handler.bind(); } diff --git a/src/devices/machine/ym3802.cpp b/src/devices/machine/ym3802.cpp index 4a8f6a7ffae..ab073b6057b 100644 --- a/src/devices/machine/ym3802.cpp +++ b/src/devices/machine/ym3802.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(YM3802, ym3802_device, "ym3802", "Yamaha YM3802 MCS MIDI Communication and Service Controller") -ym3802_device::ym3802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +ym3802_device::ym3802_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, YM3802, tag, owner, clock) , device_serial_interface(mconfig, *this) , m_irq_handler(*this) diff --git a/src/devices/machine/ym3802.h b/src/devices/machine/ym3802.h index 00e6683ed25..f5fd91ea35d 100644 --- a/src/devices/machine/ym3802.h +++ b/src/devices/machine/ym3802.h @@ -30,7 +30,7 @@ class ym3802_device : public device_t, public device_serial_interface { public: // construction/destruction - ym3802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ym3802_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/machine/z8038.cpp b/src/devices/machine/z8038.cpp index 699c43898ca..4640bb2267a 100644 --- a/src/devices/machine/z8038.cpp +++ b/src/devices/machine/z8038.cpp @@ -32,7 +32,7 @@ DEFINE_DEVICE_TYPE(Z8038, z8038_device, "z8038", "FIFO Input/Output Interface Unit") -z8038_device::z8038_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z8038_device::z8038_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z8038, tag, owner, clock) , m_out_int_cb(*this) , m_out_E_cb(*this) diff --git a/src/devices/machine/z8038.h b/src/devices/machine/z8038.h index 2e2201f10d6..2f6a199e7c7 100644 --- a/src/devices/machine/z8038.h +++ b/src/devices/machine/z8038.h @@ -9,7 +9,7 @@ class z8038_device : public device_t { public: - z8038_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z8038_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // port 1 and 2 I̅N̅T̅ output lines template <u8 Port> auto out_int_cb() { return m_out_int_cb[Port - 1].bind(); } diff --git a/src/devices/machine/z80ctc.cpp b/src/devices/machine/z80ctc.cpp index 6a6e728d548..0623725940f 100644 --- a/src/devices/machine/z80ctc.cpp +++ b/src/devices/machine/z80ctc.cpp @@ -76,7 +76,7 @@ DEFINE_DEVICE_TYPE(Z80CTC_CHANNEL, z80ctc_channel_device, "z80ctc_channel", "Z80 // z80ctc_device - constructor //------------------------------------------------- -z80ctc_device::z80ctc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +z80ctc_device::z80ctc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80CTC, tag, owner, clock) , device_z80daisy_interface(mconfig, *this) , m_intr_cb(*this) @@ -286,7 +286,7 @@ void z80ctc_device::interrupt_check() // z80ctc_channel_device - constructor //------------------------------------------------- -z80ctc_channel_device::z80ctc_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +z80ctc_channel_device::z80ctc_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80CTC_CHANNEL, tag, owner, clock), m_device(*this, DEVICE_SELF_OWNER), m_index(0), diff --git a/src/devices/machine/z80ctc.h b/src/devices/machine/z80ctc.h index 2e61a80df1b..8bfb441def9 100644 --- a/src/devices/machine/z80ctc.h +++ b/src/devices/machine/z80ctc.h @@ -47,7 +47,7 @@ class z80ctc_channel_device : public device_t public: // construction/destruction - z80ctc_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + z80ctc_channel_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock = XTAL()); protected: // device-level overrides @@ -82,11 +82,10 @@ class z80ctc_device : public device_t, public: // construction/destruction - z80ctc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + z80ctc_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto intr_callback() { return m_intr_cb.bind(); } template <int Channel> auto zc_callback() { return m_zc_cb[Channel].bind(); } // m_zc_cb[3] not supported on a standard ctc, only used for the tmpz84c015 - template <int Channel> void set_clk(u32 clock) { channel_config(Channel).set_clock(clock); } template <int Channel> void set_clk(const XTAL &xtal) { channel_config(Channel).set_clock(xtal); } // read/write handlers diff --git a/src/devices/machine/z80daisy_generic.cpp b/src/devices/machine/z80daisy_generic.cpp index 3a5b6562f30..92bf68c3612 100644 --- a/src/devices/machine/z80daisy_generic.cpp +++ b/src/devices/machine/z80daisy_generic.cpp @@ -25,7 +25,7 @@ DEFINE_DEVICE_TYPE(Z80DAISY_GENERIC, z80daisy_generic_device, "z80daisy_generic" // z80daisy_generic_device - constructor //------------------------------------------------- -z80daisy_generic_device::z80daisy_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +z80daisy_generic_device::z80daisy_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80DAISY_GENERIC, tag, owner, clock), device_z80daisy_interface(mconfig, *this), m_int_handler(*this), diff --git a/src/devices/machine/z80daisy_generic.h b/src/devices/machine/z80daisy_generic.h index d26b50e6ee7..34b01f1d7bd 100644 --- a/src/devices/machine/z80daisy_generic.h +++ b/src/devices/machine/z80daisy_generic.h @@ -22,7 +22,7 @@ class z80daisy_generic_device : public device_t, public device_z80daisy_interfac { public: // construction/destruction - z80daisy_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80daisy_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // callbacks auto int_handler() { return m_int_handler.bind(); } diff --git a/src/devices/machine/z80dma.cpp b/src/devices/machine/z80dma.cpp index 7ed0e61160f..9b00cade7b0 100644 --- a/src/devices/machine/z80dma.cpp +++ b/src/devices/machine/z80dma.cpp @@ -149,7 +149,7 @@ DEFINE_DEVICE_TYPE(Z80DMA, z80dma_device, "z80dma", "Z80 DMA Controller") // z80dma_device - constructor //------------------------------------------------- -z80dma_device::z80dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z80dma_device::z80dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80DMA, tag, owner, clock) , device_z80daisy_interface(mconfig, *this) , m_out_busreq_cb(*this) diff --git a/src/devices/machine/z80dma.h b/src/devices/machine/z80dma.h index 26613e74b80..11fd05f22b4 100644 --- a/src/devices/machine/z80dma.h +++ b/src/devices/machine/z80dma.h @@ -49,7 +49,7 @@ class z80dma_device : public device_t, { public: // construction/destruction - z80dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80dma_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_busreq_callback() { return m_out_busreq_cb.bind(); } auto out_int_callback() { return m_out_int_cb.bind(); } diff --git a/src/devices/machine/z80pio.cpp b/src/devices/machine/z80pio.cpp index e1664055f21..37c9ddd9a5f 100644 --- a/src/devices/machine/z80pio.cpp +++ b/src/devices/machine/z80pio.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(Z80PIO, z80pio_device, "z80pio", "Z80 PIO") // z80pio_device - constructor //------------------------------------------------- -z80pio_device::z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +z80pio_device::z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80PIO, tag, owner, clock), device_z80daisy_interface(mconfig, *this), m_out_int_cb(*this), diff --git a/src/devices/machine/z80pio.h b/src/devices/machine/z80pio.h index a448fd9d502..e7c7a867183 100644 --- a/src/devices/machine/z80pio.h +++ b/src/devices/machine/z80pio.h @@ -56,7 +56,7 @@ public: }; // construction/destruction - z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_int_callback() { return m_out_int_cb.bind(); } auto in_pa_callback() { return m_in_pa_cb.bind(); } diff --git a/src/devices/machine/z80scc.cpp b/src/devices/machine/z80scc.cpp index 020b2678bfd..c6a8a63401c 100644 --- a/src/devices/machine/z80scc.cpp +++ b/src/devices/machine/z80scc.cpp @@ -386,8 +386,8 @@ DEFINE_DEVICE_TYPE(SCC8523L, scc8523l_device, "scc8523l", "Zilog Z85 //------------------------------------------------- void z80scc_device::device_add_mconfig(machine_config &config) { - Z80SCC_CHANNEL(config, CHANA_TAG, 0); - Z80SCC_CHANNEL(config, CHANB_TAG, 0); + Z80SCC_CHANNEL(config, CHANA_TAG); + Z80SCC_CHANNEL(config, CHANB_TAG); } @@ -413,7 +413,7 @@ inline void z80scc_channel::out_dtr_cb(int state) //------------------------------------------------- // z80scc_device - constructor //------------------------------------------------- -z80scc_device::z80scc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant) +z80scc_device::z80scc_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_z80daisy_interface(mconfig, *this), m_wr9(0), @@ -440,42 +440,42 @@ z80scc_device::z80scc_device(const machine_config &mconfig, device_type type, co elem = 0; } -scc8030_device::scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc8030_device::scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC8030, tag, owner, clock, TYPE_SCC8030) { } -scc80c30_device::scc80c30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc80c30_device::scc80c30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC80C30, tag, owner, clock, TYPE_SCC80C30) { } -scc80230_device::scc80230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc80230_device::scc80230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC80230, tag, owner, clock, TYPE_SCC80230) { } -scc8530_device::scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc8530_device::scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC8530N, tag, owner, clock, TYPE_SCC8530) { } -scc85c30_device::scc85c30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc85c30_device::scc85c30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC85C30, tag, owner, clock, TYPE_SCC85C30) { } -scc85230_device::scc85230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc85230_device::scc85230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC85230, tag, owner, clock, TYPE_SCC85230) { } -scc85233_device::scc85233_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc85233_device::scc85233_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC85233, tag, owner, clock, TYPE_SCC85233) { } -scc8523l_device::scc8523l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +scc8523l_device::scc8523l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80scc_device(mconfig, SCC8523L, tag, owner, clock, TYPE_SCC8523L) { } @@ -1011,7 +1011,7 @@ void z80scc_device::ab_dc_w(offs_t offset, uint8_t data) //------------------------------------------------- // SCC_channel - constructor //------------------------------------------------- -z80scc_channel::z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z80scc_channel::z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80SCC_CHANNEL, tag, owner, clock), device_serial_interface(mconfig, *this), m_baudtimer(0), @@ -2915,8 +2915,8 @@ void z80scc_channel::update_serial() else { LOG("- BRG disabled\n"); - set_rcv_rate(0); - set_tra_rate(0); + set_rcv_rate(XTAL::u(0)); + set_tra_rate(XTAL::u(0)); } // TODO: Check registers for use of RTxC and TRxC, if used as direct Tx and/or Rx clocks set them to value as programmed // in m_uart->txca/txcb and rxca/rxcb respectivelly diff --git a/src/devices/machine/z80scc.h b/src/devices/machine/z80scc.h index 4ef274aba92..5bae5fe767b 100644 --- a/src/devices/machine/z80scc.h +++ b/src/devices/machine/z80scc.h @@ -53,7 +53,7 @@ class z80scc_channel : public device_t, friend class z80scc_device; public: - z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80scc_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_start() override; @@ -330,12 +330,12 @@ public: void set_cputag(const char *tag) { m_cputag = tag; } - void configure_channels(int rxa, int txa, int rxb, int txb) + void configure_channels(const XTAL &rxa, const XTAL &txa, const XTAL &rxb, const XTAL &txb) { - m_rxca = rxa; - m_txca = txa; - m_rxcb = rxb; - m_txcb = txb; + m_rxca = rxa.value(); + m_txca = txa.value(); + m_rxcb = rxb.value(); + m_txcb = txb.value(); } uint8_t dc_ab_r(offs_t offset); @@ -380,7 +380,7 @@ public: int get_extint_priority(int type); protected: - z80scc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant); + z80scc_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_resolve_objects() override; @@ -460,49 +460,49 @@ protected: class scc8030_device : public z80scc_device { public: - scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc80c30_device : public z80scc_device { public: - scc80c30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc80c30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc80230_device : public z80scc_device { public: - scc80230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc80230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc8530_device : public z80scc_device { public: - scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc85c30_device : public z80scc_device { public: - scc85c30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc85c30_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc85230_device : public z80scc_device { public: - scc85230_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc85230_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc85233_device : public z80scc_device { public: - scc85233_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc85233_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class scc8523l_device : public z80scc_device { public: - scc8523l_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + scc8523l_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; // device type definition diff --git a/src/devices/machine/z80sio.cpp b/src/devices/machine/z80sio.cpp index 8306c48bab4..5ba14295c4f 100644 --- a/src/devices/machine/z80sio.cpp +++ b/src/devices/machine/z80sio.cpp @@ -269,26 +269,26 @@ DEFINE_DEVICE_TYPE(MK68564, mk68564_device, "mk68564", "Most //------------------------------------------------- void z80sio_device::device_add_mconfig(machine_config &config) { - Z80SIO_CHANNEL(config, CHANA_TAG, 0); - Z80SIO_CHANNEL(config, CHANB_TAG, 0); + Z80SIO_CHANNEL(config, CHANA_TAG); + Z80SIO_CHANNEL(config, CHANB_TAG); } void z80dart_device::device_add_mconfig(machine_config &config) { - Z80DART_CHANNEL(config, CHANA_TAG, 0); - Z80DART_CHANNEL(config, CHANB_TAG, 0); + Z80DART_CHANNEL(config, CHANA_TAG); + Z80DART_CHANNEL(config, CHANB_TAG); } void i8274_device::device_add_mconfig(machine_config &config) { - I8274_CHANNEL(config, CHANA_TAG, 0); - I8274_CHANNEL(config, CHANB_TAG, 0); + I8274_CHANNEL(config, CHANA_TAG); + I8274_CHANNEL(config, CHANB_TAG); } void mk68564_device::device_add_mconfig(machine_config &config) { - MK68564_CHANNEL(config, CHANA_TAG, 0); - MK68564_CHANNEL(config, CHANB_TAG, 0); + MK68564_CHANNEL(config, CHANA_TAG); + MK68564_CHANNEL(config, CHANB_TAG); } @@ -397,7 +397,7 @@ void z80dart_channel::tx_setup_idle() //------------------------------------------------- // z80sio_device - constructor //------------------------------------------------- -z80sio_device::z80sio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +z80sio_device::z80sio_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_z80daisy_interface(mconfig, *this), m_chanA(*this, CHANA_TAG), @@ -416,32 +416,32 @@ z80sio_device::z80sio_device(const machine_config &mconfig, device_type type, co elem = 0; } -z80sio_device::z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +z80sio_device::z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80sio_device(mconfig, Z80SIO, tag, owner, clock) { } -z80dart_device::z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +z80dart_device::z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80sio_device(mconfig, Z80DART, tag, owner, clock) { } -i8274_device::i8274_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +i8274_device::i8274_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : z80sio_device(mconfig, type, tag, owner, clock) { } -i8274_device::i8274_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +i8274_device::i8274_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8274_device(mconfig, I8274, tag, owner, clock) { } -upd7201_device::upd7201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +upd7201_device::upd7201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8274_device(mconfig, UPD7201, tag, owner, clock) { } -mk68564_device::mk68564_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +mk68564_device::mk68564_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : i8274_device(mconfig, MK68564, tag, owner, clock) { } @@ -978,22 +978,22 @@ z80sio_channel::z80sio_channel( m_wr0 = m_wr1 = m_wr2 = m_wr3 = m_wr4 = m_wr5 = m_wr6 = m_wr7 = 0; } -z80sio_channel::z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z80sio_channel::z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80sio_channel(mconfig, Z80SIO_CHANNEL, tag, owner, clock, RR1_END_OF_FRAME | RR1_CRC_FRAMING_ERROR | RR1_RESIDUE_CODE_MASK) { } -z80dart_channel::z80dart_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z80dart_channel::z80dart_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80sio_channel(mconfig, Z80DART_CHANNEL, tag, owner, clock, RR1_END_OF_FRAME | RR1_CRC_FRAMING_ERROR | RR1_RESIDUE_CODE_MASK) { } -i8274_channel::i8274_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +i8274_channel::i8274_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80sio_channel(mconfig, I8274_CHANNEL, tag, owner, clock, RR1_RX_OVERRUN_ERROR) { } -mk68564_channel::mk68564_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mk68564_channel::mk68564_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : z80sio_channel(mconfig, MK68564_CHANNEL, tag, owner, clock, RR1_END_OF_FRAME | RR1_CRC_FRAMING_ERROR | RR1_RESIDUE_CODE_MASK) , m_tx_auto_enable(false) , m_brg_tc(0) diff --git a/src/devices/machine/z80sio.h b/src/devices/machine/z80sio.h index f8fbc1522c9..de27b405072 100644 --- a/src/devices/machine/z80sio.h +++ b/src/devices/machine/z80sio.h @@ -178,7 +178,7 @@ class z80sio_channel : public device_t friend class mk68564_device; public: - z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // read register handlers uint8_t do_sioreg_rr0(); @@ -397,7 +397,7 @@ protected: class z80dart_channel : public z80sio_channel { public: - z80dart_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80dart_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void enter_hunt_mode() override; @@ -414,7 +414,7 @@ protected: class i8274_channel : public z80sio_channel { public: - i8274_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8274_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -425,7 +425,7 @@ class mk68564_channel : public z80sio_channel friend class mk68564_device; public: - mk68564_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mk68564_channel(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -473,7 +473,7 @@ class z80sio_device : public device_t, public: // construction/destruction - z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_txda_callback() { return m_out_txd_cb[0].bind(); } auto out_txdb_callback() { return m_out_txd_cb[1].bind(); } @@ -526,7 +526,7 @@ public: DECLARE_WRITE_LINE_MEMBER( syncb_w ) { m_chanB->sync_w(state); } protected: - z80sio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + z80sio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device-level overrides virtual void device_validity_check(validity_checker &valid) const override; @@ -579,7 +579,7 @@ protected: class z80dart_device : public z80sio_device { public: - z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); DECLARE_WRITE_LINE_MEMBER( ria_w ) { m_chanA->sync_w(state); } DECLARE_WRITE_LINE_MEMBER( rib_w ) { m_chanB->sync_w(state); } @@ -592,12 +592,12 @@ protected: class i8274_device : public z80sio_device { public: - i8274_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + i8274_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t inta_r() { return m1_r(); } protected: - i8274_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + i8274_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); // device_t overrides virtual void device_add_mconfig(machine_config &config) override; @@ -613,13 +613,13 @@ protected: class upd7201_device : public i8274_device { public: - upd7201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + upd7201_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; class mk68564_device : public i8274_device { public: - mk68564_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + mk68564_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_xtal(uint32_t clock); void set_xtal(const XTAL &clock) { set_xtal(clock.value()); } diff --git a/src/devices/machine/z80sti.cpp b/src/devices/machine/z80sti.cpp index a72a370ec79..4ed129c2faa 100644 --- a/src/devices/machine/z80sti.cpp +++ b/src/devices/machine/z80sti.cpp @@ -76,7 +76,7 @@ const int z80sti_device::PRESCALER[] = { 0, 4, 10, 16, 50, 64, 100, 200 }; // z80sti_device - constructor //------------------------------------------------- -z80sti_device::z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +z80sti_device::z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : device_t(mconfig, Z80STI, tag, owner, clock) , device_serial_interface(mconfig, *this) , device_z80daisy_interface(mconfig, *this) diff --git a/src/devices/machine/z80sti.h b/src/devices/machine/z80sti.h index 9cd0ff40d59..9bee4619055 100644 --- a/src/devices/machine/z80sti.h +++ b/src/devices/machine/z80sti.h @@ -50,7 +50,7 @@ class z80sti_device : public device_t, { public: // construction/destruction - z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto out_int_cb() { return m_out_int_cb.bind(); } auto in_gpio_cb() { return m_in_gpio_cb.bind(); } diff --git a/src/devices/machine/z8536.cpp b/src/devices/machine/z8536.cpp index c30868d0dbb..4f21fa59125 100644 --- a/src/devices/machine/z8536.cpp +++ b/src/devices/machine/z8536.cpp @@ -776,7 +776,7 @@ void cio_base_device::external_port_w(int port, int bit, int state) // cio_base_device - constructor //------------------------------------------------- -cio_base_device::cio_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : +cio_base_device::cio_base_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_write_irq(*this), m_read_pa(*this), @@ -794,7 +794,7 @@ cio_base_device::cio_base_device(const machine_config &mconfig, device_type type // z8036_device - constructor //------------------------------------------------- -z8036_device::z8036_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +z8036_device::z8036_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cio_base_device(mconfig, Z8036, tag, owner, clock) { } @@ -804,7 +804,7 @@ z8036_device::z8036_device(const machine_config &mconfig, const char *tag, devic // z8536_device - constructor //------------------------------------------------- -z8536_device::z8536_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : +z8536_device::z8536_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : cio_base_device(mconfig, Z8536, tag, owner, clock), device_z80daisy_interface(mconfig, *this) { diff --git a/src/devices/machine/z8536.h b/src/devices/machine/z8536.h index 382649a15f9..ea1b624d940 100644 --- a/src/devices/machine/z8536.h +++ b/src/devices/machine/z8536.h @@ -104,7 +104,7 @@ public: protected: // construction/destruction - cio_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + cio_base_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; @@ -416,7 +416,7 @@ class z8036_device : public cio_base_device { public: // construction/destruction - z8036_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + z8036_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); @@ -428,7 +428,7 @@ class z8536_device : public cio_base_device, public device_z80daisy_interface { public: // construction/destruction - z8536_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + z8536_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); |