summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/dsp56156/dsp56dsm.cpp
blob: 58397c3284f0288699bb11025fc59d4fc19817d4 (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
29
30
31
32
33
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 &params)
{
	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);
}