diff options
author | Olivier Galibert <galibert@pobox.com> | 2018-08-10 09:45:53 +0200 |
---|---|---|
committer | Olivier Galibert <galibert@pobox.com> | 2018-08-10 09:47:04 +0200 |
commit | f1b7a2f97e0a31ab928283732388bec2e6b8f043 (patch) | |
tree | 158df2a8daa410be1e5882d1369a89af2860c5f8 /src/devices/imagedev | |
parent | e78ca34bac6e5ef1e8ae8deebae9ae8563cb1b04 (diff) |
wd_fdc: Simplify API. Plus some collateral damage [O. Galibert]
Diffstat (limited to 'src/devices/imagedev')
-rw-r--r-- | src/devices/imagedev/cassette.h | 3 | ||||
-rw-r--r-- | src/devices/imagedev/floppy.h | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/devices/imagedev/cassette.h b/src/devices/imagedev/cassette.h index 8ca824c61ca..dc92c59ae59 100644 --- a/src/devices/imagedev/cassette.h +++ b/src/devices/imagedev/cassette.h @@ -47,12 +47,13 @@ class cassette_image_device : public device_t, { public: // construction/destruction - cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); virtual ~cassette_image_device(); void set_formats(const struct CassetteFormat* const *formats) { m_formats = formats; } void set_create_opts(const struct CassetteOptions *create_opts) { m_create_opts = create_opts; } void set_default_state(cassette_state default_state) { m_default_state = default_state; } + void set_default_state(int default_state) { m_default_state = (cassette_state)default_state; } void set_interface(const char *interface) { m_interface = interface; } // image-level overrides diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h index d06ce318e27..02879b6af17 100644 --- a/src/devices/imagedev/floppy.h +++ b/src/devices/imagedev/floppy.h @@ -326,6 +326,16 @@ public: set_fixed(fixed); set_formats(formats); } + floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, const char *option, const device_type &devtype, bool is_default, const floppy_format_type *formats) + : floppy_connector(mconfig, tag, owner, 0) + { + option_reset(); + option_add(option, devtype); + if(is_default) + set_default_option(option); + set_fixed(false); + set_formats(formats); + } floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); virtual ~floppy_connector(); |