diff options
| author | 2018-05-18 13:32:56 -0400 | |
|---|---|---|
| committer | 2018-05-18 13:40:29 -0400 | |
| commit | 0ba652e723036746aa1b1ac665411bee83771654 (patch) | |
| tree | ba3cf42c70bf33ad22c07ad85b9d41f863a373e7 /src/devices/cpu/sh | |
| parent | e5dc17a4881d2b9ce4573b42d825cb6456bf529c (diff) | |
diexec: Interrupt API changes (nw)
- PULSE_LINE is no longer a value. Existing uses have been changed to pulse_input_line with attotime::zero as the second argument.
- Formerly only INPUT_LINE_NMI and INPUT_LINE_RESET were allowed with PULSE_LINE. INPUT_LINE_NMI no longer receives special handling; instead, CPU devices must specify which of their input lines are edge-triggered and thus may be used with zero-width pulses by overriding the execute_input_edge_triggered predicate. INPUT_LINE_RESET is still special-cased, however.
- execute_default_irq_vector now allows a different default vector to be specified for each input line. This added flexibility may or may not prove useful.
Diffstat (limited to 'src/devices/cpu/sh')
| -rw-r--r-- | src/devices/cpu/sh/sh2.h | 3 | ||||
| -rw-r--r-- | src/devices/cpu/sh/sh4.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/devices/cpu/sh/sh2.h b/src/devices/cpu/sh/sh2.h index c5693ca9ebd..2fd53b05e93 100644 --- a/src/devices/cpu/sh/sh2.h +++ b/src/devices/cpu/sh/sh2.h @@ -99,7 +99,8 @@ protected: virtual uint32_t execute_min_cycles() const override { return 1; } virtual uint32_t execute_max_cycles() const override { return 4; } virtual uint32_t execute_input_lines() const override { return 16; } - virtual uint32_t execute_default_irq_vector() const override { return 0; } + virtual uint32_t execute_default_irq_vector(int inputnum) const override { return 0; } + virtual bool execute_input_edge_triggered(int inputnum) const override { return inputnum == INPUT_LINE_NMI; } virtual void execute_run() override; virtual void execute_set_input(int inputnum, int state) override; diff --git a/src/devices/cpu/sh/sh4.h b/src/devices/cpu/sh/sh4.h index 8d6af845820..eb84a9128f9 100644 --- a/src/devices/cpu/sh/sh4.h +++ b/src/devices/cpu/sh/sh4.h @@ -309,6 +309,7 @@ protected: virtual uint32_t execute_input_lines() const override { return 5; } virtual void execute_run() override; virtual void execute_set_input(int inputnum, int state) override; + virtual bool execute_input_edge_triggered(int inputnum) const override { return inputnum == INPUT_LINE_NMI; } // device_memory_interface overrides virtual space_config_vector memory_space_config() const override; |
