1 // license:BSD-3-Clause 2 // copyright-holders:Raphael Nabet 3 /* 4 cpu/apexc/apexcsm.c : APE(X)C CPU disassembler 5 6 By Raphael Nabet 7 8 see cpu/apexc.c for background and tech info 9 */ 10 11 #ifndef MAME_CPU_APEXC_APEXCDSM_H 12 #define MAME_CPU_APEXC_APEXCDSM_H 13 14 #pragma once 15 16 class apexc_disassembler : public util::disasm_interface 17 { 18 public: 19 apexc_disassembler() = default; 20 virtual ~apexc_disassembler() = default; 21 22 virtual u32 opcode_alignment() const override; 23 virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) override; 24 25 private: 26 enum format_type {branch, shiftl, shiftr, multiply, store, swap, one_address, two_address}; 27 28 struct instr_desc 29 { 30 const char *mnemonic; 31 format_type format; /* -> X and Y are format */ 32 }; 33 34 static const instr_desc instructions[16]; 35 }; 36 37 #endif 38