1 // license:BSD-3-Clause
2 // copyright-holders:Olivier Galibert
3 /*********************************************************************
4 
5     formats/msx_dsk.c
6 
7     MSX disk images
8 
9 *********************************************************************/
10 
11 #include "msx_dsk.h"
12 
13 //msx_format::msx_format() : wd177x_format(formats)
msx_format()14 msx_format::msx_format() : upd765_format(formats)
15 {
16 }
17 
name() const18 const char *msx_format::name() const
19 {
20 	return "msx";
21 }
22 
description() const23 const char *msx_format::description() const
24 {
25 	return "MSX disk image";
26 }
27 
extensions() const28 const char *msx_format::extensions() const
29 {
30 	return "dsk";
31 }
32 
33 // Unverified gap sizes
34 const msx_format::format msx_format::formats[] = {
35 	{   /*  3 1/2 inch single sided double density */
36 		// 80x4e 12x00 3xf6 fc
37 		// 26x4e 12x00 3xf5 fe 2x00 01 02 f7 24x4e 12x00 3xf5 fb 512xe5 f7
38 		// 54x4e 12x00 3xf5 fe 2x00 02 02 f7 24x4e 12x00 3xf5 fb 512xe5 f7
39 		// 54x4e 12x00 3xf5 fe 2x00 03 02 f7 24x4e 12x00 3xf5 fb 512xe5 f7
40 		// 54x4e 12x00 3xf5 fe 2x00 04 02 f7 24x4e 12x00 3xf5 fb 512xe5 f7
41 		// 54x4e 12x00 3xf5 fe 2x00 05 02 f7 24x4e 12x00 3xf5 fb 512xe5 f7
42 		// 54x4e 12x00 3xf5 fe 2x00 06 02 f7 24x4e 12x00 3xf5 fb 512xe5 f7
43 		// 54x4e 12x00 3xf5 fe 2x00 07 02 f7 24x4e 12x00 3xf5 fb 512xe5 f7
44 		// 54x4e 12x00 3xf5 fe 2x00 08 02 f7 24x4e 12x00 3xf5 fb 512xe5 f7
45 		// 54x4e 12x00 3xf5 fe 2x00 09 02 f7 24x4e 12x00 3xf5 fb 512xe5 f7
46 		// 1078x4e
47 		floppy_image::FF_35,  floppy_image::SSDD, floppy_image::MFM,
48 		2000,  9, 80, 1, 512, {}, 1, {}, 26, 24, 28, 80
49 	},
50 	{   /*  3 1/2 inch double density */
51 		floppy_image::FF_35,  floppy_image::DSDD, floppy_image::MFM,
52 		2000,  9, 80, 2, 512, {}, 1, {}, 26, 24, 28, 80
53 	},
54 	{   /*  3 1/2 inch double density - 81 tracks */
55 		floppy_image::FF_35,  floppy_image::DSDD, floppy_image::MFM,
56 		2000,  9, 81, 2, 512, {}, 1, {}, 26, 24, 28, 80
57 	},
58 	{}
59 };
60 
61 const floppy_format_type FLOPPY_MSX_FORMAT = &floppy_image_format_creator<msx_format>;
62