summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/hp300_dsk.cpp
diff options
context:
space:
mode:
author Sven Schnelle <41547105+svenschnelle@users.noreply.github.com>2022-12-24 20:33:59 +0100
committer GitHub <noreply@github.com>2022-12-25 06:33:59 +1100
commit0ce06a9d748f59455655f004a1d92f5e03d1ee5c (patch)
tree939511bbed7c58607f6a3a185782f5caedf7ef85 /src/lib/formats/hp300_dsk.cpp
parente76c27800e6e0e791c28544ac6156160ea9180dc (diff)
formats/hp300_dsk.cpp, formats/hp_lif.cpp: Added HP 300 floppy format and LIF filesystem. (#10729)
Added support for various disk formats used with HP computers. Named 'hp300', but also contains formats used with HP85 and HP150 computers, using the same floppy drivers as the 300 series. Most of the information was taken from "HP Flexible Disk Formats" by Martin Hepperle. HP LIF was used in quite a lot of different HP products like the HP 9000/300, HP85/87 and HP150 computers. Added support for reading this filesystem.
Diffstat (limited to 'src/lib/formats/hp300_dsk.cpp')
-rw-r--r--src/lib/formats/hp300_dsk.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/lib/formats/hp300_dsk.cpp b/src/lib/formats/hp300_dsk.cpp
new file mode 100644
index 00000000000..99f9ac033ee
--- /dev/null
+++ b/src/lib/formats/hp300_dsk.cpp
@@ -0,0 +1,48 @@
+// license:BSD-3-Clause
+// copyright-holders:Sven Schnelle
+/*********************************************************************
+
+ formats/hp300_dsk.c
+
+ HP 9000/300 disk format
+
+*********************************************************************/
+
+#include "formats/hp300_dsk.h"
+
+hp300_format::hp300_format() : wd177x_format(formats)
+{
+}
+
+const char *hp300_format::name() const
+{
+ return "hp300";
+}
+
+const char *hp300_format::description() const
+{
+ return "HP 9000/300 disk image";
+}
+
+const char *hp300_format::extensions() const
+{
+ return "img";
+}
+
+const hp300_format::format hp300_format::formats[] = {
+ // HP 9121S, 9121D or 9133A
+ { floppy_image::FF_35, floppy_image::DSDD, floppy_image::MFM, 2000, 16, 77, 2, 256, {}, 1, {}, 50, 22, 54 }, // FORMAT 0,1
+ { floppy_image::FF_35, floppy_image::DSDD, floppy_image::MFM, 2000, 9, 77, 2, 512, {}, 1, {}, 50, 22, 89 }, // FORMAT 2
+ { floppy_image::FF_35, floppy_image::DSDD, floppy_image::MFM, 2000, 5, 77, 2, 1024, {}, 1, {}, 50, 22, 108 }, // FORMAT 3
+ { floppy_image::FF_35, floppy_image::DSSD, floppy_image::MFM, 2000, 16, 70, 1, 256, {}, 1, {}, 32, 22, 46 }, // FORMAT 4
+ { floppy_image::FF_35, floppy_image::DSDD, floppy_image::MFM, 2000, 9, 80, 2, 512, {}, 1, {}, 146, 22, 81 }, // FORMAT 16
+ // HP9122C/D, 9123D, 9133D/H/L or 9153A/B
+ { floppy_image::FF_35, floppy_image::DSHD, floppy_image::MFM, 2000, 32, 77, 2, 256, {}, 1, {}, 50, 22, 59 }, // FORMAT 0,1,4
+ { floppy_image::FF_35, floppy_image::DSHD, floppy_image::MFM, 2000, 18, 77, 2, 512, {}, 1, {}, 50, 22, 97 }, // FORMAT 2
+ { floppy_image::FF_35, floppy_image::DSHD, floppy_image::MFM, 2000, 10, 77, 2, 1024, {}, 1, {}, 50, 22, 123 }, // FORMAT 3
+ { floppy_image::FF_35, floppy_image::DSHD, floppy_image::MFM, 2000, 18, 80, 2, 512, {}, 1, {}, 146, 22, 98 }, // FORMAT 16
+ {}
+};
+
+const hp300_format FLOPPY_HP300_FORMAT;
+