diff options
author | 2012-11-22 19:33:19 +0000 | |
---|---|---|
committer | 2012-11-22 19:33:19 +0000 | |
commit | 9046ce0dc516d3a8b947deaa67448068c198eb45 (patch) | |
tree | 0f3c1a6ba191584dfd05631c95c6a4d978d37fd4 /src/emu/imagedev | |
parent | 20f0cd1a58cfeff8d49437b9c34a344732939706 (diff) |
sed1310: Cleanup. (nw)
(MESS) bw2: Fixed memory mapping. (nw)
(MESS) msm6255: Refactored to use device_memory_interface. (nw)
(MESS) floppy: Added macros for declaring modern floppy formats. The generic floppy formats (D88/DFI/IMD/IPF/MFI/MFM) are now automatically supported in each driver using the modern floppy code. [Curt Coder]
Diffstat (limited to 'src/emu/imagedev')
-rw-r--r-- | src/emu/imagedev/floppy.c | 10 | ||||
-rw-r--r-- | src/emu/imagedev/floppy.h | 24 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/emu/imagedev/floppy.c b/src/emu/imagedev/floppy.c index 1996e5265b0..e6cfc24aab8 100644 --- a/src/emu/imagedev/floppy.c +++ b/src/emu/imagedev/floppy.c @@ -25,6 +25,16 @@ const device_type FLOPPY_525_HD = &device_creator<floppy_525_hd>; const device_type FLOPPY_8_SSSD = &device_creator<floppy_8_sssd>; const device_type FLOPPY_8_DSDD = &device_creator<floppy_8_dsdd>; +const floppy_format_type floppy_image_device::default_floppy_formats[] = { + FLOPPY_D88_FORMAT, + FLOPPY_DFI_FORMAT, + FLOPPY_IMD_FORMAT, + FLOPPY_IPF_FORMAT, + FLOPPY_MFI_FORMAT, + FLOPPY_MFM_FORMAT, + NULL +}; + floppy_connector::floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, FLOPPY_CONNECTOR, "Floppy drive connector abstraction", tag, owner, clock), device_slot_interface(mconfig, *this) diff --git a/src/emu/imagedev/floppy.h b/src/emu/imagedev/floppy.h index 62023eb68a2..08bdff6593e 100644 --- a/src/emu/imagedev/floppy.h +++ b/src/emu/imagedev/floppy.h @@ -8,12 +8,34 @@ #define FLOPPY_H #include "formats/flopimg.h" +#include "formats/d88_dsk.h" +#include "formats/dfi_dsk.h" +#include "formats/hxcmfm_dsk.h" +#include "formats/imd_dsk.h" +#include "formats/ipf_dsk.h" +#include "formats/mfi_dsk.h" #define MCFG_FLOPPY_DRIVE_ADD(_tag, _slot_intf, _def_slot, _def_inp, _formats) \ MCFG_DEVICE_ADD(_tag, FLOPPY_CONNECTOR, 0) \ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false) \ static_cast<floppy_connector *>(device)->set_formats(_formats); +#define DECLARE_FLOPPY_FORMATS(_name) \ + static const floppy_format_type _name []; + +#define FLOPPY_FORMATS_MEMBER(_member) \ + const floppy_format_type _member [] = { \ + +#define FLOPPY_FORMATS_END \ + , \ + FLOPPY_D88_FORMAT, \ + FLOPPY_DFI_FORMAT, \ + FLOPPY_IMD_FORMAT, \ + FLOPPY_IPF_FORMAT, \ + FLOPPY_MFI_FORMAT, \ + FLOPPY_MFM_FORMAT, \ + NULL }; + /*************************************************************************** TYPE DEFINITIONS @@ -89,6 +111,8 @@ public: virtual ui_menu *get_selection_menu(running_machine &machine, class render_container *container); + static const floppy_format_type default_floppy_formats[]; + protected: // device-level overrides virtual void device_config_complete(); |