1 // license:BSD-3-Clause 2 // copyright-holders:Nathan Woods 3 /*************************************************************************** 4 5 dgnalpha.h 6 7 Dragon Alpha 8 9 ***************************************************************************/ 10 11 #ifndef MAME_INCLUDES_DGNALPHA_H 12 #define MAME_INCLUDES_DGNALPHA_H 13 14 #pragma once 15 16 17 #include "includes/dragon.h" 18 #include "imagedev/floppy.h" 19 #include "sound/ay8910.h" 20 #include "machine/wd_fdc.h" 21 22 23 24 //************************************************************************** 25 // MACROS / CONSTANTS 26 //************************************************************************** 27 28 /* devices */ 29 #define PIA2_TAG "pia2" 30 #define AY8912_TAG "ay8912" 31 #define WD2797_TAG "wd2797" 32 33 34 35 //************************************************************************** 36 // TYPE DEFINITIONS 37 //************************************************************************** 38 39 class dragon_alpha_state : public dragon64_state 40 { 41 public: dragon_alpha_state(const machine_config & mconfig,device_type type,const char * tag)42 dragon_alpha_state(const machine_config &mconfig, device_type type, const char *tag) 43 : dragon64_state(mconfig, type, tag), 44 m_pia_2(*this, PIA2_TAG), 45 m_ay8912(*this, AY8912_TAG), 46 m_fdc(*this, WD2797_TAG), 47 m_floppy(*this, WD2797_TAG ":%u", 0U) 48 { 49 } 50 51 void dgnalpha(machine_config &config); 52 53 private: 54 DECLARE_FLOPPY_FORMATS(dragon_formats); 55 56 /* pia2 */ 57 void pia2_pa_w(uint8_t data); 58 DECLARE_WRITE_LINE_MEMBER( pia2_firq_a ); 59 DECLARE_WRITE_LINE_MEMBER( pia2_firq_b ); 60 61 /* psg */ 62 uint8_t psg_porta_read(); 63 void psg_porta_write(uint8_t data); 64 65 /* fdc */ 66 DECLARE_WRITE_LINE_MEMBER( fdc_intrq_w ); 67 DECLARE_WRITE_LINE_MEMBER( fdc_drq_w ); 68 69 /* driver overrides */ 70 virtual void device_start(void) override; 71 virtual void device_reset(void) override; 72 73 /* interrupts */ 74 virtual bool firq_get_line(void) override; 75 76 void dgnalpha_io1(address_map &map); 77 78 required_device<pia6821_device> m_pia_2; 79 required_device<ay8912_device> m_ay8912; 80 required_device<wd2797_device> m_fdc; 81 required_device_array<floppy_connector, 4> m_floppy; 82 83 /* modem */ 84 uint8_t modem_r(offs_t offset); 85 void modem_w(offs_t offset, uint8_t data); 86 }; 87 88 #endif // MAME_INCLUDES_DGNALPHA_H 89