summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2017-04-10 14:36:54 -0500
committer cracyc <cracyc@users.noreply.github.com>2017-04-10 14:36:54 -0500
commitb8e2b247052b5c31d445ebaefa4c4ec4375cb37d (patch)
tree2bc545e49f258ed0915ea110b719e4eab8e4b82b
parent0e0f3ad6a12f0b824241f37effb78c028e9c1054 (diff)
i386: add a cpuid supporting 486 (nw)
-rw-r--r--src/devices/cpu/i386/i386.cpp21
-rw-r--r--src/devices/cpu/i386/i386.h12
-rw-r--r--src/mame/drivers/mtouchxl.cpp2
3 files changed, 34 insertions, 1 deletions
diff --git a/src/devices/cpu/i386/i386.cpp b/src/devices/cpu/i386/i386.cpp
index 43d5237f64c..aeccd66818a 100644
--- a/src/devices/cpu/i386/i386.cpp
+++ b/src/devices/cpu/i386/i386.cpp
@@ -30,6 +30,7 @@
const device_type I386 = device_creator<i386_device>;
const device_type I386SX = device_creator<i386SX_device>;
const device_type I486 = device_creator<i486_device>;
+const device_type I486DX4 = device_creator<i486dx4_device>;
const device_type PENTIUM = device_creator<pentium_device>;
const device_type MEDIAGX = device_creator<mediagx_device>;
const device_type PENTIUM_PRO = device_creator<pentium_pro_device>;
@@ -78,6 +79,16 @@ i486_device::i486_device(const machine_config &mconfig, const char *tag, device_
{
}
+i486_device::i486_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
+ : i386_device(mconfig, type, name, tag, owner, clock, shortname, source)
+{
+}
+
+i486dx4_device::i486dx4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : i486_device(mconfig, I486DX4, "I486DX4", tag, owner, clock, "i486dx4", __FILE__)
+{
+}
+
pentium_device::pentium_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: i386_device(mconfig, PENTIUM, "PENTIUM", tag, owner, clock, "pentium", __FILE__)
{
@@ -4075,6 +4086,16 @@ void i486_device::device_reset()
CHANGE_PC(m_eip);
}
+void i486dx4_device::device_reset()
+{
+ i486_device::device_reset();
+ m_cpuid_id0 = 0x756e6547; // Genu
+ m_cpuid_id1 = 0x49656e69; // ineI
+ m_cpuid_id2 = 0x6c65746e; // ntel
+
+ m_cpuid_max_input_value_eax = 0x01;
+ m_cpu_version = REG32(EDX);
+}
/*****************************************************************************/
/* Pentium */
diff --git a/src/devices/cpu/i386/i386.h b/src/devices/cpu/i386/i386.h
index ca299b6cf1d..85817a8afb4 100644
--- a/src/devices/cpu/i386/i386.h
+++ b/src/devices/cpu/i386/i386.h
@@ -1432,12 +1432,23 @@ class i486_device : public i386_device
public:
// construction/destruction
i486_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ i486_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
protected:
virtual void device_start() override;
virtual void device_reset() override;
};
+class i486dx4_device : public i486_device
+{
+public:
+ // construction/destruction
+ i486dx4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+protected:
+ virtual void device_reset() override;
+};
+
class pentium_device : public i386_device
{
@@ -1528,6 +1539,7 @@ protected:
extern const device_type I386;
extern const device_type I386SX;
extern const device_type I486;
+extern const device_type I486DX4;
extern const device_type PENTIUM;
extern const device_type MEDIAGX;
extern const device_type PENTIUM_PRO;
diff --git a/src/mame/drivers/mtouchxl.cpp b/src/mame/drivers/mtouchxl.cpp
index 0f95c717d3e..bb59f313e23 100644
--- a/src/mame/drivers/mtouchxl.cpp
+++ b/src/mame/drivers/mtouchxl.cpp
@@ -116,7 +116,7 @@ static MACHINE_CONFIG_FRAGMENT(cdrom)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( at486, mt6k_state )
- MCFG_CPU_ADD("maincpu", I486, 25000000)
+ MCFG_CPU_ADD("maincpu", I486DX4, 25000000)
MCFG_CPU_PROGRAM_MAP(at32_map)
MCFG_CPU_IO_MAP(at32_io)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("mb:pic8259_master", pic8259_device, inta_cb)