summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/floptool.cpp
diff options
context:
space:
mode:
author 68bit <info@68bit.org>2020-02-04 16:14:07 +1100
committer 68bit <info@68bit.org>2020-02-08 00:12:05 +1100
commita87c3b6f7a988271974d38d0fd445a85dde7c09b (patch)
tree98a5ac7cd3daa9bd9bfbef03b60f5ba0c07cce37 /src/tools/floptool.cpp
parent927906163401b32433f18d2d92c72f196bc1f7f8 (diff)
wd177x_dsk: generalize to allow custom track format variations
Add a get_track_format() method that can be overridden to supply format variations for any track and head. The code is generalised to account for such variations. The default method returns the passed format, so this change is neutral for existing formats. Simplify the FLEX DSK format code. There are now simply format variation descriptions for the second track that have the sector ID continuing in sequence from the first track, rather than specialized code. Extend the FLEX format to support variations in the sectors ID of the first two sectors. The FLEX 6800 boot sectors have IDs based at zero rather than one. Extend the FLEX format to support variations for which the first track, on both sides, is single density on an otherwise double density disk which was historically a common format. Extend the OS9 disk format to support variations for which the first track, on only the first side, is single density on an otherwise double density disk. OS9 for the SWTPC and Gimix typically used such formats. Extend the OS9 disk format to support variations with a base sector ID of zero in contrast to the existing COCO OS9 format which uses a based sector ID of one. The OS9 format identification code is extended to rely on the optional information stored in the OS9 LSN0 header to identify COCO format disks, and all COCO format disks appear to have this optional information in a regular enough format.
Diffstat (limited to 'src/tools/floptool.cpp')
-rw-r--r--src/tools/floptool.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/floptool.cpp b/src/tools/floptool.cpp
index b140119dd72..a791ceb4190 100644
--- a/src/tools/floptool.cpp
+++ b/src/tools/floptool.cpp
@@ -56,6 +56,8 @@
#include "formats/aim_dsk.h"
#include "formats/m20_dsk.h"
+#include "formats/os9_dsk.h"
+
#include "formats/flex_dsk.h"
#include "formats/uniflex_dsk.h"
@@ -105,6 +107,8 @@ static floppy_format_type floppy_formats[] = {
FLOPPY_AIM_FORMAT,
FLOPPY_M20_FORMAT,
+ FLOPPY_OS9_FORMAT,
+
FLOPPY_FLEX_FORMAT,
FLOPPY_UNIFLEX_FORMAT
};