summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/g65816/g65816ds.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/g65816/g65816ds.h')
-rw-r--r--src/devices/cpu/g65816/g65816ds.h39
1 files changed, 10 insertions, 29 deletions
diff --git a/src/devices/cpu/g65816/g65816ds.h b/src/devices/cpu/g65816/g65816ds.h
index 9e229c0e676..cb6eee661dc 100644
--- a/src/devices/cpu/g65816/g65816ds.h
+++ b/src/devices/cpu/g65816/g65816ds.h
@@ -1,9 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Karl Stenerud
+#ifndef MAME_CPU_G65816_G65816DS_H
+#define MAME_CPU_G65816_G65816DS_H
+
#pragma once
-#ifndef __G65816DS_H__
-#define __G65816DS_H__
/* ======================================================================== */
/* =============================== COPYRIGHT ============================== */
/* ======================================================================== */
@@ -25,13 +26,14 @@ class g65816_disassembler : public util::disasm_interface
{
public:
class config {
+ protected:
+ ~config() = default;
public:
- virtual ~config() = default;
virtual bool get_m_flag() const = 0;
virtual bool get_x_flag() const = 0;
};
- g65816_disassembler(config *conf);
+ g65816_disassembler(const config *conf);
virtual u32 opcode_alignment() const override;
virtual u32 interface_flags() const override;
@@ -39,18 +41,7 @@ public:
virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params) override;
private:
- enum class op : unsigned
- {
- ADC , AND , ASL , BCC , BCS , BEQ , BIT , BMI , BNE , BPL , BRA ,
- BRK , BRL , BVC , BVS , CLC , CLD , CLI , CLV , CMP , COP , CPX ,
- CPY , DEA , DEC , DEX , DEY , EOR , INA , INC , INX , INY , JML ,
- JMP , JSL , JSR , LDA , LDX , LDY , LSR , MVN , MVP , NOP , ORA ,
- PEA , PEI , PER , PHA , PHB , PHD , PHK , PHP , PHX , PHY , PLA ,
- PLB , PLD , PLP , PLX , PLY , REP , ROL , ROR , RTI , RTL , RTS ,
- SBC , SEC , SED , SEI , SEP , STA , STP , STX , STY , STZ , TAX ,
- TAY , TCS , TCD , TDC , TRB , TSB , TSC , TSX , TXA , TXS , TXY ,
- TYA , TYX , WAI , WDM , XBA , XCE
- };
+ enum class op : unsigned;
enum
{
@@ -66,25 +57,15 @@ private:
X /* check x bit */
};
- class opcode_struct {
- public:
- op m_name;
- u8 flag;
- u8 ea;
-
- opcode_struct(op n, u8 f, u8 e);
- const char *name() const;
- bool is_call() const;
- bool is_return() const;
- };
+ class opcode_struct;
static const char *const s_opnames[];
static const opcode_struct s_opcodes[256];
- config *m_config;
+ const config *m_config;
std::string int_8_str(u8 val);
std::string int_16_str(u16 val);
};
-#endif /* __G65816DS_H__ */
+#endif // MAME_CPU_G65816_G65816DS_H