diff options
author | 2017-07-05 11:44:49 +0200 | |
---|---|---|
committer | 2017-11-26 17:41:27 +0100 | |
commit | 6caef2579a1490f05d28bcede731cbdd45fc5c65 (patch) | |
tree | 8055384e183be3cb27e7d0894ac53dc96c09e6fa /src/devices/cpu/upd7725/dasm7725.cpp | |
parent | 34b222062c89adbeed822f56be6130421777e11f (diff) |
dvdisasm: Overhaul [O. Galibert]
Disassemblers are now independant classes. Not only the code is
cleaner, but unidasm has access to all the cpu cores again. The
interface to the disassembly method has changed from byte buffers to
objects that give a result to read methods. This also adds support
for lfsr and/or paged PCs.
Diffstat (limited to 'src/devices/cpu/upd7725/dasm7725.cpp')
-rw-r--r-- | src/devices/cpu/upd7725/dasm7725.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/devices/cpu/upd7725/dasm7725.cpp b/src/devices/cpu/upd7725/dasm7725.cpp index f2e644e0bec..06a9fdd3d16 100644 --- a/src/devices/cpu/upd7725/dasm7725.cpp +++ b/src/devices/cpu/upd7725/dasm7725.cpp @@ -10,11 +10,16 @@ ***************************************************************************/ #include "emu.h" -#include "upd7725.h" +#include "dasm7725.h" -CPU_DISASSEMBLE(upd7725) +u32 necdsp_disassembler::opcode_alignment() const { - uint32_t opcode = oprom[2] | (oprom[1] << 8) | (oprom[0] << 16); + return 1; +} + +offs_t necdsp_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) +{ + uint32_t opcode = opcodes.r32(pc); uint32_t type = (opcode >> 22); // printf("dasm: PC %x opcode %08x\n", pc, opcode); @@ -220,5 +225,5 @@ CPU_DISASSEMBLE(upd7725) } } - return 1 | DASMFLAG_SUPPORTED; + return 1 | SUPPORTED; } |