summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/imagedev
diff options
context:
space:
mode:
author mooglyguy <therealmogminer@gmail.com>2018-09-08 07:03:27 +0200
committer mooglyguy <therealmogminer@gmail.com>2018-09-08 07:03:39 +0200
commita89530ceaa5980209f1f0d0f66f34fafe0604920 (patch)
tree71ba27b9707e8b9da12ec265d58c5a25479ef8df /src/devices/imagedev
parent67633fcedda50ae56d66af406a5d46835312bee2 (diff)
-mc2661,mc68328,mc6843,mc6846: De-MCFG, nw
Diffstat (limited to 'src/devices/imagedev')
-rw-r--r--src/devices/imagedev/flopdrv.h30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/devices/imagedev/flopdrv.h b/src/devices/imagedev/flopdrv.h
index 11182f2dc00..cae694146b7 100644
--- a/src/devices/imagedev/flopdrv.h
+++ b/src/devices/imagedev/flopdrv.h
@@ -11,6 +11,11 @@
#include "formats/flopimg.h"
#include "softlist_dev.h"
+#define FLOPPY_0 "floppy0"
+#define FLOPPY_1 "floppy1"
+#define FLOPPY_2 "floppy2"
+#define FLOPPY_3 "floppy3"
+
#define FLOPPY_TYPE_REGULAR 0
#define FLOPPY_TYPE_APPLE 1
#define FLOPPY_TYPE_SONY 2
@@ -53,7 +58,7 @@
TYPE DEFINITIONS
***************************************************************************/
-// ======================> floppy_type_t
+DECLARE_DEVICE_TYPE(LEGACY_FLOPPY, legacy_floppy_image_device)
struct floppy_type_t
{
@@ -95,12 +100,26 @@ class legacy_floppy_image_device : public device_t,
{
public:
// construction/destruction
+ legacy_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const floppy_interface *config)
+ : legacy_floppy_image_device(mconfig, tag, owner, clock)
+ {
+ set_floppy_config(config);
+ }
+
legacy_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~legacy_floppy_image_device();
void set_floppy_config(const floppy_interface *config) { m_config = config; }
template<class Object> devcb_base &set_out_idx_func(Object &&cb) { return m_out_idx_func.set_callback(std::forward<Object>(cb)); }
+ static void add_4drives(machine_config &mconfig, const floppy_interface *config)
+ {
+ LEGACY_FLOPPY(mconfig, FLOPPY_0, 0, config);
+ LEGACY_FLOPPY(mconfig, FLOPPY_1, 0, config);
+ LEGACY_FLOPPY(mconfig, FLOPPY_2, 0, config);
+ LEGACY_FLOPPY(mconfig, FLOPPY_3, 0, config);
+ }
+
virtual image_init_result call_load() override;
virtual const software_list_loader &get_software_list_loader() const override { return image_software_list_loader::instance(); }
virtual image_init_result call_create(int format_type, util::option_resolution *format_options) override;
@@ -226,11 +245,6 @@ protected:
char m_extension_list[256];
};
-// device type definition
-DECLARE_DEVICE_TYPE(LEGACY_FLOPPY, legacy_floppy_image_device)
-
-
-
legacy_floppy_image_device *floppy_get_device(running_machine &machine,int drive);
legacy_floppy_image_device *floppy_get_device_by_type(running_machine &machine,int ftype,int drive);
int floppy_get_drive_by_type(legacy_floppy_image_device *image,int ftype);
@@ -240,10 +254,6 @@ int floppy_get_count(running_machine &machine);
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
-#define FLOPPY_0 "floppy0"
-#define FLOPPY_1 "floppy1"
-#define FLOPPY_2 "floppy2"
-#define FLOPPY_3 "floppy3"
#define MCFG_LEGACY_FLOPPY_CONFIG(_config) \