summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/jaguar
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-11-08 09:20:43 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-11-08 09:20:43 +0000
commit2ba1a992834e8b50712f6dfbe87da3b7beb1ba05 (patch)
tree8281f706ae83c8adcefda66dcdfab9b1b457f50e /src/emu/cpu/jaguar
parente8ec5637ac26e2129abd0607818fc68e3148d30e (diff)
Added macros for all CPU callbacks to ease future changes.
Updated all CPU cores to use them.
Diffstat (limited to 'src/emu/cpu/jaguar')
-rw-r--r--src/emu/cpu/jaguar/jaguar.c32
-rw-r--r--src/emu/cpu/jaguar/jaguar.h4
2 files changed, 18 insertions, 18 deletions
diff --git a/src/emu/cpu/jaguar/jaguar.c b/src/emu/cpu/jaguar/jaguar.c
index 30bd2a547cb..135381ce77e 100644
--- a/src/emu/cpu/jaguar/jaguar.c
+++ b/src/emu/cpu/jaguar/jaguar.c
@@ -353,7 +353,7 @@ static void set_irq_line(int irqline, int state)
CONTEXT SWITCHING
***************************************************************************/
-static void jaguar_get_context(void *dst)
+static CPU_GET_CONTEXT( jaguar )
{
/* copy the context */
if (dst)
@@ -361,7 +361,7 @@ static void jaguar_get_context(void *dst)
}
-static void jaguar_set_context(void *src)
+static CPU_SET_CONTEXT( jaguar )
{
/* copy the context */
if (src)
@@ -599,13 +599,13 @@ static CPU_EXECUTE( jaguardsp )
DISASSEMBLY HOOK
***************************************************************************/
-static offs_t jaguargpu_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
+static CPU_DISASSEMBLE( jaguargpu )
{
extern unsigned dasmjag(int, char *, unsigned, const UINT8 *);
return dasmjag(JAGUAR_VARIANT_GPU, buffer, pc, oprom);
}
-static offs_t jaguardsp_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram)
+static CPU_DISASSEMBLE( jaguardsp )
{
extern unsigned dasmjag(int, char *, unsigned, const UINT8 *);
return dasmjag(JAGUAR_VARIANT_DSP, buffer, pc, oprom);
@@ -1515,7 +1515,7 @@ void jaguardsp_ctrl_w(int cpunum, offs_t offset, UINT32 data, UINT32 mem_mask)
* Generic set_info
**************************************************************************/
-static void jaguargpu_set_info(UINT32 state, cpuinfo *info)
+static CPU_SET_INFO( jaguargpu )
{
switch (state)
{
@@ -1572,7 +1572,7 @@ static void jaguargpu_set_info(UINT32 state, cpuinfo *info)
* Generic get_info
**************************************************************************/
-void jaguargpu_get_info(UINT32 state, cpuinfo *info)
+CPU_GET_INFO( jaguargpu )
{
switch (state)
{
@@ -1645,15 +1645,15 @@ void jaguargpu_get_info(UINT32 state, cpuinfo *info)
case CPUINFO_INT_SP: info->i = jaguar.b0[31]; break;
/* --- the following bits of info are returned as pointers to data or functions --- */
- case CPUINFO_PTR_SET_INFO: info->setinfo = jaguargpu_set_info; break;
- case CPUINFO_PTR_GET_CONTEXT: info->getcontext = jaguar_get_context; break;
- case CPUINFO_PTR_SET_CONTEXT: info->setcontext = jaguar_set_context; break;
+ case CPUINFO_PTR_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(jaguargpu); break;
+ case CPUINFO_PTR_GET_CONTEXT: info->getcontext = CPU_GET_CONTEXT_NAME(jaguar); break;
+ case CPUINFO_PTR_SET_CONTEXT: info->setcontext = CPU_SET_CONTEXT_NAME(jaguar); break;
case CPUINFO_PTR_INIT: info->init = CPU_INIT_NAME(jaguargpu); break;
case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(jaguargpu); break;
case CPUINFO_PTR_EXIT: info->exit = CPU_EXIT_NAME(jaguar); break;
case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(jaguargpu); break;
case CPUINFO_PTR_BURN: info->burn = NULL; break;
- case CPUINFO_PTR_DISASSEMBLE: info->disassemble = jaguargpu_dasm; break;
+ case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(jaguargpu); break;
case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &jaguar_icount; break;
/* --- the following bits of info are returned as NULL-terminated strings --- */
@@ -1718,7 +1718,7 @@ void jaguargpu_get_info(UINT32 state, cpuinfo *info)
* CPU-specific set_info
**************************************************************************/
-static void jaguardsp_set_info(UINT32 state, cpuinfo *info)
+static CPU_SET_INFO( jaguardsp )
{
switch (state)
{
@@ -1728,12 +1728,12 @@ static void jaguardsp_set_info(UINT32 state, cpuinfo *info)
/* --- the following bits of info are set as pointers to data or functions --- */
default:
- jaguargpu_set_info(state, info);
+ CPU_SET_INFO_CALL(jaguargpu);
break;
}
}
-void jaguardsp_get_info(UINT32 state, cpuinfo *info)
+CPU_GET_INFO( jaguardsp )
{
switch (state)
{
@@ -1742,17 +1742,17 @@ void jaguardsp_get_info(UINT32 state, cpuinfo *info)
case CPUINFO_INT_INPUT_STATE + JAGUAR_IRQ5: info->i = (jaguar.ctrl[G_CTRL] & 0x10000) ? ASSERT_LINE : CLEAR_LINE; break;
/* --- the following bits of info are returned as pointers to data or functions --- */
- case CPUINFO_PTR_SET_INFO: info->setinfo = jaguardsp_set_info; break;
+ case CPUINFO_PTR_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(jaguardsp); break;
case CPUINFO_PTR_INIT: info->init = CPU_INIT_NAME(jaguardsp); break;
case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(jaguardsp); break;
case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(jaguardsp); break;
- case CPUINFO_PTR_DISASSEMBLE: info->disassemble = jaguardsp_dasm; break;
+ case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(jaguardsp); break;
/* --- the following bits of info are returned as NULL-terminated strings --- */
case CPUINFO_STR_NAME: strcpy(info->s, "Jaguar DSP"); break;
default:
- jaguargpu_get_info(state, info);
+ CPU_GET_INFO_CALL(jaguargpu);
break;
}
}
diff --git a/src/emu/cpu/jaguar/jaguar.h b/src/emu/cpu/jaguar/jaguar.h
index ba4c60c1d56..0c518199964 100644
--- a/src/emu/cpu/jaguar/jaguar.h
+++ b/src/emu/cpu/jaguar/jaguar.h
@@ -98,11 +98,11 @@ struct _jaguar_cpu_core
PUBLIC FUNCTIONS
***************************************************************************/
-extern void jaguargpu_get_info(UINT32 state, cpuinfo *info);
+extern CPU_GET_INFO( jaguargpu );
extern void jaguargpu_ctrl_w(int cpunum, offs_t offset, UINT32 data, UINT32 mem_mask);
extern UINT32 jaguargpu_ctrl_r(int cpunum, offs_t offset);
-extern void jaguardsp_get_info(UINT32 state, cpuinfo *info);
+extern CPU_GET_INFO( jaguardsp );
extern void jaguardsp_ctrl_w(int cpunum, offs_t offset, UINT32 data, UINT32 mem_mask);
extern UINT32 jaguardsp_ctrl_r(int cpunum, offs_t offset);