1 // license:BSD-3-Clause 2 // copyright-holders:Nigel Barnes 3 /********************************************************************** 4 5 Microware / United Disk Memories DDFS FDC 6 7 **********************************************************************/ 8 9 10 #ifndef MAME_BUS_BBC_FDC_UDM_H 11 #define MAME_BUS_BBC_FDC_UDM_H 12 13 #pragma once 14 15 #include "fdc.h" 16 #include "imagedev/floppy.h" 17 #include "machine/wd_fdc.h" 18 #include "formats/acorn_dsk.h" 19 #include "formats/fsd_dsk.h" 20 21 //************************************************************************** 22 // TYPE DEFINITIONS 23 //************************************************************************** 24 25 class bbc_udm_device : 26 public device_t, 27 public device_bbc_fdc_interface 28 { 29 public: 30 // construction/destruction 31 bbc_udm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); 32 33 protected: 34 // device-level overrides 35 virtual void device_start() override; 36 37 // optional information overrides 38 virtual void device_add_mconfig(machine_config &config) override; 39 virtual const tiny_rom_entry *device_rom_region() const override; 40 41 virtual uint8_t read(offs_t offset) override; 42 virtual void write(offs_t offset, uint8_t data) override; 43 44 private: 45 DECLARE_FLOPPY_FORMATS(floppy_formats); 46 47 DECLARE_WRITE_LINE_MEMBER(intrq_w); 48 DECLARE_WRITE_LINE_MEMBER(drq_w); 49 DECLARE_WRITE_LINE_MEMBER(motor_w); 50 51 required_device<wd2793_device> m_fdc; 52 required_device_array<floppy_connector, 2> m_floppy; 53 54 int m_fdc_ie; 55 }; 56 57 58 // device type definition 59 DECLARE_DEVICE_TYPE(BBC_UDM, bbc_udm_device); 60 61 62 #endif /* MAME_BUS_BBC_FDC_UDM_H */ 63