diff options
Diffstat (limited to 'src/devices/cpu/dsp56156/dsp56dsm.cpp')
-rw-r--r-- | src/devices/cpu/dsp56156/dsp56dsm.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/devices/cpu/dsp56156/dsp56dsm.cpp b/src/devices/cpu/dsp56156/dsp56dsm.cpp new file mode 100644 index 00000000000..58397c3284f --- /dev/null +++ b/src/devices/cpu/dsp56156/dsp56dsm.cpp @@ -0,0 +1,34 @@ +// license:BSD-3-Clause +// copyright-holders:Andrew Gardner +/*************************************************************************** + + dsp56dsm.cpp + Disassembler for the portable Motorola/Freescale DSP56156 emulator. + Written by Andrew Gardner + +***************************************************************************/ + +#include "emu.h" +#include "opcode.h" +#include "dsp56dsm.h" + +u32 dsp56156_disassembler::opcode_alignment() const +{ + return 1; +} + +/*****************************/ +/* Main disassembly function */ +/*****************************/ +offs_t dsp56156_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) +{ + const uint16_t w0 = opcodes.r16(pc); + const uint16_t w1 = opcodes.r16(pc+1); + + // Decode and disassemble. + DSP_56156::Opcode op(w0, w1); + stream << op.disassemble(); + + const unsigned size = op.size(); + return (size | SUPPORTED); +} |