diff options
Diffstat (limited to 'src/devices/cpu/z8000/z8000.h')
-rw-r--r-- | src/devices/cpu/z8000/z8000.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/devices/cpu/z8000/z8000.h b/src/devices/cpu/z8000/z8000.h index cbf7fc2a4be..6defce263df 100644 --- a/src/devices/cpu/z8000/z8000.h +++ b/src/devices/cpu/z8000/z8000.h @@ -19,19 +19,27 @@ enum Z8000_R12, Z8000_R13, Z8000_R14, Z8000_R15 }; -/* Interrupt Types that can be generated by outside sources */ -#define Z8000_EPU 0x8000 /* extended instruction trap */ -#define Z8000_TRAP 0x4000 /* privileged instruction trap */ -#define Z8000_NMI 0x2000 /* non maskable interrupt */ -#define Z8000_SEGTRAP 0x1000 /* segment trap (Z8001) */ -#define Z8000_NVI 0x0800 /* non vectored interrupt */ -#define Z8000_VI 0x0400 /* vectored interrupt (LSB is vector) */ -#define Z8000_SYSCALL 0x0200 /* system call (lsb is vector) */ -#define Z8000_HALT 0x0100 /* halted flag */ - class z8002_device : public cpu_device, public z8000_disassembler::config { +protected: + /* Interrupt Types that can be generated by outside sources */ + static constexpr uint16_t Z8000_EPU = 0x8000; /* extended instruction trap */ + static constexpr uint16_t Z8000_TRAP = 0x4000; /* privileged instruction trap */ + static constexpr uint16_t Z8000_NMI = 0x2000; /* non maskable interrupt */ + static constexpr uint16_t Z8000_SEGTRAP = 0x1000; /* segment trap (Z8001) */ + static constexpr uint16_t Z8000_NVI = 0x0800; /* non vectored interrupt */ + static constexpr uint16_t Z8000_VI = 0x0400; /* vectored interrupt (LSB is vector) */ + static constexpr uint16_t Z8000_SYSCALL = 0x0200; /* system call (lsb is vector) */ + static constexpr uint16_t Z8000_HALT = 0x0100; /* halted flag */ + public: + enum + { + NVI_LINE = 0, + VI_LINE = 1, + NMI_LINE = INPUT_LINE_NMI + }; + // construction/destruction z8002_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); ~z8002_device(); @@ -101,6 +109,7 @@ protected: void clear_internal_state(); void register_debug_state(); + void register_save_state(); virtual bool get_segmented_mode() const override; static inline uint32_t addr_add(uint32_t addr, uint32_t addend); static inline uint32_t addr_sub(uint32_t addr, uint32_t subtrahend); |