summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/mcs51
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/mcs51
parent5c14bcdfcb4aefb71b5b62387c4ad05dbeb3814e (diff)
full xtal conversionxtal
Diffstat (limited to 'src/devices/cpu/mcs51')
-rw-r--r--src/devices/cpu/mcs51/mcs51.cpp58
-rw-r--r--src/devices/cpu/mcs51/mcs51.h58
2 files changed, 58 insertions, 58 deletions
diff --git a/src/devices/cpu/mcs51/mcs51.cpp b/src/devices/cpu/mcs51/mcs51.cpp
index 9f5bd04e4c0..a463992cebc 100644
--- a/src/devices/cpu/mcs51/mcs51.cpp
+++ b/src/devices/cpu/mcs51/mcs51.cpp
@@ -267,7 +267,7 @@ void mcs51_cpu_device::data_internal(address_map &map)
-mcs51_cpu_device::mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program_map, address_map_constructor data_map, int program_width, int data_width, uint8_t features)
+mcs51_cpu_device::mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program_map, address_map_constructor data_map, int program_width, int data_width, uint8_t features)
: cpu_device(mconfig, type, tag, owner, clock)
, m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0, program_map)
, m_data_config("data", ENDIANNESS_LITTLE, 8, 9, 0, data_map)
@@ -295,147 +295,147 @@ mcs51_cpu_device::mcs51_cpu_device(const machine_config &mconfig, device_type ty
}
-mcs51_cpu_device::mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features)
+mcs51_cpu_device::mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features)
: mcs51_cpu_device(mconfig, type, tag, owner, clock, address_map_constructor(FUNC(mcs51_cpu_device::program_internal), this), address_map_constructor(FUNC(mcs51_cpu_device::data_internal), this), program_width, data_width, features)
{
}
-i8031_device::i8031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i8031_device::i8031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mcs51_cpu_device(mconfig, I8031, tag, owner, clock, 0, 7)
{
}
-i8051_device::i8051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i8051_device::i8051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mcs51_cpu_device(mconfig, I8051, tag, owner, clock, 12, 7)
{
}
-i8751_device::i8751_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i8751_device::i8751_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mcs51_cpu_device(mconfig, I8751, tag, owner, clock, 12, 7)
{
}
-am8753_device::am8753_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+am8753_device::am8753_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mcs51_cpu_device(mconfig, AM8753, tag, owner, clock, 13, 7)
{
}
-i8052_device::i8052_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features)
+i8052_device::i8052_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features)
: mcs51_cpu_device(mconfig, type, tag, owner, clock, program_width, data_width, features | FEATURE_I8052)
{
m_num_interrupts = 6;
}
-i8052_device::i8052_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i8052_device::i8052_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i8052_device(mconfig, I8052, tag, owner, clock, 13, 8)
{
}
-i8032_device::i8032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i8032_device::i8032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i8052_device(mconfig, I8032, tag, owner, clock, 0, 8)
{
}
-i8752_device::i8752_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i8752_device::i8752_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i8052_device(mconfig, I8752, tag, owner, clock, 13, 8)
{
}
-i80c31_device::i80c31_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i80c31_device::i80c31_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i8052_device(mconfig, I80C31, tag, owner, clock, 0, 7)
{
}
-i80c51_device::i80c51_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features)
+i80c51_device::i80c51_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features)
: mcs51_cpu_device(mconfig, type, tag, owner, clock, program_width, data_width, features | FEATURE_CMOS)
{
}
-i80c51_device::i80c51_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i80c51_device::i80c51_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i80c51_device(mconfig, I80C51, tag, owner, clock, 12, 7)
{
}
-i87c51_device::i87c51_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i87c51_device::i87c51_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i80c51_device(mconfig, I87C51, tag, owner, clock, 12, 7)
{
}
-i80c52_device::i80c52_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features)
+i80c52_device::i80c52_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features)
: i8052_device(mconfig, type, tag, owner, clock, program_width, data_width, features | FEATURE_I80C52 | FEATURE_CMOS)
{
}
-i80c52_device::i80c52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i80c52_device::i80c52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i80c52_device(mconfig, I80C52, tag, owner, clock, 13, 8)
{
}
-i80c32_device::i80c32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i80c32_device::i80c32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i80c52_device(mconfig, I80C32, tag, owner, clock, 0, 8)
{
}
-i87c52_device::i87c52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i87c52_device::i87c52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i80c52_device(mconfig, I87C52, tag, owner, clock, 13, 8)
{
}
-i87c51fa_device::i87c51fa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features)
+i87c51fa_device::i87c51fa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features)
: i80c52_device(mconfig, type, tag, owner, clock, program_width, data_width, features)
{
}
-i87c51fa_device::i87c51fa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i87c51fa_device::i87c51fa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i87c51fa_device(mconfig, I87C51FA, tag, owner, clock, 13, 8)
{
}
-i80c51gb_device::i80c51gb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i80c51gb_device::i80c51gb_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i87c51fa_device(mconfig, I80C51GB, tag, owner, clock, 0, 8)
{
}
-at89c52_device::at89c52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+at89c52_device::at89c52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i80c52_device(mconfig, AT89C52, tag, owner, clock, 13, 8)
{
}
-at89s52_device::at89s52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+at89s52_device::at89s52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i80c52_device(mconfig, AT89S52, tag, owner, clock, 13, 8)
{
}
-at89c4051_device::at89c4051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+at89c4051_device::at89c4051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i80c51_device(mconfig, AT89C4051, tag, owner, clock, 12, 7)
{
}
-ds80c320_device::ds80c320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ds80c320_device::ds80c320_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i80c52_device(mconfig, DS80C320, tag, owner, clock, 0, 8)
{
}
-sab80c535_device::sab80c535_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+sab80c535_device::sab80c535_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: i80c51_device(mconfig, SAB80C535, tag, owner, clock, 0, 8)
{
}
-i8344_device::i8344_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i8344_device::i8344_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mcs51_cpu_device(mconfig, I8344, tag, owner, clock, 0, 8)
{
}
-i8744_device::i8744_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+i8744_device::i8744_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mcs51_cpu_device(mconfig, I8744, tag, owner, clock, 12, 8)
{
}
/* program width field is set to 0 because technically the SRAM isn't internal */
-ds5002fp_device::ds5002fp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ds5002fp_device::ds5002fp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: mcs51_cpu_device(mconfig, DS5002FP, tag, owner, clock, 0, 7, FEATURE_DS5002FP | FEATURE_CMOS)
, device_nvram_interface(mconfig, *this)
, m_region(*this, "internal")
diff --git a/src/devices/cpu/mcs51/mcs51.h b/src/devices/cpu/mcs51/mcs51.h
index 32925c23de8..39940b2e157 100644
--- a/src/devices/cpu/mcs51/mcs51.h
+++ b/src/devices/cpu/mcs51/mcs51.h
@@ -71,8 +71,8 @@ public:
void data_internal(address_map &map);
protected:
// construction/destruction
- mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features = 0);
- mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, address_map_constructor program_map, address_map_constructor data_map, int program_width, int data_width, uint8_t features = 0);
+ mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features = 0);
+ mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, address_map_constructor program_map, address_map_constructor data_map, int program_width, int data_width, uint8_t features = 0);
// device-level overrides
virtual void device_start() override;
@@ -358,28 +358,28 @@ class i8031_device : public mcs51_cpu_device
{
public:
// construction/destruction
- i8031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i8031_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class i8051_device : public mcs51_cpu_device
{
public:
// construction/destruction
- i8051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i8051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class i8751_device : public mcs51_cpu_device
{
public:
// construction/destruction
- i8751_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i8751_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class am8753_device : public mcs51_cpu_device
{
public:
// construction/destruction
- am8753_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ am8753_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
@@ -387,10 +387,10 @@ class i8052_device : public mcs51_cpu_device
{
public:
// construction/destruction
- i8052_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i8052_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
- i8052_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features = 0);
+ i8052_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features = 0);
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
@@ -403,21 +403,21 @@ class i8032_device : public i8052_device
{
public:
// construction/destruction
- i8032_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i8032_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class i8752_device : public i8052_device
{
public:
// construction/destruction
- i8752_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i8752_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class i80c31_device : public i8052_device
{
public:
// construction/destruction
- i80c31_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i80c31_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;
@@ -428,10 +428,10 @@ class i80c51_device : public mcs51_cpu_device
{
public:
// construction/destruction
- i80c51_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i80c51_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
- i80c51_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features = 0);
+ i80c51_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features = 0);
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
};
@@ -440,7 +440,7 @@ class i87c51_device : public i80c51_device
{
public:
// construction/destruction
- i87c51_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i87c51_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
@@ -448,10 +448,10 @@ class i80c52_device : public i8052_device
{
public:
// construction/destruction
- i80c52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i80c52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
- i80c52_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features = 0);
+ i80c52_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features = 0);
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
@@ -464,24 +464,24 @@ class i80c32_device : public i80c52_device
{
public:
// construction/destruction
- i80c32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i80c32_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class i87c52_device : public i80c52_device
{
public:
// construction/destruction
- i87c52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i87c52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class i87c51fa_device : public i80c52_device
{
public:
// construction/destruction
- i87c51fa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i87c51fa_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
protected:
- i87c51fa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int data_width, uint8_t features = 0);
+ i87c51fa_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock, int program_width, int data_width, uint8_t features = 0);
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
};
@@ -490,7 +490,7 @@ class i80c51gb_device : public i87c51fa_device
{
public:
// construction/destruction
- i80c51gb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i80c51gb_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;
@@ -500,28 +500,28 @@ class at89c52_device : public i80c52_device
{
public:
// construction/destruction
- at89c52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ at89c52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class at89s52_device : public i80c52_device
{
public:
// construction/destruction
- at89s52_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ at89s52_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class at89c4051_device : public i80c51_device
{
public:
// construction/destruction
- at89c4051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ at89c4051_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
};
class ds80c320_device : public i80c52_device
{
public:
// construction/destruction
- ds80c320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ds80c320_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;
@@ -531,7 +531,7 @@ class sab80c535_device : public i80c51_device
{
public:
// construction/destruction
- sab80c535_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ sab80c535_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;
@@ -541,7 +541,7 @@ class i8344_device : public mcs51_cpu_device
{
public:
// construction/destruction
- i8344_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i8344_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;
@@ -551,7 +551,7 @@ class i8744_device : public mcs51_cpu_device
{
public:
// construction/destruction
- i8744_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i8744_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;
@@ -588,7 +588,7 @@ class ds5002fp_device : public mcs51_cpu_device, public device_nvram_interface
{
public:
// construction/destruction
- ds5002fp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ ds5002fp_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);
void set_mcon(uint8_t mcon) { m_ds5002fp.mcon = mcon; }
void set_rpctl(uint8_t rpctl) { m_ds5002fp.rpctl = rpctl; }