From c2d39f378bf74df68020b05a321ffa9a09dc4647 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 22 Apr 2021 21:56:55 +1000 Subject: kaypro: added back support for kay/dsk images. --- src/lib/formats/kaypro_dsk.cpp | 4 ++-- src/mame/drivers/kaypro.cpp | 23 +++++++++++++++-------- src/mame/includes/kaypro.h | 1 + 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/lib/formats/kaypro_dsk.cpp b/src/lib/formats/kaypro_dsk.cpp index be1d6130e0a..9d85ced697c 100644 --- a/src/lib/formats/kaypro_dsk.cpp +++ b/src/lib/formats/kaypro_dsk.cpp @@ -36,7 +36,7 @@ const char *kayproii_format::description() const const char *kayproii_format::extensions() const { - return "kay"; + return "kay,dsk"; } const kayproii_format::format kayproii_format::formats[] = { @@ -63,7 +63,7 @@ const char *kaypro2x_format::description() const const char *kaypro2x_format::extensions() const { - return "kay"; + return "kay,dsk"; } const kaypro2x_format::format kaypro2x_format::formats[] = { diff --git a/src/mame/drivers/kaypro.cpp b/src/mame/drivers/kaypro.cpp index 9eae318824a..933a5d4dfc5 100644 --- a/src/mame/drivers/kaypro.cpp +++ b/src/mame/drivers/kaypro.cpp @@ -46,6 +46,7 @@ #include "emu.h" #include "includes/kaypro.h" #include "machine/kay_kbd.h" +#include "formats/kaypro_dsk.h" #include "bus/rs232/rs232.h" #include "machine/clock.h" @@ -194,6 +195,12 @@ static void kaypro_floppies(device_slot_interface &device) device.option_add("525qd", FLOPPY_525_QD); } +void kaypro_state::floppy_formats(format_registration &fr) +{ + fr.add_mfm_containers(); + fr.add(FLOPPY_KAYPROII_FORMAT); + fr.add(FLOPPY_KAYPRO2X_FORMAT); +} void kaypro_state::kayproii(machine_config &config) { @@ -265,8 +272,8 @@ void kaypro_state::kayproii(machine_config &config) m_fdc->intrq_wr_callback().set(FUNC(kaypro_state::fdc_intrq_w)); m_fdc->drq_wr_callback().set(FUNC(kaypro_state::fdc_drq_w)); m_fdc->set_force_ready(true); - FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525ssdd", kaypro_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525ssdd", kaypro_state::floppy_formats).enable_sound(true); SOFTWARE_LIST(config, "flop_list").set_original("kaypro").set_filter("A"); } @@ -276,8 +283,8 @@ void kaypro_state::kayproiv(machine_config &config) m_pio_s->out_pa_callback().set(FUNC(kaypro_state::kayproiv_pio_system_w)); config.device_remove("fdc:0"); config.device_remove("fdc:1"); - FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525dd", kaypro_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525dd", kaypro_state::floppy_formats).enable_sound(true); SOFTWARE_LIST(config.replace(), "flop_list").set_original("kaypro").set_filter("D"); } @@ -365,8 +372,8 @@ void kaypro_state::kaypro484(machine_config &config) m_fdc->intrq_wr_callback().set(FUNC(kaypro_state::fdc_intrq_w)); m_fdc->drq_wr_callback().set(FUNC(kaypro_state::fdc_drq_w)); m_fdc->set_force_ready(true); - FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525dd", kaypro_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525dd", kaypro_state::floppy_formats).enable_sound(true); SOFTWARE_LIST(config, "flop_list").set_original("kaypro").set_filter("C"); } @@ -402,8 +409,8 @@ void kaypro_state::kaypro284(machine_config &config) kaypro484(config); config.device_remove("fdc:0"); config.device_remove("fdc:1"); - FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525ssdd", kaypro_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525ssdd", kaypro_state::floppy_formats).enable_sound(true); SOFTWARE_LIST(config.replace(), "flop_list").set_original("kaypro").set_filter("B"); } diff --git a/src/mame/includes/kaypro.h b/src/mame/includes/kaypro.h index 2e66840954b..5bc400af0e4 100644 --- a/src/mame/includes/kaypro.h +++ b/src/mame/includes/kaypro.h @@ -80,6 +80,7 @@ private: DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); u8 kaypro_videoram_r(offs_t offset); void kaypro_videoram_w(offs_t offset, u8 data); + static void floppy_formats(format_registration &fr); void kaypro_palette(palette_device &palette) const; uint32_t screen_update_kayproii(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); -- cgit v1.2.3