From 4ad4e70ea1f50cad31608d92815414dd0d63933e Mon Sep 17 00:00:00 2001 From: smf- Date: Wed, 6 Mar 2013 18:02:20 +0000 Subject: [PATCH] tms57002 works in unidasm, disassemble interface can be revisited when all cpu cores have been converted. [smf] --- src/emu/cpu/tms57002/57002dsm.c | 13 ++----------- src/emu/cpu/tms57002/tms57002.c | 16 ++++++++++++++++ src/tools/unidasm.c | 4 ++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/emu/cpu/tms57002/57002dsm.c b/src/emu/cpu/tms57002/57002dsm.c index c649e96900d..3f180c92335 100644 --- a/src/emu/cpu/tms57002/57002dsm.c +++ b/src/emu/cpu/tms57002/57002dsm.c @@ -41,7 +41,7 @@ #include "debugger.h" #include "tms57002.h" -const char *tms57002_device::get_memadr(UINT32 opcode, char type) +static const char *get_memadr(UINT32 opcode, char type) { static char buff[2][10]; static int index = 0; @@ -64,17 +64,8 @@ const char *tms57002_device::get_memadr(UINT32 opcode, char type) return buf; } -UINT32 tms57002_device::disasm_min_opcode_bytes() const -{ - return 4; -} -UINT32 tms57002_device::disasm_max_opcode_bytes() const -{ - return 4; -} - -offs_t tms57002_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) +CPU_DISASSEMBLE(tms57002) { UINT32 opcode = opram[0] | (opram[1] << 8) | (opram[2] << 16); UINT8 fa = opcode >> 18; diff --git a/src/emu/cpu/tms57002/tms57002.c b/src/emu/cpu/tms57002/tms57002.c index 307d8d3d476..413456c399d 100644 --- a/src/emu/cpu/tms57002/tms57002.c +++ b/src/emu/cpu/tms57002/tms57002.c @@ -844,6 +844,22 @@ UINT32 tms57002_device::execute_input_lines() const return 0; } +UINT32 tms57002_device::disasm_min_opcode_bytes() const +{ + return 4; +} + +UINT32 tms57002_device::disasm_max_opcode_bytes() const +{ + return 4; +} + +offs_t tms57002_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) +{ + extern CPU_DISASSEMBLE( tms57002 ); + return CPU_DISASSEMBLE_NAME(tms57002)(this, buffer, pc, oprom, opram, options); +} + const address_space_config *tms57002_device::memory_space_config(address_spacenum spacenum) const { switch(spacenum) { diff --git a/src/tools/unidasm.c b/src/tools/unidasm.c index ea477ea97de..6b91a3ca1b5 100644 --- a/src/tools/unidasm.c +++ b/src/tools/unidasm.c @@ -187,7 +187,7 @@ CPU_DISASSEMBLE( tms3203x ); CPU_DISASSEMBLE( tms32051 ); CPU_DISASSEMBLE( tms34010 ); CPU_DISASSEMBLE( tms34020 ); -//CPU_DISASSEMBLE( tms57002 ); +CPU_DISASSEMBLE( tms57002 ); CPU_DISASSEMBLE( tms7000 ); CPU_DISASSEMBLE( upd7810 ); CPU_DISASSEMBLE( upd7807 ); @@ -309,7 +309,7 @@ static const dasm_table_entry dasm_table[] = { "tms32051", _16le, -1, CPU_DISASSEMBLE_NAME(tms32051) }, { "tms34010", _8bit, 3, CPU_DISASSEMBLE_NAME(tms34010) }, { "tms34020", _8bit, 3, CPU_DISASSEMBLE_NAME(tms34020) }, - // { "tms57002", _32le, -2, CPU_DISASSEMBLE_NAME(tms57002) }, + { "tms57002", _32le, -2, CPU_DISASSEMBLE_NAME(tms57002) }, { "tms7000", _8bit, 0, CPU_DISASSEMBLE_NAME(tms7000) }, { "upd7810", _8bit, 0, CPU_DISASSEMBLE_NAME(upd7810) }, { "upd7807", _8bit, 0, CPU_DISASSEMBLE_NAME(upd7807) },