summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/dsp56k/dsp56dsm.c
blob: 8cc109c2dc46ddeb819cc5a55140476a8f902ba1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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().c_str());

	const unsigned size = op.size();
	return (size | DASMFLAG_SUPPORTED);
}