diff options
author | 2025-01-12 10:27:13 -0600 | |
---|---|---|
committer | 2025-01-12 17:27:13 +0100 | |
commit | 9a06c424e0a900a1327ef1c52768bb6602f300fc (patch) | |
tree | e5f4748b0bfe3637efb2d22a5f943d21d6cef1c1 /src/lib/formats/h17disk.h | |
parent | 43b23c15ecf5f29fb0622dbd31c64d950f0eba3f (diff) |
formats/h17disk.cpp: Add format for Heath hard-sectored formats (#13222)
* formats/h17disk.cpp: Add format for Heath hard-sectored formats
* fix compile error
* minor formatting changes
Diffstat (limited to 'src/lib/formats/h17disk.h')
-rw-r--r-- | src/lib/formats/h17disk.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/lib/formats/h17disk.h b/src/lib/formats/h17disk.h new file mode 100644 index 00000000000..19ac0bac052 --- /dev/null +++ b/src/lib/formats/h17disk.h @@ -0,0 +1,38 @@ +// license:BSD-3-Clause +// copyright-holders:Mark Garlanger +/********************************************************************* + +Heath h17disk disk image format + +The Heath hard-sectored disk format for the H8 and H89 systems with the +H17 controller on the H8 and the H-88-1 controller on the H89. + +*********************************************************************/ +#ifndef MAME_FORMATS_H17DISK_H +#define MAME_FORMATS_H17DISK_H + +#pragma once + +#include "flopimg.h" + +class heath_h17d_format : public floppy_image_format_t +{ +public: + heath_h17d_format(); + + int identify(util::random_read &io, uint32_t form_factor, const std::vector<uint32_t> &variants) const override; + bool load(util::random_read &io, uint32_t form_factor, const std::vector<uint32_t> &variants, floppy_image &image) const override; + + const char *name() const noexcept override { return "h17disk"; } + const char *description() const noexcept override { return "Heath H17D disk image"; } + const char *extensions() const noexcept override { return "h17,h17d,h17disk"; } + bool supports_save() const noexcept override { return false; } + +protected: + + void fm_reverse_byte_w(std::vector<uint32_t> &buffer, uint8_t val) const; +}; + +extern const heath_h17d_format FLOPPY_H17D_FORMAT; + +#endif // MAME_FORMATS_H17DISK_H |