blob: 847a4bda6a005db5c5e637a3d9c3ef937d8bac02 (
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.c
Disassembler for the portable Motorola/Freescale dsp56k emulator.
Written by Andrew Gardner
***************************************************************************/
#include "emu.h"
#include "opcode.h"
#include "dsp56dsm.h"
u32 dsp56k_disassembler::opcode_alignment() const
{
return 1;
}
/*****************************/
/* Main disassembly function */
/*****************************/
offs_t dsp56k_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.
DSP56K::Opcode op(w0, w1);
stream << op.disassemble();
const unsigned size = op.size();
return (size | SUPPORTED);
}
|