summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2013-03-06 17:49:58 +0000
committer smf- <smf-@users.noreply.github.com>2013-03-06 17:49:58 +0000
commitb8216f048a34b9736da131d517c58b5603c93cdf (patch)
tree9f08aa16fc3a56556af2523ef511eae0f4d2e0f9 /src
parent59b20dca6ebd52f711ce3b0ad9f28a3e0d1a68e0 (diff)
reduced some duplication in the nec disassembler interface (nw)
Diffstat (limited to 'src')
-rw-r--r--src/emu/cpu/nec/nec.c7
-rw-r--r--src/emu/cpu/nec/necdasm.c2
-rw-r--r--src/emu/cpu/v30mz/v30mz.c5
-rw-r--r--src/tools/unidasm.c4
4 files changed, 6 insertions, 12 deletions
diff --git a/src/emu/cpu/nec/nec.c b/src/emu/cpu/nec/nec.c
index 2f8bfc41617..23335d78b86 100644
--- a/src/emu/cpu/nec/nec.c
+++ b/src/emu/cpu/nec/nec.c
@@ -114,7 +114,7 @@ typedef UINT32 DWORD;
#include "nec.h"
#include "necpriv.h"
-extern int necv_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, const nec_config *config);
+extern CPU_DISASSEMBLE( nec );
INLINE nec_state_t *get_safe_token(device_t *device)
{
@@ -309,11 +309,6 @@ static void set_irq_line(nec_state_t *nec_state, int irqline, int state)
}
}
-static CPU_DISASSEMBLE( nec )
-{
- return necv_dasm_one(buffer, pc, oprom, NULL);
-}
-
static void nec_init(legacy_cpu_device *device, device_irq_acknowledge_callback irqcallback)
{
nec_state_t *nec_state = get_safe_token(device);
diff --git a/src/emu/cpu/nec/necdasm.c b/src/emu/cpu/nec/necdasm.c
index b0a69a0e185..32a63f6368e 100644
--- a/src/emu/cpu/nec/necdasm.c
+++ b/src/emu/cpu/nec/necdasm.c
@@ -1605,7 +1605,7 @@ int necv_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, const nec_config
return (pc-eip) | dasm_flags | DASMFLAG_SUPPORTED;
}
-CPU_DISASSEMBLE( nec_generic )
+CPU_DISASSEMBLE( nec )
{
return necv_dasm_one(buffer, pc, oprom, NULL);
}
diff --git a/src/emu/cpu/v30mz/v30mz.c b/src/emu/cpu/v30mz/v30mz.c
index df2491df104..8996f3a712d 100644
--- a/src/emu/cpu/v30mz/v30mz.c
+++ b/src/emu/cpu/v30mz/v30mz.c
@@ -1292,9 +1292,8 @@ void v30mz_cpu_device::execute_set_input( int inptnum, int state )
offs_t v30mz_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
{
- extern int necv_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, const nec_config *config);
-
- return necv_dasm_one(buffer, pc, oprom, NULL);
+ extern CPU_DISASSEMBLE( nec );
+ return CPU_DISASSEMBLE_NAME(nec)(this, buffer, pc, oprom, opram, options);
}
diff --git a/src/tools/unidasm.c b/src/tools/unidasm.c
index a2aa2ae0987..ea477ea97de 100644
--- a/src/tools/unidasm.c
+++ b/src/tools/unidasm.c
@@ -154,7 +154,7 @@ CPU_DISASSEMBLE( mips3le );
CPU_DISASSEMBLE( psxcpu_generic );
CPU_DISASSEMBLE( r3000be );
CPU_DISASSEMBLE( r3000le );
-CPU_DISASSEMBLE( nec_generic );
+CPU_DISASSEMBLE( nec );
CPU_DISASSEMBLE( pdp1 );
CPU_DISASSEMBLE( pps4 );
CPU_DISASSEMBLE( tx0_64kw );
@@ -276,7 +276,7 @@ static const dasm_table_entry dasm_table[] =
{ "psxcpu", _32le, 0, CPU_DISASSEMBLE_NAME(psxcpu_generic) },
{ "r3000be", _32be, 0, CPU_DISASSEMBLE_NAME(r3000be) },
{ "r3000le", _32le, 0, CPU_DISASSEMBLE_NAME(r3000le) },
- { "nec", _8bit, 0, CPU_DISASSEMBLE_NAME(nec_generic) },
+ { "nec", _8bit, 0, CPU_DISASSEMBLE_NAME(nec) },
{ "pdp1", _32be, 0, CPU_DISASSEMBLE_NAME(pdp1) },
{ "pps4", _8bit, 0, CPU_DISASSEMBLE_NAME(pps4) },
{ "tx0_64kw", _32be, -2, CPU_DISASSEMBLE_NAME(tx0_64kw) },