Previous 199869 Revisions Next

r18866 Monday 5th November, 2012 at 19:44:19 UTC by Curt Coder
(MESS) adam: Added modern disk formats. (nw)
[src/lib]lib.mak
[src/lib/formats]adam_dsk.c* adam_dsk.h*

trunk/src/lib/formats/adam_dsk.c
r0r18866
1/***************************************************************************
2
3    Copyright Olivier Galibert
4    All rights reserved.
5
6    Redistribution and use in source and binary forms, with or without
7    modification, are permitted provided that the following conditions are
8    met:
9
10        * Redistributions of source code must retain the above copyright
11          notice, this list of conditions and the following disclaimer.
12        * Redistributions in binary form must reproduce the above copyright
13          notice, this list of conditions and the following disclaimer in
14          the documentation and/or other materials provided with the
15          distribution.
16        * Neither the name 'MAME' nor the names of its contributors may be
17          used to endorse or promote products derived from this software
18          without specific prior written permission.
19
20    THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
21    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23    DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
24    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29    IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30    POSSIBILITY OF SUCH DAMAGE.
31
32****************************************************************************/
33
34/*********************************************************************
35
36    formats/adam_dsk.c
37
38    Coleco Adam disk image format
39
40*********************************************************************/
41
42#include "emu.h"
43#include "formats/adam_dsk.h"
44
45adam_format::adam_format() : wd177x_format(formats)
46{
47}
48
49const char *adam_format::name() const
50{
51   return "adam";
52}
53
54const char *adam_format::description() const
55{
56   return "Coleco Adam disk image";
57}
58
59const char *adam_format::extensions() const
60{
61   return "dsk";
62}
63
64// Unverified gap sizes
65const adam_format::format adam_format::formats[] = {
66   {   /*  160K 5 1/4 inch double density single sided */
67      floppy_image::FF_525, floppy_image::SSDD,
68      2000,  8, 40, 1, 512, {}, 1, {}, 544, 22, 84
69   },
70   {   /*  320K 5 1/4 inch double density */
71      floppy_image::FF_525, floppy_image::DSDD,
72      2000,  8, 40, 2, 512, {}, 1, {}, 544, 22, 84
73   },
74   {   /*  640K 5 1/4 inch quad density */
75      floppy_image::FF_525, floppy_image::DSQD,
76      2000,  8, 80, 2, 512, {}, 1, {}, 544, 22, 84
77   },
78   {   /*  720K 3 1/2 inch double density */
79      floppy_image::FF_35,  floppy_image::DSDD,
80      2000,  9, 80, 2, 512, {}, 1, {}, 544, 22, 84
81   },
82   {   /* 1440K 3 1/2 inch high density */
83      floppy_image::FF_35,  floppy_image::DSHD,
84      1000, 18, 80, 2, 512, {}, 1, {}, 544, 22, 84
85   },
86   {}
87};
88
89const floppy_format_type FLOPPY_ADAM_FORMAT = &floppy_image_format_creator<adam_format>;
trunk/src/lib/formats/adam_dsk.h
r0r18866
1/*********************************************************************
2
3    formats/adam_dsk.h
4
5    Coleco Adam disk image format
6
7*********************************************************************/
8
9#ifndef ADAM_DSK_H_
10#define ADAM_DSK_H_
11
12#include "wd177x_dsk.h"
13
14class adam_format : public wd177x_format {
15public:
16   adam_format();
17
18   virtual const char *name() const;
19   virtual const char *description() const;
20   virtual const char *extensions() const;
21
22private:
23   static const format formats[];
24};
25
26extern const floppy_format_type FLOPPY_ADAM_FORMAT;
27
28#endif
trunk/src/lib/lib.mak
r18865r18866
9696   $(LIBOBJ)/formats/a5105_dsk.o   \
9797   $(LIBOBJ)/formats/ace_tap.o      \
9898   $(LIBOBJ)/formats/adam_cas.o   \
99   $(LIBOBJ)/formats/adam_dsk.o   \
99100   $(LIBOBJ)/formats/ami_dsk.o      \
100101   $(LIBOBJ)/formats/ap2_dsk.o      \
101102   $(LIBOBJ)/formats/apf_apt.o      \

Previous 199869 Revisions Next


© 1997-2024 The MAME Team