blob: 219fdce3abe1144f24abb9158dcd6ee8f3f679c0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// license:BSD-3-Clause
// copyright-holders:Wilbert Pol, tim lindner
/*********************************************************************
formats/sdf_dsk.h
SDF disk images. Format created by Darren Atkinson for use with
his CoCoSDC floppy disk emulator.
*********************************************************************/
#ifndef SDF_DSK_H
#define SDF_DSK_H
#include "flopimg.h"
/**************************************************************************/
class sdf_format : public floppy_image_format_t
{
public:
sdf_format();
virtual int identify(io_generic *io, uint32_t form_factor) override;
virtual bool load(io_generic *io, uint32_t form_factor, floppy_image *image) override;
virtual bool save(io_generic *io, floppy_image *image) override;
virtual const char *name() const override;
virtual const char *description() const override;
virtual const char *extensions() const override;
virtual bool supports_save() const override;
protected:
static constexpr int HEADER_SIZE = 512;
static constexpr int TRACK_HEADER_SIZE = 256;
static constexpr int TRACK_SIZE = 6250;
static constexpr int TRACK_PADDING = 150;
static constexpr int TOTAL_TRACK_SIZE = TRACK_HEADER_SIZE + TRACK_SIZE + TRACK_PADDING;
static constexpr int SECTOR_SLOT_COUNT = 31;
};
extern const floppy_format_type FLOPPY_SDF_FORMAT;
#endif /* SDF_DSK_H */
|