summaryrefslogtreecommitdiffstatshomepage
path: root/trunk/src/emu/cpu/dsp56k/dsp56dsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/emu/cpu/dsp56k/dsp56dsm.c')
-rw-r--r--trunk/src/emu/cpu/dsp56k/dsp56dsm.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/trunk/src/emu/cpu/dsp56k/dsp56dsm.c b/trunk/src/emu/cpu/dsp56k/dsp56dsm.c
new file mode 100644
index 00000000000..1321b92c851
--- /dev/null
+++ b/trunk/src/emu/cpu/dsp56k/dsp56dsm.c
@@ -0,0 +1,28 @@
+/***************************************************************************
+
+ dsp56dsm.c
+ Disassembler for the portable Motorola/Freescale dsp56k emulator.
+ Written by Andrew Gardner
+
+***************************************************************************/
+
+#include "opcode.h"
+
+#include "emu.h"
+#include "dsp56k.h"
+
+/*****************************/
+/* Main disassembly function */
+/*****************************/
+CPU_DISASSEMBLE( dsp56k )
+{
+ const UINT16 w0 = oprom[0] | (oprom[1] << 8);
+ const UINT16 w1 = oprom[2] | (oprom[3] << 8);
+
+ // Decode and disassemble.
+ DSP56K::Opcode op(w0, w1);
+ sprintf(buffer, "%s", op.disassemble().cstr());
+
+ const unsigned size = op.size();
+ return (size | DASMFLAG_SUPPORTED);
+}