diff options
author | 2017-09-05 17:45:17 +0700 | |
---|---|---|
committer | 2017-09-05 17:45:17 +0700 | |
commit | 8a692c36281c3f2050d2ccb45bea843ef0b3ee77 (patch) | |
tree | bd07c251c4d1f560634e3d78fd224356b6a441c2 /src/devices/cpu/clipper/clipper.h | |
parent | 67ddfe302cdc18b356839797d166f7bfda4ce2af (diff) |
clipper: interrupt handling fixes
* improve interrupt vector handling
* fix C300 interrupt entry and stack frame
* fix pushw where source register is same as stack register
* switch to logmacro.h logging
Diffstat (limited to 'src/devices/cpu/clipper/clipper.h')
-rw-r--r-- | src/devices/cpu/clipper/clipper.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/devices/cpu/clipper/clipper.h b/src/devices/cpu/clipper/clipper.h index 0a95c77aa5d..27624b4e05a 100644 --- a/src/devices/cpu/clipper/clipper.h +++ b/src/devices/cpu/clipper/clipper.h @@ -14,6 +14,10 @@ class clipper_device : public cpu_device { +public: + DECLARE_READ32_MEMBER(get_ssw) const { return m_ssw; } + DECLARE_WRITE8_MEMBER(set_ivec) { m_ivec = data; } + protected: enum registers { @@ -177,10 +181,12 @@ protected: MTS_WRITE_PROTECT_FAULT = 7 << 28, }; -public: - DECLARE_READ32_MEMBER(ssw) { return m_ssw; } + enum ivec_mask + { + IVEC_NUMBER = 0x0f, + IVEC_LEVEL = 0xf0 + }; -protected: clipper_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, const u32 cpuid); // device-level overrides @@ -224,17 +230,18 @@ protected: // floating registers double m_f[16]; -private: address_space_config m_insn_config; address_space_config m_data_config; address_space *m_insn; address_space *m_data; +private: int m_icount; int m_irq; int m_nmi; + u8 m_ivec; // decoded instruction information struct @@ -254,9 +261,10 @@ private: void decode_instruction(u16 insn); int execute_instruction(); - bool evaluate_branch(); + bool evaluate_branch() const; - uint32_t intrap(u32 vector, u32 pc, u32 cts = CTS_NO_CPU_TRAP, u32 mts = MTS_NO_MEMORY_TRAP); +protected: + virtual uint32_t intrap(u32 vector, u32 pc, u32 cts = CTS_NO_CPU_TRAP, u32 mts = MTS_NO_MEMORY_TRAP); }; class clipper_c100_device : public clipper_device @@ -275,6 +283,9 @@ class clipper_c400_device : public clipper_device { public: clipper_c400_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual uint32_t intrap(u32 vector, u32 pc, u32 cts = CTS_NO_CPU_TRAP, u32 mts = MTS_NO_MEMORY_TRAP) override; }; DECLARE_DEVICE_TYPE(CLIPPER_C100, clipper_c100_device) |