diff options
Diffstat (limited to 'src/mame/machine/hpc3.h')
-rw-r--r-- | src/mame/machine/hpc3.h | 70 |
1 files changed, 48 insertions, 22 deletions
diff --git a/src/mame/machine/hpc3.h b/src/mame/machine/hpc3.h index be4bee3da6a..87e9e2a472f 100644 --- a/src/mame/machine/hpc3.h +++ b/src/mame/machine/hpc3.h @@ -20,25 +20,12 @@ #include "sound/volt_reg.h" #include "speaker.h" -class hpc3_device : public device_t +class hpc3_base_device : public device_t { public: - template <typename T, typename U> - hpc3_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&scsi_tag) - : hpc3_device(mconfig, tag, owner, (uint32_t)0) - { - m_maincpu.set_tag(std::forward<T>(cpu_tag)); - m_wd33c93.set_tag(std::forward<U>(scsi_tag)); - } - - template <typename T, typename U, typename V> - hpc3_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&scsi_tag, V &&scsi2_tag) - : hpc3_device(mconfig, tag, owner, std::forward<T>(cpu_tag), std::forward<U>(scsi_tag)) - { - m_wd33c93_2.set_tag(std::forward<V>(scsi2_tag)); - } - - hpc3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + template <typename T> void set_cpu_tag(T &&tag) { m_maincpu.set_tag(std::forward<T>(tag)); } + template <typename T> void set_scsi0_tag(T &&tag) { m_wd33c93.set_tag(std::forward<T>(tag)); } + template <typename T> void set_scsi1_tag(T &&tag) { m_wd33c93_2.set_tag(std::forward<T>(tag)); } void map(address_map &map); @@ -51,6 +38,8 @@ public: DECLARE_WRITE_LINE_MEMBER(scsi1_drq); protected: + hpc3_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + virtual void device_start() override; virtual void device_reset() override; virtual void device_add_mconfig(machine_config &config) override; @@ -153,11 +142,12 @@ protected: struct scsi_dma_t { - uint32_t m_desc; - uint32_t m_addr; + uint32_t m_cbp; + uint32_t m_nbdp; uint32_t m_ctrl; - uint32_t m_length; - uint32_t m_next; + uint32_t m_bc; + uint32_t m_dmacfg; + uint32_t m_piocfg; bool m_irq; bool m_drq; bool m_big_endian; @@ -172,6 +162,42 @@ protected: address_space *m_cpu_space; }; -DECLARE_DEVICE_TYPE(SGI_HPC3, hpc3_device) +class hpc3_guinness_device : public hpc3_base_device +{ +public: + template <typename T, typename U> + hpc3_guinness_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&scsi0_tag) + : hpc3_guinness_device(mconfig, tag, owner, (uint32_t)0) + { + set_cpu_tag(std::forward<T>(cpu_tag)); + set_scsi0_tag(std::forward<U>(scsi0_tag)); + } + + hpc3_guinness_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + +class hpc3_full_house_device : public hpc3_base_device +{ +public: + template <typename T, typename U, typename V> + hpc3_full_house_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&cpu_tag, U &&scsi0_tag, V &&scsi1_tag) + : hpc3_full_house_device(mconfig, tag, owner, (uint32_t)0) + { + set_cpu_tag(std::forward<T>(cpu_tag)); + set_scsi0_tag(std::forward<U>(scsi0_tag)); + set_scsi1_tag(std::forward<U>(scsi1_tag)); + } + + hpc3_full_house_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + +DECLARE_DEVICE_TYPE(SGI_HPC3_GUINNESS, hpc3_guinness_device) +DECLARE_DEVICE_TYPE(SGI_HPC3_FULL_HOUSE, hpc3_full_house_device) #endif // MAME_MACHINE_HPC3_H |