diff options
| author | 2022-02-05 13:32:54 +0200 | |
|---|---|---|
| committer | 2022-02-07 09:28:14 +0200 | |
| commit | 8099d46984d1393bfd6994c483b2968ec7dc2e00 (patch) | |
| tree | ce6dee3ad612013258785e105fa5671178720113 /src/lib | |
| parent | 74c9b4c248f0e901f9190cfc7734a62a85776fe4 (diff) | |
abc1600: Added sector dump floppy image format. [Curt Coder]
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/formats/abc1600_dsk.cpp | 79 | ||||
| -rw-r--r-- | src/lib/formats/abc1600_dsk.h | 35 |
2 files changed, 114 insertions, 0 deletions
diff --git a/src/lib/formats/abc1600_dsk.cpp b/src/lib/formats/abc1600_dsk.cpp new file mode 100644 index 00000000000..e4cde5374b1 --- /dev/null +++ b/src/lib/formats/abc1600_dsk.cpp @@ -0,0 +1,79 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/abc1600_dsk.c + + Luxor ABC 1600 disk image formats + +*********************************************************************/ + +#include "formats/abc1600_dsk.h" + +abc1600_format::abc1600_format() : wd177x_format(formats) +{ +} + +const char *abc1600_format::name() const +{ + return "abc1600"; +} + +const char *abc1600_format::description() const +{ + return "Luxor ABC 1600 disk image"; +} + +const char *abc1600_format::extensions() const +{ + return "img"; +} + +const abc1600_format::format abc1600_format::formats[] = { + // 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 + + { // 640K 5 1/4 inch quad density + floppy_image::FF_525, floppy_image::DSQD, floppy_image::MFM, + 2000, 16, 80, 2, 256, {}, 1, {}, 55, 22, 54 + }, + + {} +}; + +const floppy_format_type FLOPPY_ABC1600_FORMAT = &floppy_image_format_creator<abc1600_format>; + +int abc1600_format::get_image_offset(const format &f, int head, int track) +{ + int offset = 0; + + if(head) { + for(int trk=0; trk < f.track_count; trk++) { + const format &tf = get_track_format(f, 0, trk); + offset += compute_track_size(tf); + } + } + + for(int trk=0; trk < track; trk++) { + const format &tf = get_track_format(f, head, trk); + offset += compute_track_size(tf); + } + + return offset; +} diff --git a/src/lib/formats/abc1600_dsk.h b/src/lib/formats/abc1600_dsk.h new file mode 100644 index 00000000000..8498871c23e --- /dev/null +++ b/src/lib/formats/abc1600_dsk.h @@ -0,0 +1,35 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/abc1600_dsk.h + + Luxor ABC 1600 disk image formats + +*********************************************************************/ +#ifndef MAME_FORMATS_ABC1600_DSK_H +#define MAME_FORMATS_ABC1600_DSK_H + +#pragma once + +#include "wd177x_dsk.h" + +class abc1600_format : public wd177x_format +{ +public: + abc1600_format(); + + virtual const char *name() const override; + virtual const char *description() const override; + virtual const char *extensions() const override; + +protected: + virtual int get_image_offset(const format &f, int head, int track) override; + +private: + static const format formats[]; +}; + +extern const floppy_format_type FLOPPY_ABC1600_FORMAT; + +#endif // MAME_FORMATS_ABC1600_DSK_H |
