diff options
author | 2019-11-10 04:08:29 +1100 | |
---|---|---|
committer | 2019-11-10 04:08:29 +1100 | |
commit | 13b1ebb1b4512ba808cdc5dfbdac61ed0d755d8c (patch) | |
tree | 0be119271371bb88d200c5ec598c189e88218e8d /src/devices/imagedev | |
parent | 1b2acde80819ca6917c248e496725158ed4fe12e (diff) |
start putting noexcept on things that have no business throwing exceptions, starting with diimage. also fix a slight bug in the interface matching function for software list parts. (nw)
Diffstat (limited to 'src/devices/imagedev')
-rw-r--r-- | src/devices/imagedev/avivideo.h | 16 | ||||
-rw-r--r-- | src/devices/imagedev/bitbngr.h | 20 | ||||
-rw-r--r-- | src/devices/imagedev/cassette.h | 20 | ||||
-rw-r--r-- | src/devices/imagedev/chd_cd.h | 20 | ||||
-rw-r--r-- | src/devices/imagedev/diablo.h | 20 | ||||
-rw-r--r-- | src/devices/imagedev/flopdrv.cpp | 19 | ||||
-rw-r--r-- | src/devices/imagedev/flopdrv.h | 20 | ||||
-rw-r--r-- | src/devices/imagedev/floppy.h | 24 | ||||
-rw-r--r-- | src/devices/imagedev/harddriv.h | 20 | ||||
-rw-r--r-- | src/devices/imagedev/microdrv.h | 21 | ||||
-rw-r--r-- | src/devices/imagedev/midiin.h | 16 | ||||
-rw-r--r-- | src/devices/imagedev/midiout.h | 16 | ||||
-rw-r--r-- | src/devices/imagedev/picture.h | 16 | ||||
-rw-r--r-- | src/devices/imagedev/printer.h | 15 | ||||
-rw-r--r-- | src/devices/imagedev/snapquik.h | 22 | ||||
-rw-r--r-- | src/devices/imagedev/wafadrive.h | 21 |
16 files changed, 163 insertions, 143 deletions
diff --git a/src/devices/imagedev/avivideo.h b/src/devices/imagedev/avivideo.h index 8feb78b262e..7d4c1bc5fa7 100644 --- a/src/devices/imagedev/avivideo.h +++ b/src/devices/imagedev/avivideo.h @@ -32,14 +32,14 @@ public: // image-level overrides virtual image_init_result call_load() override; virtual void call_unload() override; - virtual iodevice_t image_type() const override { return IO_VIDEO; } - - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return 0; } - virtual bool is_creatable() const override { return 0; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *file_extensions() const override { return "avi"; } + virtual iodevice_t image_type() const noexcept override { return IO_VIDEO; } + + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return false; } + virtual bool is_creatable() const noexcept override { return false; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *file_extensions() const noexcept override { return "avi"; } bitmap_argb32 &get_frame() { return *m_frame; } diff --git a/src/devices/imagedev/bitbngr.h b/src/devices/imagedev/bitbngr.h index 2a2a72dd9a6..ad9e45e1d86 100644 --- a/src/devices/imagedev/bitbngr.h +++ b/src/devices/imagedev/bitbngr.h @@ -25,16 +25,16 @@ public: virtual void call_unload() override; // image device - virtual iodevice_t image_type() const override { return IO_SERIAL; } - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return !m_is_readonly; } - virtual bool is_creatable() const override { return !m_is_readonly; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *image_interface() const override { return m_interface; } - virtual const char *file_extensions() const override { return ""; } - virtual const char *custom_instance_name() const override { return "bitbanger"; } - virtual const char *custom_brief_instance_name() const override { return "bitb"; } + virtual iodevice_t image_type() const noexcept override { return IO_SERIAL; } + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return !m_is_readonly; } + virtual bool is_creatable() const noexcept override { return !m_is_readonly; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override { return m_interface; } + virtual const char *file_extensions() const noexcept override { return ""; } + virtual const char *custom_instance_name() const noexcept override { return "bitbanger"; } + virtual const char *custom_brief_instance_name() const noexcept override { return "bitb"; } void output(uint8_t data); uint32_t input(void *buffer, uint32_t length); diff --git a/src/devices/imagedev/cassette.h b/src/devices/imagedev/cassette.h index f639d58bfe6..e5a67a10970 100644 --- a/src/devices/imagedev/cassette.h +++ b/src/devices/imagedev/cassette.h @@ -63,17 +63,16 @@ public: virtual image_init_result call_create(int format_type, util::option_resolution *format_options) override; virtual void call_unload() override; virtual std::string call_display() override; - virtual const software_list_loader &get_software_list_loader() const override { return image_software_list_loader::instance(); } - virtual iodevice_t image_type() const override { return IO_CASSETTE; } + virtual iodevice_t image_type() const noexcept override { return IO_CASSETTE; } - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return 1; } - virtual bool is_creatable() const override { return 1; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *image_interface() const override { return m_interface; } - virtual const char *file_extensions() const override { return m_extension_list; } + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return true; } + virtual bool is_creatable() const noexcept override { return true; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override { return m_interface; } + virtual const char *file_extensions() const noexcept override { return m_extension_list; } // specific implementation cassette_state get_state() { return m_state; } @@ -105,6 +104,9 @@ protected: virtual void device_start() override; virtual const bool use_software_list_file_extension_for_filetype() const override { return true; } + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return image_software_list_loader::instance(); } + private: cassette_image *m_cassette; cassette_state m_state; diff --git a/src/devices/imagedev/chd_cd.h b/src/devices/imagedev/chd_cd.h index e3e980d9ea9..ade4b4d07d3 100644 --- a/src/devices/imagedev/chd_cd.h +++ b/src/devices/imagedev/chd_cd.h @@ -35,17 +35,16 @@ public: // image-level overrides virtual image_init_result call_load() override; virtual void call_unload() override; - virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } - virtual iodevice_t image_type() const override { return IO_CDROM; } + virtual iodevice_t image_type() const noexcept override { return IO_CDROM; } - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return 0; } - virtual bool is_creatable() const override { return 0; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *image_interface() const override { return m_interface; } - virtual const char *file_extensions() const override { return m_extension_list; } + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return false; } + virtual bool is_creatable() const noexcept override { return false; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override { return m_interface; } + virtual const char *file_extensions() const noexcept override { return m_extension_list; } // specific implementation cdrom_file *get_cdrom_file() { return m_cdrom_handle; } @@ -58,6 +57,9 @@ protected: virtual void device_start() override; virtual void device_stop() override; + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } + chd_file m_self_chd; cdrom_file *m_cdrom_handle; const char *m_extension_list; diff --git a/src/devices/imagedev/diablo.h b/src/devices/imagedev/diablo.h index a83d8bc30b7..c541573f5f5 100644 --- a/src/devices/imagedev/diablo.h +++ b/src/devices/imagedev/diablo.h @@ -35,17 +35,16 @@ public: virtual image_init_result call_load() override; virtual image_init_result call_create(int create_format, util::option_resolution *create_args) override; virtual void call_unload() override; - virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } - virtual iodevice_t image_type() const override { return IO_HARDDISK; } + virtual iodevice_t image_type() const noexcept override { return IO_HARDDISK; } - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return 1; } - virtual bool is_creatable() const override { return 0; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *image_interface() const override { return m_interface; } - virtual const char *file_extensions() const override { return "chd,dsk"; } + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return true; } + virtual bool is_creatable() const noexcept override { return false; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override { return m_interface; } + virtual const char *file_extensions() const noexcept override { return "chd,dsk"; } virtual const util::option_guide &create_option_guide() const override; // specific implementation @@ -58,6 +57,9 @@ protected: virtual void device_start() override; virtual void device_stop() override; + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } + image_init_result internal_load_dsk(); chd_file *m_chd; diff --git a/src/devices/imagedev/flopdrv.cpp b/src/devices/imagedev/flopdrv.cpp index 59d23f82f73..b505f99c8c1 100644 --- a/src/devices/imagedev/flopdrv.cpp +++ b/src/devices/imagedev/flopdrv.cpp @@ -702,7 +702,8 @@ void legacy_floppy_image_device::device_config_complete() for (int i = 0; floppy_options && floppy_options[i].construct; i++) { // only add if creatable - if (floppy_options[i].param_guidelines) { + if (floppy_options[i].param_guidelines) + { // allocate a new format and append it to the list add_format(floppy_options[i].name, floppy_options[i].description, floppy_options[i].extensions, floppy_options[i].param_guidelines); } @@ -757,21 +758,21 @@ void legacy_floppy_image_device::call_unload() machine().scheduler().timer_set(attotime::from_msec(250), timer_expired_delegate(FUNC(legacy_floppy_image_device::set_wpt),this), 1); } -bool legacy_floppy_image_device::is_creatable() const +bool legacy_floppy_image_device::is_creatable() const noexcept { - int cnt = 0; - if (m_config != nullptr) + if (m_config) { const struct FloppyFormat *floppy_options = m_config->formats; - int i; - for ( i = 0; floppy_options[i].construct; i++ ) { - if(floppy_options[i].param_guidelines) cnt++; + for (int i = 0; floppy_options[i].construct; i++) + { + if (floppy_options[i].param_guidelines) + return true; } } - return (cnt>0) ? 1 : 0; + return false; } -const char *legacy_floppy_image_device::image_interface() const +const char *legacy_floppy_image_device::image_interface() const noexcept { return m_config->interface; } diff --git a/src/devices/imagedev/flopdrv.h b/src/devices/imagedev/flopdrv.h index d4b30a8cd5b..4f893bca965 100644 --- a/src/devices/imagedev/flopdrv.h +++ b/src/devices/imagedev/flopdrv.h @@ -104,19 +104,18 @@ public: auto out_idx_cb() { return m_out_idx_func.bind(); } 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; virtual void call_unload() override; - virtual iodevice_t image_type() const override { return IO_FLOPPY; } + virtual iodevice_t image_type() const noexcept override { return IO_FLOPPY; } - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return 1; } - virtual bool is_creatable() const override; - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *image_interface() const override; - virtual const char *file_extensions() const override { return m_extension_list; } + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return true; } + virtual bool is_creatable() const noexcept override; + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override; + virtual const char *file_extensions() const noexcept override { return m_extension_list; } virtual const util::option_guide &create_option_guide() const override { return floppy_option_guide; } floppy_image_legacy *flopimg_get_image(); @@ -172,6 +171,9 @@ protected: virtual void device_config_complete() override; virtual void device_start() override; + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return image_software_list_loader::instance(); } + /* callbacks */ devcb_write_line m_out_idx_func; diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h index 760cdc30a21..4fa16d3c338 100644 --- a/src/devices/imagedev/floppy.h +++ b/src/devices/imagedev/floppy.h @@ -79,16 +79,15 @@ public: virtual image_init_result call_load() override; virtual void call_unload() override; virtual image_init_result call_create(int format_type, util::option_resolution *format_options) override; - virtual const software_list_loader &get_software_list_loader() const override { return image_software_list_loader::instance(); } - virtual const char *image_interface() const override = 0; - virtual iodevice_t image_type() const override { return IO_FLOPPY; } - - virtual bool is_readable() const override { return true; } - virtual bool is_writeable() const override { return true; } - virtual bool is_creatable() const override { return true; } - virtual bool must_be_loaded() const override { return false; } - virtual bool is_reset_on_load() const override { return false; } - virtual const char *file_extensions() const override { return extension_list; } + virtual const char *image_interface() const noexcept override = 0; + virtual iodevice_t image_type() const noexcept override { return IO_FLOPPY; } + + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return true; } + virtual bool is_creatable() const noexcept override { return true; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *file_extensions() const noexcept override { return extension_list; } void setup_write(floppy_image_format_t *output_format); void setup_load_cb(load_cb cb); @@ -146,6 +145,9 @@ protected: virtual void device_add_mconfig(machine_config &config) override; + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return image_software_list_loader::instance(); } + virtual void setup_characteristics() = 0; void init_floppy_load(bool write_supported); @@ -233,7 +235,7 @@ protected: Name(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); \ virtual ~Name(); \ virtual void handled_variants(uint32_t *variants, int &var_count) const override; \ - virtual const char *image_interface() const override { return Interface; } \ + virtual const char *image_interface() const noexcept override { return Interface; } \ protected: \ virtual void setup_characteristics() override; \ }; \ diff --git a/src/devices/imagedev/harddriv.h b/src/devices/imagedev/harddriv.h index a6a9e721bc5..032d449ad68 100644 --- a/src/devices/imagedev/harddriv.h +++ b/src/devices/imagedev/harddriv.h @@ -41,17 +41,16 @@ public: virtual image_init_result call_load() override; virtual image_init_result call_create(int create_format, util::option_resolution *create_args) override; virtual void call_unload() override; - virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } - virtual iodevice_t image_type() const override { return IO_HARDDISK; } + virtual iodevice_t image_type() const noexcept override { return IO_HARDDISK; } - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return 1; } - virtual bool is_creatable() const override { return 0; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *image_interface() const override { return m_interface; } - virtual const char *file_extensions() const override { return "chd,hd,hdv,2mg,hdi"; } + virtual bool is_readable() const noexcept override { return 1; } + virtual bool is_writeable() const noexcept override { return 1; } + virtual bool is_creatable() const noexcept override { return 0; } + virtual bool must_be_loaded() const noexcept override { return 0; } + virtual bool is_reset_on_load() const noexcept override { return 0; } + virtual const char *image_interface() const noexcept override { return m_interface; } + virtual const char *file_extensions() const noexcept override { return "chd,hd,hdv,2mg,hdi"; } virtual const util::option_guide &create_option_guide() const override; // specific implementation @@ -66,6 +65,9 @@ protected: virtual void device_start() override; virtual void device_stop() override; + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } + image_init_result internal_load_hd(); chd_file *m_chd; diff --git a/src/devices/imagedev/microdrv.h b/src/devices/imagedev/microdrv.h index 30ff82724fc..d43daba70fb 100644 --- a/src/devices/imagedev/microdrv.h +++ b/src/devices/imagedev/microdrv.h @@ -43,17 +43,16 @@ public: // image-level overrides virtual image_init_result call_load() override; virtual void call_unload() override; - virtual const software_list_loader &get_software_list_loader() const override { return image_software_list_loader::instance(); } - virtual iodevice_t image_type() const override { return IO_MAGTAPE; } + virtual iodevice_t image_type() const noexcept override { return IO_MAGTAPE; } - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return 1; } - virtual bool is_creatable() const override { return 0; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *image_interface() const override { return "ql_cass"; } - virtual const char *file_extensions() const override { return "mdv,mdr"; } + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return true; } + virtual bool is_creatable() const noexcept override { return false; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override { return "ql_cass"; } + virtual const char *file_extensions() const noexcept override { return "mdv,mdr"; } // specific implementation DECLARE_WRITE_LINE_MEMBER( clk_w ); @@ -69,6 +68,10 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return image_software_list_loader::instance(); } + private: devcb_write_line m_write_comms_out; diff --git a/src/devices/imagedev/midiin.h b/src/devices/imagedev/midiin.h index 8254c6965a0..ad9eeabf236 100644 --- a/src/devices/imagedev/midiin.h +++ b/src/devices/imagedev/midiin.h @@ -35,14 +35,14 @@ public: virtual void call_unload() override; // image device - virtual iodevice_t image_type() const override { return IO_MIDIIN; } - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return 0; } - virtual bool is_creatable() const override { return 0; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *file_extensions() const override { return "mid"; } - virtual bool core_opens_image_file() const override { return false; } + virtual iodevice_t image_type() const noexcept override { return IO_MIDIIN; } + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return false; } + virtual bool is_creatable() const noexcept override { return false; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *file_extensions() const noexcept override { return "mid"; } + virtual bool core_opens_image_file() const noexcept override { return false; } protected: // device-level overrides diff --git a/src/devices/imagedev/midiout.h b/src/devices/imagedev/midiout.h index 159e71cab17..2b182e0273d 100644 --- a/src/devices/imagedev/midiout.h +++ b/src/devices/imagedev/midiout.h @@ -33,14 +33,14 @@ public: virtual void call_unload() override; // image device - virtual iodevice_t image_type() const override { return IO_MIDIOUT; } - virtual bool is_readable() const override { return 0; } - virtual bool is_writeable() const override { return 1; } - virtual bool is_creatable() const override { return 0; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *file_extensions() const override { return "mid"; } - virtual bool core_opens_image_file() const override { return false; } + virtual iodevice_t image_type() const noexcept override { return IO_MIDIOUT; } + virtual bool is_readable() const noexcept override { return false; } + virtual bool is_writeable() const noexcept override { return true; } + virtual bool is_creatable() const noexcept override { return false; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *file_extensions() const noexcept override { return "mid"; } + virtual bool core_opens_image_file() const noexcept override { return false; } virtual void tx(uint8_t state) { rx_w(state); } diff --git a/src/devices/imagedev/picture.h b/src/devices/imagedev/picture.h index 4261d6cf351..f8601345a89 100644 --- a/src/devices/imagedev/picture.h +++ b/src/devices/imagedev/picture.h @@ -32,14 +32,14 @@ public: // image-level overrides virtual image_init_result call_load() override; virtual void call_unload() override; - virtual iodevice_t image_type() const override { return IO_PICTURE; } - - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return 0; } - virtual bool is_creatable() const override { return 0; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *file_extensions() const override { return "png"; } + virtual iodevice_t image_type() const noexcept override { return IO_PICTURE; } + + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return false; } + virtual bool is_creatable() const noexcept override { return false; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *file_extensions() const noexcept override { return "png"; } bitmap_argb32 &get_bitmap() { return *m_picture; } diff --git a/src/devices/imagedev/printer.h b/src/devices/imagedev/printer.h index 359faca8951..84f3efb4002 100644 --- a/src/devices/imagedev/printer.h +++ b/src/devices/imagedev/printer.h @@ -35,13 +35,13 @@ public: virtual void call_unload() override; // image device - virtual iodevice_t image_type() const override { return IO_PRINTER; } - virtual bool is_readable() const override { return 0; } - virtual bool is_writeable() const override { return 1; } - virtual bool is_creatable() const override { return 1; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *file_extensions() const override { return "prn"; } + virtual iodevice_t image_type() const noexcept override { return IO_PRINTER; } + virtual bool is_readable() const noexcept override { return false; } + virtual bool is_writeable() const noexcept override { return true; } + virtual bool is_creatable() const noexcept override { return true; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *file_extensions() const noexcept override { return "prn"; } // specific implementation @@ -49,6 +49,7 @@ public: int is_ready(); /* outputs data to a printer */ void output(uint8_t data); + protected: // device-level overrides virtual void device_start() override; diff --git a/src/devices/imagedev/snapquik.h b/src/devices/imagedev/snapquik.h index 7ad476a0a3b..0566e63752b 100644 --- a/src/devices/imagedev/snapquik.h +++ b/src/devices/imagedev/snapquik.h @@ -36,16 +36,15 @@ public: // image-level overrides 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 iodevice_t image_type() const override { return IO_SNAPSHOT; } + virtual iodevice_t image_type() const noexcept override { return IO_SNAPSHOT; } - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return 0; } - virtual bool is_creatable() const override { return 0; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *image_interface() const override { return m_interface; } - virtual const char *file_extensions() const override { return m_file_extensions; } + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return false; } + virtual bool is_creatable() const noexcept override { return false; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override { return m_interface; } + virtual const char *file_extensions() const noexcept override { return m_file_extensions; } void set_extensions(const char *ext) { m_file_extensions = ext; } void set_delay(attotime delay) { m_delay = delay; } @@ -57,6 +56,9 @@ protected: // device-level overrides virtual void device_start() override; + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return image_software_list_loader::instance(); } + TIMER_CALLBACK_MEMBER(process_snapshot_or_quickload); load_delegate m_load; /* loading function */ @@ -83,7 +85,7 @@ public: } quickload_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0U); - virtual iodevice_t image_type() const override { return IO_QUICKLOAD; } + virtual iodevice_t image_type() const noexcept override { return IO_QUICKLOAD; } }; // device type definition diff --git a/src/devices/imagedev/wafadrive.h b/src/devices/imagedev/wafadrive.h index 72dcb99b089..ee1c70acd0b 100644 --- a/src/devices/imagedev/wafadrive.h +++ b/src/devices/imagedev/wafadrive.h @@ -33,22 +33,23 @@ public: // image-level overrides virtual image_init_result call_load() override; virtual void call_unload() override; - virtual const software_list_loader &get_software_list_loader() const override { return image_software_list_loader::instance(); } - virtual iodevice_t image_type() const override { return IO_MAGTAPE; } // what are these classed as? they're infinite loop tapes, in a cartridge shell that operate like discs + virtual iodevice_t image_type() const noexcept override { return IO_MAGTAPE; } // what are these classed as? they're infinite loop tapes, in a cartridge shell that operate like discs - virtual bool is_readable() const override { return 1; } - virtual bool is_writeable() const override { return 1; } - virtual bool is_creatable() const override { return 0; } // should be (although would need a way to specify size) - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual const char *image_interface() const override { return "wafadrive_cart"; } - virtual const char *file_extensions() const override { return "wdr"; } + virtual bool is_readable() const noexcept override { return true; } + virtual bool is_writeable() const noexcept override { return true; } + virtual bool is_creatable() const noexcept override { return false; } // should be (although would need a way to specify size) + virtual bool must_be_loaded() const noexcept override { return false; } + virtual bool is_reset_on_load() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override { return "wafadrive_cart"; } + virtual const char *file_extensions() const noexcept override { return "wdr"; } protected: // device-level overrides virtual void device_start() override; -private: + + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return image_software_list_loader::instance(); } }; |