diff options
author | 2019-07-31 11:26:04 +1000 | |
---|---|---|
committer | 2019-08-13 13:42:13 +1000 | |
commit | 10f480911da66a56f5e70667c4019468ba04faf2 (patch) | |
tree | 3b91cb9ce3097928df6ad513b7a37d6133d5249e /src/lib/formats/uniflex_dsk.h | |
parent | 6bf8519cf5de98bd85d1e766a795d0f165766749 (diff) |
swtpc09: add a UniFLEX specific floppy format.
The UniFLEX disk format is not compatible with the Flex format. Significantly it
does not use a mix of single density for booting on some double density disks
which makes it simpler - hardware required a new boot ROM to run UniFLEX.
Further, the UniFLEX sector size is 512 bytes versus 256 for Flex, and the
UniFLEX 'SIR' info sector record is completely different to the info on Flex
disk, and the file system format is also not at all compatible.
Thus the UniFlex format can rely largely on the WD17xx format, with an
overload to handle the sector numbering on the second side continuing from the
first side (one feature in common with the Flex format). This gives a quick
'save' capability and shares code.
Support for 8" disks is included as this was the initial distribution format
and the only one found so far.
Diffstat (limited to 'src/lib/formats/uniflex_dsk.h')
-rw-r--r-- | src/lib/formats/uniflex_dsk.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lib/formats/uniflex_dsk.h b/src/lib/formats/uniflex_dsk.h new file mode 100644 index 00000000000..cd3a3c515ab --- /dev/null +++ b/src/lib/formats/uniflex_dsk.h @@ -0,0 +1,32 @@ +// license:BSD-3-Clause +// copyright-holders:68bit +/* + * uniflex_dsk.h + */ +#ifndef MAME_FORMATS_UNIFLEX_DSK_H +#define MAME_FORMATS_UNIFLEX_DSK_H + +#pragma once + +#include "flopimg.h" +#include "wd177x_dsk.h" + +class uniflex_format : public wd177x_format +{ +public: + uniflex_format(); + + virtual const char *name() const override; + virtual const char *description() const override; + virtual const char *extensions() const override; + virtual int identify(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor) override; + void build_sector_description(const format &f, uint8_t *sectdata, desc_s *sectors, int track, int head) const override; + +private: + static const format formats[]; +}; + +extern const floppy_format_type FLOPPY_UNIFLEX_FORMAT; + +#endif // MAME_FORMATS_UNIFLEX_DSK_H |