summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/bml3_dsk.c
blob: e445824ab053dc8b2695b034fd413dbb80d402ee (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
/*********************************************************************

    formats/bml3_dsk.c

    BML3 disk images

*********************************************************************/

#include <string.h>

#include "bml3_dsk.h"
#include "basicdsk.h"

static FLOPPY_IDENTIFY(bml3_dsk_identify)
{
	*vote = 100;
	return FLOPPY_ERROR_SUCCESS;
}

static FLOPPY_CONSTRUCT(bml3_dsk_construct)
{
	struct basicdsk_geometry geometry;

	memset(&geometry, 0, sizeof(geometry));
	geometry.heads = 2;
	geometry.first_sector_id = 1;
	geometry.sector_length = 256;
	geometry.tracks = 40;
	geometry.sectors = 16;
	return basicdsk_construct(floppy, &geometry);
}



/* ----------------------------------------------------------------------- */


LEGACY_FLOPPY_OPTIONS_START( bml3 )
	LEGACY_FLOPPY_OPTION( bml3_dsk, "bm3",      "BML3 floppy disk image",   bml3_dsk_identify, bml3_dsk_construct, NULL,
			HEADS([2])
			TRACKS([40])
			SECTORS([16])
			SECTOR_LENGTH([256])
			FIRST_SECTOR_ID([1]))
LEGACY_FLOPPY_OPTIONS_END