summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/pic1670/pic1670d.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/pic1670/pic1670d.h')
-rw-r--r--src/devices/cpu/pic1670/pic1670d.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/devices/cpu/pic1670/pic1670d.h b/src/devices/cpu/pic1670/pic1670d.h
new file mode 100644
index 00000000000..cf96f43b632
--- /dev/null
+++ b/src/devices/cpu/pic1670/pic1670d.h
@@ -0,0 +1,34 @@
+// license:BSD-3-Clause
+// copyright-holders:Olivier Galibert
+
+// PIC1670 disassembler
+
+#ifndef MAME_CPU_PIC1670_PIC1670D_H
+#define MAME_CPU_PIC1670_PIC1670D_H
+
+#pragma once
+
+class pic1670_disassembler : public util::disasm_interface
+{
+public:
+ pic1670_disassembler() = default;
+ virtual ~pic1670_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:
+ struct instruction {
+ u16 value;
+ u16 mask;
+ u32 (*cb)(std::ostream &, const pic1670_disassembler *, u16, u16);
+ };
+
+ static const instruction instructions[];
+
+ std::string freg(u16 opcode) const;
+ static char fw(u16 opcode);
+ static std::string imm8(u16 opcode);
+};
+
+#endif // MAME_CPU_PIC1670_PIC1670D_H