summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
author mahlemiut <mahlemiut@users.noreply.github.com>2014-03-31 01:23:08 +0000
committer mahlemiut <mahlemiut@users.noreply.github.com>2014-03-31 01:23:08 +0000
commit6251ca51539b87a7a8ef6fc91dd7d79e6bc83a4b (patch)
tree1cbc6355797e626604540a2bd53cfc8ff6829b3f /src/lib
parentbe9ff598cb057a409f73aad12c3ae7ecaab0d572 (diff)
fmtowns: converted to use wd_fdc and modern floppy drive implementation.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/formats/fmtowns_dsk.c40
-rw-r--r--src/lib/formats/fmtowns_dsk.h27
-rw-r--r--src/lib/lib.mak1
3 files changed, 68 insertions, 0 deletions
diff --git a/src/lib/formats/fmtowns_dsk.c b/src/lib/formats/fmtowns_dsk.c
new file mode 100644
index 00000000000..9b2bad2170d
--- /dev/null
+++ b/src/lib/formats/fmtowns_dsk.c
@@ -0,0 +1,40 @@
+/*
+ * fmtowns_dsk.c
+ *
+ * FM Towns floppy image format
+ *
+ * Created on: 23/03/2014
+ */
+
+#include "emu.h"
+#include "formats/fmtowns_dsk.h"
+
+fmtowns_format::fmtowns_format() : wd177x_format(formats)
+{
+}
+
+const char *fmtowns_format::name() const
+{
+ return "fmtowns";
+}
+
+const char *fmtowns_format::description() const
+{
+ return "FM Towns disk image";
+}
+
+const char *fmtowns_format::extensions() const
+{
+ return "bin";
+}
+
+// Unverified gap sizes
+const fmtowns_format::format fmtowns_format::formats[] = {
+ { /* 1.2MB 3 1/2 inch high density */
+ floppy_image::FF_35, floppy_image::DSHD, floppy_image::MFM,
+ 1200, 8, 77, 2, 1024, {}, 1, {}, 50, 22, 84
+ },
+ {}
+};
+
+const floppy_format_type FLOPPY_FMTOWNS_FORMAT = &floppy_image_format_creator<fmtowns_format>;
diff --git a/src/lib/formats/fmtowns_dsk.h b/src/lib/formats/fmtowns_dsk.h
new file mode 100644
index 00000000000..390bc3b8a41
--- /dev/null
+++ b/src/lib/formats/fmtowns_dsk.h
@@ -0,0 +1,27 @@
+/*
+ * fmtowns_dsk.h
+ *
+ * Created on: 23/03/2014
+ */
+
+#ifndef FMTOWNS_DSK_H_
+#define FMTOWNS_DSK_H_
+
+#include "wd177x_dsk.h"
+
+class fmtowns_format : public wd177x_format {
+public:
+ fmtowns_format();
+
+ virtual const char *name() const;
+ virtual const char *description() const;
+ virtual const char *extensions() const;
+
+private:
+ static const format formats[];
+};
+
+extern const floppy_format_type FLOPPY_FMTOWNS_FORMAT;
+
+
+#endif /* FMTOWNS_DSK_H_ */
diff --git a/src/lib/lib.mak b/src/lib/lib.mak
index 8c5d817fef9..6ca2f427f56 100644
--- a/src/lib/lib.mak
+++ b/src/lib/lib.mak
@@ -144,6 +144,7 @@ FORMATSOBJS = \
$(LIBOBJ)/formats/fdi_dsk.o \
$(LIBOBJ)/formats/fm7_cas.o \
$(LIBOBJ)/formats/fmsx_cas.o \
+ $(LIBOBJ)/formats/fmtowns_dsk.o \
$(LIBOBJ)/formats/g64_dsk.o \
$(LIBOBJ)/formats/gtp_cas.o \
$(LIBOBJ)/formats/hect_dsk.o \