summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/dspp/dsppdasm.h
blob: b7af27ccccdb93fa544b0e5ff25feeb227ebeecf (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
// license:BSD-3-Clause
// copyright-holders:Philip Bennett, AJR
/*
    DSPP disassembler shim
*/

#ifndef MAME_CPU_DSPP_DSPPDASM_H
#define MAME_CPU_DSPP_DSPPDASM_H

#pragma once

class dspp_disassembler : public util::disasm_interface
{
public:
	dspp_disassembler() = default;
	virtual ~dspp_disassembler() = default;

	virtual uint32_t opcode_alignment() const override;
	virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params) override;

private:
	static void format_operand(std::ostream &stream, uint16_t operand);

	static offs_t dasm_control(std::ostream &stream, offs_t pc, const data_buffer &opcodes, uint16_t op);
	static offs_t dasm_super_special(std::ostream &stream, uint16_t op);
	static offs_t dasm_special(std::ostream &stream, offs_t pc, const data_buffer &opcodes, uint16_t op);
	static offs_t dasm_branch(std::ostream &stream, uint16_t op);
	static offs_t dasm_complex_branch(std::ostream &stream, uint16_t op);
	static offs_t dasm_arithmetic(std::ostream &stream, offs_t pc, const data_buffer &opcodes, uint16_t op);
};

#endif // MAME_CPU_DSPP_DSPPDASM_H