summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar David Haywood <mamehaze@users.noreply.github.com>2015-01-02 21:32:21 +0000
committerGravatarGravatar David Haywood <mamehaze@users.noreply.github.com>2015-01-02 21:32:21 +0000
commit46645aeba4cc76ee9d4c7b5d6f324db1ae7de448 (patch) (github)
treede0918dada4b112fe0b97f2208ab1daea2801b33
parent4f06a0ae4ba2f23f9eeae665cf68e3e113d0ba8d (diff)
downloadmame-46645aeba4cc76ee9d4c7b5d6f324db1ae7de448.tar.bz2
mame-46645aeba4cc76ee9d4c7b5d6f324db1ae7de448.zip
arcompact (nw)
-rw-r--r--src/emu/cpu/arcompact/arcompact.c11
-rw-r--r--src/emu/cpu/arcompact/arcompact.h9
-rw-r--r--src/emu/cpu/arcompact/arcompact_execute.c1
-rw-r--r--src/emu/cpu/arcompact/arcompact_make.py5
-rw-r--r--src/mess/drivers/leapster.c11
5 files changed, 33 insertions, 4 deletions
diff --git a/src/emu/cpu/arcompact/arcompact.c b/src/emu/cpu/arcompact/arcompact.c
index da20ab7e948..f7661f9bacd 100644
--- a/src/emu/cpu/arcompact/arcompact.c
+++ b/src/emu/cpu/arcompact/arcompact.c
@@ -30,9 +30,19 @@ WRITE32_MEMBER(arcompact_device::arcompact_auxreg002_LPSTART_w) { m_LP_START = d
READ32_MEMBER( arcompact_device::arcompact_auxreg003_LPEND_r) { return m_LP_END&0xfffffffe; }
WRITE32_MEMBER(arcompact_device::arcompact_auxreg003_LPEND_w) { m_LP_END = data&0xfffffffe; }
+READ32_MEMBER( arcompact_device::arcompact_auxreg00a_STATUS32_r) { return 0xffffdead; /*m_status32;*/ }
+
+READ32_MEMBER( arcompact_device::arcompact_auxreg025_INTVECTORBASE_r) { return m_INTVECTORBASE&0xfffffc00; }
+WRITE32_MEMBER(arcompact_device::arcompact_auxreg025_INTVECTORBASE_w) { m_INTVECTORBASE = data&0xfffffc00; }
+
+
+
+
static ADDRESS_MAP_START( arcompact_auxreg_map, AS_IO, 32, arcompact_device )
AM_RANGE(0x000000008, 0x00000000b) AM_READWRITE(arcompact_auxreg002_LPSTART_r, arcompact_auxreg002_LPSTART_w)
AM_RANGE(0x00000000c, 0x00000000f) AM_READWRITE(arcompact_auxreg003_LPEND_r, arcompact_auxreg003_LPEND_w)
+ AM_RANGE(0x000000028, 0x00000002b) AM_READ(arcompact_auxreg00a_STATUS32_r) // r/o
+ AM_RANGE(0x000000094, 0x000000097) AM_READWRITE(arcompact_auxreg025_INTVECTORBASE_r, arcompact_auxreg025_INTVECTORBASE_w)
ADDRESS_MAP_END
//#define AUX_SPACE_ADDRESS_WIDTH 34 // IO space is 32 bits of dwords, so 34-bits
@@ -169,6 +179,7 @@ void arcompact_device::device_reset()
m_status32 = 0;
m_LP_START = 0;
m_LP_END = 0;
+ m_INTVECTORBASE = 0;
}
diff --git a/src/emu/cpu/arcompact/arcompact.h b/src/emu/cpu/arcompact/arcompact.h
index b41c3f6d472..b98377b8fbb 100644
--- a/src/emu/cpu/arcompact/arcompact.h
+++ b/src/emu/cpu/arcompact/arcompact.h
@@ -65,7 +65,12 @@ public:
DECLARE_WRITE32_MEMBER(arcompact_auxreg002_LPSTART_w);
DECLARE_READ32_MEMBER( arcompact_auxreg003_LPEND_r);
DECLARE_WRITE32_MEMBER(arcompact_auxreg003_LPEND_w);
+
+ DECLARE_READ32_MEMBER( arcompact_auxreg00a_STATUS32_r);
+ DECLARE_READ32_MEMBER( arcompact_auxreg025_INTVECTORBASE_r);
+ DECLARE_WRITE32_MEMBER( arcompact_auxreg025_INTVECTORBASE_w);
+
protected:
// device-level overrides
virtual void device_start();
@@ -189,7 +194,7 @@ protected:
ARCOMPACT_RETTYPE arcompact_handle04_2f_00(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_2f_01(OPS_32);
// ARCOMPACT_RETTYPE arcompact_handle04_2f_02(OPS_32);
- ARCOMPACT_RETTYPE arcompact_handle04_2f_03(OPS_32);
+// ARCOMPACT_RETTYPE arcompact_handle04_2f_03(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_2f_04(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_2f_05(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_2f_06(OPS_32);
@@ -794,6 +799,7 @@ protected:
ARCOMPACT_HANDLER04_TYPE_PM(04_2b);
ARCOMPACT_HANDLER04_TYPE_PM(04_2f_02);
+ ARCOMPACT_HANDLER04_TYPE_PM(04_2f_03);
ARCOMPACT_HANDLER04_TYPE_PM(04_2f_07);
ARCOMPACT_HANDLER04_TYPE_PM(04_2f_08);
@@ -841,6 +847,7 @@ private:
UINT32 m_LP_START;
UINT32 m_LP_END;
+ UINT32 m_INTVECTORBASE;
};
diff --git a/src/emu/cpu/arcompact/arcompact_execute.c b/src/emu/cpu/arcompact/arcompact_execute.c
index 68a5de1efe7..acbd1a2af2d 100644
--- a/src/emu/cpu/arcompact/arcompact_execute.c
+++ b/src/emu/cpu/arcompact/arcompact_execute.c
@@ -2306,7 +2306,6 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_helper(OPS_32, const c
ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_00(OPS_32) { return arcompact_handle04_2f_helper(PARAMS, "ASL"); } // ASL
ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_01(OPS_32) { return arcompact_handle04_2f_helper(PARAMS, "ASR"); } // ASR
-ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_03(OPS_32) { return arcompact_handle04_2f_helper(PARAMS, "ROR"); } // ROR
ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_04(OPS_32) { return arcompact_handle04_2f_helper(PARAMS, "RCC"); } // RCC
ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_05(OPS_32) { return arcompact_handle04_2f_helper(PARAMS, "SEXB"); } // SEXB
ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_2f_06(OPS_32) { return arcompact_handle04_2f_helper(PARAMS, "SEXW"); } // SEXW
diff --git a/src/emu/cpu/arcompact/arcompact_make.py b/src/emu/cpu/arcompact/arcompact_make.py
index a1552f71b30..9e8eef9bf10 100644
--- a/src/emu/cpu/arcompact/arcompact_make.py
+++ b/src/emu/cpu/arcompact/arcompact_make.py
@@ -390,7 +390,10 @@ EmitGroup04(f, "05_00", "ASL", "UINT32 result = b << (c&0x1f);", "m_regs[areg] =
EmitGroup04(f, "05_01", "LSR", "UINT32 result = b >> (c&0x1f);", "m_regs[areg] = result;", "m_regs[breg] = result;", 0,0, -1, EmitGroup04_unsupported_Flags )
# the 04_2f subgroup uses the same encoding, but the areg is already used as sub-opcode select, so any modes relying on areg bits for other reasons (sign, condition) (modes 10, 11m0, 11m1) are illegal. the destination is also breg not areg
-EmitGroup04(f, "04_2f_02", "LSR1", "UINT32 result = c >> 1;", "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_Handle_NZC_LSR1_Flags ) # no alt handler (invalid path)
+EmitGroup04(f, "04_2f_02", "LSR1", "UINT32 result = c >> 1;", "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_Handle_NZC_LSR1_Flags ) # no alt handler (invalid path)
+EmitGroup04(f, "04_2f_03", "ROR", "int shift = 1; UINT32 mask = (1 << (shift)) - 1; mask <<= (32-shift); UINT32 result = ((c >> shift) & ~mask) | ((c << (32-shift)) & mask);", "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_Handle_NZC_LSR1_Flags )
+
+
EmitGroup04(f, "04_2f_07", "EXTB", "UINT32 result = c & 0x000000ff;", "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_unsupported_Flags ) # ^
EmitGroup04(f, "04_2f_08", "EXTW", "UINT32 result = c & 0x0000ffff;", "m_regs[breg] = result;","", 2,1, -1, EmitGroup04_unsupported_Flags ) # ^
diff --git a/src/mess/drivers/leapster.c b/src/mess/drivers/leapster.c
index efdf33e23af..fe1fca5215f 100644
--- a/src/mess/drivers/leapster.c
+++ b/src/mess/drivers/leapster.c
@@ -232,6 +232,11 @@ public:
return rand() | (rand()<<16); // there is a loop checking that this is above a certain value
}
+ DECLARE_WRITE32_MEMBER(leapster_aux004b_w)
+ {
+ printf("leapster_aux004b_w %04x\n", data);
+ }
+
protected:
required_device<cpu_device> m_maincpu;
required_device<generic_slot_device> m_cart;
@@ -288,12 +293,16 @@ static ADDRESS_MAP_START( leapster_map, AS_PROGRAM, 32, leapster_state )
// AM_RANGE(0x80000000, 0x807fffff) AM_ROMBANK("cartrom") // game ROM pointers are all to the 80xxxxxx region, so I assume it maps here - installed if a cart is present
ADDRESS_MAP_END
+static ADDRESS_MAP_START( leapster_aux, AS_IO, 32, leapster_state )
+ AM_RANGE(0x00000012c, 0x00000012f) AM_WRITE(leapster_aux004b_w) // this address isn't used by ARC internal stuff afaik, so probably leapster specific
+ADDRESS_MAP_END
+
static MACHINE_CONFIG_START( leapster, leapster_state )
/* basic machine hardware */
// CPU is ArcTangent-A5 '5.1' (ARCompact core)
MCFG_CPU_ADD("maincpu", ARCA5, 96000000/10)
MCFG_CPU_PROGRAM_MAP(leapster_map)
-
+ MCFG_CPU_IO_MAP(leapster_aux)
/* video hardware */
MCFG_SCREEN_ADD("screen", LCD)