summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/flex_dsk.h
blob: 9348fecd5db9e53b7a0802b4ba84268e7a4c1894 (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
46
/*
 * flex_dsk.h
 *
 *  Created on: 24/06/2014
 */

#ifndef FLEX_DSK_H_
#define FLEX_DSK_H_

#include "flopimg.h"

class flex_format : public floppy_image_format_t {
public:
	flex_format();

	virtual const char *name() const;
	virtual const char *description() const;
	virtual const char *extensions() const;
	virtual int identify(io_generic *io, UINT32 form_factor);
	virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
	virtual bool supports_save() const;

private:
	struct sysinfo_sector
	{
		UINT8 unused1[16];
		UINT8 disk_name[8];
		UINT8 disk_ext[3];
		UINT8 disk_number[2];
		UINT8 fc_start_trk;
		UINT8 fc_start_sec;
		UINT8 fc_end_trk;
		UINT8 fc_end_sec;
		UINT8 free[2];
		UINT8 month;
		UINT8 day;
		UINT8 year;
		UINT8 last_trk;
		UINT8 last_sec;
		UINT8 unused2[216];
	} info;
};

extern const floppy_format_type FLOPPY_FLEX_FORMAT;

#endif /* FLEX_DSK_H_ */