summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/mips
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/mips
parent5c14bcdfcb4aefb71b5b62387c4ad05dbeb3814e (diff)
full xtal conversionxtal
Diffstat (limited to 'src/devices/cpu/mips')
-rw-r--r--src/devices/cpu/mips/mips1.cpp26
-rw-r--r--src/devices/cpu/mips/mips1.h26
-rw-r--r--src/devices/cpu/mips/mips3.cpp2
-rw-r--r--src/devices/cpu/mips/mips3.h54
-rw-r--r--src/devices/cpu/mips/ps2vif1.cpp2
-rw-r--r--src/devices/cpu/mips/ps2vif1.h4
-rw-r--r--src/devices/cpu/mips/ps2vu.cpp6
-rw-r--r--src/devices/cpu/mips/ps2vu.h10
-rw-r--r--src/devices/cpu/mips/r4000.cpp2
-rw-r--r--src/devices/cpu/mips/r4000.h18
10 files changed, 75 insertions, 75 deletions
diff --git a/src/devices/cpu/mips/mips1.cpp b/src/devices/cpu/mips/mips1.cpp
index 6f45a954d50..824cd47e762 100644
--- a/src/devices/cpu/mips/mips1.cpp
+++ b/src/devices/cpu/mips/mips1.cpp
@@ -55,7 +55,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_IOP, iop_device, "sonyiop", "Sony Playstation 2
ALLOW_SAVE_TYPE(mips1core_device_base::branch_state);
-mips1core_device_base::mips1core_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, u32 cpurev, size_t icache_size, size_t dcache_size)
+mips1core_device_base::mips1core_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, u32 cpurev, size_t icache_size, size_t dcache_size)
: cpu_device(mconfig, type, tag, owner, clock)
, m_program_config_be("program", ENDIANNESS_BIG, 32, 32)
, m_program_config_le("program", ENDIANNESS_LITTLE, 32, 32)
@@ -70,64 +70,64 @@ mips1core_device_base::mips1core_device_base(machine_config const &mconfig, devi
{
}
-mips1_device_base::mips1_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, u32 cpurev, size_t icache_size, size_t dcache_size)
+mips1_device_base::mips1_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, u32 cpurev, size_t icache_size, size_t dcache_size)
: mips1core_device_base(mconfig, type, tag, owner, clock, cpurev, icache_size, dcache_size)
, m_fcr0(0)
{
}
-r2000_device::r2000_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size, size_t dcache_size)
+r2000_device::r2000_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size, size_t dcache_size)
: mips1_device_base(mconfig, R2000, tag, owner, clock, 0x0100, icache_size, dcache_size)
{
}
-r2000a_device::r2000a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size, size_t dcache_size)
+r2000a_device::r2000a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size, size_t dcache_size)
: mips1_device_base(mconfig, R2000A, tag, owner, clock, 0x0210, icache_size, dcache_size)
{
}
-r3000_device::r3000_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size, size_t dcache_size)
+r3000_device::r3000_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size, size_t dcache_size)
: mips1_device_base(mconfig, R3000, tag, owner, clock, 0x0220, icache_size, dcache_size)
{
}
-r3000a_device::r3000a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size, size_t dcache_size)
+r3000a_device::r3000a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size, size_t dcache_size)
: mips1_device_base(mconfig, R3000A, tag, owner, clock, 0x0230, icache_size, dcache_size)
{
}
-r3041_device::r3041_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
+r3041_device::r3041_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock)
: mips1core_device_base(mconfig, R3041, tag, owner, clock, 0x0700, 2048, 512)
{
}
-r3051_device::r3051_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
+r3051_device::r3051_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock)
: mips1core_device_base(mconfig, R3051, tag, owner, clock, 0x0200, 4096, 2048)
{
}
-r3052_device::r3052_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
+r3052_device::r3052_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock)
: mips1core_device_base(mconfig, R3052, tag, owner, clock, 0x0200, 8192, 2048)
{
}
-r3052e_device::r3052e_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
+r3052e_device::r3052e_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock)
: mips1_device_base(mconfig, R3052E, tag, owner, clock, 0x0200, 8192, 2048)
{
}
-r3071_device::r3071_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size, size_t dcache_size)
+r3071_device::r3071_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size, size_t dcache_size)
: mips1_device_base(mconfig, R3071, tag, owner, clock, 0x0200, icache_size, dcache_size)
{
}
-r3081_device::r3081_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size, size_t dcache_size)
+r3081_device::r3081_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size, size_t dcache_size)
: mips1_device_base(mconfig, R3081, tag, owner, clock, 0x0200, icache_size, dcache_size)
{
set_fpu(0x0300);
}
-iop_device::iop_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock)
+iop_device::iop_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock)
: mips1core_device_base(mconfig, SONYPS2_IOP, tag, owner, clock, 0x001f, 4096, 1024)
{
m_endianness = ENDIANNESS_LITTLE;
diff --git a/src/devices/cpu/mips/mips1.h b/src/devices/cpu/mips/mips1.h
index df6b1c8e6c9..bdf5c67f51d 100644
--- a/src/devices/cpu/mips/mips1.h
+++ b/src/devices/cpu/mips/mips1.h
@@ -17,7 +17,7 @@ public:
void berr_w(int state) { m_bus_error = bool(state); }
protected:
- mips1core_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, u32 cpurev, size_t icache_size, size_t dcache_size);
+ mips1core_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, u32 cpurev, size_t icache_size, size_t dcache_size);
enum registers : unsigned
{
@@ -261,7 +261,7 @@ public:
void set_fpu(u32 revision, unsigned interrupt = 3) { m_fcr0 = revision; m_fpu_irq = interrupt; }
protected:
- mips1_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, u32 cpurev, size_t icache_size, size_t dcache_size);
+ mips1_device_base(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, u32 cpurev, size_t icache_size, size_t dcache_size);
enum cp1_fcr31_mask : u32
{
@@ -324,31 +324,31 @@ private:
class r2000_device : public mips1_device_base
{
public:
- r2000_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size = 0, size_t dcache_size = 0);
+ r2000_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size = 0, size_t dcache_size = 0);
};
class r2000a_device : public mips1_device_base
{
public:
- r2000a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size = 0, size_t dcache_size = 0);
+ r2000a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size = 0, size_t dcache_size = 0);
};
class r3000_device : public mips1_device_base
{
public:
- r3000_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size = 0, size_t dcache_size = 0);
+ r3000_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size = 0, size_t dcache_size = 0);
};
class r3000a_device : public mips1_device_base
{
public:
- r3000a_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size = 0, size_t dcache_size = 0);
+ r3000a_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size = 0, size_t dcache_size = 0);
};
class r3041_device : public mips1core_device_base
{
public:
- r3041_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
+ r3041_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock);
protected:
virtual void device_start() override;
@@ -358,37 +358,37 @@ protected:
class r3051_device : public mips1core_device_base
{
public:
- r3051_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
+ r3051_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock);
};
class r3052_device : public mips1core_device_base
{
public:
- r3052_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
+ r3052_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock);
};
class r3052e_device : public mips1_device_base
{
public:
- r3052e_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
+ r3052e_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock);
};
class r3071_device : public mips1_device_base
{
public:
- r3071_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size = 16384, size_t dcache_size = 4096);
+ r3071_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size = 16384, size_t dcache_size = 4096);
};
class r3081_device : public mips1_device_base
{
public:
- r3081_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, size_t icache_size = 16384, size_t dcache_size = 4096);
+ r3081_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock, size_t icache_size = 16384, size_t dcache_size = 4096);
};
class iop_device : public mips1core_device_base
{
public:
- iop_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock);
+ iop_device(machine_config const &mconfig, char const *tag, device_t *owner, const XTAL &clock);
};
DECLARE_DEVICE_TYPE(R2000, r2000_device)
diff --git a/src/devices/cpu/mips/mips3.cpp b/src/devices/cpu/mips/mips3.cpp
index 9b6067e5fa4..b1e0f2d57a6 100644
--- a/src/devices/cpu/mips/mips3.cpp
+++ b/src/devices/cpu/mips/mips3.cpp
@@ -131,7 +131,7 @@ DEFINE_DEVICE_TYPE(RM7000LE, rm7000le_device, "rm7000le", "MIPS RM7000 (littl
// VR4300 and VR5432 have 4 fewer PFN bits, and only 32 TLB entries
-mips3_device::mips3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, mips3_flavor flavor, endianness_t endianness, uint32_t data_bits)
+mips3_device::mips3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, mips3_flavor flavor, endianness_t endianness, uint32_t data_bits)
: cpu_device(mconfig, type, tag, owner, clock)
, device_vtlb_interface(mconfig, *this, AS_PROGRAM)
, m_core(nullptr)
diff --git a/src/devices/cpu/mips/mips3.h b/src/devices/cpu/mips/mips3.h
index 0bf7e49e5cc..3801a935f18 100644
--- a/src/devices/cpu/mips/mips3.h
+++ b/src/devices/cpu/mips/mips3.h
@@ -297,7 +297,7 @@ protected:
public:
// construction/destruction
- mips3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, mips3_flavor flavor, endianness_t endiannes, uint32_t data_bits);
+ mips3_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, mips3_flavor flavor, endianness_t endiannes, uint32_t data_bits);
void set_icache_size(size_t icache_size) { c_icache_size = icache_size; }
void set_dcache_size(size_t dcache_size) { c_dcache_size = dcache_size; }
@@ -658,7 +658,7 @@ private:
class r4000be_device : public mips3_device {
public:
// construction/destruction
- r4000be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r4000be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R4000BE, tag, owner, clock, MIPS3_TYPE_R4000, ENDIANNESS_BIG, 64)
{
}
@@ -667,7 +667,7 @@ public:
class r4000le_device : public mips3_device {
public:
// construction/destruction
- r4000le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r4000le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R4000LE, tag, owner, clock, MIPS3_TYPE_R4000, ENDIANNESS_LITTLE, 64)
{
}
@@ -676,7 +676,7 @@ public:
class r4400be_device : public mips3_device {
public:
// construction/destruction
- r4400be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r4400be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R4400BE, tag, owner, clock, MIPS3_TYPE_R4400, ENDIANNESS_BIG, 64)
{
}
@@ -685,7 +685,7 @@ public:
class r4400le_device : public mips3_device {
public:
// construction/destruction
- r4400le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r4400le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R4400LE, tag, owner, clock, MIPS3_TYPE_R4400, ENDIANNESS_LITTLE, 32) // Should be 64 bits
{
}
@@ -694,7 +694,7 @@ public:
class vr4300be_device : public mips3_device {
public:
// construction/destruction
- vr4300be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ vr4300be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, VR4300BE, tag, owner, clock, MIPS3_TYPE_VR4300, ENDIANNESS_BIG, 32)
{
}
@@ -703,7 +703,7 @@ public:
class vr4300le_device : public mips3_device {
public:
// construction/destruction
- vr4300le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ vr4300le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, VR4300LE, tag, owner, clock, MIPS3_TYPE_VR4300, ENDIANNESS_LITTLE, 32)
{
}
@@ -712,7 +712,7 @@ public:
class vr4310be_device : public mips3_device {
public:
// construction/destruction
- vr4310be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ vr4310be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, VR4310BE, tag, owner, clock, MIPS3_TYPE_VR4300, ENDIANNESS_BIG, 32)
{
}
@@ -721,7 +721,7 @@ public:
class vr4310le_device : public mips3_device {
public:
// construction/destruction
- vr4310le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ vr4310le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, VR4310LE, tag, owner, clock, MIPS3_TYPE_VR4300, ENDIANNESS_LITTLE, 32)
{
}
@@ -730,7 +730,7 @@ public:
class r4600be_device : public mips3_device {
public:
// construction/destruction
- r4600be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r4600be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R4600BE, tag, owner, clock, MIPS3_TYPE_R4600, ENDIANNESS_BIG, 64)
{
}
@@ -739,7 +739,7 @@ public:
class r4600le_device : public mips3_device {
public:
// construction/destruction
- r4600le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r4600le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R4600LE, tag, owner, clock, MIPS3_TYPE_R4600, ENDIANNESS_LITTLE, 32) // Should be 64 bits
{
}
@@ -748,7 +748,7 @@ public:
class r4650be_device : public mips3_device {
public:
// construction/destruction
- r4650be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r4650be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R4650BE, tag, owner, clock, MIPS3_TYPE_R4650, ENDIANNESS_BIG, 32) // Should be 64 bits
{
}
@@ -757,7 +757,7 @@ public:
class r4650le_device : public mips3_device {
public:
// construction/destruction
- r4650le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r4650le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R4650LE, tag, owner, clock, MIPS3_TYPE_R4650, ENDIANNESS_LITTLE, 32) // Should be 64 bits
{
}
@@ -766,7 +766,7 @@ public:
class r4700be_device : public mips3_device {
public:
// construction/destruction
- r4700be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r4700be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R4700BE, tag, owner, clock, MIPS3_TYPE_R4700, ENDIANNESS_BIG, 32) // Should be 64 bits
{
}
@@ -775,7 +775,7 @@ public:
class r4700le_device : public mips3_device {
public:
// construction/destruction
- r4700le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r4700le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R4700LE, tag, owner, clock, MIPS3_TYPE_R4700, ENDIANNESS_LITTLE, 32) // Should be 64 bits
{
}
@@ -784,7 +784,7 @@ public:
class tx4925be_device : public mips3_device {
public:
// construction/destruction
- tx4925be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ tx4925be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, TX4925BE, tag, owner, clock, MIPS3_TYPE_TX4925, ENDIANNESS_BIG, 32) // Should be 64 bits
{
}
@@ -793,7 +793,7 @@ public:
class tx4925le_device : public mips3_device {
public:
// construction/destruction
- tx4925le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ tx4925le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, TX4925LE, tag, owner, clock, MIPS3_TYPE_TX4925, ENDIANNESS_LITTLE, 32) // Should be 64 bits
{
}
@@ -802,7 +802,7 @@ public:
class r5000be_device : public mips3_device {
public:
// construction/destruction
- r5000be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r5000be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R5000BE, tag, owner, clock, MIPS3_TYPE_R5000, ENDIANNESS_BIG, 64)
{
}
@@ -814,7 +814,7 @@ protected:
class r5000le_device : public mips3_device {
public:
// construction/destruction
- r5000le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r5000le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R5000LE, tag, owner, clock, MIPS3_TYPE_R5000, ENDIANNESS_LITTLE, 32) // FIXME: Should be 64 bits, Galileo blows up though
{
}
@@ -823,7 +823,7 @@ public:
class vr5500be_device : public mips3_device {
public:
// construction/destruction
- vr5500be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ vr5500be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, VR5500BE, tag, owner, clock, MIPS3_TYPE_R5000, ENDIANNESS_BIG, 32) // Should be 64 bits
{
}
@@ -832,7 +832,7 @@ public:
class vr5500le_device : public mips3_device {
public:
// construction/destruction
- vr5500le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ vr5500le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, VR5500LE, tag, owner, clock, MIPS3_TYPE_R5000, ENDIANNESS_LITTLE, 32) // Should be 64 bits
{
}
@@ -842,13 +842,13 @@ class r5900le_device : public mips3_device {
public:
// construction/destruction
template <typename T>
- r5900le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&vu0_tag)
+ r5900le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&vu0_tag)
: r5900le_device(mconfig, tag, owner, clock)
{
m_vu0.set_tag(std::forward<T>(vu0_tag));
}
- r5900le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ r5900le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, R5900LE, tag, owner, clock, MIPS3_TYPE_R5900, ENDIANNESS_LITTLE, 64)
, m_vu0(*this, finder_base::DUMMY_TAG)
{
@@ -907,7 +907,7 @@ protected:
class qed5271be_device : public mips3_device {
public:
// construction/destruction
- qed5271be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ qed5271be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, QED5271BE, tag, owner, clock, MIPS3_TYPE_QED5271, ENDIANNESS_BIG, 32) // Should be 64 bits
{
}
@@ -916,7 +916,7 @@ public:
class qed5271le_device : public mips3_device {
public:
// construction/destruction
- qed5271le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ qed5271le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, QED5271LE, tag, owner, clock, MIPS3_TYPE_QED5271, ENDIANNESS_LITTLE, 32) // Should be 64 bits
{
}
@@ -925,7 +925,7 @@ public:
class rm7000be_device : public mips3_device {
public:
// construction/destruction
- rm7000be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ rm7000be_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, RM7000BE, tag, owner, clock, MIPS3_TYPE_RM7000, ENDIANNESS_BIG, 32) // Should be 64 bits
{
}
@@ -934,7 +934,7 @@ public:
class rm7000le_device : public mips3_device {
public:
// construction/destruction
- rm7000le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ rm7000le_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mips3_device(mconfig, RM7000LE, tag, owner, clock, MIPS3_TYPE_RM7000, ENDIANNESS_LITTLE, 32) // Should be 64 bits
{
}
diff --git a/src/devices/cpu/mips/ps2vif1.cpp b/src/devices/cpu/mips/ps2vif1.cpp
index 43fc71a2267..091be49d774 100644
--- a/src/devices/cpu/mips/ps2vif1.cpp
+++ b/src/devices/cpu/mips/ps2vif1.cpp
@@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(SONYPS2_VIF1, ps2_vif1_device, "ps2vif1", "PlayStation 2 VIF1
4, 2, 1, 2
};
-ps2_vif1_device::ps2_vif1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ps2_vif1_device::ps2_vif1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: device_t(mconfig, SONYPS2_VIF1, tag, owner, clock)
, device_execute_interface(mconfig, *this)
, m_gs(*this, finder_base::DUMMY_TAG)
diff --git a/src/devices/cpu/mips/ps2vif1.h b/src/devices/cpu/mips/ps2vif1.h
index 171a3839f8f..a03afe2111a 100644
--- a/src/devices/cpu/mips/ps2vif1.h
+++ b/src/devices/cpu/mips/ps2vif1.h
@@ -23,14 +23,14 @@ class ps2_vif1_device : public device_t, public device_execute_interface
{
public:
template <typename T, typename U>
- ps2_vif1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&gs_tag, U &&vu1_tag)
+ ps2_vif1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&gs_tag, U &&vu1_tag)
: ps2_vif1_device(mconfig, tag, owner, clock)
{
m_gs.set_tag(std::forward<T>(gs_tag));
m_vu1.set_tag(std::forward<U>(vu1_tag));
}
- ps2_vif1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ps2_vif1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
virtual ~ps2_vif1_device() override;
uint64_t mmio_r(offs_t offset);
diff --git a/src/devices/cpu/mips/ps2vu.cpp b/src/devices/cpu/mips/ps2vu.cpp
index 8f0b125314d..b16fcc663f4 100644
--- a/src/devices/cpu/mips/ps2vu.cpp
+++ b/src/devices/cpu/mips/ps2vu.cpp
@@ -23,7 +23,7 @@ sonyvu_device::sonyvu_device(
device_type type,
const char *tag,
device_t *owner,
- uint32_t clock,
+ const XTAL &clock,
address_map_constructor micro_cons,
address_map_constructor vu_cons,
chip_type chiptype,
@@ -54,13 +54,13 @@ sonyvu_device::sonyvu_device(
{
}
-sonyvu0_device::sonyvu0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sonyvu0_device::sonyvu0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sonyvu_device(mconfig, SONYPS2_VU0, tag, owner, clock, address_map_constructor(FUNC(sonyvu0_device::micro_map), this), address_map_constructor(FUNC(sonyvu0_device::vu_map), this), CHIP_TYPE_VU0, 0x1000)
, m_vu1(*this, finder_base::DUMMY_TAG)
{
}
-sonyvu1_device::sonyvu1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sonyvu1_device::sonyvu1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: sonyvu_device(mconfig, SONYPS2_VU1, tag, owner, clock, address_map_constructor(FUNC(sonyvu1_device::micro_map), this), address_map_constructor(FUNC(sonyvu1_device::vu_map), this), CHIP_TYPE_VU0, 0x4000)
, m_gs(*this, finder_base::DUMMY_TAG)
, m_vif(*this, "vif")
diff --git a/src/devices/cpu/mips/ps2vu.h b/src/devices/cpu/mips/ps2vu.h
index cc898ffa58d..b0ccb2a2134 100644
--- a/src/devices/cpu/mips/ps2vu.h
+++ b/src/devices/cpu/mips/ps2vu.h
@@ -98,7 +98,7 @@ protected:
CHIP_TYPE_VU1,
};
- sonyvu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor micro_cons, address_map_constructor vu_cons, chip_type chiptype, uint32_t mem_size);
+ sonyvu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor micro_cons, address_map_constructor vu_cons, chip_type chiptype, uint32_t mem_size);
enum : uint64_t
{
@@ -178,13 +178,13 @@ class sonyvu1_device : public sonyvu_device
{
public:
template <typename T>
- sonyvu1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&gs_tag)
+ sonyvu1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&gs_tag)
: sonyvu1_device(mconfig, tag, owner, clock)
{
m_gs.set_tag(std::forward<T>(gs_tag));
}
- sonyvu1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sonyvu1_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
ps2_vif1_device* interface();
@@ -213,13 +213,13 @@ class sonyvu0_device : public sonyvu_device
{
public:
template <typename T>
- sonyvu0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, T &&vu1_tag)
+ sonyvu0_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, T &&vu1_tag)
: sonyvu0_device(mconfig, tag, owner, clock)
{
m_vu1.set_tag(std::forward<T>(vu1_tag));
}
- sonyvu0_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sonyvu0_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/mips/r4000.cpp b/src/devices/cpu/mips/r4000.cpp
index 15f161b32c3..433f3b640fd 100644
--- a/src/devices/cpu/mips/r4000.cpp
+++ b/src/devices/cpu/mips/r4000.cpp
@@ -92,7 +92,7 @@ DEFINE_DEVICE_TYPE(R5000, r5000_device, "r5000", "MIPS R5000")
u32 const r5000_device::s_fcc_masks[8] = { (1U << 23), (1U << 25), (1U << 26), (1U << 27), (1U << 28), (1U << 29), (1U << 30), (1U << 31) };
u32 const r5000_device::s_fcc_shifts[8] = { 23, 25, 26, 27, 28, 29, 30, 31 };
-r4000_base_device::r4000_base_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, u32 prid, u32 fcr, cache_size icache_size, cache_size dcache_size, unsigned m32, unsigned m64, unsigned d32, unsigned d64, bool timer_interrupt_disabled)
+r4000_base_device::r4000_base_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, u32 prid, u32 fcr, cache_size icache_size, cache_size dcache_size, unsigned m32, unsigned m64, unsigned d32, unsigned d64, bool timer_interrupt_disabled)
: cpu_device(mconfig, type, tag, owner, clock)
, m_program_config_le("program", ENDIANNESS_LITTLE, 64, 32)
, m_program_config_be("program", ENDIANNESS_BIG, 64, 32)
diff --git a/src/devices/cpu/mips/r4000.h b/src/devices/cpu/mips/r4000.h
index adc9ccd1f3d..71345e45b22 100644
--- a/src/devices/cpu/mips/r4000.h
+++ b/src/devices/cpu/mips/r4000.h
@@ -57,7 +57,7 @@ protected:
CACHE_256K = 6,
CACHE_512K = 7,
};
- r4000_base_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, u32 clock, u32 prid, u32 fcr, cache_size icache_size, cache_size dcache_size, unsigned m32, unsigned m64, unsigned d32, unsigned d64, bool timer_interrupt_disabled);
+ r4000_base_device(machine_config const &mconfig, device_type type, char const *tag, device_t *owner, const XTAL &clock, u32 prid, u32 fcr, cache_size icache_size, cache_size dcache_size, unsigned m32, unsigned m64, unsigned d32, unsigned d64, bool timer_interrupt_disabled);
enum cp0_reg : int
{
@@ -489,14 +489,14 @@ class r4000_device : public r4000_base_device
{
public:
// NOTE: R4000 chips prior to 3.0 have an xtlb bug
- r4000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, bool timer_interrupt_disabled)
+ r4000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool timer_interrupt_disabled)
: r4000_base_device(mconfig, R4000, tag, owner, clock, 0x0430, 0x0500, CACHE_8K, CACHE_8K, 10, 20, 69, 133, timer_interrupt_disabled)
{
// no secondary cache
m_cp0[CP0_Config] |= CONFIG_SC;
}
- r4000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ r4000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: r4000_device(mconfig, tag, owner, clock, false)
{
}
@@ -505,7 +505,7 @@ public:
class r4400_device : public r4000_base_device
{
public:
- r4400_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, bool timer_interrupt_disabled, u32 scache_size, u8 scache_line_size)
+ r4400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool timer_interrupt_disabled, u32 scache_size, u8 scache_line_size)
: r4000_base_device(mconfig, R4400, tag, owner, clock, 0x0440, 0x0500, CACHE_16K, CACHE_16K, 10, 20, 69, 133, timer_interrupt_disabled)
{
m_scache_size = scache_size;
@@ -513,7 +513,7 @@ public:
configure_scache();
}
- r4400_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ r4400_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: r4400_device(mconfig, tag, owner, clock, false, 0, 0)
{
}
@@ -522,14 +522,14 @@ public:
class r4600_device : public r4000_base_device
{
public:
- r4600_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, bool timer_interrupt_disabled)
+ r4600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool timer_interrupt_disabled)
: r4000_base_device(mconfig, R4600, tag, owner, clock, 0x2020, 0x2020, CACHE_16K, CACHE_16K, 10, 12, 42, 74, timer_interrupt_disabled)
{
// no secondary cache
m_cp0[CP0_Config] |= CONFIG_SC;
}
- r4600_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ r4600_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: r4600_device(mconfig, tag, owner, clock, false)
{
}
@@ -538,14 +538,14 @@ public:
class r5000_device : public r4000_base_device
{
public:
- r5000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, bool timer_interrupt_disabled)
+ r5000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock, bool timer_interrupt_disabled)
: r4000_base_device(mconfig, R5000, tag, owner, clock, 0x2320, 0x2320, CACHE_32K, CACHE_32K, 5, 9, 36, 68, timer_interrupt_disabled)
{
// no secondary cache
m_cp0[CP0_Config] |= CONFIG_SC;
}
- r5000_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ r5000_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: r5000_device(mconfig, tag, owner, clock, false)
{
}