summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/camplynx_dsk.cpp
blob: c58b12b94236789c7d7c6c8f11127405fe262955 (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
47
48
49
50
51
52
53
54
55
56
57
// license:BSD-3-Clause
// copyright-holders:Robbbert
/*********************************************************************

    formats/camplynx_dsk.c

    Camputers Lynx disk image format

    There is no inter-sector info on these disks. It is simply a
    dump of the 512 bytes from each sector and track in order.

    Extension is LDF as used by the Pale emulator

    The disk is formatted with 512 bytes per sector, 10 sectors,
    6040 bytes per track. 200KB disks are single sided 40 tracks.
    800KB disks are double sided 80 tracks.

    The numbers below are guesswork since there's no documentation.

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

#include <assert.h>

#include "formats/camplynx_dsk.h"

camplynx_format::camplynx_format() : wd177x_format(formats)
{
}

const char *camplynx_format::name() const
{
	return "camplynx";
}

const char *camplynx_format::description() const
{
	return "Camputers Lynx disk image";
}

const char *camplynx_format::extensions() const
{
	return "ldf";
}

const camplynx_format::format camplynx_format::formats[] = {
	{   /*  200K 13cm double density single sided */
		floppy_image::FF_525,  floppy_image::SSDD, floppy_image::MFM,
		2000, 10, 40, 1, 512, {}, 1, {}, 100, 22, 30 // guesswork to stop it crashing
	},
	{   /*  800K 13cm quad density double sided */
		floppy_image::FF_525,  floppy_image::DSQD, floppy_image::MFM,
		2000, 10, 80, 2, 512, {}, 1, {}, 100, 22, 30 // guesswork to stop it crashing
	},
	{}
};

const floppy_format_type FLOPPY_CAMPLYNX_FORMAT = &floppy_image_format_creator<camplynx_format>;