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/cpu/m6800 | |
parent | 5c14bcdfcb4aefb71b5b62387c4ad05dbeb3814e (diff) |
full xtal conversionxtal
Diffstat (limited to 'src/devices/cpu/m6800')
-rw-r--r-- | src/devices/cpu/m6800/m6800.cpp | 12 | ||||
-rw-r--r-- | src/devices/cpu/m6800/m6800.h | 12 | ||||
-rw-r--r-- | src/devices/cpu/m6800/m6801.cpp | 32 | ||||
-rw-r--r-- | src/devices/cpu/m6800/m6801.h | 32 |
4 files changed, 44 insertions, 44 deletions
diff --git a/src/devices/cpu/m6800/m6800.cpp b/src/devices/cpu/m6800/m6800.cpp index 4df393c0a4c..674cb487fd9 100644 --- a/src/devices/cpu/m6800/m6800.cpp +++ b/src/devices/cpu/m6800/m6800.cpp @@ -383,12 +383,12 @@ DEFINE_DEVICE_TYPE(M6808, m6808_cpu_device, "m6808", "Motorola MC6808") DEFINE_DEVICE_TYPE(NSC8105, nsc8105_cpu_device, "nsc8105", "NSC8105") -m6800_cpu_device::m6800_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6800_cpu_device::m6800_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6800_cpu_device(mconfig, M6800, tag, owner, clock, m6800_insn, cycles_6800, address_map_constructor()) { } -m6800_cpu_device::m6800_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const op_func *insn, const uint8_t *cycles, address_map_constructor internal) +m6800_cpu_device::m6800_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const op_func *insn, const uint8_t *cycles, address_map_constructor internal) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_BIG, 8, 16, 0, internal) , m_decrypted_opcodes_config("program", ENDIANNESS_BIG, 8, 16, 0) @@ -397,12 +397,12 @@ m6800_cpu_device::m6800_cpu_device(const machine_config &mconfig, device_type ty { } -m6802_cpu_device::m6802_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6802_cpu_device::m6802_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6802_cpu_device(mconfig, M6802, tag, owner, clock, m6800_insn, cycles_6800) { } -m6802_cpu_device::m6802_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const op_func *insn, const uint8_t *cycles) +m6802_cpu_device::m6802_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const op_func *insn, const uint8_t *cycles) : m6800_cpu_device(mconfig, type, tag, owner, clock, insn, cycles, address_map_constructor(FUNC(m6802_cpu_device::ram_map), this)) , m_ram_enable(true) { @@ -414,7 +414,7 @@ void m6802_cpu_device::ram_map(address_map &map) map(0x0000, 0x007f).ram(); } -m6808_cpu_device::m6808_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6808_cpu_device::m6808_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6802_cpu_device(mconfig, M6808, tag, owner, clock, m6800_insn, cycles_6800) { set_ram_enable(false); @@ -426,7 +426,7 @@ void m6808_cpu_device::device_validity_check(validity_checker &valid) const osd_printf_error("MC6808 should not have internal RAM enabled\n"); } -nsc8105_cpu_device::nsc8105_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nsc8105_cpu_device::nsc8105_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6802_cpu_device(mconfig, NSC8105, tag, owner, clock, nsc8105_insn, cycles_nsc8105) { } diff --git a/src/devices/cpu/m6800/m6800.h b/src/devices/cpu/m6800/m6800.h index 10e40ab3a3f..c4229d07fa3 100644 --- a/src/devices/cpu/m6800/m6800.h +++ b/src/devices/cpu/m6800/m6800.h @@ -34,7 +34,7 @@ public: typedef void (m6800_cpu_device::*op_func)(); // construction/destruction - m6800_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6800_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: enum @@ -43,7 +43,7 @@ protected: M6800_SLP = 0x10 /* HD63701 only */ }; - m6800_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const m6800_cpu_device::op_func *insn, const uint8_t *cycles, address_map_constructor internal); + m6800_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const m6800_cpu_device::op_func *insn, const uint8_t *cycles, address_map_constructor internal); // device-level overrides virtual void device_start() override; @@ -364,12 +364,12 @@ protected: class m6802_cpu_device : public m6800_cpu_device { public: - m6802_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6802_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); void set_ram_enable(bool re) { assert(!configured()); m_ram_enable = re; } protected: - m6802_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const m6800_cpu_device::op_func *insn, const uint8_t *cycles); + m6802_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const m6800_cpu_device::op_func *insn, const uint8_t *cycles); virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const noexcept override { return (clocks + 4 - 1) / 4; } virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const noexcept override { return (cycles * 4); } @@ -385,7 +385,7 @@ private: class m6808_cpu_device : public m6802_cpu_device { public: - m6808_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6808_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; @@ -396,7 +396,7 @@ protected: class nsc8105_cpu_device : public m6802_cpu_device { public: - nsc8105_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nsc8105_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; diff --git a/src/devices/cpu/m6800/m6801.cpp b/src/devices/cpu/m6800/m6801.cpp index e759a0b57cc..9bce8f303fb 100644 --- a/src/devices/cpu/m6800/m6801.cpp +++ b/src/devices/cpu/m6800/m6801.cpp @@ -309,12 +309,12 @@ DEFINE_DEVICE_TYPE(HD6303R, hd6303r_cpu_device, "hd6303r", "Hitachi HD6303R") DEFINE_DEVICE_TYPE(HD6303X, hd6303x_cpu_device, "hd6303x", "Hitachi HD6303X") DEFINE_DEVICE_TYPE(HD6303Y, hd6303y_cpu_device, "hd6303y", "Hitachi HD6303Y") -m6801_cpu_device::m6801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6801_cpu_device::m6801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6801_cpu_device(mconfig, M6801, tag, owner, clock, m6803_insn, cycles_6803, address_map_constructor()) { } -m6801_cpu_device::m6801_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const op_func *insn, const uint8_t *cycles, address_map_constructor internal) +m6801_cpu_device::m6801_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const op_func *insn, const uint8_t *cycles, address_map_constructor internal) : m6800_cpu_device(mconfig, type, tag, owner, clock, insn, cycles, internal) , m_in_port_func(*this) , m_out_port_func(*this) @@ -324,37 +324,37 @@ m6801_cpu_device::m6801_cpu_device(const machine_config &mconfig, device_type ty { } -m6803_cpu_device::m6803_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6803_cpu_device::m6803_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6801_cpu_device(mconfig, M6803, tag, owner, clock, m6803_insn, cycles_6803, address_map_constructor(FUNC(m6803_cpu_device::m6803_mem), this)) { } -m6803e_cpu_device::m6803e_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +m6803e_cpu_device::m6803e_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : m6801_cpu_device(mconfig, M6803E, tag, owner, clock, m6803_insn, cycles_6803, address_map_constructor(FUNC(m6803e_cpu_device::m6803_mem), this)) { } -hd6301_cpu_device::hd6301_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +hd6301_cpu_device::hd6301_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : m6801_cpu_device(mconfig, type, tag, owner, clock, hd63701_insn, cycles_63701) { } -hd6301v1_cpu_device::hd6301v1_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6301v1_cpu_device::hd6301v1_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301_cpu_device(mconfig, HD6301V1, tag, owner, clock) { } -hd63701v0_cpu_device::hd63701v0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd63701v0_cpu_device::hd63701v0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301_cpu_device(mconfig, HD63701V0, tag, owner, clock) { } -hd6303r_cpu_device::hd6303r_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6303r_cpu_device::hd6303r_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301_cpu_device(mconfig, HD6303R, tag, owner, clock) { } -hd6301x_cpu_device::hd6301x_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +hd6301x_cpu_device::hd6301x_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : hd6301_cpu_device(mconfig, type, tag, owner, clock) , m_in_portx_func(*this) , m_out_portx_func(*this) @@ -362,37 +362,37 @@ hd6301x_cpu_device::hd6301x_cpu_device(const machine_config &mconfig, device_typ m_sclk_divider = 16; } -hd6301x0_cpu_device::hd6301x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6301x0_cpu_device::hd6301x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301x_cpu_device(mconfig, HD6301X0, tag, owner, clock) { } -hd63701x0_cpu_device::hd63701x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd63701x0_cpu_device::hd63701x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301x_cpu_device(mconfig, HD63701X0, tag, owner, clock) { } -hd6303x_cpu_device::hd6303x_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6303x_cpu_device::hd6303x_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301x_cpu_device(mconfig, HD6303X, tag, owner, clock) { } -hd6301y_cpu_device::hd6301y_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +hd6301y_cpu_device::hd6301y_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) : hd6301x_cpu_device(mconfig, type, tag, owner, clock) { } -hd6301y0_cpu_device::hd6301y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6301y0_cpu_device::hd6301y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301y_cpu_device(mconfig, HD6301Y0, tag, owner, clock) { } -hd63701y0_cpu_device::hd63701y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd63701y0_cpu_device::hd63701y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301y_cpu_device(mconfig, HD63701Y0, tag, owner, clock) { } -hd6303y_cpu_device::hd6303y_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +hd6303y_cpu_device::hd6303y_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) : hd6301y_cpu_device(mconfig, HD6303Y, tag, owner, clock) { } diff --git a/src/devices/cpu/m6800/m6801.h b/src/devices/cpu/m6800/m6801.h index de74fed4ff7..435c3e7836a 100644 --- a/src/devices/cpu/m6800/m6801.h +++ b/src/devices/cpu/m6800/m6801.h @@ -43,7 +43,7 @@ enum class m6801_cpu_device : public m6800_cpu_device { public: - m6801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); auto in_p1_cb() { return m_in_port_func[0].bind(); } auto out_p1_cb() { return m_out_port_func[0].bind(); } @@ -62,7 +62,7 @@ public: void m6801_clock_serial(); protected: - m6801_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const m6800_cpu_device::op_func *insn, const uint8_t *cycles, address_map_constructor internal = address_map_constructor()); + m6801_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, const m6800_cpu_device::op_func *insn, const uint8_t *cycles, address_map_constructor internal = address_map_constructor()); // device-level overrides virtual void device_resolve_objects() override; @@ -184,7 +184,7 @@ protected: class m6803_cpu_device : public m6801_cpu_device { public: - m6803_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6803_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; @@ -194,7 +194,7 @@ protected: class m6803e_cpu_device : public m6801_cpu_device { public: - m6803e_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + m6803e_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); protected: virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const noexcept override { return clocks; } @@ -207,7 +207,7 @@ protected: class hd6301_cpu_device : public m6801_cpu_device { protected: - hd6301_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + hd6301_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock); virtual std::unique_ptr<util::disasm_interface> create_disassembler() override; @@ -224,7 +224,7 @@ protected: class hd6301v1_cpu_device : public hd6301_cpu_device { public: - hd6301v1_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6301v1_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -233,7 +233,7 @@ public: class hd63701v0_cpu_device : public hd6301_cpu_device { public: - hd63701v0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd63701v0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -244,7 +244,7 @@ public: class hd6303r_cpu_device : public hd6301_cpu_device { public: - hd6303r_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6303r_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -261,7 +261,7 @@ public: void hd6301x_io(address_map &map); protected: - hd6301x_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + hd6301x_cpu_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; @@ -328,7 +328,7 @@ protected: class hd6301x0_cpu_device : public hd6301x_cpu_device { public: - hd6301x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6301x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -337,7 +337,7 @@ public: class hd63701x0_cpu_device : public hd6301x_cpu_device { public: - hd63701x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd63701x0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -348,7 +348,7 @@ public: class hd6303x_cpu_device : public hd6301x_cpu_device { public: - hd6303x_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6303x_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -359,7 +359,7 @@ public: void hd6301y_io(address_map &map); protected: - hd6301y_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + hd6301y_cpu_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; @@ -392,7 +392,7 @@ protected: class hd6301y0_cpu_device : public hd6301y_cpu_device { public: - hd6301y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6301y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -401,7 +401,7 @@ public: class hd63701y0_cpu_device : public hd6301y_cpu_device { public: - hd63701y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd63701y0_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; @@ -413,7 +413,7 @@ public: class hd6303y_cpu_device : public hd6301y_cpu_device { public: - hd6303y_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + hd6303y_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock); }; |