summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2013-08-21 13:40:43 +0000
committer cracyc <cracyc@users.noreply.github.com>2013-08-21 13:40:43 +0000
commitf1ab5c69a6bb06d83a302772ed682f3674fc6852 (patch)
tree1f60c63a947a40972977bb43d3a0beec43e5d347 /src/lib
parent796e4fcf03902c2c0bbf60a94ea22b0e9410d564 (diff)
(mess) support raw compis images (nw)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/formats/cpis_dsk.c94
-rw-r--r--src/lib/formats/cpis_dsk.h17
2 files changed, 111 insertions, 0 deletions
diff --git a/src/lib/formats/cpis_dsk.c b/src/lib/formats/cpis_dsk.c
index f355e024580..f42dec457d0 100644
--- a/src/lib/formats/cpis_dsk.c
+++ b/src/lib/formats/cpis_dsk.c
@@ -91,3 +91,97 @@ LEGACY_FLOPPY_OPTIONS_START( compis )
TRACKS(40/[80])
SECTORS(8/[9]/15))
LEGACY_FLOPPY_OPTIONS_END
+
+
+
+
+/***************************************************************************
+
+ Copyright Olivier Galibert
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ * Neither the name 'MAME' nor the names of its contributors may be
+ used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+****************************************************************************/
+
+/*********************************************************************
+
+ formats/cpis_dsk.c
+
+ cpis format
+
+*********************************************************************/
+
+#include "emu.h"
+#include "formats/cpis_dsk.h"
+
+cpis_format::cpis_format() : upd765_format(formats)
+{
+}
+
+const char *cpis_format::name() const
+{
+ return "cpis";
+}
+
+const char *cpis_format::description() const
+{
+ return "COMPIS disk image";
+}
+
+const char *cpis_format::extensions() const
+{
+ return "dsk,img";
+}
+
+// Unverified gap sizes
+const cpis_format::format cpis_format::formats[] = {
+ { /* 320K 5 1/4 inch double density */
+ floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM,
+ 2000, 8, 40, 2, 512, {}, 1, {}, 80, 50, 22, 80
+ },
+ { /* 360K 5 1/4 inch double density */
+ floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM,
+ 2000, 9, 40, 2, 512, {}, 1, {}, 80, 50, 22, 80
+ },
+ { /* 640K 5 1/4 inch quad density - gaps unverified */
+ floppy_image::FF_525, floppy_image::DSQD, floppy_image::MFM,
+ 2000, 8, 80, 2, 512, {}, 1, {}, 80, 50, 22, 80
+ },
+ { /* 720K 5 1/4 inch quad density - gaps unverified */
+ floppy_image::FF_525, floppy_image::DSQD, floppy_image::MFM,
+ 2000, 9, 80, 2, 512, {}, 1, {}, 80, 50, 22, 80
+ },
+ { /* 1200K 5 1/4 inch quad density */
+ floppy_image::FF_525, floppy_image::DSQD, floppy_image::MFM,
+ 1200, 15, 80, 2, 512, {}, 1, {}, 80, 50, 22, 84
+ },
+ {}
+};
+
+const floppy_format_type FLOPPY_CPIS_FORMAT = &floppy_image_format_creator<cpis_format>;
+
diff --git a/src/lib/formats/cpis_dsk.h b/src/lib/formats/cpis_dsk.h
index 4b654b5002e..002f5dd2e54 100644
--- a/src/lib/formats/cpis_dsk.h
+++ b/src/lib/formats/cpis_dsk.h
@@ -16,4 +16,21 @@
LEGACY_FLOPPY_OPTIONS_EXTERN(compis);
+
+#include "upd765_dsk.h"
+
+class cpis_format : public upd765_format {
+public:
+ cpis_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_CPIS_FORMAT;
+
#endif /* CPIS_DSK_H */