Changed how the PowerPC MMU is enabled at compile time, to cut down on the

amount of unused functions in MAME.
This commit is contained in:
Nathan Woods 2008-03-10 13:10:44 +00:00
parent 2a8c73cc45
commit 43c2c2a002
2 changed files with 130 additions and 122 deletions

View File

@ -817,12 +817,10 @@ INLINE UINT32 ppc_get_cr(void)
return CR(0) << 28 | CR(1) << 24 | CR(2) << 20 | CR(3) << 16 | CR(4) << 12 | CR(5) << 8 | CR(6) << 4 | CR(7);
}
#ifdef UNUSED_FUNCTION
INLINE void ppc_exception(int exception_type)
{
longjmp(ppc.exception_jmpbuf, exception_type);
}
#endif
/***********************************************************************/

View File

@ -122,6 +122,14 @@ enum
};
#ifdef MESS
#define PPC_MMU_ENABLED 1
#else /* !MESS */
/* MMU not enabled in MAME; model3 drivers don't work properly */
#define PPC_MMU_ENABLED 0
#endif /* MESS */
static int ppc_is_protected(UINT32 pp, int flags)
{
if (flags & PPC_TRANSLATE_WRITE)
@ -136,11 +144,11 @@ static int ppc_is_protected(UINT32 pp, int flags)
}
return FALSE;
}
#endif
static int ppc_translate_address(offs_t *addr_ptr, int flags)
{
#ifdef MESS
if (PPC_MMU_ENABLED)
{
const BATENT *bat;
UINT32 address;
UINT32 sr, vsid, hash;
@ -280,10 +288,12 @@ exception:
}
}
return 0;
#else
}
else
{
/* MMU not enabled in MAME; model3 drivers don't work properly */
return 1;
#endif
}
}
#if (HAS_PPC602||HAS_PPC603)