Previous 199869 Revisions Next

r34906 Saturday 7th February, 2015 at 10:24:32 UTC by Olivier Galibert
huh? (nw)
[src/lib/formats]flex_dsk.c flex_dsk.h

trunk/src/lib/formats/flex_dsk.c
r243417r243418
77#include "emu.h"
88#include "flex_dsk.h"
99
10flex_format::flex_format() : wd177x_format(formats)
10flex_format::flex_format()
1111{
1212}
1313
r243417r243418
2626   return "dsk";
2727}
2828
29bool flex_format::supports_save() const
30{
31   return true;
32}
33
2934int flex_format::identify(io_generic *io, UINT32 form_factor)
3035{
3136   io_generic_read(io, &info, 256 * 2, sizeof(struct sysinfo_sector));
r243417r243418
97102   return true;
98103}
99104
100// Empty since geometry is determined from the disk image itself
101const flex_format::format flex_format::formats[] = { {} };
102
103105const floppy_format_type FLOPPY_FLEX_FORMAT = &floppy_image_format_creator<flex_format>;
trunk/src/lib/formats/flex_dsk.h
r243417r243418
77#ifndef FLEX_DSK_H_
88#define FLEX_DSK_H_
99
10#include "wd177x_dsk.h"
10#include "flopimg.h"
1111
12class flex_format : public wd177x_format {
12class flex_format : public floppy_image_format_t {
1313public:
1414   flex_format();
1515
r243417r243418
1818   virtual const char *extensions() const;
1919   virtual int identify(io_generic *io, UINT32 form_factor);
2020   virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
21   virtual bool supports_save() const;
22
2123private:
2224   struct sysinfo_sector
2325   {
r243417r243418
3739      UINT8 last_sec;
3840      UINT8 unused2[216];
3941   } info;
40   static const format formats[];
4142};
4243
4344extern const floppy_format_type FLOPPY_FLEX_FORMAT;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team