summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/apexc/apexcdsm.h
blob: b310df1f4964e7cd13a4d61962330f6a5b36301c (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
35
36
37
// license:BSD-3-Clause
// copyright-holders:Raphael Nabet
/*
    cpu/apexc/apexcsm.c : APE(X)C CPU disassembler

    By Raphael Nabet

    see cpu/apexc.c for background and tech info
*/

#ifndef MAME_CPU_APEXC_APEXCDSM_H
#define MAME_CPU_APEXC_APEXCDSM_H

#pragma once

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

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

private:
	enum format_type {branch, shiftl, shiftr, multiply, store, swap, one_address, two_address};

	struct instr_desc
	{
		const char *mnemonic;
		format_type format; /* -> X and Y are format */
	};

	static const instr_desc instructions[16];
};

#endif