diff options
Diffstat (limited to 'src/devices/cpu/m6502')
54 files changed, 119 insertions, 119 deletions
diff --git a/src/devices/cpu/m6502/deco16.cpp b/src/devices/cpu/m6502/deco16.cpp index acd9983cc12..0b16a6db8b3 100644 --- a/src/devices/cpu/m6502/deco16.cpp +++ b/src/devices/cpu/m6502/deco16.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(DECO16, deco16_device, "deco16", "Data East DECO16") -deco16_device::deco16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +deco16_device::deco16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, DECO16, tag, owner, clock), io(nullptr), io_config("io", ENDIANNESS_LITTLE, 8, 16) diff --git a/src/devices/cpu/m6502/deco16.h b/src/devices/cpu/m6502/deco16.h index 63494f6b1d4..0d170f43df0 100644 --- a/src/devices/cpu/m6502/deco16.h +++ b/src/devices/cpu/m6502/deco16.h @@ -16,7 +16,7 @@ class deco16_device : public m6502_device { public: - deco16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + deco16_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; diff --git a/src/devices/cpu/m6502/m3745x.cpp b/src/devices/cpu/m6502/m3745x.cpp index 20b881f217e..60c23046544 100644 --- a/src/devices/cpu/m6502/m3745x.cpp +++ b/src/devices/cpu/m6502/m3745x.cpp @@ -37,7 +37,7 @@ DEFINE_DEVICE_TYPE(M37450, m37450_device, "m37450", "Mitsubishi M37450") //------------------------------------------------- // m3745x_device - constructor //------------------------------------------------- -m3745x_device::m3745x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map) : +m3745x_device::m3745x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map) : m740_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, internal_map), m_read_p(*this), @@ -393,12 +393,12 @@ void m37450_device::m37450_map(address_map &map) map(0x0100, 0x01ff).ram(); } -m37450_device::m37450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m37450_device::m37450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m37450_device(mconfig, M37450, tag, owner, clock) { } -m37450_device::m37450_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m37450_device::m37450_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m3745x_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(m37450_device::m37450_map), this)) { } diff --git a/src/devices/cpu/m6502/m3745x.h b/src/devices/cpu/m6502/m3745x.h index bab3558e0a2..c98c3d32f7c 100644 --- a/src/devices/cpu/m6502/m3745x.h +++ b/src/devices/cpu/m6502/m3745x.h @@ -53,7 +53,7 @@ public: protected: // construction/destruction - m3745x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal_map); + m3745x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map); // device-level overrides virtual void device_start() override; @@ -88,11 +88,11 @@ private: class m37450_device : public m3745x_device { public: - m37450_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m37450_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void m37450_map(address_map &map); protected: - m37450_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m37450_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; DECLARE_DEVICE_TYPE(M37450, m37450_device) diff --git a/src/devices/cpu/m6502/m4510.cpp b/src/devices/cpu/m6502/m4510.cpp index aa29a820dcd..56867b2a3ea 100644 --- a/src/devices/cpu/m6502/m4510.cpp +++ b/src/devices/cpu/m6502/m4510.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(M4510, m4510_device, "m4510", "CSG 4510") -m4510_device::m4510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m4510_device::m4510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m65ce02_device(mconfig, M4510, tag, owner, clock), map_enable(0), nomap(false) diff --git a/src/devices/cpu/m6502/m4510.h b/src/devices/cpu/m6502/m4510.h index eb6cf818489..fdbf3831a39 100644 --- a/src/devices/cpu/m6502/m4510.h +++ b/src/devices/cpu/m6502/m4510.h @@ -17,7 +17,7 @@ class m4510_device : public m65ce02_device { public: - m4510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m4510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; diff --git a/src/devices/cpu/m6502/m50734.cpp b/src/devices/cpu/m6502/m50734.cpp index b4e31f003c7..bd6cb72cf2f 100644 --- a/src/devices/cpu/m6502/m50734.cpp +++ b/src/devices/cpu/m6502/m50734.cpp @@ -23,7 +23,7 @@ // device type definition DEFINE_DEVICE_TYPE(M50734, m50734_device, "m50734", "Mitsubishi M50734") -m50734_device::m50734_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +m50734_device::m50734_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m740_device(mconfig, M50734, tag, owner, clock) , m_data_config("data", ENDIANNESS_LITTLE, 8, 16, 0) , m_port_in_cb(*this) diff --git a/src/devices/cpu/m6502/m50734.h b/src/devices/cpu/m6502/m50734.h index 0c98f86aa31..2e48f4c5cd5 100644 --- a/src/devices/cpu/m6502/m50734.h +++ b/src/devices/cpu/m6502/m50734.h @@ -54,7 +54,7 @@ public: //enum { //}; - m50734_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + m50734_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); // port callback configuration auto p0_in_cb() { return m_port_in_cb[0].bind(); } diff --git a/src/devices/cpu/m6502/m5074x.cpp b/src/devices/cpu/m6502/m5074x.cpp index 2d961b694a5..ca272aec3b5 100644 --- a/src/devices/cpu/m6502/m5074x.cpp +++ b/src/devices/cpu/m6502/m5074x.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(M50753, m50753_device, "m50753", "Mitsubishi M50753") //------------------------------------------------- // m5074x_device - constructor //------------------------------------------------- -m5074x_device::m5074x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addrbits, address_map_constructor internal_map) : +m5074x_device::m5074x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits, address_map_constructor internal_map) : m740_device(mconfig, type, tag, owner, clock), m_program_config("program", ENDIANNESS_LITTLE, 8, addrbits, 0, internal_map), m_read_p(*this), @@ -231,13 +231,13 @@ void m5074x_device::recalc_timer(int timer) switch (timer) { case 0: - hz = clock() / 16; + hz = clock().value() / 16; hz /= (m_tmr12pre + 2); m_timers[TIMER_1]->adjust(attotime::from_hz(hz), 0, attotime::from_hz(hz)); break; case 1: - hz = clock() / 16; + hz = clock().value() / 16; hz /= (m_tmr12pre + 2); m_timers[TIMER_2]->adjust(attotime::from_hz(hz), 0, attotime::from_hz(hz)); break; @@ -254,7 +254,7 @@ void m5074x_device::recalc_timer(int timer) } else { - hz = clock() / 16; + hz = clock().value() / 16; hz /= (m_tmrxpre + 2); m_timers[TIMER_X]->adjust(attotime::from_hz(hz), 0, attotime::from_hz(hz)); } @@ -458,12 +458,12 @@ void m50740_device::m50740_map(address_map &map) map(0x1400, 0x1fff).rom().region(DEVICE_SELF, 0); } -m50740_device::m50740_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m50740_device::m50740_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m50740_device(mconfig, M50740, tag, owner, clock) { } -m50740_device::m50740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m50740_device::m50740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m5074x_device(mconfig, type, tag, owner, clock, 13, address_map_constructor(FUNC(m50740_device::m50740_map), this)) { } @@ -477,12 +477,12 @@ void m50741_device::m50741_map(address_map &map) map(0x1000, 0x1fff).rom().region(DEVICE_SELF, 0); } -m50741_device::m50741_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m50741_device::m50741_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m50741_device(mconfig, M50741, tag, owner, clock) { } -m50741_device::m50741_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m50741_device::m50741_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m5074x_device(mconfig, type, tag, owner, clock, 13, address_map_constructor(FUNC(m50741_device::m50741_map), this)) { } @@ -506,12 +506,12 @@ static constexpr u8 IRQ_50753_INT1REQ = 0x80; static constexpr u8 IRQ_50753_INTADC = 0x20; static constexpr u8 IRQ_50753_INT2REQ = 0x02; -m50753_device::m50753_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m50753_device::m50753_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m50753_device(mconfig, M50753, tag, owner, clock) { } -m50753_device::m50753_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m50753_device::m50753_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m5074x_device(mconfig, type, tag, owner, clock, 16, address_map_constructor(FUNC(m50753_device::m50753_map), this)), m_ad_in(*this), m_in_p(*this), diff --git a/src/devices/cpu/m6502/m5074x.h b/src/devices/cpu/m6502/m5074x.h index 2b860a56e83..21f0b21402b 100644 --- a/src/devices/cpu/m6502/m5074x.h +++ b/src/devices/cpu/m6502/m5074x.h @@ -51,7 +51,7 @@ public: protected: // construction/destruction - m5074x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addrbits, address_map_constructor internal_map); + m5074x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int addrbits, address_map_constructor internal_map); // device-level overrides virtual void device_start() override; @@ -90,10 +90,10 @@ private: class m50740_device : public m5074x_device { public: - m50740_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m50740_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - m50740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m50740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: void m50740_map(address_map &map); @@ -102,10 +102,10 @@ private: class m50741_device : public m5074x_device { public: - m50741_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m50741_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - m50741_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m50741_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); private: void m50741_map(address_map &map); @@ -114,7 +114,7 @@ private: class m50753_device : public m5074x_device { public: - m50753_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m50753_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); enum { @@ -127,7 +127,7 @@ public: auto read_in_p() { return m_in_p.bind(); } protected: - m50753_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m50753_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/cpu/m6502/m6500_1.cpp b/src/devices/cpu/m6502/m6500_1.cpp index 5767899755e..c40582e13b3 100644 --- a/src/devices/cpu/m6502/m6500_1.cpp +++ b/src/devices/cpu/m6502/m6500_1.cpp @@ -91,7 +91,7 @@ constexpr u8 CR_CTRO = 0x80U; DEFINE_DEVICE_TYPE(M6500_1, m6500_1_device, "m6500_1", "MOS Technology 6500/1"); -m6500_1_device::m6500_1_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) +m6500_1_device::m6500_1_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock) : m6502_mcu_device(mconfig, M6500_1, tag, owner, clock) , m_port_in_cb{ *this } , m_port_out_cb{ *this } diff --git a/src/devices/cpu/m6502/m6500_1.h b/src/devices/cpu/m6502/m6500_1.h index 0a4a07a6ff9..45cc3acea90 100644 --- a/src/devices/cpu/m6502/m6500_1.h +++ b/src/devices/cpu/m6502/m6500_1.h @@ -44,7 +44,7 @@ class m6500_1_device : public m6502_mcu_device { public: - m6500_1_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + m6500_1_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock); auto pa_in_cb() { return m_port_in_cb[0].bind(); } auto pb_in_cb() { return m_port_in_cb[1].bind(); } diff --git a/src/devices/cpu/m6502/m6502.cpp b/src/devices/cpu/m6502/m6502.cpp index 55276aeba00..eece2c86708 100644 --- a/src/devices/cpu/m6502/m6502.cpp +++ b/src/devices/cpu/m6502/m6502.cpp @@ -15,17 +15,17 @@ DEFINE_DEVICE_TYPE(M6502, m6502_device, "m6502", "MOS Technology 6502") DEFINE_DEVICE_TYPE(M6512, m6512_device, "m6512", "MOS Technology 6512") -m6502_device::m6502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6502_device::m6502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6502, tag, owner, clock) { } -m6512_device::m6512_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6512_device::m6512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6512, tag, owner, clock) { } -m6502_device::m6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m6502_device::m6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : cpu_device(mconfig, type, tag, owner, clock), sync_w(*this), program_config("program", ENDIANNESS_LITTLE, 8, 16), @@ -565,7 +565,7 @@ void m6502_device::mi_default14::write(uint16_t adr, uint8_t val) program14.write_byte(adr, val); } -m6502_mcu_device::m6502_mcu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m6502_mcu_device::m6502_mcu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m6502.h b/src/devices/cpu/m6502/m6502.h index 4b05d7a0846..445050e739e 100644 --- a/src/devices/cpu/m6502/m6502.h +++ b/src/devices/cpu/m6502/m6502.h @@ -35,7 +35,7 @@ public: virtual void write_9(uint16_t adr, uint8_t val); }; - m6502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_address_width(int width, bool custom_interface) { program_config.m_addr_width = width; @@ -54,7 +54,7 @@ public: devcb_write_line sync_w; protected: - m6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m6502_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); class mi_default : public memory_interface { public: @@ -278,7 +278,7 @@ protected: class m6502_mcu_device : public m6502_device { protected: - m6502_mcu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m6502_mcu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); void internal_update() { internal_update(total_cycles()); } virtual void internal_update(uint64_t current_time) = 0; @@ -290,7 +290,7 @@ protected: class m6512_device : public m6502_device { public: - m6512_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6512_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; enum { diff --git a/src/devices/cpu/m6502/m6504.cpp b/src/devices/cpu/m6502/m6504.cpp index 51859f178f5..5d34e784249 100644 --- a/src/devices/cpu/m6502/m6504.cpp +++ b/src/devices/cpu/m6502/m6504.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(M6504, m6504_device, "m6504", "MOS Technology 6504") -m6504_device::m6504_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6504_device::m6504_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6504, tag, owner, clock) { program_config.m_addr_width = 13; diff --git a/src/devices/cpu/m6502/m6504.h b/src/devices/cpu/m6502/m6504.h index bf4dee43a76..83dfe25b22c 100644 --- a/src/devices/cpu/m6502/m6504.h +++ b/src/devices/cpu/m6502/m6504.h @@ -15,7 +15,7 @@ class m6504_device : public m6502_device { public: - m6504_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6504_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/m6502/m6507.cpp b/src/devices/cpu/m6502/m6507.cpp index 7a102e4b110..6ec2a023881 100644 --- a/src/devices/cpu/m6502/m6507.cpp +++ b/src/devices/cpu/m6502/m6507.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(M6507, m6507_device, "m6507", "MOS Technology 6507") -m6507_device::m6507_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6507_device::m6507_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6507, tag, owner, clock) { program_config.m_addr_width = 13; diff --git a/src/devices/cpu/m6502/m6507.h b/src/devices/cpu/m6502/m6507.h index 50466608d2a..037dc7a7c87 100644 --- a/src/devices/cpu/m6502/m6507.h +++ b/src/devices/cpu/m6502/m6507.h @@ -15,7 +15,7 @@ class m6507_device : public m6502_device { public: - m6507_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6507_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; diff --git a/src/devices/cpu/m6502/m6509.cpp b/src/devices/cpu/m6502/m6509.cpp index 3ffbeda05fc..212ca66171f 100644 --- a/src/devices/cpu/m6502/m6509.cpp +++ b/src/devices/cpu/m6502/m6509.cpp @@ -14,7 +14,7 @@ DEFINE_DEVICE_TYPE(M6509, m6509_device, "m6509", "MOS Technology 6509") -m6509_device::m6509_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6509_device::m6509_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M6509, tag, owner, clock), bank_i(0), bank_y(0) { program_config.m_addr_width = 20; diff --git a/src/devices/cpu/m6502/m6509.h b/src/devices/cpu/m6502/m6509.h index 4359c691c0e..d86f14e2d0c 100644 --- a/src/devices/cpu/m6502/m6509.h +++ b/src/devices/cpu/m6502/m6509.h @@ -15,7 +15,7 @@ class m6509_device : public m6502_device { public: - m6509_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6509_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; virtual void do_exec_full() override; diff --git a/src/devices/cpu/m6502/m6510.cpp b/src/devices/cpu/m6502/m6510.cpp index 706c1407fcb..2188fa17802 100644 --- a/src/devices/cpu/m6502/m6510.cpp +++ b/src/devices/cpu/m6502/m6510.cpp @@ -18,12 +18,12 @@ DEFINE_DEVICE_TYPE(M6510, m6510_device, "m6510", "MOS Technology 6510") DEFINE_DEVICE_TYPE(M6508, m6508_device, "m6508", "MOS Technology 6508") -m6510_device::m6510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6510_device::m6510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6510_device(mconfig, M6510, tag, owner, clock) { } -m6510_device::m6510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m6510_device::m6510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, type, tag, owner, clock), read_port(*this), write_port(*this), dir(0), port(0), drive(0) @@ -151,7 +151,7 @@ void m6510_device::mi_6510::write(uint16_t adr, uint8_t val) } -m6508_device::m6508_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6508_device::m6508_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6510_device(mconfig, M6508, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m6510.h b/src/devices/cpu/m6502/m6510.h index 284bc885180..6e96f36bd6d 100644 --- a/src/devices/cpu/m6502/m6510.h +++ b/src/devices/cpu/m6502/m6510.h @@ -16,7 +16,7 @@ class m6510_device : public m6502_device { public: - m6510_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6510_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t get_port(); void set_pulls(uint8_t pullup, uint8_t pulldown); @@ -29,7 +29,7 @@ public: virtual void do_exec_partial() override; protected: - m6510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m6510_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); class mi_6510 : public memory_interface { public: @@ -75,7 +75,7 @@ protected: class m6508_device : public m6510_device { public: - m6508_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6508_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/cpu/m6502/m6510t.cpp b/src/devices/cpu/m6502/m6510t.cpp index a8b543a8198..6094a20ff29 100644 --- a/src/devices/cpu/m6502/m6510t.cpp +++ b/src/devices/cpu/m6502/m6510t.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(M6510T, m6510t_device, "m6510t", "MOS Technology 6510T") -m6510t_device::m6510t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m6510t_device::m6510t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6510_device(mconfig, M6510T, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m6510t.h b/src/devices/cpu/m6502/m6510t.h index 20db82b97e9..47fa8063355 100644 --- a/src/devices/cpu/m6502/m6510t.h +++ b/src/devices/cpu/m6502/m6510t.h @@ -15,7 +15,7 @@ class m6510t_device : public m6510_device { public: - m6510t_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6510t_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; enum { diff --git a/src/devices/cpu/m6502/m65c02.cpp b/src/devices/cpu/m6502/m65c02.cpp index fbfd2964f20..61d8b09c3e2 100644 --- a/src/devices/cpu/m6502/m65c02.cpp +++ b/src/devices/cpu/m6502/m65c02.cpp @@ -15,12 +15,12 @@ DEFINE_DEVICE_TYPE(M65C02, m65c02_device, "m65c02", "WDC W65C02") -m65c02_device::m65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m65c02_device::m65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, M65C02, tag, owner, clock) { } -m65c02_device::m65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m65c02_device::m65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m65c02.h b/src/devices/cpu/m6502/m65c02.h index 5a89f301236..3f2a39e6871 100644 --- a/src/devices/cpu/m6502/m65c02.h +++ b/src/devices/cpu/m6502/m65c02.h @@ -17,14 +17,14 @@ class m65c02_device : public m6502_device { public: - m65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; virtual void do_exec_full() override; virtual void do_exec_partial() override; protected: - m65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); #define O(o) void o ## _full(); void o ## _partial() diff --git a/src/devices/cpu/m6502/m65ce02.cpp b/src/devices/cpu/m6502/m65ce02.cpp index e6f80e4df09..88c391e7a6b 100644 --- a/src/devices/cpu/m6502/m65ce02.cpp +++ b/src/devices/cpu/m6502/m65ce02.cpp @@ -14,12 +14,12 @@ DEFINE_DEVICE_TYPE(M65CE02, m65ce02_device, "m65ce02", "CSG 65CE02") -m65ce02_device::m65ce02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m65ce02_device::m65ce02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m65ce02_device(mconfig, M65CE02, tag, owner, clock) { } -m65ce02_device::m65ce02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m65ce02_device::m65ce02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m65c02_device(mconfig, type, tag, owner, clock), TMP3(0), Z(0), B(0) { } diff --git a/src/devices/cpu/m6502/m65ce02.h b/src/devices/cpu/m6502/m65ce02.h index 6e27c66e010..159e214f75f 100644 --- a/src/devices/cpu/m6502/m65ce02.h +++ b/src/devices/cpu/m6502/m65ce02.h @@ -16,14 +16,14 @@ class m65ce02_device : public m65c02_device { public: - m65ce02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m65ce02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; virtual void do_exec_full() override; virtual void do_exec_partial() override; protected: - m65ce02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m65ce02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); uint16_t TMP3; /* temporary internal values */ uint8_t Z; /* Z index register */ diff --git a/src/devices/cpu/m6502/m65sc02.cpp b/src/devices/cpu/m6502/m65sc02.cpp index 93a9f18c7b6..9dc161f973a 100644 --- a/src/devices/cpu/m6502/m65sc02.cpp +++ b/src/devices/cpu/m6502/m65sc02.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(M65SC02, m65sc02_device, "m65sc02", "GTE G65SC02") -m65sc02_device::m65sc02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m65sc02_device::m65sc02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : r65c02_device(mconfig, M65SC02, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m65sc02.h b/src/devices/cpu/m6502/m65sc02.h index 686411c0b22..6ebd3602792 100644 --- a/src/devices/cpu/m6502/m65sc02.h +++ b/src/devices/cpu/m6502/m65sc02.h @@ -15,7 +15,7 @@ class m65sc02_device : public r65c02_device { public: - m65sc02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m65sc02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; enum { diff --git a/src/devices/cpu/m6502/m740.cpp b/src/devices/cpu/m6502/m740.cpp index d9feb8071d5..e1494e0e7fa 100644 --- a/src/devices/cpu/m6502/m740.cpp +++ b/src/devices/cpu/m6502/m740.cpp @@ -11,7 +11,7 @@ #include "emu.h" #include "m740.h" -m740_device::m740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +m740_device::m740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, type, tag, owner, clock), m_irq_multiplex(0), m_irq_vector(0) { } diff --git a/src/devices/cpu/m6502/m740.h b/src/devices/cpu/m6502/m740.h index de483675f81..a1a243bf258 100644 --- a/src/devices/cpu/m6502/m740.h +++ b/src/devices/cpu/m6502/m740.h @@ -51,7 +51,7 @@ protected: virtual void do_exec_partial() override; virtual void execute_set_input(int inputnum, int state) override; - m740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + m740_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); #define O(o) void o ## _full(); void o ## _partial() diff --git a/src/devices/cpu/m6502/m7501.cpp b/src/devices/cpu/m6502/m7501.cpp index 912a7a023dd..b5b86dde7d3 100644 --- a/src/devices/cpu/m6502/m7501.cpp +++ b/src/devices/cpu/m6502/m7501.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(M7501, m7501_device, "m7501", "M7501") -m7501_device::m7501_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m7501_device::m7501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6510_device(mconfig, M7501, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m7501.h b/src/devices/cpu/m6502/m7501.h index baa26668fab..88c711df2db 100644 --- a/src/devices/cpu/m6502/m7501.h +++ b/src/devices/cpu/m6502/m7501.h @@ -15,7 +15,7 @@ class m7501_device : public m6510_device { public: - m7501_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m7501_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; enum { diff --git a/src/devices/cpu/m6502/m8502.cpp b/src/devices/cpu/m6502/m8502.cpp index 356ed95c0fe..f956a98a08f 100644 --- a/src/devices/cpu/m6502/m8502.cpp +++ b/src/devices/cpu/m6502/m8502.cpp @@ -13,7 +13,7 @@ DEFINE_DEVICE_TYPE(M8502, m8502_device, "m8502", "MOS Technology 8502") -m8502_device::m8502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +m8502_device::m8502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6510_device(mconfig, M8502, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/m8502.h b/src/devices/cpu/m6502/m8502.h index cdd9c8c702f..734d5509e88 100644 --- a/src/devices/cpu/m6502/m8502.h +++ b/src/devices/cpu/m6502/m8502.h @@ -16,7 +16,7 @@ class m8502_device : public m6510_device { public: - m8502_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m8502_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; enum { diff --git a/src/devices/cpu/m6502/r65c02.cpp b/src/devices/cpu/m6502/r65c02.cpp index 190f370c933..ecda0a9f29d 100644 --- a/src/devices/cpu/m6502/r65c02.cpp +++ b/src/devices/cpu/m6502/r65c02.cpp @@ -14,12 +14,12 @@ DEFINE_DEVICE_TYPE(R65C02, r65c02_device, "r65c02", "Rockwell R65C02") -r65c02_device::r65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +r65c02_device::r65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : r65c02_device(mconfig, R65C02, tag, owner, clock) { } -r65c02_device::r65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +r65c02_device::r65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m65c02_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/r65c02.h b/src/devices/cpu/m6502/r65c02.h index a28ccd9d932..2e8fa666d68 100644 --- a/src/devices/cpu/m6502/r65c02.h +++ b/src/devices/cpu/m6502/r65c02.h @@ -15,14 +15,14 @@ class r65c02_device : public m65c02_device { public: - r65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + r65c02_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; virtual void do_exec_full() override; virtual void do_exec_partial() override; protected: - r65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + r65c02_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); }; enum { diff --git a/src/devices/cpu/m6502/r65c19.cpp b/src/devices/cpu/m6502/r65c19.cpp index ffd6c3ee2db..d685b3e6703 100644 --- a/src/devices/cpu/m6502/r65c19.cpp +++ b/src/devices/cpu/m6502/r65c19.cpp @@ -16,7 +16,7 @@ DEFINE_DEVICE_TYPE(R65C19, r65c19_device, "r65c19", "Rockwell R65C19 MCU") DEFINE_DEVICE_TYPE(L2800, l2800_device, "l2800", "Rockwell L2800 MCU") -r65c19_device::r65c19_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map) +r65c19_device::r65c19_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map) : r65c02_device(mconfig, type, tag, owner, clock) , m_w(0) , m_i(0) @@ -26,19 +26,19 @@ r65c19_device::r65c19_device(const machine_config &mconfig, device_type type, co program_config.m_internal_map = std::move(internal_map); } -r65c19_device::r65c19_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +r65c19_device::r65c19_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : r65c19_device(mconfig, R65C19, tag, owner, clock, address_map_constructor()) { } -c39_device::c39_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map) +c39_device::c39_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map) : r65c19_device(mconfig, type, tag, owner, clock, internal_map) , m_exp_config("expansion", ENDIANNESS_LITTLE, 8, 21, 0) , m_es4_config("es4", ENDIANNESS_LITTLE, 8, 9, 0) { } -l2800_device::l2800_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +l2800_device::l2800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : c39_device(mconfig, L2800, tag, owner, clock, address_map_constructor(FUNC(l2800_device::internal_map), this)) { } diff --git a/src/devices/cpu/m6502/r65c19.h b/src/devices/cpu/m6502/r65c19.h index 6f018fb661b..20cd9fe7442 100644 --- a/src/devices/cpu/m6502/r65c19.h +++ b/src/devices/cpu/m6502/r65c19.h @@ -18,10 +18,10 @@ public: R65C19_I }; - r65c19_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + r65c19_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: - r65c19_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map); + r65c19_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map); virtual void device_start() override; virtual void device_reset() override; @@ -110,7 +110,7 @@ public: }; protected: - c39_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map); + c39_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map); virtual space_config_vector memory_space_config() const override; @@ -153,7 +153,7 @@ private: class l2800_device : public c39_device { public: - l2800_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + l2800_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); private: void internal_map(address_map &map); diff --git a/src/devices/cpu/m6502/rp2a03.cpp b/src/devices/cpu/m6502/rp2a03.cpp index 25e43144db8..c14b3995445 100644 --- a/src/devices/cpu/m6502/rp2a03.cpp +++ b/src/devices/cpu/m6502/rp2a03.cpp @@ -53,19 +53,19 @@ void rp2a03_device::rp2a03_map(address_map &map) -rp2a03_core_device::rp2a03_core_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rp2a03_core_device::rp2a03_core_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, type, tag, owner, clock) { } -rp2a03_core_device::rp2a03_core_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rp2a03_core_device::rp2a03_core_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rp2a03_core_device(mconfig, RP2A03_CORE, tag, owner, clock) { } -rp2a03_device::rp2a03_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +rp2a03_device::rp2a03_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : rp2a03_core_device(mconfig, type, tag, owner, clock) , device_mixer_interface(mconfig, *this, 1) , m_apu(*this, "nesapu") @@ -73,12 +73,12 @@ rp2a03_device::rp2a03_device(const machine_config &mconfig, device_type type, co program_config.m_internal_map = address_map_constructor(FUNC(rp2a03_device::rp2a03_map), this); } -rp2a03_device::rp2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rp2a03_device::rp2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rp2a03_device(mconfig, RP2A03, tag, owner, clock) { } -rp2a03g_device::rp2a03g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +rp2a03g_device::rp2a03g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : rp2a03_device(mconfig, RP2A03G, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/rp2a03.h b/src/devices/cpu/m6502/rp2a03.h index 412837cd885..99079341623 100644 --- a/src/devices/cpu/m6502/rp2a03.h +++ b/src/devices/cpu/m6502/rp2a03.h @@ -17,7 +17,7 @@ class rp2a03_core_device : public m6502_device { public: - rp2a03_core_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp2a03_core_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; @@ -25,7 +25,7 @@ public: virtual void do_exec_partial() override; protected: - rp2a03_core_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rp2a03_core_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); #define O(o) void o ## _full(); void o ## _partial() @@ -43,7 +43,7 @@ private: class rp2a03_device : public rp2a03_core_device, public device_mixer_interface { public: - rp2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp2a03_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); uint8_t psg1_4014_r(); uint8_t psg1_4015_r(); @@ -53,7 +53,7 @@ public: void rp2a03_map(address_map &map); protected: - rp2a03_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + rp2a03_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); required_device<nesapu_device> m_apu; @@ -66,7 +66,7 @@ protected: class rp2a03g_device : public rp2a03_device { public: - rp2a03g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + rp2a03g_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/cpu/m6502/st2204.cpp b/src/devices/cpu/m6502/st2204.cpp index 0e8541be87a..dc1fb605de4 100644 --- a/src/devices/cpu/m6502/st2204.cpp +++ b/src/devices/cpu/m6502/st2204.cpp @@ -40,7 +40,7 @@ DEFINE_DEVICE_TYPE(ST2202, st2202_device, "st2202", "Sitronix ST2202 Integrated Microcontroller") DEFINE_DEVICE_TYPE(ST2204, st2204_device, "st2204", "Sitronix ST2204 Integrated Microcontroller") -st2204_device::st2204_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor map) +st2204_device::st2204_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor map) : st2xxx_device(mconfig, type, tag, owner, clock, map, 26, false) // logical; only 23 address lines are brought out , m_dac_callback(*this) , m_tmode{0} @@ -58,12 +58,12 @@ st2204_device::st2204_device(const machine_config &mconfig, device_type type, co { } -st2204_device::st2204_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +st2204_device::st2204_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : st2204_device(mconfig, ST2204, tag, owner, clock, address_map_constructor(FUNC(st2204_device::int_map), this)) { } -st2202_device::st2202_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +st2202_device::st2202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : st2204_device(mconfig, ST2202, tag, owner, clock, address_map_constructor(FUNC(st2202_device::int_map), this)) { } diff --git a/src/devices/cpu/m6502/st2204.h b/src/devices/cpu/m6502/st2204.h index c1fbe707fd9..f30b3765f50 100644 --- a/src/devices/cpu/m6502/st2204.h +++ b/src/devices/cpu/m6502/st2204.h @@ -30,12 +30,12 @@ public: ST_DMD }; - st2204_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + st2204_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto dac_callback() { return m_dac_callback.bind(); } protected: - st2204_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor int_map); + st2204_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor int_map); virtual void device_resolve_objects() override; virtual void device_start() override; @@ -148,7 +148,7 @@ private: class st2202_device : public st2204_device { public: - st2202_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + st2202_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual u8 st2xxx_misc_mask() const override { return 0x0f; } diff --git a/src/devices/cpu/m6502/st2205u.cpp b/src/devices/cpu/m6502/st2205u.cpp index ac50492e325..673c0815770 100644 --- a/src/devices/cpu/m6502/st2205u.cpp +++ b/src/devices/cpu/m6502/st2205u.cpp @@ -51,7 +51,7 @@ DEFINE_DEVICE_TYPE(ST2205U, st2205u_device, "st2205u", "Sitronix ST2205U Integrated Microcontroller") DEFINE_DEVICE_TYPE(ST2302U, st2302u_device, "st2302u", "Sitronix ST2302U Integrated Microcontroller") -st2205u_base_device::st2205u_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram) +st2205u_base_device::st2205u_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram) : st2xxx_device(mconfig, type, tag, owner, clock, internal_map, data_bits, has_banked_ram) , device_sound_interface(mconfig, *this) , m_stream(nullptr) @@ -82,7 +82,7 @@ st2205u_base_device::st2205u_base_device(const machine_config &mconfig, device_t { } -st2205u_device::st2205u_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +st2205u_device::st2205u_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : st2205u_base_device(mconfig, ST2205U, tag, owner, clock, address_map_constructor(FUNC(st2205u_device::int_map), this), 26, // logical; only 23 address lines are brought out @@ -93,7 +93,7 @@ st2205u_device::st2205u_device(const machine_config &mconfig, const char *tag, d { } -st2302u_device::st2302u_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) +st2302u_device::st2302u_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : st2205u_base_device(mconfig, ST2302U, tag, owner, clock, address_map_constructor(FUNC(st2302u_device::int_map), this), 26, // ??? diff --git a/src/devices/cpu/m6502/st2205u.h b/src/devices/cpu/m6502/st2205u.h index bd73e481822..bbf0e8f05cd 100644 --- a/src/devices/cpu/m6502/st2205u.h +++ b/src/devices/cpu/m6502/st2205u.h @@ -59,7 +59,7 @@ public: static constexpr feature_type imperfect_features() { return feature::SOUND; } protected: - st2205u_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram); + st2205u_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram); virtual void device_reset() override; @@ -180,7 +180,7 @@ public: ST_BRR }; - st2205u_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + st2205u_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual void device_start() override; @@ -254,7 +254,7 @@ private: class st2302u_device : public st2205u_base_device { public: - st2302u_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + st2302u_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/cpu/m6502/st2xxx.cpp b/src/devices/cpu/m6502/st2xxx.cpp index 480460bbe67..c9dd74ca018 100644 --- a/src/devices/cpu/m6502/st2xxx.cpp +++ b/src/devices/cpu/m6502/st2xxx.cpp @@ -42,7 +42,7 @@ //#define VERBOSE (LOG_IRQ | LOG_BT | LOG_LCDC) #include "logmacro.h" -st2xxx_device::st2xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram) +st2xxx_device::st2xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram) : w65c02s_device(mconfig, type, tag, owner, clock) , m_data_config("data", ENDIANNESS_LITTLE, 8, data_bits, 0) , m_in_port_cb(*this) diff --git a/src/devices/cpu/m6502/st2xxx.h b/src/devices/cpu/m6502/st2xxx.h index 811c2008d49..430fac1df1e 100644 --- a/src/devices/cpu/m6502/st2xxx.h +++ b/src/devices/cpu/m6502/st2xxx.h @@ -85,7 +85,7 @@ public: auto out_pl_callback() { return m_out_port_cb[6].bind(); } protected: - st2xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram); + st2xxx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor internal_map, int data_bits, bool has_banked_ram); virtual space_config_vector memory_space_config() const override; virtual void device_resolve_objects() override; diff --git a/src/devices/cpu/m6502/w65c02s.cpp b/src/devices/cpu/m6502/w65c02s.cpp index 171db777dc2..d44c05ec5a8 100644 --- a/src/devices/cpu/m6502/w65c02s.cpp +++ b/src/devices/cpu/m6502/w65c02s.cpp @@ -15,12 +15,12 @@ DEFINE_DEVICE_TYPE(W65C02S, w65c02s_device, "w65c02s", "WDC W65C02S") -w65c02s_device::w65c02s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +w65c02s_device::w65c02s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : w65c02s_device(mconfig, W65C02S, tag, owner, clock) { } -w65c02s_device::w65c02s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +w65c02s_device::w65c02s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m65c02_device(mconfig, type, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/w65c02s.h b/src/devices/cpu/m6502/w65c02s.h index a5848f86e68..b07da3ab58b 100644 --- a/src/devices/cpu/m6502/w65c02s.h +++ b/src/devices/cpu/m6502/w65c02s.h @@ -16,14 +16,14 @@ class w65c02s_device : public m65c02_device { public: - w65c02s_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + w65c02s_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; virtual void do_exec_full() override; virtual void do_exec_partial() override; protected: - w65c02s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + w65c02s_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual uint8_t read_vector(uint16_t adr) { return mintf->read_arg(adr); } virtual void end_interrupt() { } diff --git a/src/devices/cpu/m6502/xavix.cpp b/src/devices/cpu/m6502/xavix.cpp index c8f98a0e8f7..1ae031ee81f 100644 --- a/src/devices/cpu/m6502/xavix.cpp +++ b/src/devices/cpu/m6502/xavix.cpp @@ -33,12 +33,12 @@ DEFINE_DEVICE_TYPE(XAVIX, xavix_device, "xavix", "XaviX (SSD 97 / SSD 98)") -xavix_device::xavix_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +xavix_device::xavix_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : xavix_device(mconfig, XAVIX, tag, owner, clock) { } -xavix_device::xavix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +xavix_device::xavix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6502_device(mconfig, type, tag, owner, clock), XPC(0), m_lowbus_config("lowbus", ENDIANNESS_LITTLE, 8, 15), diff --git a/src/devices/cpu/m6502/xavix.h b/src/devices/cpu/m6502/xavix.h index ccab73f75d4..7fe24a30587 100644 --- a/src/devices/cpu/m6502/xavix.h +++ b/src/devices/cpu/m6502/xavix.h @@ -14,7 +14,7 @@ class xavix_device : public m6502_device { public: - xavix_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; virtual void do_exec_full() override; @@ -164,7 +164,7 @@ protected: uint8_t m_codebank; uint32_t XPC; - xavix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + xavix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); uint32_t adr_with_codebank(uint16_t adr) { return adr | (get_codebank() << 16); } diff --git a/src/devices/cpu/m6502/xavix2000.cpp b/src/devices/cpu/m6502/xavix2000.cpp index 35da0f522b3..78f2cedffe5 100644 --- a/src/devices/cpu/m6502/xavix2000.cpp +++ b/src/devices/cpu/m6502/xavix2000.cpp @@ -36,7 +36,7 @@ DEFINE_DEVICE_TYPE(XAVIX2002, xavix2002_device, "xavix2002", "XaviX (SSD 2002) ( -xavix2000_device::xavix2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : +xavix2000_device::xavix2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : xavix_device(mconfig, type, tag, owner, clock) { program_config.m_addr_width = 24; @@ -45,12 +45,12 @@ xavix2000_device::xavix2000_device(const machine_config &mconfig, device_type ty sprogram_config.m_logaddr_width = 24; } -xavix2000_device::xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +xavix2000_device::xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : xavix2000_device(mconfig, XAVIX2000, tag, owner, clock) { } -xavix2002_device::xavix2002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +xavix2002_device::xavix2002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : xavix2000_device(mconfig, XAVIX2002, tag, owner, clock) { } diff --git a/src/devices/cpu/m6502/xavix2000.h b/src/devices/cpu/m6502/xavix2000.h index c5e3113e840..80cc55f1895 100644 --- a/src/devices/cpu/m6502/xavix2000.h +++ b/src/devices/cpu/m6502/xavix2000.h @@ -14,12 +14,12 @@ class xavix2000_device : public xavix_device { public: - xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; protected: - xavix2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + xavix2000_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual void do_exec_full() override; virtual void do_exec_partial() override; @@ -164,7 +164,7 @@ enum { class xavix2002_device : public xavix2000_device { public: - xavix2002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + xavix2002_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; |