diff options
author | 2021-09-11 16:07:33 -0400 | |
---|---|---|
committer | 2021-09-11 16:09:27 -0400 | |
commit | 0da505b43eb7e6d9d391efc70f68a752bcdcd643 (patch) | |
tree | 38c06fbfded30bc6854a63b3f661d4162acc4d0d /src/lib/formats/ds9_dsk.cpp | |
parent | fae732dc5d3b5ea2f03de3ad7b1f0740c43d7c4e (diff) |
Formats-related refactoring
- Remove opresolv.h from emu.h and some other base headers
- Split legacy floppy image class into a separate file
- Clean up a lot of #includes in src/lib and src/tools/imgtool
Diffstat (limited to 'src/lib/formats/ds9_dsk.cpp')
-rw-r--r-- | src/lib/formats/ds9_dsk.cpp | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/lib/formats/ds9_dsk.cpp b/src/lib/formats/ds9_dsk.cpp index c97a2cced51..deab3d2539b 100644 --- a/src/lib/formats/ds9_dsk.cpp +++ b/src/lib/formats/ds9_dsk.cpp @@ -18,41 +18,8 @@ #include "ioprocs.h" +#include <cstring> -static FLOPPY_IDENTIFY(ds9_dsk_identify) -{ - switch (floppy_image_size(floppy)) - { - case (80 * 2 * 21 * 256): - case 860164: - case 860288: - *vote = 100; - break; - - default: - *vote = 0; - break; - } - - return FLOPPY_ERROR_SUCCESS; -} - -static FLOPPY_CONSTRUCT(ds9_dsk_construct) -{ - struct basicdsk_geometry geometry; - memset(&geometry, 0, sizeof(geometry)); - geometry.heads = 2; - geometry.first_sector_id = 0; - geometry.sector_length = 256; - geometry.tracks = 80; - geometry.sectors = 21; - return basicdsk_construct(floppy, &geometry); -} - -LEGACY_FLOPPY_OPTIONS_START( ds9 ) - LEGACY_FLOPPY_OPTION( ds9_dsk, "ds9,dsk,raw", "Agat 840K DSK image", - ds9_dsk_identify, ds9_dsk_construct, nullptr, nullptr) -LEGACY_FLOPPY_OPTIONS_END // exactly 6500 bytes const floppy_image_format_t::desc_e ds9_format::ds9_desc[] = { |