summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-12-30 06:54:17 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-12-30 06:54:17 +0000
commitc303794661def755a3dcff24d9bc5708f79b6213 (patch)
treebec566b6e04afcfe57a86a87cfb49df4855bd31c
parent13fff98e5f0a173c03eb08f98325d6f3928a2b1f (diff)
Hooked up DSA/ESA instructions for PowerPC 602 (as no-ops for now).
polystar gets a little farther but crashes when the sub cpu attempts to enable interrupts. Removed HAS_PPC* in favor of a single HAS_POWERPC, and a single definition in cpu.mak for all PowerPC variants.
-rw-r--r--src/emu/cpu/cpu.mak14
-rw-r--r--src/emu/cpu/powerpc/drc_ops.c8
-rw-r--r--src/emu/cpu/powerpc/ppc.c86
-rw-r--r--src/emu/cpu/powerpc/ppc.h18
-rw-r--r--src/emu/cpu/powerpc/ppc603.c2
-rw-r--r--src/emu/cpu/powerpc/ppc_dasm.c2
-rw-r--r--src/emu/cpu/powerpc/ppc_mem.c8
-rw-r--r--src/emu/cpu/powerpc/ppc_ops.c22
-rw-r--r--src/emu/cpu/powerpc/ppcdrc.c47
-rw-r--r--src/emu/cpu/powerpc/ppcfe.c19
-rw-r--r--src/mame/drivers/konamim2.c2
-rw-r--r--src/mame/mame.mak10
12 files changed, 31 insertions, 207 deletions
diff --git a/src/emu/cpu/cpu.mak b/src/emu/cpu/cpu.mak
index 66417a64fe1..7d4d39193de 100644
--- a/src/emu/cpu/cpu.mak
+++ b/src/emu/cpu/cpu.mak
@@ -1213,17 +1213,9 @@ $(CPUOBJ)/pdp1/pdp1.o: $(CPUSRC)/pdp1/pdp1.c \
# Motorola PowerPC series
#-------------------------------------------------
-CPUDEFS += -DHAS_PPC403GA=$(if $(filter PPC403GA,$(CPUS)),1,0)
-CPUDEFS += -DHAS_PPC403GCX=$(if $(filter PPC403GCX,$(CPUS)),1,0)
-CPUDEFS += -DHAS_PPC601=$(if $(filter PPC601,$(CPUS)),1,0)
-CPUDEFS += -DHAS_PPC602=$(if $(filter PPC602,$(CPUS)),1,0)
-CPUDEFS += -DHAS_PPC603=$(if $(filter PPC603,$(CPUS)),1,0)
-CPUDEFS += -DHAS_PPC603E=$(if $(filter PPC603E,$(CPUS)),1,0)
-CPUDEFS += -DHAS_PPC603R=$(if $(filter PPC603R,$(CPUS)),1,0)
-CPUDEFS += -DHAS_PPC604=$(if $(filter PPC604,$(CPUS)),1,0)
-CPUDEFS += -DHAS_MPC8240=$(if $(filter MPC8240,$(CPUS)),1,0)
-
-ifneq ($(filter PPC403GA PPC403GCX PPC601 PPC602 PPC603 PPC603E PPC603R PPC604 MPC8240,$(CPUS)),)
+CPUDEFS += -DHAS_POWERPC=$(if $(filter POWERPC,$(CPUS)),1,0)
+
+ifneq ($(filter POWERPC,$(CPUS)),)
OBJDIRS += $(CPUOBJ)/powerpc
CPUOBJS += $(CPUOBJ)/powerpc/ppccom.o $(CPUOBJ)/powerpc/ppcfe.o $(CPUOBJ)/powerpc/ppcdrc.o $(DRCOBJ)
DBGOBJS += $(CPUOBJ)/powerpc/ppc_dasm.o
diff --git a/src/emu/cpu/powerpc/drc_ops.c b/src/emu/cpu/powerpc/drc_ops.c
index 1649156c296..40759911a39 100644
--- a/src/emu/cpu/powerpc/drc_ops.c
+++ b/src/emu/cpu/powerpc/drc_ops.c
@@ -2624,7 +2624,6 @@ static UINT32 recompile_xoris(drc_core *drc, UINT32 op)
return RECOMPILE_SUCCESSFUL_CP(1,4);
}
-#if HAS_PPC403
static UINT32 recompile_dccci(drc_core *drc, UINT32 op)
{
return RECOMPILE_SUCCESSFUL_CP(1,4);
@@ -2713,7 +2712,6 @@ static UINT32 recompile_invalid(drc_core *drc, UINT32 op)
/* PowerPC 60x Recompilers */
-#if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240)
static UINT32 recompile_lfs(drc_core *drc,UINT32 op)
{
emit_mov_m32_r32(DRCTOP, MABS(&ppc_icount), REG_EBP);
@@ -3768,7 +3766,6 @@ static UINT32 recompile_fnmsubsx(drc_core *drc, UINT32 op)
// PPC602
-#if (HAS_PPC602)
static UINT32 recompile_esa(drc_core *drc, UINT32 op)
{
emit_mov_m32_r32(DRCTOP, MABS(&ppc_icount), REG_EBP);
@@ -3790,19 +3787,14 @@ static UINT32 recompile_dsa(drc_core *drc, UINT32 op)
return RECOMPILE_SUCCESSFUL_CP(1,4);
}
-#endif /* HAS_PPC602 */
-#if (HAS_PPC602 || HAS_MPC8240)
static UINT32 recompile_tlbli(drc_core *drc, UINT32 op)
{
return RECOMPILE_SUCCESSFUL_CP(1,4);
}
-#endif
-#if (HAS_PPC602||HAS_PPC604||HAS_MPC8240)
static UINT32 recompile_tlbld(drc_core *drc, UINT32 op)
{
return RECOMPILE_SUCCESSFUL_CP(1,4);
}
-#endif
diff --git a/src/emu/cpu/powerpc/ppc.c b/src/emu/cpu/powerpc/ppc.c
index a0e1775a831..82e233dec15 100644
--- a/src/emu/cpu/powerpc/ppc.c
+++ b/src/emu/cpu/powerpc/ppc.c
@@ -77,17 +77,11 @@ static const int mpc603r_pll_config[12][9] =
};
-#if (HAS_PPC603 || HAS_PPC601 || HAS_PPC604)
static void ppc603_exception(int exception);
-#endif
-#if (HAS_PPC602)
static void ppc602_exception(int exception);
-#endif
-#if (HAS_PPC403)
static void ppc403_exception(int exception);
static UINT8 ppc403_spu_r(UINT32 a);
static void ppc403_spu_w(UINT32 a, UINT8 d);
-#endif
#define RD ((op >> 21) & 0x1F)
#define RT ((op >> 21) & 0x1f)
@@ -144,9 +138,7 @@ static void ppc403_spu_w(UINT32 a, UINT8 d);
if((ppc.msr & 0x2000) == 0){ \
}
-#if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240)
static UINT32 ppc_field_xlat[256];
-#endif
@@ -323,12 +315,8 @@ typedef struct {
FPR fpr[32];
UINT32 sr[16];
-#if HAS_PPC603 || HAS_PPC601 || HAS_MPC8240 || HAS_PPC604
int is603;
-#endif
-#if HAS_PPC602
int is602;
-#endif
/* PowerPC 602 specific registers */
UINT32 lt;
@@ -388,29 +376,17 @@ static UINT32 ppc_rotate_mask[32][32];
INLINE int IS_PPC602(void)
{
-#if HAS_PPC602
return ppc.is602;
-#else
- return 0;
-#endif
}
INLINE int IS_PPC603(void)
{
-#if HAS_PPC603 || HAS_PPC601 || HAS_PPC604
return ppc.is603;
-#else
- return 0;
-#endif
}
INLINE int IS_PPC403(void)
{
-#if HAS_PPC403
return !IS_PPC602() && !IS_PPC603();
-#else
- return 0;
-#endif
}
/*********************************************************************/
@@ -560,7 +536,6 @@ INLINE void ppc_set_spr(int spr, UINT32 value)
case SPR_PVR: return;
}
-#if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601 || HAS_PPC604)
if(IS_PPC602() || IS_PPC603()) {
switch(spr)
{
@@ -568,14 +543,10 @@ INLINE void ppc_set_spr(int spr, UINT32 value)
if((value & 0x80000000) && !(DEC & 0x80000000))
{
/* trigger interrupt */
-#if HAS_PPC602
if (IS_PPC602())
ppc602_exception(EXCEPTION_DECREMENTER);
-#endif
-#if HAS_PPC603 || HAS_PPC601 || HAS_PPC604
if (IS_PPC603())
ppc603_exception(EXCEPTION_DECREMENTER);
-#endif
}
write_decrementer(value);
return;
@@ -629,9 +600,7 @@ INLINE void ppc_set_spr(int spr, UINT32 value)
case SPR603E_IABR: ppc.iabr = value; return;
}
}
-#endif
-#if (HAS_PPC602)
if (ppc.is602) {
switch(spr)
{
@@ -643,9 +612,7 @@ INLINE void ppc_set_spr(int spr, UINT32 value)
case SPR602_TCR: ppc.tcr = value; return;
}
}
-#endif
-#if (HAS_PPC403)
if (IS_PPC403()) {
switch(spr)
{
@@ -702,7 +669,6 @@ INLINE void ppc_set_spr(int spr, UINT32 value)
case SPR403_IAC2: ppc.iac2 = value; return;
}
}
-#endif
fatalerror("ppc: set_spr: unknown spr %d (%03X) !", spr, spr);
}
@@ -723,7 +689,6 @@ INLINE UINT32 ppc_get_spr(int spr)
case SPR_PVR: return ppc.pvr;
}
-#if (HAS_PPC403)
if (IS_PPC403())
{
switch (spr)
@@ -754,9 +719,7 @@ INLINE UINT32 ppc_get_spr(int spr)
case SPR403_IAC2: return ppc.iac2;
}
}
-#endif
-#if (HAS_PPC602)
if (ppc.is602) {
switch(spr)
{
@@ -769,9 +732,7 @@ INLINE UINT32 ppc_get_spr(int spr)
case SPR602_TCR: return ppc.tcr;
}
}
-#endif
-#if (HAS_PPC603 || HAS_PPC602 || HAS_PPC601 || HAS_PPC604)
if (IS_PPC603() || IS_PPC602())
{
switch (spr)
@@ -819,7 +780,6 @@ INLINE UINT32 ppc_get_spr(int spr)
case SPR603E_DBAT3U: return ppc.dbat[3].u;
}
}
-#endif
fatalerror("ppc: get_spr: unknown spr %d (%03X) !", spr, spr);
return 0;
@@ -899,17 +859,9 @@ INLINE void ppc_exception(int exception_type)
#include "ppc_mem.c"
-#if (HAS_PPC403)
#include "ppc403.c"
-#endif
-
-#if (HAS_PPC602)
#include "ppc602.c"
-#endif
-
-#if (HAS_PPC603 || HAS_PPC601 || HAS_MPC8240 || HAS_PPC604)
#include "ppc603.c"
-#endif
/********************************************************************/
@@ -974,7 +926,6 @@ static void ppc_init(void)
// !!! probably should move this stuff elsewhere !!!
-#if HAS_PPC403
static CPU_INIT( ppc403 )
{
const ppc_config *configdata = device->static_config;
@@ -1020,10 +971,7 @@ static CPU_EXIT( ppc403 )
{
}
-#endif /* HAS_PPC403 */
-
-#if (HAS_PPC603)
static CPU_INIT( ppc603 )
{
const ppc_config *configdata = device->static_config;
@@ -1167,9 +1115,7 @@ static CPU_EXIT( ppc603 )
{
}
-#endif
-#if (HAS_PPC602)
static CPU_INIT( ppc602 )
{
float multiplier;
@@ -1302,9 +1248,6 @@ static CPU_EXIT( ppc602 )
{
}
-#endif
-
-#if (HAS_MPC8240)
static void mpc8240_tlbli(UINT32 op)
{
@@ -1446,10 +1389,7 @@ static CPU_EXIT( mpc8240 )
{
}
-#endif
-
-#if (HAS_PPC601)
static CPU_INIT( ppc601 )
{
const ppc_config *configdata = device->static_config;
@@ -1577,9 +1517,7 @@ static CPU_EXIT( ppc601 )
{
}
-#endif
-#if (HAS_PPC604)
static CPU_INIT( ppc604 )
{
const ppc_config *configdata = device->static_config;
@@ -1709,7 +1647,6 @@ static CPU_EXIT( ppc604 )
{
}
-#endif
@@ -1766,7 +1703,6 @@ static CPU_SET_INFO( ppc )
}
}
-#if (HAS_PPC403)
static CPU_SET_INFO( ppc403 )
{
if (state >= CPUINFO_INT_INPUT_STATE && state <= CPUINFO_INT_INPUT_STATE + 8)
@@ -1781,9 +1717,7 @@ static CPU_SET_INFO( ppc403 )
default: ppc_set_info(state, info); break;
}
}
-#endif
-#if (HAS_PPC603)
static CPU_SET_INFO( ppc603 )
{
if (state >= CPUINFO_INT_INPUT_STATE && state <= CPUINFO_INT_INPUT_STATE + 5)
@@ -1798,7 +1732,6 @@ static CPU_SET_INFO( ppc603 )
default: ppc_set_info(state, info); break;
}
}
-#endif
static CPU_GET_INFO( ppc )
{
@@ -1933,7 +1866,6 @@ static CPU_GET_INFO( ppc )
}
}
-#if (HAS_PPC403)
CPU_GET_INFO( ppc403 )
{
switch(state)
@@ -1959,9 +1891,7 @@ CPU_GET_INFO( ppc403 )
default: CPU_GET_INFO_CALL(ppc); break;
}
}
-#endif
-#if (HAS_PPC603)
CPU_GET_INFO( ppc603 )
{
switch(state)
@@ -1994,11 +1924,7 @@ CPU_GET_INFO( ppc603 )
default: CPU_GET_INFO_CALL(ppc); break;
}
}
-#endif
-
-/* PowerPC 602 */
-#if (HAS_PPC602)
static CPU_SET_INFO( ppc602 )
{
if (state >= CPUINFO_INT_INPUT_STATE && state <= CPUINFO_INT_INPUT_STATE + 5)
@@ -2043,11 +1969,8 @@ CPU_GET_INFO( ppc602 )
default: CPU_GET_INFO_CALL(ppc); break;
}
}
-#endif
-/* Motorola MPC8240 */
-#if (HAS_MPC8240)
static CPU_SET_INFO( mpc8240 )
{
if (state >= CPUINFO_INT_INPUT_STATE && state <= CPUINFO_INT_INPUT_STATE + 5)
@@ -2088,11 +2011,7 @@ CPU_GET_INFO( mpc8240 )
default: CPU_GET_INFO_CALL(ppc); break;
}
}
-#endif
-/* PPC601 */
-
-#if (HAS_PPC601)
static CPU_SET_INFO( ppc601 )
{
if (state >= CPUINFO_INT_INPUT_STATE && state <= CPUINFO_INT_INPUT_STATE + 5)
@@ -2133,11 +2052,7 @@ CPU_GET_INFO( ppc601 )
default: CPU_GET_INFO_CALL(ppc); break;
}
}
-#endif
-
-/* PPC604 */
-#if (HAS_PPC604)
static CPU_SET_INFO( ppc604 )
{
if (state >= CPUINFO_INT_INPUT_STATE && state <= CPUINFO_INT_INPUT_STATE + 5)
@@ -2178,4 +2093,3 @@ CPU_GET_INFO( ppc604 )
default: CPU_GET_INFO_CALL(ppc); break;
}
}
-#endif
diff --git a/src/emu/cpu/powerpc/ppc.h b/src/emu/cpu/powerpc/ppc.h
index 5be9b70265b..ad9af018360 100644
--- a/src/emu/cpu/powerpc/ppc.h
+++ b/src/emu/cpu/powerpc/ppc.h
@@ -148,50 +148,32 @@ struct _powerpc_config
PUBLIC FUNCTIONS
***************************************************************************/
-#if (HAS_PPC403GA)
CPU_GET_INFO( ppc403ga );
#define CPU_PPC403GA CPU_GET_INFO_NAME( ppc403ga )
-#endif
-#if (HAS_PPC403GCX)
CPU_GET_INFO( ppc403gcx );
#define CPU_PPC403GCX CPU_GET_INFO_NAME( ppc403gcx )
-#endif
-#if (HAS_PPC601)
CPU_GET_INFO( ppc601 );
#define CPU_PPC601 CPU_GET_INFO_NAME( ppc601 )
-#endif
-#if (HAS_PPC602)
CPU_GET_INFO( ppc602 );
#define CPU_PPC602 CPU_GET_INFO_NAME( ppc602 )
-#endif
-#if (HAS_PPC603)
CPU_GET_INFO( ppc603 );
#define CPU_PPC603 CPU_GET_INFO_NAME( ppc603 )
-#endif
-#if (HAS_PPC603E)
CPU_GET_INFO( ppc603e );
#define CPU_PPC603E CPU_GET_INFO_NAME( ppc603e )
-#endif
-#if (HAS_PPC603R)
CPU_GET_INFO( ppc603r );
#define CPU_PPC603R CPU_GET_INFO_NAME( ppc603r )
-#endif
-#if (HAS_PPC604)
CPU_GET_INFO( ppc604 );
#define CPU_PPC604 CPU_GET_INFO_NAME( ppc604 )
-#endif
-#if (HAS_MPC8240)
CPU_GET_INFO( mpc8240 );
#define CPU_MPC8240 CPU_GET_INFO_NAME( mpc8240 )
-#endif
diff --git a/src/emu/cpu/powerpc/ppc603.c b/src/emu/cpu/powerpc/ppc603.c
index f3219bd1078..3e76794c7de 100644
--- a/src/emu/cpu/powerpc/ppc603.c
+++ b/src/emu/cpu/powerpc/ppc603.c
@@ -176,14 +176,12 @@ static void ppc603_set_irq_line(int irqline, int state)
}
}
-#if HAS_PPC603
static void ppc603_set_smi_line(int state)
{
if( state ) {
ppc.interrupt_pending |= 0x4;
}
}
-#endif
INLINE void ppc603_check_interrupts(void)
{
diff --git a/src/emu/cpu/powerpc/ppc_dasm.c b/src/emu/cpu/powerpc/ppc_dasm.c
index d5ff1c4ebf5..4cfa12bac5a 100644
--- a/src/emu/cpu/powerpc/ppc_dasm.c
+++ b/src/emu/cpu/powerpc/ppc_dasm.c
@@ -166,10 +166,12 @@ static const IDESCR itab[] =
{ "dcread", D_OP(31)|D_XO(486), M_RA|M_RB, F_RT_RA_RB, 0 },
{ "divw", D_OP(31)|D_XO(491), M_RT|M_RA|M_RB|M_OE|M_RC, F_RT_RA_RB, FL_OE|FL_RC },
{ "divwu", D_OP(31)|D_XO(459), M_RT|M_RA|M_RB|M_OE|M_RC, F_RT_RA_RB, FL_OE|FL_RC },
+ { "dsa", D_OP(31)|D_XO(628), 0, 0, 0 },
{ "eciwx", D_OP(31)|D_XO(310), M_RT|M_RA|M_RB, F_RT_RA_0_RB, 0 },
{ "ecowx", D_OP(31)|D_XO(438), M_RT|M_RA|M_RB, F_RT_RA_0_RB, 0 },
{ "eieio", D_OP(31)|D_XO(854), 0, F_NONE, 0 },
{ "eqv", D_OP(31)|D_XO(284), M_RT|M_RA|M_RB|M_RC, F_RA_RT_RB, FL_RC },
+ { "esa", D_OP(31)|D_XO(596), 0, 0, 0 },
{ "extsb", D_OP(31)|D_XO(954), M_RT|M_RA|M_RC, F_RA_RT, FL_RC },
{ "extsh", D_OP(31)|D_XO(922), M_RT|M_RA|M_RC, F_RA_RT, FL_RC },
{ "fabs", D_OP(63)|D_XO(264), M_RT|M_RB|M_RC, F_FRT_FRB, FL_RC },
diff --git a/src/emu/cpu/powerpc/ppc_mem.c b/src/emu/cpu/powerpc/ppc_mem.c
index f0047f0fcfb..2da52291213 100644
--- a/src/emu/cpu/powerpc/ppc_mem.c
+++ b/src/emu/cpu/powerpc/ppc_mem.c
@@ -66,7 +66,6 @@ INLINE void WRITE64(UINT32 a, UINT64 d)
/***********************************************************************/
-#if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240)
static UINT16 ppc_read16_unaligned(const address_space *space, UINT32 a)
{
return ((UINT16)ppc.read8(space, a+0) << 8) | ((UINT16)ppc.read8(space, a+1) << 0);
@@ -102,7 +101,6 @@ static void ppc_write64_unaligned(const address_space *space, UINT32 a, UINT64 d
ppc.write32(space, a+0, (UINT32)(d >> 32));
ppc.write32(space, a+4, (UINT32)(d));
}
-#endif
/***********************************************************************/
@@ -296,7 +294,6 @@ exception:
}
}
-#if (HAS_PPC602||HAS_PPC603)
static int ppc_translate_address_cb(int space, offs_t *addr)
{
int success = 1;
@@ -308,7 +305,6 @@ static int ppc_translate_address_cb(int space, offs_t *addr)
}
return success;
}
-#endif
static UINT8 ppc_read8_translated(const address_space *space, offs_t address)
{
@@ -359,14 +355,12 @@ static void ppc_write64_translated(const address_space *space, offs_t address, U
}
#ifndef PPC_DRC
-#if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240)
static UINT32 ppc_readop_translated(const address_space *space, offs_t address)
{
ppc_translate_address(&address, PPC_TRANSLATE_CODE | PPC_TRANSLATE_READ);
return memory_read_dword_64be(space, address);
}
#endif
-#endif
/***********************************************************************/
@@ -380,7 +374,6 @@ static CPU_DISASSEMBLE( ppc )
/***********************************************************************/
-#if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240)
static CPU_READOP( ppc )
{
if (!(ppc.msr & MSR_IR))
@@ -441,4 +434,3 @@ static CPU_WRITE( ppc )
return 1;
}
-#endif
diff --git a/src/emu/cpu/powerpc/ppc_ops.c b/src/emu/cpu/powerpc/ppc_ops.c
index a09cea5843c..287517fff77 100644
--- a/src/emu/cpu/powerpc/ppc_ops.c
+++ b/src/emu/cpu/powerpc/ppc_ops.c
@@ -4,12 +4,10 @@
#include <math.h>
#ifndef PPC_DRC
-#if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_MPC8240)
static void ppc_unimplemented(UINT32 op)
{
fatalerror("ppc: Unimplemented opcode %08X at %08X", op, ppc.pc);
}
-#endif
static void ppc_addx(UINT32 op)
{
@@ -1063,21 +1061,15 @@ static void ppc_rlwnmx(UINT32 op)
#ifndef PPC_DRC
static void ppc_sc(UINT32 op)
{
-#if (HAS_PPC603 || HAS_PPC601)
if (ppc.is603) {
ppc603_exception(EXCEPTION_SYSTEM_CALL);
}
-#endif
-#if (HAS_PPC602)
if (ppc.is602) {
ppc602_exception(EXCEPTION_SYSTEM_CALL);
}
-#endif
-#if (HAS_PPC403)
if (IS_PPC403()) {
ppc403_exception(EXCEPTION_SYSTEM_CALL);
}
-#endif
}
#endif
@@ -1543,21 +1535,15 @@ static void ppc_tw(UINT32 op)
}
if (exception) {
-#if (HAS_PPC603 || HAS_PPC601)
if (ppc.is603) {
ppc603_exception(EXCEPTION_TRAP);
}
-#endif
-#if (HAS_PPC602)
if (ppc.is602) {
ppc602_exception(EXCEPTION_TRAP);
}
-#endif
-#if (HAS_PPC403)
if (IS_PPC403()) {
ppc403_exception(EXCEPTION_TRAP);
}
-#endif
}
}
#endif
@@ -1587,21 +1573,15 @@ static void ppc_twi(UINT32 op)
}
if (exception) {
-#if (HAS_PPC603 || HAS_PPC601)
if (ppc.is603) {
ppc603_exception(EXCEPTION_TRAP);
}
-#endif
-#if (HAS_PPC602)
if (ppc.is602) {
ppc602_exception(EXCEPTION_TRAP);
}
-#endif
-#if (HAS_PPC403)
if (IS_PPC403()) {
ppc403_exception(EXCEPTION_TRAP);
}
-#endif
}
}
#endif
@@ -1777,7 +1757,6 @@ INLINE void set_fprf(FPR f)
-#if (HAS_PPC601||HAS_PPC602||HAS_PPC603||HAS_PPC604||HAS_MPC8240)
static void ppc_lfs(UINT32 op)
{
UINT32 ea = SIMM16;
@@ -2837,4 +2816,3 @@ static void ppc_fnmsubsx(UINT32 op)
SET_CR1();
}
}
-#endif
diff --git a/src/emu/cpu/powerpc/ppcdrc.c b/src/emu/cpu/powerpc/ppcdrc.c
index 01e70e0be21..6211981dae7 100644
--- a/src/emu/cpu/powerpc/ppcdrc.c
+++ b/src/emu/cpu/powerpc/ppcdrc.c
@@ -3709,6 +3709,11 @@ static int generate_instruction_1f(powerpc_state *ppc, drcuml_block *block, comp
else
UML_AND(block, MSR32, MSR32, IMM(~MSR_EE)); // and msr,msr,~MSR_EE
return TRUE;
+
+ case 0x254: /* ESA */
+ case 0x274: /* DSA */
+ /* no-op for now */
+ return TRUE;
}
return FALSE;
@@ -4189,8 +4194,6 @@ static void log_opcode_desc(drcuml_state *drcuml, const opcode_desc *desclist, i
PPC 4XX VARIANTS
***************************************************************************/
-#if (HAS_PPC403GA || HAS_PPC403GCX)
-
/*-------------------------------------------------
ppcdrc4xx_get_info - PowerPC 4XX-specific
information getter
@@ -4216,10 +4219,6 @@ static CPU_SET_INFO( ppcdrc4xx )
ppc4xx_set_info(ppc, state, info);
}
-#endif
-
-
-#if (HAS_PPC403GA)
/*-------------------------------------------------
ppc403ga_init - PowerPC 403GA-specific
@@ -4255,10 +4254,6 @@ CPU_GET_INFO( ppc403ga )
}
}
-#endif
-
-
-#if (HAS_PPC403GCX)
/*-------------------------------------------------
ppc403gcx_init - PowerPC 403GCX-specific
@@ -4294,16 +4289,12 @@ CPU_GET_INFO( ppc403gcx )
}
}
-#endif
-
/***************************************************************************
PPC 6XX VARIANTS
***************************************************************************/
-#if (HAS_PPC601)
-
/*-------------------------------------------------
ppc601_init - PowerPC 601-specific
initialization
@@ -4337,10 +4328,6 @@ CPU_GET_INFO( ppc601 )
}
}
-#endif
-
-
-#if (HAS_PPC602)
/*-------------------------------------------------
ppc602_init - PowerPC 602-specific
@@ -4375,10 +4362,6 @@ CPU_GET_INFO( ppc602 )
}
}
-#endif
-
-
-#if (HAS_PPC603)
/*-------------------------------------------------
ppc603_init - PowerPC 603-specific
@@ -4413,10 +4396,6 @@ CPU_GET_INFO( ppc603 )
}
}
-#endif
-
-
-#if (HAS_PPC603E)
/*-------------------------------------------------
ppc603e_init - PowerPC 603e-specific
@@ -4451,10 +4430,6 @@ CPU_GET_INFO( ppc603e )
}
}
-#endif
-
-
-#if (HAS_PPC603R)
/*-------------------------------------------------
ppc603r_init - PowerPC 603r-specific
@@ -4489,10 +4464,6 @@ CPU_GET_INFO( ppc603r )
}
}
-#endif
-
-
-#if (HAS_PPC604)
/*-------------------------------------------------
ppc604_init - PowerPC 604-specific
@@ -4527,16 +4498,12 @@ CPU_GET_INFO( ppc604 )
}
}
-#endif
-
/***************************************************************************
- PPC 6XX VARIANTS
+ MPC VARIANTS
***************************************************************************/
-#if (HAS_MPC8240)
-
/*-------------------------------------------------
mpc8240_init - PowerPC MPC8240-specific
initialization
@@ -4569,5 +4536,3 @@ CPU_GET_INFO( mpc8240 )
default: CPU_GET_INFO_CALL(ppcdrc); break;
}
}
-
-#endif
diff --git a/src/emu/cpu/powerpc/ppcfe.c b/src/emu/cpu/powerpc/ppcfe.c
index 199d579b1ab..195cadc39a1 100644
--- a/src/emu/cpu/powerpc/ppcfe.c
+++ b/src/emu/cpu/powerpc/ppcfe.c
@@ -98,6 +98,16 @@ INLINE int is_601_class(const powerpc_state *ppc)
/*-------------------------------------------------
+ is_602_class - are we one of the 602 variants?
+-------------------------------------------------*/
+
+INLINE int is_602_class(const powerpc_state *ppc)
+{
+ return (ppc->flavor == PPC_MODEL_602);
+}
+
+
+/*-------------------------------------------------
is_603_class - are we one of the 603 variants?
-------------------------------------------------*/
@@ -1005,7 +1015,7 @@ static int describe_instruction_1f(powerpc_state *ppc, UINT32 op, opcode_desc *d
case 0x3d2: /* TLBLD */
case 0x3f2: /* TLBLI */
- if (!(ppc->cap & PPCCAP_603_MMU))
+ if (!(ppc->cap & PPCCAP_603_MMU) && !is_602_class(ppc))
return FALSE;
desc->flags |= OPFLAG_PRIVILEGED | OPFLAG_CAN_CAUSE_EXCEPTION;
return TRUE;
@@ -1181,6 +1191,13 @@ static int describe_instruction_1f(powerpc_state *ppc, UINT32 op, opcode_desc *d
if (op & MSR_EE)
desc->flags |= OPFLAG_CAN_EXPOSE_EXTERNAL_INT;
return TRUE;
+
+ case 0x254: /* ESA */
+ case 0x274: /* DSA */
+ if (!is_602_class(ppc))
+ return FALSE;
+ desc->flags |= OPFLAG_PRIVILEGED | OPFLAG_CAN_CAUSE_EXCEPTION;
+ return TRUE;
}
return FALSE;
diff --git a/src/mame/drivers/konamim2.c b/src/mame/drivers/konamim2.c
index 27cccb55110..69c51783f65 100644
--- a/src/mame/drivers/konamim2.c
+++ b/src/mame/drivers/konamim2.c
@@ -221,7 +221,7 @@ static VIDEO_UPDATE( m2 )
UINT16 *d = BITMAP_ADDR16(bitmap, j, 0);
for (i=0; i < 512; i++)
{
- d[i^3] = *fb++;
+ d[i^3] = *fb++ & 0x7fff;
}
}
}
diff --git a/src/mame/mame.mak b/src/mame/mame.mak
index c77caaef0dc..2158ac39dc6 100644
--- a/src/mame/mame.mak
+++ b/src/mame/mame.mak
@@ -169,15 +169,7 @@ CPUS += H83334
CPUS += V810
CPUS += M37702
CPUS += M37710
-CPUS += PPC403GA
-CPUS += PPC403GCX
-CPUS += PPC601
-CPUS += PPC602
-CPUS += PPC603
-CPUS += PPC603E
-CPUS += PPC603R
-CPUS += PPC604
-CPUS += MPC8240
+CPUS += POWERPC
CPUS += SE3208
CPUS += MC68HC11
CPUS += ADSP21062