summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/sh
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2022-06-16 12:47:52 +0200
committer Olivier Galibert <galibert@pobox.com>2025-04-29 23:06:41 +0200
commit45d4cd52a8194f2ef9e0383cfb2e2a35634af6ff (patch)
tree4e8d8fcb7382a5e9e0bce5ec59939bcfbe67155a /src/devices/cpu/sh
parent5c14bcdfcb4aefb71b5b62387c4ad05dbeb3814e (diff)
full xtal conversionxtal
Diffstat (limited to 'src/devices/cpu/sh')
-rw-r--r--src/devices/cpu/sh/sh.h2
-rw-r--r--src/devices/cpu/sh/sh2.cpp8
-rw-r--r--src/devices/cpu/sh/sh2.h8
-rw-r--r--src/devices/cpu/sh/sh4.cpp14
-rw-r--r--src/devices/cpu/sh/sh4.h14
-rw-r--r--src/devices/cpu/sh/sh7604_bus.cpp2
-rw-r--r--src/devices/cpu/sh/sh7604_bus.h2
-rw-r--r--src/devices/cpu/sh/sh7604_sci.cpp2
-rw-r--r--src/devices/cpu/sh/sh7604_sci.h2
-rw-r--r--src/devices/cpu/sh/sh7604_wdt.cpp2
-rw-r--r--src/devices/cpu/sh/sh7604_wdt.h2
11 files changed, 29 insertions, 29 deletions
diff --git a/src/devices/cpu/sh/sh.h b/src/devices/cpu/sh/sh.h
index d87c1e9742d..1533bca32e5 100644
--- a/src/devices/cpu/sh/sh.h
+++ b/src/devices/cpu/sh/sh.h
@@ -101,7 +101,7 @@ class sh_common_execution : public cpu_device
{
public:
- sh_common_execution(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness, address_map_constructor internal)
+ sh_common_execution(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness, address_map_constructor internal)
: cpu_device(mconfig, type, tag, owner, clock)
, m_sh2_state(nullptr)
, m_cache(CACHE_SIZE + sizeof(internal_sh2_state))
diff --git a/src/devices/cpu/sh/sh2.cpp b/src/devices/cpu/sh/sh2.cpp
index c117afadbe0..fce9a07bd8d 100644
--- a/src/devices/cpu/sh/sh2.cpp
+++ b/src/devices/cpu/sh/sh2.cpp
@@ -232,7 +232,7 @@ void sh1_device::sh7032_map(address_map &map)
map(0x05fffe00, 0x05ffffff).rw(FUNC(sh1_device::sh7032_r), FUNC(sh1_device::sh7032_w)); // SH-7032H internal i/o
}
-sh2_device::sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sh2_device::sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sh2_device(mconfig, SH2, tag, owner, clock, CPU_TYPE_SH2, address_map_constructor(FUNC(sh2_device::sh7604_map), this), 32)
{
}
@@ -249,7 +249,7 @@ void sh2_device::device_stop()
-sh2_device::sh2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cpu_type, address_map_constructor internal_map, int addrlines)
+sh2_device::sh2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cpu_type, address_map_constructor internal_map, int addrlines)
: sh_common_execution(mconfig, type, tag, owner, clock, ENDIANNESS_BIG, internal_map)
, m_program_config("program", ENDIANNESS_BIG, 32, addrlines, 0, internal_map)
, m_decrypted_program_config("decrypted_opcodes", ENDIANNESS_BIG, 32, addrlines, 0)
@@ -265,13 +265,13 @@ sh2_device::sh2_device(const machine_config &mconfig, device_type type, const ch
m_isdrc = allow_drc();
}
-sh2a_device::sh2a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sh2a_device::sh2a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sh2_device(mconfig, SH2A, tag, owner, clock, CPU_TYPE_SH2, address_map_constructor(FUNC(sh2a_device::sh7021_map), this), 28)
{
std::fill(std::begin(m_sh7021_regs), std::end(m_sh7021_regs), 0);
}
-sh1_device::sh1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sh1_device::sh1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sh2_device(mconfig, SH1, tag, owner, clock, CPU_TYPE_SH1, address_map_constructor(FUNC(sh1_device::sh7032_map), this), 28)
{
std::fill(std::begin(m_sh7032_regs), std::end(m_sh7032_regs), 0);
diff --git a/src/devices/cpu/sh/sh2.h b/src/devices/cpu/sh/sh2.h
index c0ba7340d8b..0ce8c65bcbf 100644
--- a/src/devices/cpu/sh/sh2.h
+++ b/src/devices/cpu/sh/sh2.h
@@ -55,7 +55,7 @@ public:
typedef device_delegate<void (uint32_t data)> ftcsr_read_delegate;
// construction/destruction
- sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sh2_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
virtual ~sh2_device() override;
void set_is_slave(int slave) { m_is_slave = slave; }
@@ -207,7 +207,7 @@ public:
void sh7604_map(address_map &map);
protected:
- sh2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cpu_type,address_map_constructor internal_map, int addrlines);
+ sh2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int cpu_type,address_map_constructor internal_map, int addrlines);
// device-level overrides
virtual void device_start() override;
@@ -366,7 +366,7 @@ class sh2a_device : public sh2_device
{
public:
// construction/destruction
- sh2a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sh2a_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
uint32_t dma_sar0_r();
void dma_sar0_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
@@ -400,7 +400,7 @@ class sh1_device : public sh2_device
{
public:
// construction/destruction
- sh1_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t _clock);
+ sh1_device(const machine_config &mconfig, const char *_tag, device_t *_owner, const XTAL &_clock);
uint16_t sh7032_r(offs_t offset);
void sh7032_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
diff --git a/src/devices/cpu/sh/sh4.cpp b/src/devices/cpu/sh/sh4.cpp
index 7d64546d741..662f055d223 100644
--- a/src/devices/cpu/sh/sh4.cpp
+++ b/src/devices/cpu/sh/sh4.cpp
@@ -71,7 +71,7 @@ void sh3_base_device::sh3_internal_map(address_map &map)
}
-sh34_base_device::sh34_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness, address_map_constructor internal)
+sh34_base_device::sh34_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness, address_map_constructor internal)
: sh_common_execution(mconfig, type, tag, owner, clock, endianness, internal)
, m_program_config("program", endianness, 64, 32, 0, internal)
, m_io_config("io", endianness, 64, 8)
@@ -90,7 +90,7 @@ device_memory_interface::space_config_vector sh34_base_device::memory_space_conf
}
-sh3_base_device::sh3_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness)
+sh3_base_device::sh3_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness)
: sh34_base_device(mconfig, type, tag, owner, clock, endianness, address_map_constructor(FUNC(sh3_base_device::sh3_internal_map), this))
{
m_cpu_type = CPU_TYPE_SH3;
@@ -98,7 +98,7 @@ sh3_base_device::sh3_base_device(const machine_config &mconfig, device_type type
}
-sh4_base_device::sh4_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness)
+sh4_base_device::sh4_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness)
: sh34_base_device(mconfig, type, tag, owner, clock, endianness, address_map_constructor(FUNC(sh4_base_device::sh4_internal_map), this))
{
m_cpu_type = CPU_TYPE_SH4;
@@ -106,25 +106,25 @@ sh4_base_device::sh4_base_device(const machine_config &mconfig, device_type type
}
-sh3_device::sh3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sh3_device::sh3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sh3_base_device(mconfig, SH3LE, tag, owner, clock, ENDIANNESS_LITTLE)
{
}
-sh3be_device::sh3be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sh3be_device::sh3be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sh3_base_device(mconfig, SH3BE, tag, owner, clock, ENDIANNESS_BIG)
{
}
-sh4_device::sh4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sh4_device::sh4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sh4_base_device(mconfig, SH4LE, tag, owner, clock, ENDIANNESS_LITTLE)
{
}
-sh4be_device::sh4be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sh4be_device::sh4be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sh4_base_device(mconfig, SH4BE, tag, owner, clock, ENDIANNESS_BIG)
{
}
diff --git a/src/devices/cpu/sh/sh4.h b/src/devices/cpu/sh/sh4.h
index b2c97c9dc16..40b4bdd0dac 100644
--- a/src/devices/cpu/sh/sh4.h
+++ b/src/devices/cpu/sh/sh4.h
@@ -254,7 +254,7 @@ public:
protected:
// construction/destruction
- sh34_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness, address_map_constructor internal);
+ sh34_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness, address_map_constructor internal);
// device-level overrides
virtual void device_start() override;
@@ -690,7 +690,7 @@ public:
void sh3_internal_map(address_map &map);
protected:
// construction/destruction
- sh3_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness);
+ sh3_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness);
virtual void device_reset() override;
};
@@ -718,7 +718,7 @@ public:
void sh4_internal_map(address_map &map);
protected:
// construction/destruction
- sh4_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness);
+ sh4_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, endianness_t endianness);
virtual void device_start() override;
virtual void device_reset() override;
@@ -729,7 +729,7 @@ class sh3_device : public sh3_base_device
{
friend class sh4_frontend;
public:
- sh3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sh3_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
std::unique_ptr<sh4_frontend> m_drcfe; /* pointer to the DRC front-end state */
virtual const opcode_desc* get_desclist(offs_t pc) override;
virtual void init_drc_frontend() override;
@@ -741,7 +741,7 @@ class sh3be_device : public sh3_base_device
friend class sh4be_frontend;
public:
- sh3be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sh3be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
std::unique_ptr<sh4be_frontend> m_drcfe; /* pointer to the DRC front-end state */
virtual const opcode_desc* get_desclist(offs_t pc) override;
virtual void init_drc_frontend() override;
@@ -756,7 +756,7 @@ class sh4_device : public sh4_base_device
friend class sh4_frontend;
public:
- sh4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sh4_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
std::unique_ptr<sh4_frontend> m_drcfe; /* pointer to the DRC front-end state */
virtual const opcode_desc* get_desclist(offs_t pc) override;
virtual void init_drc_frontend() override;
@@ -769,7 +769,7 @@ class sh4be_device : public sh4_base_device
friend class sh4be_frontend;
public:
- sh4be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sh4be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
std::unique_ptr<sh4be_frontend> m_drcfe; /* pointer to the DRC front-end state */
virtual const opcode_desc* get_desclist(offs_t pc) override;
virtual void init_drc_frontend() override;
diff --git a/src/devices/cpu/sh/sh7604_bus.cpp b/src/devices/cpu/sh/sh7604_bus.cpp
index a4b61bddae6..1ad437546b9 100644
--- a/src/devices/cpu/sh/sh7604_bus.cpp
+++ b/src/devices/cpu/sh/sh7604_bus.cpp
@@ -109,7 +109,7 @@ void sh7604_bus_device::bus_regs(address_map &map)
// sh7604_bus_device - constructor
//-------------------------------------------------
-sh7604_bus_device::sh7604_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sh7604_bus_device::sh7604_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SH7604_BUS, tag, owner, clock)
{
}
diff --git a/src/devices/cpu/sh/sh7604_bus.h b/src/devices/cpu/sh/sh7604_bus.h
index 9d2915b6b6b..30298211fb8 100644
--- a/src/devices/cpu/sh/sh7604_bus.h
+++ b/src/devices/cpu/sh/sh7604_bus.h
@@ -23,7 +23,7 @@ class sh7604_bus_device : public device_t
{
public:
// construction/destruction
- sh7604_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sh7604_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// I/O operations
void bus_regs(address_map &map);
diff --git a/src/devices/cpu/sh/sh7604_sci.cpp b/src/devices/cpu/sh/sh7604_sci.cpp
index 5d49eab5c31..c79b46e73ff 100644
--- a/src/devices/cpu/sh/sh7604_sci.cpp
+++ b/src/devices/cpu/sh/sh7604_sci.cpp
@@ -113,7 +113,7 @@ void sh7604_sci_device::sci_regs(address_map &map)
// sh7604_sci_device - constructor
//-------------------------------------------------
-sh7604_sci_device::sh7604_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sh7604_sci_device::sh7604_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SH7604_SCI, tag, owner, clock)
{
diff --git a/src/devices/cpu/sh/sh7604_sci.h b/src/devices/cpu/sh/sh7604_sci.h
index b77630db074..b94f9652d1f 100644
--- a/src/devices/cpu/sh/sh7604_sci.h
+++ b/src/devices/cpu/sh/sh7604_sci.h
@@ -23,7 +23,7 @@ class sh7604_sci_device : public device_t
{
public:
// construction/destruction
- sh7604_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sh7604_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// I/O operations
void sci_regs(address_map &map);
diff --git a/src/devices/cpu/sh/sh7604_wdt.cpp b/src/devices/cpu/sh/sh7604_wdt.cpp
index 2b5ea9eb499..56d61c7b83b 100644
--- a/src/devices/cpu/sh/sh7604_wdt.cpp
+++ b/src/devices/cpu/sh/sh7604_wdt.cpp
@@ -39,7 +39,7 @@ void sh7604_wdt_device::wdt_regs(address_map &map)
// sh7604_wdt_device - constructor
//-------------------------------------------------
-sh7604_wdt_device::sh7604_wdt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sh7604_wdt_device::sh7604_wdt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SH7604_WDT, tag, owner, clock)
{
}
diff --git a/src/devices/cpu/sh/sh7604_wdt.h b/src/devices/cpu/sh/sh7604_wdt.h
index dd39f4be514..12b7896fe44 100644
--- a/src/devices/cpu/sh/sh7604_wdt.h
+++ b/src/devices/cpu/sh/sh7604_wdt.h
@@ -23,7 +23,7 @@ class sh7604_wdt_device : public device_t
{
public:
// construction/destruction
- sh7604_wdt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sh7604_wdt_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
// I/O operations
void wdt_regs(address_map &map);