diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/bus/abcbus/lux10828.cpp | 1 | ||||
-rw-r--r-- | src/devices/bus/abcbus/lux10828.h | 1 | ||||
-rw-r--r-- | src/devices/bus/abcbus/lux21046.cpp | 1 | ||||
-rw-r--r-- | src/devices/bus/abcbus/lux21046.h | 1 | ||||
-rw-r--r-- | src/lib/formats/abc800_dsk.cpp | 29 | ||||
-rw-r--r-- | src/lib/formats/abc800_dsk.h | 1 | ||||
-rw-r--r-- | src/lib/formats/abc800i_dsk.cpp | 108 | ||||
-rw-r--r-- | src/lib/formats/abc800i_dsk.h | 35 | ||||
-rw-r--r-- | src/lib/formats/all.cpp | 7 | ||||
-rw-r--r-- | src/mame/luxor/abc80x.cpp | 6 |
10 files changed, 161 insertions, 29 deletions
diff --git a/src/devices/bus/abcbus/lux10828.cpp b/src/devices/bus/abcbus/lux10828.cpp index e349cd76bb5..1c1535e9b87 100644 --- a/src/devices/bus/abcbus/lux10828.cpp +++ b/src/devices/bus/abcbus/lux10828.cpp @@ -302,6 +302,7 @@ static void abc_floppies(device_slot_interface &device) void luxor_55_10828_device::floppy_formats(format_registration &fr) { fr.add_mfm_containers(); + fr.add(FLOPPY_ABC800I_FORMAT); fr.add(FLOPPY_ABC800_FORMAT); } diff --git a/src/devices/bus/abcbus/lux10828.h b/src/devices/bus/abcbus/lux10828.h index c5bf46a8c89..0766de4d547 100644 --- a/src/devices/bus/abcbus/lux10828.h +++ b/src/devices/bus/abcbus/lux10828.h @@ -15,6 +15,7 @@ #include "cpu/z80/z80.h" #include "machine/z80daisy.h" #include "formats/abc800_dsk.h" +#include "formats/abc800i_dsk.h" #include "imagedev/floppy.h" #include "machine/wd_fdc.h" #include "machine/z80pio.h" diff --git a/src/devices/bus/abcbus/lux21046.cpp b/src/devices/bus/abcbus/lux21046.cpp index 7dd4ebfb791..f004990a8fc 100644 --- a/src/devices/bus/abcbus/lux21046.cpp +++ b/src/devices/bus/abcbus/lux21046.cpp @@ -257,6 +257,7 @@ void luxor_55_21046_device::io_write_byte(offs_t offset, uint8_t data) void luxor_55_21046_device::floppy_formats(format_registration &fr) { fr.add_mfm_containers(); + fr.add(FLOPPY_ABC800I_FORMAT); fr.add(FLOPPY_ABC800_FORMAT); } diff --git a/src/devices/bus/abcbus/lux21046.h b/src/devices/bus/abcbus/lux21046.h index 735de99641c..a45eb11d130 100644 --- a/src/devices/bus/abcbus/lux21046.h +++ b/src/devices/bus/abcbus/lux21046.h @@ -15,6 +15,7 @@ #include "cpu/z80/z80.h" #include "machine/z80daisy.h" #include "formats/abc800_dsk.h" +#include "formats/abc800i_dsk.h" #include "imagedev/floppy.h" #include "machine/wd_fdc.h" #include "machine/z80dma.h" diff --git a/src/lib/formats/abc800_dsk.cpp b/src/lib/formats/abc800_dsk.cpp index 6498aa7f357..88a9cacf0dc 100644 --- a/src/lib/formats/abc800_dsk.cpp +++ b/src/lib/formats/abc800_dsk.cpp @@ -26,7 +26,7 @@ const char *abc800_format::description() const const char *abc800_format::extensions() const { - return "dsk,img"; + return "img"; } const abc800_format::format abc800_format::formats[] = { @@ -51,7 +51,7 @@ const abc800_format::format abc800_format::formats[] = { { // 80K 5 1/4 inch single density single sided floppy_image::FF_525, floppy_image::SSSD, floppy_image::FM, - 4000, 16, 40, 1, 128, {}, -1, { 1,2,11,12,5,6,15,16,9,10,3,4,13,14,7,8 }, 28, 11, 27 + 4000, 16, 40, 1, 128, {}, 1, {}, 28, 11, 27 }, // track description @@ -75,7 +75,7 @@ const abc800_format::format abc800_format::formats[] = { { // 160K 5 1/4 inch double density single sided floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, - 2000, 16, 40, 1, 256, {}, -1, { 1,8,15,6,13,4,11,2,9,16,7,14,5,12,3,10 }, 55, 22, 54 + 2000, 16, 40, 1, 256, {}, 1, {}, 55, 22, 54 }, // track description @@ -141,29 +141,6 @@ const abc800_format::format abc800_format::formats[] = { const abc800_format FLOPPY_ABC800_FORMAT; -void abc800_format::build_sector_description(const format &f, uint8_t *sectdata, desc_s *sectors, int track, int head) const -{ - if(f.sector_base_id == -1) { - for(int i=0; i<f.sector_count; i++) { - int cur_offset = 0; - for(int j=0; j<f.sector_count; j++) - if(f.per_sector_id[j] < f.per_sector_id[i]) - cur_offset += f.sector_base_size ? f.sector_base_size : f.per_sector_size[j]; - sectors[i].data = sectdata + cur_offset; - sectors[i].size = f.sector_base_size ? f.sector_base_size : f.per_sector_size[i]; - sectors[i].sector_id = i + f.per_sector_id[0]; - } - } else { - int cur_offset = 0; - for(int i=0; i<f.sector_count; i++) { - sectors[i].data = sectdata + cur_offset; - sectors[i].size = f.sector_base_size ? f.sector_base_size : f.per_sector_size[i]; - cur_offset += sectors[i].size; - sectors[i].sector_id = i + f.sector_base_id; - } - } -} - int abc800_format::get_image_offset(const format &f, int head, int track) const { int offset = 0; diff --git a/src/lib/formats/abc800_dsk.h b/src/lib/formats/abc800_dsk.h index dc6f8911fa7..ce2ec83ac2b 100644 --- a/src/lib/formats/abc800_dsk.h +++ b/src/lib/formats/abc800_dsk.h @@ -24,7 +24,6 @@ public: virtual const char *extensions() const override; protected: - virtual void build_sector_description(const format &d, uint8_t *sectdata, desc_s *sectors, int track, int head) const override; virtual int get_image_offset(const format &f, int head, int track) const override; private: diff --git a/src/lib/formats/abc800i_dsk.cpp b/src/lib/formats/abc800i_dsk.cpp new file mode 100644 index 00000000000..fe623c73fcd --- /dev/null +++ b/src/lib/formats/abc800i_dsk.cpp @@ -0,0 +1,108 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/abc800i_dsk.c + + Luxor ABC 830 interleaved disk image formats + +*********************************************************************/ + +#include "formats/abc800i_dsk.h" + +abc800i_format::abc800i_format() : wd177x_format(formats) +{ +} + +const char *abc800i_format::name() const +{ + return "abc800i"; +} + +const char *abc800i_format::description() const +{ + return "Luxor ABC 830 interleaved disk image"; +} + +const char *abc800i_format::extensions() const +{ + return "dsk"; +} + +const abc800i_format::format abc800i_format::formats[] = { + // track description + // 28xff 6x00 fe 2x00 01 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 02 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 03 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 04 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 05 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 06 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 07 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 08 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 09 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 0a 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 0b 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 0c 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 0d 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 0e 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 0f 00 f7 11xff 6x00 fb 128xe5 f7 + // 27xff 6x00 fe 2x00 10 00 f7 11xff 6x00 fb 128xe5 f7 + // 117xff + + { // 80K 5 1/4 inch single density single sided + floppy_image::FF_525, floppy_image::SSSD, floppy_image::FM, + 4000, 16, 40, 1, 128, {}, -1, { 1,2,11,12,5,6,15,16,9,10,3,4,13,14,7,8 }, 28, 11, 27 + }, + + // track description + // 55x4e 12x00 3xf5 fe 2x00 01 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 02 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 03 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 04 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 05 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 06 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 07 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 08 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 09 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 0a 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 0b 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 0c 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 0d 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 0e 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 0f 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 54x4e 12x00 3xf5 fe 2x00 10 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 + // 298x4e + + { // 160K 5 1/4 inch double density single sided + floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, + 2000, 16, 40, 1, 256, {}, -1, { 1,8,15,6,13,4,11,2,9,16,7,14,5,12,3,10 }, 55, 22, 54 + }, + + {} +}; + +const abc800i_format FLOPPY_ABC800I_FORMAT; + +void abc800i_format::build_sector_description(const format &f, uint8_t *sectdata, desc_s *sectors, int track, int head) const +{ + printf("fu"); + if(f.sector_base_id == -1) { + for(int i=0; i<f.sector_count; i++) { + int cur_offset = 0; + for(int j=0; j<f.sector_count; j++) + if(f.per_sector_id[j] < f.per_sector_id[i]) + cur_offset += f.sector_base_size ? f.sector_base_size : f.per_sector_size[j]; + sectors[i].data = sectdata + cur_offset; + sectors[i].size = f.sector_base_size ? f.sector_base_size : f.per_sector_size[i]; + sectors[i].sector_id = i + f.per_sector_id[0]; + } + } else { + int cur_offset = 0; + for(int i=0; i<f.sector_count; i++) { + sectors[i].data = sectdata + cur_offset; + sectors[i].size = f.sector_base_size ? f.sector_base_size : f.per_sector_size[i]; + cur_offset += sectors[i].size; + sectors[i].sector_id = i + f.sector_base_id; + } + } +} diff --git a/src/lib/formats/abc800i_dsk.h b/src/lib/formats/abc800i_dsk.h new file mode 100644 index 00000000000..577573c11de --- /dev/null +++ b/src/lib/formats/abc800i_dsk.h @@ -0,0 +1,35 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/abc800i_dsk.h + + Luxor ABC 830 interleaved disk image formats + +*********************************************************************/ +#ifndef MAME_FORMATS_ABC800I_DSK_H +#define MAME_FORMATS_ABC800I_DSK_H + +#pragma once + +#include "wd177x_dsk.h" + +class abc800i_format : public wd177x_format +{ +public: + abc800i_format(); + + virtual const char *name() const override; + virtual const char *description() const override; + virtual const char *extensions() const override; + +protected: + virtual void build_sector_description(const format &d, uint8_t *sectdata, desc_s *sectors, int track, int head) const override; + +private: + static const format formats[]; +}; + +extern const abc800i_format FLOPPY_ABC800I_FORMAT; + +#endif // MAME_FORMATS_ABC800I_DSK_H diff --git a/src/lib/formats/all.cpp b/src/lib/formats/all.cpp index 017c81b3ce9..d56a1ee9e6c 100644 --- a/src/lib/formats/all.cpp +++ b/src/lib/formats/all.cpp @@ -36,6 +36,10 @@ #include "abc800_dsk.h" #endif +#ifdef HAS_FORMATS_ABC800I_DSK +#include "abc800i_dsk.h" +#endif + #ifdef HAS_FORMATS_ABCFD2_DSK #include "abcfd2_dsk.h" #endif @@ -820,6 +824,9 @@ void mame_formats_full_list(mame_formats_enumerator &en) #ifdef HAS_FORMATS_ABC800_DSK en.add(FLOPPY_ABC800_FORMAT); // abc800_dsk.h #endif +#ifdef HAS_FORMATS_ABC800I_DSK + en.add(FLOPPY_ABC800I_FORMAT); // abc800i_dsk.h +#endif #ifdef HAS_FORMATS_ABCFD2_DSK en.add(FLOPPY_ABC_FD2_FORMAT); // abcfd2_dsk.h #endif diff --git a/src/mame/luxor/abc80x.cpp b/src/mame/luxor/abc80x.cpp index 4537db566db..b2f974b966b 100644 --- a/src/mame/luxor/abc80x.cpp +++ b/src/mame/luxor/abc80x.cpp @@ -2084,7 +2084,9 @@ void abc800_state::common(machine_config &config) ABCBUS_SLOT(config, ABCBUS_TAG, ABC800_X01/2/2, abcbus_cards, nullptr); // software list - SOFTWARE_LIST(config, "flop_list").set_original("abc800"); + SOFTWARE_LIST(config, "flop_list_830").set_original("abc830_flop"); + SOFTWARE_LIST(config, "flop_list_832").set_original("abc832_flop"); + SOFTWARE_LIST(config, "flop_list_838").set_original("abc838_flop"); SOFTWARE_LIST(config, "hdd_list").set_original("abc800_hdd"); // quickload @@ -2227,7 +2229,7 @@ void abc806_state::abc806(machine_config &config) RAM(config, RAM_TAG).set_default_size("160K").set_extra_options("544K"); // software list - SOFTWARE_LIST(config, "flop_list2").set_original("abc806"); + SOFTWARE_LIST(config, "flop_list_806").set_original("abc806_flop"); } |