diff options
Diffstat (limited to 'src/devices/machine/applefdintf.h')
-rw-r--r--[-rwxr-xr-x] | src/devices/machine/applefdintf.h | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/src/devices/machine/applefdintf.h b/src/devices/machine/applefdintf.h index c6cc7a2d451..97f5bc19b22 100755..100644 --- a/src/devices/machine/applefdintf.h +++ b/src/devices/machine/applefdintf.h @@ -39,6 +39,9 @@ public: // hdsel line when present and in output mode (active high) auto hdsel_cb() { return m_hdsel_cb.bind(); } + // dat1byte line when present (active high) + auto dat1byte_cb() { return m_dat1byte_cb.bind(); } + // floppy selection input, to be updated according to the previous callbacks, // nullptr if none selected virtual void set_floppy(floppy_image_device *floppy) = 0; @@ -48,43 +51,53 @@ public: // Floppy formats // 13-sector 5.25 - DECLARE_FLOPPY_FORMATS(formats_525_13); + static void formats_525_13(format_registration &fr); // 5.25 - DECLARE_FLOPPY_FORMATS(formats_525); + static void formats_525(format_registration &fr); // 3.5 - DECLARE_FLOPPY_FORMATS(formats_35); + static void formats_35(format_registration &fr); // Floppy drives slot-level // 5.25 static void floppies_525(device_slot_interface &device); template<typename T> static void add_525_13(machine_config &config, T &floppy) { - FLOPPY_CONNECTOR(config, floppy, floppies_525, "525", formats_525_13); + FLOPPY_CONNECTOR(config, floppy, floppies_525, "525", formats_525_13).enable_sound(true); } template<typename T> static void add_525_13_nc(machine_config &config, T &floppy) { - FLOPPY_CONNECTOR(config, floppy, floppies_525, "", formats_525_13); + FLOPPY_CONNECTOR(config, floppy, floppies_525, nullptr, formats_525_13).enable_sound(true); } template<typename T> static void add_525(machine_config &config, T &floppy) { - FLOPPY_CONNECTOR(config, floppy, floppies_525, "525", formats_525); + FLOPPY_CONNECTOR(config, floppy, floppies_525, "525", formats_525).enable_sound(true); } template<typename T> static void add_525_nc(machine_config &config, T &floppy) { - FLOPPY_CONNECTOR(config, floppy, floppies_525, "", formats_525); + FLOPPY_CONNECTOR(config, floppy, floppies_525, nullptr, formats_525).enable_sound(true); } // 3.5 static void floppies_35(device_slot_interface &device); template<typename T> static void add_35(machine_config &config, T &floppy) { - FLOPPY_CONNECTOR(config, floppy, floppies_35, "35", formats_35); + FLOPPY_CONNECTOR(config, floppy, floppies_35, "35dd", formats_35).enable_sound(true); + } + template<typename T> static void add_35_sd(machine_config &config, T &floppy) { + FLOPPY_CONNECTOR(config, floppy, floppies_35, "35sd", formats_35).enable_sound(true); + } + template<typename T> static void add_35_hd(machine_config &config, T &floppy) { + FLOPPY_CONNECTOR(config, floppy, floppies_35, "35hd", formats_35).enable_sound(true); } template<typename T> static void add_35_nc(machine_config &config, T &floppy) { - FLOPPY_CONNECTOR(config, floppy, floppies_35, "", formats_35); + FLOPPY_CONNECTOR(config, floppy, floppies_35, nullptr, formats_35).enable_sound(true); } + // Sync the state when something external is going to change, like + // the floppy side or rpm. + virtual void sync() = 0; + protected: devcb_write8 m_phases_cb, m_devsel_cb; - devcb_write_line m_sel35_cb, m_hdsel_cb; + devcb_write_line m_sel35_cb, m_hdsel_cb, m_dat1byte_cb; // Current phase value in the bottom bits, input/output flags in the top bits u8 m_phases; |