diff options
Diffstat (limited to 'src/devices/cpu/dsp32/dsp32.h')
-rw-r--r-- | src/devices/cpu/dsp32/dsp32.h | 128 |
1 files changed, 63 insertions, 65 deletions
diff --git a/src/devices/cpu/dsp32/dsp32.h b/src/devices/cpu/dsp32/dsp32.h index 4b39600284a..6efdebdbf21 100644 --- a/src/devices/cpu/dsp32/dsp32.h +++ b/src/devices/cpu/dsp32/dsp32.h @@ -7,10 +7,10 @@ ***************************************************************************/ -#pragma once +#ifndef MAME_CPU_DSP32_DSP32_H +#define MAME_CPU_DSP32_DSP32_H -#ifndef __DSP32_H__ -#define __DSP32_H__ +#pragma once //************************************************************************** @@ -25,63 +25,6 @@ const int DSP32_IRQ1 = 1; // IRQ1 const int DSP32_OUTPUT_PIF = 0x01; const int DSP32_OUTPUT_PDF = 0x02; -// register enumeration -enum -{ - // CAU - DSP32_PC=1, - DSP32_R0, - DSP32_R1, - DSP32_R2, - DSP32_R3, - DSP32_R4, - DSP32_R5, - DSP32_R6, - DSP32_R7, - DSP32_R8, - DSP32_R9, - DSP32_R10, - DSP32_R11, - DSP32_R12, - DSP32_R13, - DSP32_R14, - DSP32_R15, - DSP32_R16, - DSP32_R17, - DSP32_R18, - DSP32_R19, - DSP32_R20, - DSP32_R21, - DSP32_R22, - DSP32_PIN, - DSP32_POUT, - DSP32_IVTP, - - // DAU - DSP32_A0, - DSP32_A1, - DSP32_A2, - DSP32_A3, - DSP32_DAUC, - - // PIO - DSP32_PAR, - DSP32_PDR, - DSP32_PIR, - DSP32_PCR, - DSP32_EMR, - DSP32_ESR, - DSP32_PCW, - DSP32_PIOP, - - // SIO - DSP32_IBUF, - DSP32_ISR, - DSP32_OBUF, - DSP32_OSR, - DSP32_IOC -}; - //************************************************************************** // TYPE DEFINITIONS @@ -98,7 +41,7 @@ public: // construction/destruction dsp32c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template<class _Object> static devcb_base &set_output_pins_callback(device_t &device, _Object object) { return downcast<dsp32c_device &>(device).m_output_pins_changed.set_callback(object); } + template <class Object> static devcb_base &set_output_pins_callback(device_t &device, Object &&cb) { return downcast<dsp32c_device &>(device).m_output_pins_changed.set_callback(std::forward<Object>(cb)); } // public interfaces @@ -106,6 +49,63 @@ public: int pio_r(int reg); protected: + // register enumeration + enum + { + // CAU + DSP32_PC=1, + DSP32_R0, + DSP32_R1, + DSP32_R2, + DSP32_R3, + DSP32_R4, + DSP32_R5, + DSP32_R6, + DSP32_R7, + DSP32_R8, + DSP32_R9, + DSP32_R10, + DSP32_R11, + DSP32_R12, + DSP32_R13, + DSP32_R14, + DSP32_R15, + DSP32_R16, + DSP32_R17, + DSP32_R18, + DSP32_R19, + DSP32_R20, + DSP32_R21, + DSP32_R22, + DSP32_PIN, + DSP32_POUT, + DSP32_IVTP, + + // DAU + DSP32_A0, + DSP32_A1, + DSP32_A2, + DSP32_A3, + DSP32_DAUC, + + // PIO + DSP32_PAR, + DSP32_PDR, + DSP32_PIR, + DSP32_PCR, + DSP32_EMR, + DSP32_ESR, + DSP32_PCW, + DSP32_PIOP, + + // SIO + DSP32_IBUF, + DSP32_ISR, + DSP32_OBUF, + DSP32_OSR, + DSP32_IOC + }; + // device-level overrides virtual void device_start() override; virtual void device_reset() override; @@ -432,8 +432,6 @@ protected: }; -extern const device_type DSP32C; - - +DECLARE_DEVICE_TYPE(DSP32C, dsp32c_device) -#endif /* __DSP32_H__ */ +#endif // MAME_CPU_DSP32_DSP32_H |