diff options
Diffstat (limited to 'src/devices/cpu/m68000/m68000.h')
-rw-r--r-- | src/devices/cpu/m68000/m68000.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/devices/cpu/m68000/m68000.h b/src/devices/cpu/m68000/m68000.h index b9a2ac4d266..d08edf4e44d 100644 --- a/src/devices/cpu/m68000/m68000.h +++ b/src/devices/cpu/m68000/m68000.h @@ -107,6 +107,26 @@ public: void autovectors_map(address_map &map); protected: + static constexpr int NUM_CPU_TYPES = 7; + + typedef void (m68000_base_device::*opcode_handler_ptr)(); + static opcode_handler_ptr m68ki_instruction_jump_table[NUM_CPU_TYPES][0x10000]; /* opcode handler jump table */ + static unsigned char m68ki_cycles[NUM_CPU_TYPES][0x10000]; /* Cycles used by CPU type */ + + /* This is used to generate the opcode handler jump table */ + struct opcode_handler_struct + { + opcode_handler_ptr opcode_handler; /* handler function */ + unsigned int mask; /* mask on opcode */ + unsigned int match; /* what to match after masking */ + unsigned char cycles[NUM_CPU_TYPES]; /* cycles each cpu type takes */ + }; + + static const opcode_handler_struct m68k_opcode_handler_table[]; + + static void m68ki_set_one(unsigned short opcode, const opcode_handler_struct *s); + static void m68ki_build_opcode_table(void); + void presave(); void postload(); |