summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/ap_dsk35.h
diff options
context:
space:
mode:
author arbee <rb6502@users.noreply.github.com>2021-02-05 22:55:12 -0500
committer arbee <rb6502@users.noreply.github.com>2021-02-05 22:55:12 -0500
commit1029a103aa1e6fc18ffa0ee7080e77867fb5277c (patch)
tree4899caf8e5c2979037f53396bb7d357ca5dc32ef /src/lib/formats/ap_dsk35.h
parentfa40bb8dfb7312ee765fab8fddd19e47dcbe605a (diff)
ap_dsk35: make .2MG its own separate format handler [R. Belmont]
Diffstat (limited to 'src/lib/formats/ap_dsk35.h')
-rw-r--r--src/lib/formats/ap_dsk35.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/lib/formats/ap_dsk35.h b/src/lib/formats/ap_dsk35.h
index 7266fc65855..def1cb86856 100644
--- a/src/lib/formats/ap_dsk35.h
+++ b/src/lib/formats/ap_dsk35.h
@@ -57,12 +57,25 @@ public:
virtual const char *description() const override;
virtual const char *extensions() const override;
virtual bool supports_save() const override;
-
-private:
- bool m_bIs2MG;
- uint32_t m_u2MGOffset;
};
extern const floppy_format_type FLOPPY_APPLE_GCR_FORMAT;
+class apple_2mg_format : public floppy_image_format_t
+{
+public:
+ apple_2mg_format();
+
+ virtual int identify(io_generic *io, uint32_t form_factor, const std::vector<uint32_t> &variants) override;
+ virtual bool load(io_generic *io, uint32_t form_factor, const std::vector<uint32_t> &variants, floppy_image *image) override;
+ virtual bool save(io_generic *io, const std::vector<uint32_t> &variants, floppy_image *image) override;
+
+ virtual const char *name() const override;
+ virtual const char *description() const override;
+ virtual const char *extensions() const override;
+ virtual bool supports_save() const override;
+};
+
+extern const floppy_format_type FLOPPY_APPLE_2MG_FORMAT;
+
#endif // MAME_FORMATS_AP_DSK35_H