mirror of
https://github.com/holub/mame
synced 2025-07-07 02:50:50 +03:00
mips3: add r4000 and r4400 variants (nw)
This commit is contained in:
parent
0e5c458544
commit
9014ba4c17
@ -102,6 +102,10 @@ static const uint8_t fpmode_source[4] =
|
|||||||
#define ROPCODE(pc) m_lr32(pc)
|
#define ROPCODE(pc) m_lr32(pc)
|
||||||
|
|
||||||
|
|
||||||
|
DEFINE_DEVICE_TYPE(R4000BE, r4000be_device, "r4000be", "MIPS R4000 (big)")
|
||||||
|
DEFINE_DEVICE_TYPE(R4000LE, r4000le_device, "r4000le", "MIPS R4000 (little)")
|
||||||
|
DEFINE_DEVICE_TYPE(R4400BE, r4400be_device, "r4400be", "MIPS R4400 (big)")
|
||||||
|
DEFINE_DEVICE_TYPE(R4400LE, r4400le_device, "r4400le", "MIPS R4400 (little)")
|
||||||
DEFINE_DEVICE_TYPE(VR4300BE, vr4300be_device, "vr4300be", "NEC VR4300 (big)")
|
DEFINE_DEVICE_TYPE(VR4300BE, vr4300be_device, "vr4300be", "NEC VR4300 (big)")
|
||||||
DEFINE_DEVICE_TYPE(VR4300LE, vr4300le_device, "vr4300le", "NEC VR4300 (little)")
|
DEFINE_DEVICE_TYPE(VR4300LE, vr4300le_device, "vr4300le", "NEC VR4300 (little)")
|
||||||
DEFINE_DEVICE_TYPE(VR4310BE, vr4310be_device, "vr4310be", "NEC VR4310 (big)")
|
DEFINE_DEVICE_TYPE(VR4310BE, vr4310be_device, "vr4310be", "NEC VR4310 (big)")
|
||||||
|
@ -20,6 +20,10 @@ MIPS III/IV emulator.
|
|||||||
#include "cpu/drcuml.h"
|
#include "cpu/drcuml.h"
|
||||||
#include "ps2vu.h"
|
#include "ps2vu.h"
|
||||||
|
|
||||||
|
DECLARE_DEVICE_TYPE(R4000BE, r4000be_device)
|
||||||
|
DECLARE_DEVICE_TYPE(R4000LE, r4000le_device)
|
||||||
|
DECLARE_DEVICE_TYPE(R4400BE, r4400be_device)
|
||||||
|
DECLARE_DEVICE_TYPE(R4400LE, r4400le_device)
|
||||||
// NEC VR4300 series is MIPS III with 32-bit address bus and slightly custom COP0/TLB
|
// NEC VR4300 series is MIPS III with 32-bit address bus and slightly custom COP0/TLB
|
||||||
DECLARE_DEVICE_TYPE(VR4300BE, vr4300be_device)
|
DECLARE_DEVICE_TYPE(VR4300BE, vr4300be_device)
|
||||||
DECLARE_DEVICE_TYPE(VR4300LE, vr4300le_device)
|
DECLARE_DEVICE_TYPE(VR4300LE, vr4300le_device)
|
||||||
@ -278,6 +282,8 @@ protected:
|
|||||||
enum mips3_flavor {
|
enum mips3_flavor {
|
||||||
/* MIPS III variants */
|
/* MIPS III variants */
|
||||||
MIPS3_TYPE_MIPS_III,
|
MIPS3_TYPE_MIPS_III,
|
||||||
|
MIPS3_TYPE_R4000,
|
||||||
|
MIPS3_TYPE_R4400,
|
||||||
MIPS3_TYPE_VR4300,
|
MIPS3_TYPE_VR4300,
|
||||||
MIPS3_TYPE_R4600,
|
MIPS3_TYPE_R4600,
|
||||||
MIPS3_TYPE_R4650,
|
MIPS3_TYPE_R4650,
|
||||||
@ -633,6 +639,42 @@ 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)
|
||||||
|
: mips3_device(mconfig, R4000BE, tag, owner, clock, MIPS3_TYPE_R4000, ENDIANNESS_BIG, 32)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class r4000le_device : public mips3_device {
|
||||||
|
public:
|
||||||
|
// construction/destruction
|
||||||
|
r4000le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
|
: mips3_device(mconfig, R4000LE, tag, owner, clock, MIPS3_TYPE_R4000, ENDIANNESS_LITTLE, 32)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class r4400be_device : public mips3_device {
|
||||||
|
public:
|
||||||
|
// construction/destruction
|
||||||
|
r4400be_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
|
: mips3_device(mconfig, R4400BE, tag, owner, clock, MIPS3_TYPE_R4400, ENDIANNESS_BIG, 32)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class r4400le_device : public mips3_device {
|
||||||
|
public:
|
||||||
|
// construction/destruction
|
||||||
|
r4400le_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
|
: mips3_device(mconfig, R4400LE, tag, owner, clock, MIPS3_TYPE_R4400, ENDIANNESS_LITTLE, 32)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class vr4300be_device : public mips3_device {
|
class vr4300be_device : public mips3_device {
|
||||||
public:
|
public:
|
||||||
// construction/destruction
|
// construction/destruction
|
||||||
|
@ -303,6 +303,12 @@ uint32_t mips3_device::compute_prid_register()
|
|||||||
{
|
{
|
||||||
switch (m_flavor)
|
switch (m_flavor)
|
||||||
{
|
{
|
||||||
|
case MIPS3_TYPE_R4000:
|
||||||
|
return 0x0400;
|
||||||
|
|
||||||
|
case MIPS3_TYPE_R4400:
|
||||||
|
return 0x0440;
|
||||||
|
|
||||||
case MIPS3_TYPE_VR4300:
|
case MIPS3_TYPE_VR4300:
|
||||||
return 0x0b00;
|
return 0x0b00;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user