reduced some duplication in the nec disassembler interface (nw)

This commit is contained in:
smf- 2013-03-06 17:49:58 +00:00
parent 59b20dca6e
commit b8216f048a
4 changed files with 6 additions and 12 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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) },