diff options
author | Vas Crabb <vas@vastheman.com> | 2019-11-10 04:08:29 +1100 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2019-11-10 04:08:29 +1100 |
commit | 13b1ebb1b4512ba808cdc5dfbdac61ed0d755d8c (patch) | |
tree | 0be119271371bb88d200c5ec598c189e88218e8d /src/devices/bus | |
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/bus')
62 files changed, 821 insertions, 737 deletions
diff --git a/src/devices/bus/a7800/a78_slot.h b/src/devices/bus/a7800/a78_slot.h index 3704c9a3356..52c201c5a6e 100644 --- a/src/devices/bus/a7800/a78_slot.h +++ b/src/devices/bus/a7800/a78_slot.h @@ -102,30 +102,26 @@ public: a78_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); virtual ~a78_cart_slot_device(); - // device-level overrides - virtual void device_start() override; - // 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(); } - int get_cart_type() { return m_type; }; - bool has_cart() { return m_cart != nullptr; } - - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "a7800_cart"; } - virtual const char *file_extensions() const override { return "bin,a78"; } - virtual u32 unhashed_header_length() const override { return 128; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "a7800_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,a78"; } + virtual u32 unhashed_header_length() const noexcept override { return 128; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_cart_type() { return m_type; }; + bool has_cart() { return m_cart != nullptr; } + // reading and writing virtual DECLARE_READ8_MEMBER(read_04xx); virtual DECLARE_READ8_MEMBER(read_10xx); @@ -137,6 +133,12 @@ public: virtual DECLARE_WRITE8_MEMBER(write_40xx); private: + // device-level overrides + virtual void device_start() override; + + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } + device_a78_cart_interface* m_cart; int m_type; diff --git a/src/devices/bus/a800/a800_slot.h b/src/devices/bus/a800/a800_slot.h index 41ef5b6c211..8a21b8e896f 100644 --- a/src/devices/bus/a800/a800_slot.h +++ b/src/devices/bus/a800/a800_slot.h @@ -106,24 +106,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 rom_software_list_loader::instance(); } - - int get_cart_type() { return m_type; }; - int identify_cart_type(const uint8_t *header) const; - bool has_cart() { return m_cart != nullptr; } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "a8bit_cart"; } - virtual const char *file_extensions() const override { return "bin,rom,car"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "a8bit_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,rom,car"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_cart_type() { return m_type; }; + int identify_cart_type(const uint8_t *header) const; + bool has_cart() { return m_cart != nullptr; } + // reading and writing virtual DECLARE_READ8_MEMBER(read_80xx); virtual DECLARE_READ8_MEMBER(read_d5xx); @@ -136,6 +135,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 rom_software_list_loader::instance(); } + private: device_a800_cart_interface* m_cart; int m_type; @@ -163,7 +165,7 @@ public: a5200_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~a5200_cart_slot_device(); - virtual const char *file_extensions() const override { return "bin,rom,car,a52"; } + virtual const char *file_extensions() const noexcept override { return "bin,rom,car,a52"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -187,7 +189,7 @@ public: xegs_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~xegs_cart_slot_device(); - virtual const char *file_extensions() const override { return "bin,rom,car"; } + virtual const char *file_extensions() const noexcept override { return "bin,rom,car"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/adam/exp.h b/src/devices/bus/adam/exp.h index 52a492f7901..69ed921d5d5 100644 --- a/src/devices/bus/adam/exp.h +++ b/src/devices/bus/adam/exp.h @@ -65,15 +65,15 @@ protected: virtual image_init_result call_load() 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_CARTSLOT; } - - 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 1; } - virtual const char *image_interface() const override { return "adam_rom"; } - virtual const char *file_extensions() const override { return "bin,rom"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + + 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 true; } + virtual const char *image_interface() const noexcept override { return "adam_rom"; } + virtual const char *file_extensions() const noexcept override { return "bin,rom"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/apf/slot.h b/src/devices/bus/apf/slot.h index 9a02839f3e4..a0996d1ec4c 100644 --- a/src/devices/bus/apf/slot.h +++ b/src/devices/bus/apf/slot.h @@ -72,30 +72,26 @@ public: apf_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); virtual ~apf_cart_slot_device(); - // device-level overrides - virtual void device_start() override; - // 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(); } - - int get_type() { return m_type; } - - void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "apfm1000_cart"; } - virtual const char *file_extensions() const override { return "bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "apfm1000_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_type() { return m_type; } + + void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_READ8_MEMBER(extra_rom); @@ -103,6 +99,10 @@ public: virtual DECLARE_WRITE8_MEMBER(write_ram); protected: + // device-level overrides + virtual void device_start() override; + + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } int m_type; device_apf_cart_interface* m_cart; diff --git a/src/devices/bus/arcadia/slot.h b/src/devices/bus/arcadia/slot.h index 6d34b209dec..eb04c946815 100644 --- a/src/devices/bus/arcadia/slot.h +++ b/src/devices/bus/arcadia/slot.h @@ -65,22 +65,21 @@ 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(); } - - int get_type() { return m_type; } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual bool is_reset_on_load() const override { return 1; } - virtual const char *image_interface() const override { return "arcadia_cart"; } - virtual const char *file_extensions() const override { return "bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual bool is_reset_on_load() const noexcept override { return true; } + virtual const char *image_interface() const noexcept override { return "arcadia_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_type() { return m_type; } + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_READ8_MEMBER(extra_rom); @@ -89,6 +88,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 rom_software_list_loader::instance(); } + int m_type; device_arcadia_cart_interface* m_cart; }; diff --git a/src/devices/bus/astrocde/slot.h b/src/devices/bus/astrocde/slot.h index 9c9654eb3b4..f068d994798 100644 --- a/src/devices/bus/astrocde/slot.h +++ b/src/devices/bus/astrocde/slot.h @@ -73,20 +73,20 @@ public: virtual void call_unload() override {} virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } - int get_type() { return m_type; } - - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "astrocde_cart"; } - virtual const char *file_extensions() const override { return "bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "astrocde_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_type() { return m_type; } + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); diff --git a/src/devices/bus/bbc/cart/slot.h b/src/devices/bus/bbc/cart/slot.h index b24a6fa1a8c..42487bee5c7 100644 --- a/src/devices/bus/bbc/cart/slot.h +++ b/src/devices/bus/bbc/cart/slot.h @@ -134,8 +134,8 @@ public: bbc_cartslot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *image_interface() const override { return "bbcm_cart"; } - virtual const char *file_extensions() const override { return "rom,bin"; } + virtual const char *image_interface() const noexcept override { return "bbcm_cart"; } + virtual const char *file_extensions() const noexcept override { return "rom,bin"; } }; diff --git a/src/devices/bus/bbc/rom/slot.h b/src/devices/bus/bbc/rom/slot.h index 7f33205327b..8d92dbf3950 100644 --- a/src/devices/bus/bbc/rom/slot.h +++ b/src/devices/bus/bbc/rom/slot.h @@ -32,16 +32,15 @@ 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_ROM; } - 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 "bbc_rom"; } - virtual const char *file_extensions() const override { return "rom,bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_ROM; } + 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 "bbc_rom"; } + virtual const char *file_extensions() const noexcept override { return "rom,bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -61,6 +60,9 @@ protected: // construction/destruction bbc_romslot_device(const machine_config &mconfig, device_type type, char const *tag, device_t *owner, uint32_t clock); + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } + // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/c64/exp.h b/src/devices/bus/c64/exp.h index d75cebfa42e..2507227d724 100644 --- a/src/devices/bus/c64/exp.h +++ b/src/devices/bus/c64/exp.h @@ -103,15 +103,15 @@ protected: virtual image_init_result call_load() 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_CARTSLOT; } - - 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 1; } - virtual const char *image_interface() const override { return "c64_cart,vic10_cart"; } - virtual const char *file_extensions() const override { return "80,a0,e0,crt"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + + 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 true; } + virtual const char *image_interface() const noexcept override { return "c64_cart,vic10_cart"; } + virtual const char *file_extensions() const noexcept override { return "80,a0,e0,crt"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/cbm2/exp.h b/src/devices/bus/cbm2/exp.h index 68bbbb8b00b..d07035614a8 100644 --- a/src/devices/bus/cbm2/exp.h +++ b/src/devices/bus/cbm2/exp.h @@ -80,15 +80,15 @@ protected: virtual image_init_result call_load() 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_CARTSLOT; } - - 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 1; } - virtual const char *image_interface() const override { return "cbm2_cart"; } - virtual const char *file_extensions() const override { return "20,40,60"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + + 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 true; } + virtual const char *image_interface() const noexcept override { return "cbm2_cart"; } + virtual const char *file_extensions() const noexcept override { return "20,40,60"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/chanf/slot.h b/src/devices/bus/chanf/slot.h index 810f326782b..5287dad72da 100644 --- a/src/devices/bus/chanf/slot.h +++ b/src/devices/bus/chanf/slot.h @@ -77,30 +77,26 @@ public: channelf_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); virtual ~channelf_cart_slot_device(); - // device-level overrides - virtual void device_start() override; - // 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(); } - - int get_type() { return m_type; } - - void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } + virtual void call_unload() override { } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "channelf_cart"; } - virtual const char *file_extensions() const override { return "bin,chf"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "channelf_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,chf"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_type() { return m_type; } + + void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_READ8_MEMBER(read_ram); @@ -108,6 +104,11 @@ public: virtual DECLARE_WRITE8_MEMBER(write_bank); 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 rom_software_list_loader::instance(); } int m_type; device_channelf_cart_interface* m_cart; diff --git a/src/devices/bus/coco/cococart.h b/src/devices/bus/coco/cococart.h index 560f4c53ec6..18348bee1e0 100644 --- a/src/devices/bus/coco/cococart.h +++ b/src/devices/bus/coco/cococart.h @@ -75,15 +75,15 @@ public: virtual image_init_result call_load() 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_CARTSLOT; } - - 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 1; } - virtual const char *image_interface() const override { return "coco_cart"; } - virtual const char *file_extensions() const override { return "ccc,rom"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + + 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 true; } + virtual const char *image_interface() const noexcept override { return "coco_cart"; } + virtual const char *file_extensions() const noexcept override { return "ccc,rom"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/coleco/cartridge/exp.h b/src/devices/bus/coleco/cartridge/exp.h index 1634007414f..d603787c3a5 100644 --- a/src/devices/bus/coleco/cartridge/exp.h +++ b/src/devices/bus/coleco/cartridge/exp.h @@ -75,15 +75,15 @@ protected: virtual image_init_result call_load() 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_CARTSLOT; } - - 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 1; } - virtual const char *image_interface() const override { return "coleco_cart"; } - virtual const char *file_extensions() const override { return "rom,col,bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + + 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 true; } + virtual const char *image_interface() const noexcept override { return "coleco_cart"; } + virtual const char *file_extensions() const noexcept override { return "rom,col,bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/cpc/cpc_rom.h b/src/devices/bus/cpc/cpc_rom.h index 67e88cf6137..f5ba180b9c8 100644 --- a/src/devices/bus/cpc/cpc_rom.h +++ b/src/devices/bus/cpc/cpc_rom.h @@ -28,15 +28,15 @@ public: virtual image_init_result call_load() override; virtual void call_unload() override; - virtual iodevice_t image_type() const override { return IO_ROM; } - - 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 1; } - virtual const char *image_interface() const override { return "cpc_rom"; } - virtual const char *file_extensions() const override { return "rom,bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_ROM; } + + virtual bool is_readable() const noexcept override { return 1; } + virtual bool is_writeable() const noexcept override { return 0; } + 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 1; } + virtual const char *image_interface() const noexcept override { return "cpc_rom"; } + virtual const char *file_extensions() const noexcept override { return "rom,bin"; } uint8_t* base() { return m_base.get(); } diff --git a/src/devices/bus/crvision/slot.h b/src/devices/bus/crvision/slot.h index 1f0452e9625..ce3de1b3c4c 100644 --- a/src/devices/bus/crvision/slot.h +++ b/src/devices/bus/crvision/slot.h @@ -74,23 +74,22 @@ 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(); } - - int get_type() { return m_type; } + virtual void call_unload() override { } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "crvision_cart"; } - virtual const char *file_extensions() const override { return "bin,rom"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "crvision_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,rom"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_type() { return m_type; } + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom40); virtual DECLARE_READ8_MEMBER(read_rom80); @@ -99,6 +98,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 rom_software_list_loader::instance(); } + int m_type; device_crvision_cart_interface* m_cart; }; diff --git a/src/devices/bus/ekara/slot.h b/src/devices/bus/ekara/slot.h index 2b6043b24ef..92442a5353d 100644 --- a/src/devices/bus/ekara/slot.h +++ b/src/devices/bus/ekara/slot.h @@ -83,23 +83,22 @@ 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(); } - int get_type() { return m_type; } - static int get_cart_type(const uint8_t *ROM, uint32_t len); - - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "ekara_cart"; } - virtual const char *file_extensions() const override { return "bin,u1"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "ekara_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,u1"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_type() { return m_type; } + static int get_cart_type(const uint8_t *ROM, uint32_t len); + // reading and writing virtual DECLARE_READ8_MEMBER(read_cart); virtual DECLARE_WRITE8_MEMBER(write_cart); @@ -123,6 +122,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 rom_software_list_loader::instance(); } + int m_type; device_ekara_cart_interface* m_cart; }; diff --git a/src/devices/bus/electron/cart/slot.h b/src/devices/bus/electron/cart/slot.h index 4cbf3d00ee0..d74b32c0734 100644 --- a/src/devices/bus/electron/cart/slot.h +++ b/src/devices/bus/electron/cart/slot.h @@ -139,16 +139,15 @@ 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_CARTSLOT; } - virtual bool is_readable() const override { return true; } - virtual bool is_writeable() const override { return true; } - virtual bool is_creatable() const override { return false; } - virtual bool must_be_loaded() const override { return false; } - virtual bool is_reset_on_load() const override { return true; } - virtual const char *image_interface() const override { return "electron_cart"; } - virtual const char *file_extensions() const override { return "rom,bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "electron_cart"; } + virtual const char *file_extensions() const noexcept override { return "rom,bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -163,10 +162,13 @@ public: DECLARE_WRITE_LINE_MEMBER(nmi_w) { m_nmi_handler(state); } protected: + electron_cartslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + // device-level overrides virtual void device_start() override; - electron_cartslot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } device_electron_cart_interface *m_cart; diff --git a/src/devices/bus/gamate/slot.h b/src/devices/bus/gamate/slot.h index d8f02e617e7..dc060cffea3 100644 --- a/src/devices/bus/gamate/slot.h +++ b/src/devices/bus/gamate/slot.h @@ -66,24 +66,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 rom_software_list_loader::instance(); } + virtual void call_unload() override { } - int get_type() { return m_type; } - static int get_cart_type(const uint8_t *ROM, uint32_t len); - - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "gamate_cart"; } - virtual const char *file_extensions() const override { return "bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "gamate_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_type() { return m_type; } + static int get_cart_type(const uint8_t *ROM, uint32_t len); + // reading and writing virtual DECLARE_READ8_MEMBER(read_cart); virtual DECLARE_WRITE8_MEMBER(write_cart); @@ -92,6 +91,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 rom_software_list_loader::instance(); } + int m_type; device_gamate_cart_interface* m_cart; }; diff --git a/src/devices/bus/gameboy/gb_slot.h b/src/devices/bus/gameboy/gb_slot.h index 8119a2f4861..a9d2b2aeb13 100644 --- a/src/devices/bus/gameboy/gb_slot.h +++ b/src/devices/bus/gameboy/gb_slot.h @@ -118,7 +118,18 @@ 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 noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "gameboy_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,gb,gbc"; } + + // slot interface overrides + virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; int get_type() { return m_type; } static int get_cart_type(const uint8_t *ROM, uint32_t len); @@ -129,18 +140,6 @@ public: void internal_header_logging(uint8_t *ROM, uint32_t len); void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "gameboy_cart"; } - virtual const char *file_extensions() const override { return "bin,gb,gbc"; } - - // slot interface overrides - virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; - // reading and writing virtual uint8_t read_rom(offs_t offset); virtual void write_bank(offs_t offset, uint8_t data); @@ -154,6 +153,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 rom_software_list_loader::instance(); } + int m_type; device_gb_cart_interface* m_cart; }; @@ -196,8 +198,8 @@ public: // image-level overrides virtual image_init_result call_load() override; - virtual const char *image_interface() const override { return "megaduck_cart"; } - virtual const char *file_extensions() const override { return "bin"; } + virtual const char *image_interface() const noexcept override { return "megaduck_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/gba/gba_slot.h b/src/devices/bus/gba/gba_slot.h index c308afe530c..8395028cdfb 100644 --- a/src/devices/bus/gba/gba_slot.h +++ b/src/devices/bus/gba/gba_slot.h @@ -100,7 +100,18 @@ 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 noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "gba_cart"; } + virtual const char *file_extensions() const noexcept override { return "gba,bin"; } + + // slot interface overrides + virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; int get_type() { return m_type; } static int get_cart_type(const uint8_t *ROM, uint32_t len); @@ -108,18 +119,6 @@ public: void save_nvram() { if (m_cart && m_cart->get_nvram_size()) m_cart->save_nvram(); } uint32_t get_rom_size() { if (m_cart) return m_cart->get_rom_size(); return 0; } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "gba_cart"; } - virtual const char *file_extensions() const override { return "gba,bin"; } - - // slot interface overrides - virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; - // reading and writing virtual DECLARE_READ32_MEMBER(read_rom); virtual DECLARE_READ32_MEMBER(read_ram); @@ -134,6 +133,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 rom_software_list_loader::instance(); } + int m_type; device_gba_cart_interface* m_cart; }; diff --git a/src/devices/bus/generic/slot.h b/src/devices/bus/generic/slot.h index 871d4f8e2cb..837da36bdca 100644 --- a/src/devices/bus/generic/slot.h +++ b/src/devices/bus/generic/slot.h @@ -118,26 +118,24 @@ public: void set_width(int width) { m_width = width; } void set_endian(endianness_t end) { m_endianness = end; } - // image-level overrides + // device_image_interface implementation virtual image_init_result call_load() override; virtual void call_unload() override; - virtual software_list_loader const &get_software_list_loader() const override { return rom_software_list_loader::instance(); } - - u32 common_get_size(char const *region); - void common_load_rom(u8 *ROM, u32 len, char const *region); - - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - virtual bool is_readable() const override { return true; } - virtual bool is_writeable() const override { return false; } - virtual bool is_creatable() const override { return false; } - virtual bool must_be_loaded() const override { return m_must_be_loaded; } - virtual bool is_reset_on_load() const override { return true; } - virtual char const *image_interface() const override { return m_interface; } - virtual char const *file_extensions() const override { return m_extensions; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 m_must_be_loaded; } + virtual bool is_reset_on_load() const noexcept override { return true; } + virtual char const *image_interface() const noexcept override { return m_interface; } + virtual char const *file_extensions() const noexcept override { return m_extensions; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + u32 common_get_size(char const *region); + void common_load_rom(u8 *ROM, u32 len, char const *region); + // reading and writing virtual u8 read_rom(offs_t offset); virtual u16 read16_rom(offs_t offset, u16 mem_mask = 0xffff); @@ -177,6 +175,9 @@ protected: // device-level overrides virtual void device_start() override ATTR_COLD; + // device_image_interface implementation + virtual software_list_loader const &get_software_list_loader() const override { return rom_software_list_loader::instance(); } + char const *m_interface; char const *m_default_card; char const *m_extensions; @@ -204,7 +205,7 @@ public: generic_socket_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); - virtual iodevice_t image_type() const override { return IO_ROM; } + virtual iodevice_t image_type() const noexcept override { return IO_ROM; } }; class generic_cartslot_device : public generic_slot_device @@ -223,7 +224,7 @@ public: generic_cartslot_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock = 0); - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } }; diff --git a/src/devices/bus/intellec4/insdatastor.h b/src/devices/bus/intellec4/insdatastor.h index fa342d1f5bc..e6bf4545872 100644 --- a/src/devices/bus/intellec4/insdatastor.h +++ b/src/devices/bus/intellec4/insdatastor.h @@ -9,8 +9,8 @@ This card has four 4002 RAMs configured as a page, sockets for four The 4002 RAMs may be jumpered to be selected by CM-RAM1, CM-RAM2 or CM-RAM3. Note that the CM-RAM lines are not decoded, so the 4002 RAMs -will be mirrored. (With two or more imm4-22 cards are installed, the -4002 RAMs will fight for the bus if pages 4-7 are selected.) +will be mirrored. (With two or more imm4-22 cards installed, the 4002 +RAMs will fight for the bus if pages 4-7 are selected.) The PROMs and I/O ports may be jumpered to be mapped at 0x04xx...0x07xx, 0x08xx...0x0bff or 0x0cff...0x0fff. Additionally, the card may be @@ -154,15 +154,15 @@ public: virtual image_init_result call_load() override; virtual void call_unload() override; - virtual iodevice_t image_type() const override { return IO_ROM; } - virtual bool is_readable() const override { return true; } - virtual bool is_writeable() const override { return false; } - virtual bool is_creatable() const override { return false; } - virtual bool must_be_loaded() const override { return false; } - virtual bool is_reset_on_load() const override { return false; } - virtual char const *file_extensions() const override { return "rom,bin"; } - virtual char const *custom_instance_name() const override { return "promimage"; } - virtual char const *custom_brief_instance_name() const override { return "prom"; } + virtual iodevice_t image_type() const noexcept override { return IO_ROM; } + 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 char const *file_extensions() const noexcept override { return "rom,bin"; } + virtual char const *custom_instance_name() const noexcept override { return "promimage"; } + virtual char const *custom_brief_instance_name() const noexcept override { return "prom"; } protected: virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/intellec4/prommemory.h b/src/devices/bus/intellec4/prommemory.h index 77605103af4..14724a0e437 100644 --- a/src/devices/bus/intellec4/prommemory.h +++ b/src/devices/bus/intellec4/prommemory.h @@ -99,15 +99,15 @@ public: virtual image_init_result call_load() override; virtual void call_unload() override; - virtual iodevice_t image_type() const override { return IO_ROM; } - virtual bool is_readable() const override { return true; } - virtual bool is_writeable() const override { return false; } - virtual bool is_creatable() const override { return false; } - virtual bool must_be_loaded() const override { return false; } - virtual bool is_reset_on_load() const override { return false; } - virtual char const *file_extensions() const override { return "rom,bin"; } - virtual char const *custom_instance_name() const override { return "promimage"; } - virtual char const *custom_brief_instance_name() const override { return "prom"; } + virtual iodevice_t image_type() const noexcept override { return IO_ROM; } + 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 char const *file_extensions() const noexcept override { return "rom,bin"; } + virtual char const *custom_instance_name() const noexcept override { return "promimage"; } + virtual char const *custom_brief_instance_name() const noexcept override { return "prom"; } protected: virtual void device_start() override; diff --git a/src/devices/bus/intellec4/tapereader.h b/src/devices/bus/intellec4/tapereader.h index 71153f042df..d28c89adba7 100644 --- a/src/devices/bus/intellec4/tapereader.h +++ b/src/devices/bus/intellec4/tapereader.h @@ -29,13 +29,13 @@ public: virtual image_init_result call_load() override; virtual void call_unload() override; - virtual iodevice_t image_type() const override { return IO_PUNCHTAPE; } - virtual bool is_readable() const override { return true; } - virtual bool is_writeable() const override { return false; } - virtual bool is_creatable() const override { return false; } - virtual bool must_be_loaded() const override { return false; } - virtual bool is_reset_on_load() const override { return false; } - virtual char const *file_extensions() const override { return "bnpf,hex,lst,txt"; } + virtual iodevice_t image_type() const noexcept override { return IO_PUNCHTAPE; } + 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 char const *file_extensions() const noexcept override { return "bnpf,hex,lst,txt"; } protected: virtual void device_start() override; diff --git a/src/devices/bus/intv/slot.h b/src/devices/bus/intv/slot.h index eb97337e622..517ce062952 100644 --- a/src/devices/bus/intv/slot.h +++ b/src/devices/bus/intv/slot.h @@ -114,25 +114,24 @@ 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 noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "intv_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,int,rom,itv"; } + + // slot interface overrides + virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; int get_type() { return m_type; } image_init_result load_fullpath(); void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "intv_cart"; } - virtual const char *file_extensions() const override { return "bin,int,rom,itv"; } - - // slot interface overrides - virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; - // reading and writing uint16_t read_rom04(offs_t offset) { if (m_cart) return m_cart->read_rom04(offset); else return 0xffff; } uint16_t read_rom20(offs_t offset) { if (m_cart) return m_cart->read_rom20(offset); else return 0xffff; } @@ -173,6 +172,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 rom_software_list_loader::instance(); } + int m_type; device_intv_cart_interface* m_cart; }; diff --git a/src/devices/bus/iq151/iq151.h b/src/devices/bus/iq151/iq151.h index 25d18c1a454..6e1ecdef546 100644 --- a/src/devices/bus/iq151/iq151.h +++ b/src/devices/bus/iq151/iq151.h @@ -110,16 +110,15 @@ public: // image-level overrides virtual image_init_result call_load() 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_CARTSLOT; } - virtual bool is_readable() const override { return true; } - virtual bool is_writeable() const override { return false; } - virtual bool is_creatable() const override { return false; } - virtual bool must_be_loaded() const override { return false; } - virtual bool is_reset_on_load() const override { return true; } - virtual const char *image_interface() const override { return "iq151_cart"; } - virtual const char *file_extensions() const override { return "bin,rom"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "iq151_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,rom"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -135,6 +134,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 rom_software_list_loader::instance(); } + devcb_write_line m_out_irq0_cb; devcb_write_line m_out_irq1_cb; devcb_write_line m_out_irq2_cb; diff --git a/src/devices/bus/isa/omti8621.cpp b/src/devices/bus/isa/omti8621.cpp index 38560f26df6..f74903797ac 100644 --- a/src/devices/bus/isa/omti8621.cpp +++ b/src/devices/bus/isa/omti8621.cpp @@ -55,19 +55,20 @@ public: omti_disk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // image-level overrides - virtual iodevice_t image_type() const 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 1; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual bool support_command_line_image_creation() const override { return 1; } - virtual const char *file_extensions() const override { return "awd"; } - virtual const char *custom_instance_name() const override { return "winchester"; } - virtual const char *custom_brief_instance_name() const override { return "disk"; } + virtual iodevice_t image_type() const noexcept override { return IO_HARDDISK; } + + 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 bool support_command_line_image_creation() const noexcept override { return true; } + virtual const char *file_extensions() const noexcept override { return "awd"; } + virtual const char *custom_instance_name() const noexcept override { return "winchester"; } + virtual const char *custom_brief_instance_name() const noexcept override { return "disk"; } virtual image_init_result call_create(int format_type, util::option_resolution *format_options) override; + protected: // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/isa/sc499.h b/src/devices/bus/isa/sc499.h index 70bb647463f..1b61b24ca3b 100644 --- a/src/devices/bus/isa/sc499.h +++ b/src/devices/bus/isa/sc499.h @@ -31,20 +31,19 @@ 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 void call_unload() override; - virtual iodevice_t image_type() const 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 1; } - virtual bool must_be_loaded() const override { return 0; } - virtual bool is_reset_on_load() const override { return 0; } - virtual bool support_command_line_image_creation() const override { return 1; } - virtual const char *image_interface() const override { return "sc499_cass"; } - virtual const char *file_extensions() const override { return "act,ct"; } - virtual const char *custom_instance_name() const override { return "ctape"; } - virtual const char *custom_brief_instance_name() const override { return "ct"; } + virtual iodevice_t image_type() const noexcept override { return IO_MAGTAPE; } + + 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 bool support_command_line_image_creation() const noexcept override { return true; } + virtual const char *image_interface() const noexcept override { return "sc499_cass"; } + virtual const char *file_extensions() const noexcept override { return "act,ct"; } + virtual const char *custom_instance_name() const noexcept override { return "ctape"; } + virtual const char *custom_brief_instance_name() const noexcept override { return "ct"; } uint8_t *read_block(int block_num); void write_block(int block_num, uint8_t *ptr); @@ -54,6 +53,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(); } + std::vector<uint8_t> m_ctape_data; }; diff --git a/src/devices/bus/jakks_gamekey/slot.h b/src/devices/bus/jakks_gamekey/slot.h index c9d07629b43..aa1f5e121e9 100644 --- a/src/devices/bus/jakks_gamekey/slot.h +++ b/src/devices/bus/jakks_gamekey/slot.h @@ -70,24 +70,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 rom_software_list_loader::instance(); } + virtual void call_unload() override { } - int get_type() { return m_type; } - static int get_cart_type(const uint8_t *ROM, uint32_t len); - - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "jakks_gamekey"; } - virtual const char *file_extensions() const override { return "bin,u1"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "jakks_gamekey"; } + virtual const char *file_extensions() const noexcept override { return "bin,u1"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_type() { return m_type; } + static int get_cart_type(const uint8_t *ROM, uint32_t len); + // reading and writing virtual DECLARE_READ16_MEMBER(read_cart); virtual DECLARE_WRITE16_MEMBER(write_cart); @@ -101,6 +100,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 rom_software_list_loader::instance(); } + int m_type; device_jakks_gamekey_interface* m_cart; }; diff --git a/src/devices/bus/kc/kc.h b/src/devices/bus/kc/kc.h index 7125d73d2ef..9c510fe62cd 100644 --- a/src/devices/bus/kc/kc.h +++ b/src/devices/bus/kc/kc.h @@ -112,19 +112,22 @@ public: // image-level overrides virtual image_init_result call_load() 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_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "kc_cart"; } - virtual const char *file_extensions() const override { return "bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "kc_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + +protected: + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } }; // device type definition diff --git a/src/devices/bus/m5/slot.h b/src/devices/bus/m5/slot.h index 1a626edcdb8..105bc7c71d2 100644 --- a/src/devices/bus/m5/slot.h +++ b/src/devices/bus/m5/slot.h @@ -81,25 +81,24 @@ 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(); } - - int get_type() { return m_type; } + virtual void call_unload() override { } - void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } - - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "m5_cart"; } - virtual const char *file_extensions() const override { return "bin,rom"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "m5_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,rom"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_type() { return m_type; } + + void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_READ8_MEMBER(read_ram); @@ -109,6 +108,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 rom_software_list_loader::instance(); } + int m_type; device_m5_cart_interface* m_cart; }; diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h index 988a60c1df2..cf3b20dc685 100644 --- a/src/devices/bus/megadrive/md_slot.h +++ b/src/devices/bus/megadrive/md_slot.h @@ -152,23 +152,18 @@ class base_md_cart_slot_device : public device_t, { public: // construction/destruction - base_md_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); virtual ~base_md_cart_slot_device(); - // device-level overrides - virtual void device_start() override; - // 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_CARTSLOT; } - 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 m_must_be_loaded; } - virtual bool is_reset_on_load() const override { return 1; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 m_must_be_loaded; } + virtual bool is_reset_on_load() const noexcept override { return true; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -203,6 +198,16 @@ public: int m_type; device_md_cart_interface* m_cart; bool m_must_be_loaded; + +protected: + base_md_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + + // device-level overrides + virtual void device_start() override; + + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } + }; // ======================> md_cart_slot_device @@ -222,8 +227,8 @@ public: } md_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *image_interface() const override { return "megadriv_cart"; } - virtual const char *file_extensions() const override { return "smd,bin,md,gen"; } + virtual const char *image_interface() const noexcept override { return "megadriv_cart"; } + virtual const char *file_extensions() const noexcept override { return "smd,bin,md,gen"; } }; // ======================> pico_cart_slot_device @@ -242,8 +247,8 @@ public: set_fixed(false); } pico_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *image_interface() const override { return "pico_cart"; } - virtual const char *file_extensions() const override { return "bin,md"; } + virtual const char *image_interface() const noexcept override { return "pico_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,md"; } }; // ======================> copera_cart_slot_device @@ -262,8 +267,8 @@ public: set_fixed(false); } copera_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *image_interface() const override { return "copera_cart"; } - virtual const char *file_extensions() const override { return "bin,md"; } + virtual const char *image_interface() const noexcept override { return "copera_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,md"; } }; diff --git a/src/devices/bus/msx_slot/cartridge.h b/src/devices/bus/msx_slot/cartridge.h index faabf394042..36d0282f7b7 100644 --- a/src/devices/bus/msx_slot/cartridge.h +++ b/src/devices/bus/msx_slot/cartridge.h @@ -29,17 +29,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_CARTSLOT; } - virtual bool is_readable() const override { return true; } - virtual bool is_writeable() const override { return false; } - virtual bool is_creatable() const override { return false; } - virtual bool must_be_loaded() const override { return false; } - virtual bool is_reset_on_load() const override { return true; } - virtual const char *image_interface() const override { return "msx_cart"; } - virtual const char *file_extensions() const override { return "mx1,bin,rom"; } - virtual const char *custom_instance_name() const override { return "cartridge"; } - virtual const char *custom_brief_instance_name() const override { return "cart"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "msx_cart"; } + virtual const char *file_extensions() const noexcept override { return "mx1,bin,rom"; } + virtual const char *custom_instance_name() const noexcept override { return "cartridge"; } + virtual const char *custom_brief_instance_name() const noexcept override { return "cart"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -57,6 +56,9 @@ protected: virtual void device_resolve_objects() override; virtual void device_start() override; + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } + devcb_write_line m_irq_handler; msx_cart_interface *m_cartridge; @@ -70,9 +72,9 @@ public: // construction/destruction msx_slot_yamaha_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *image_interface() const override { return "msx_yamaha_60pin"; } - virtual const char *custom_instance_name() const override { return "cartridge60pin"; } - virtual const char *custom_brief_instance_name() const override { return "cart60p"; } + virtual const char *image_interface() const noexcept override { return "msx_yamaha_60pin"; } + virtual const char *custom_instance_name() const noexcept override { return "cartridge60pin"; } + virtual const char *custom_brief_instance_name() const noexcept override { return "cart60p"; } protected: virtual void device_start() override; diff --git a/src/devices/bus/neogeo/slot.h b/src/devices/bus/neogeo/slot.h index 9d948b68c40..b52f0454145 100644 --- a/src/devices/bus/neogeo/slot.h +++ b/src/devices/bus/neogeo/slot.h @@ -205,16 +205,15 @@ 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_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "neo_cart"; } - virtual const char *file_extensions() const override { return "bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "neo_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -338,6 +337,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 rom_software_list_loader::instance(); } + private: int m_type; device_neogeo_cart_interface* m_cart; diff --git a/src/devices/bus/nes/aladdin.h b/src/devices/bus/nes/aladdin.h index 05072f8504b..102abe68172 100644 --- a/src/devices/bus/nes/aladdin.h +++ b/src/devices/bus/nes/aladdin.h @@ -65,16 +65,15 @@ public: // image-level overrides virtual image_init_result call_load() 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_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "ade_cart"; } - virtual const char *file_extensions() const override { return "nes,bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "ade_cart"; } + virtual const char *file_extensions() const noexcept override { return "nes,bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -86,6 +85,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 rom_software_list_loader::instance(); } + aladdin_cart_interface* m_cart; }; diff --git a/src/devices/bus/nes/datach.h b/src/devices/bus/nes/datach.h index a5693c78108..df12bbe5a86 100644 --- a/src/devices/bus/nes/datach.h +++ b/src/devices/bus/nes/datach.h @@ -66,16 +66,15 @@ public: // image-level overrides virtual image_init_result call_load() 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_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "datach_cart"; } - virtual const char *file_extensions() const override { return "nes,bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "datach_cart"; } + virtual const char *file_extensions() const noexcept override { return "nes,bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -87,6 +86,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 rom_software_list_loader::instance(); } + datach_cart_interface* m_cart; }; diff --git a/src/devices/bus/nes/karastudio.h b/src/devices/bus/nes/karastudio.h index faaf8ecedbb..ced1ed31a21 100644 --- a/src/devices/bus/nes/karastudio.h +++ b/src/devices/bus/nes/karastudio.h @@ -64,16 +64,15 @@ public: // image-level overrides virtual image_init_result call_load() 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_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "ks_cart"; } - virtual const char *file_extensions() const override { return "bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "ks_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -85,6 +84,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 rom_software_list_loader::instance(); } + kstudio_cart_interface* m_cart; }; diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index 4a55430c074..acdfed33164 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -364,34 +364,22 @@ public: nes_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~nes_cart_slot_device(); - // device-level overrides - virtual void device_start() override; - // 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(); } - - void call_load_ines(); - void call_load_unif(); - void call_load_pcb(); - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 m_must_be_loaded; } - virtual bool is_reset_on_load() const override { return 1; } - virtual const char *image_interface() const override { return "nes_cart"; } - virtual const char *file_extensions() const override { return "nes,unf,unif"; } - virtual u32 unhashed_header_length() const override { return 16; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 m_must_be_loaded; } + virtual bool is_reset_on_load() const noexcept override { return true; } + virtual const char *image_interface() const noexcept override { return "nes_cart"; } + virtual const char *file_extensions() const noexcept override { return "nes,unf,unif"; } + virtual u32 unhashed_header_length() const noexcept override { return 16; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; - const char * get_default_card_ines(get_default_card_software_hook &hook, const uint8_t *ROM, uint32_t len) const; - static const char * get_default_card_unif(const uint8_t *ROM, uint32_t len); - static const char * nes_get_slot(int pcb_id); - int nes_get_pcb_id(const char *slot); // reading and writing virtual uint8_t read_l(offs_t offset); @@ -422,6 +410,22 @@ public: device_nes_cart_interface* m_cart; int m_pcb_id; bool m_must_be_loaded; + +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 rom_software_list_loader::instance(); } + + const char * get_default_card_ines(get_default_card_software_hook &hook, const uint8_t *ROM, uint32_t len) const; + static const char * get_default_card_unif(const uint8_t *ROM, uint32_t len); + static const char * nes_get_slot(int pcb_id); + int nes_get_pcb_id(const char *slot); + + void call_load_ines(); + void call_load_unif(); + void call_load_pcb(); }; // device type definition diff --git a/src/devices/bus/nes/sunsoft_dcs.h b/src/devices/bus/nes/sunsoft_dcs.h index ba96e6333be..87ca0bae5bd 100644 --- a/src/devices/bus/nes/sunsoft_dcs.h +++ b/src/devices/bus/nes/sunsoft_dcs.h @@ -61,16 +61,15 @@ public: // image-level overrides virtual image_init_result call_load() 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_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "ntb_cart"; } - virtual const char *file_extensions() const override { return "bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "ntb_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -81,6 +80,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 rom_software_list_loader::instance(); } + ntb_cart_interface* m_cart; }; diff --git a/src/devices/bus/nubus/nubus_image.cpp b/src/devices/bus/nubus/nubus_image.cpp index 1dd6bc2ab56..80324a287bc 100644 --- a/src/devices/bus/nubus/nubus_image.cpp +++ b/src/devices/bus/nubus/nubus_image.cpp @@ -20,32 +20,32 @@ // nubus_image_device::messimg_disk_image_device -class nubus_image_device::messimg_disk_image_device : public device_t, - public device_image_interface +class nubus_image_device::messimg_disk_image_device : public device_t, public device_image_interface { public: // construction/destruction messimg_disk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // image-level overrides - virtual iodevice_t image_type() const override { return IO_QUICKLOAD; } + virtual iodevice_t image_type() const noexcept override { return IO_QUICKLOAD; } - 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 *file_extensions() const override { return "img"; } - virtual const char *custom_instance_name() const override { return "disk"; } - virtual const char *custom_brief_instance_name() const override { return "disk"; } + 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 *file_extensions() const noexcept override { return "img"; } + virtual const char *custom_instance_name() const noexcept override { return "disk"; } + virtual const char *custom_brief_instance_name() const noexcept override { return "disk"; } virtual image_init_result call_load() override; virtual void call_unload() override; - protected: +protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; + public: uint32_t m_size; std::unique_ptr<uint8_t[]> m_data; diff --git a/src/devices/bus/odyssey2/slot.h b/src/devices/bus/odyssey2/slot.h index b0271e0e610..c951fda1ef8 100644 --- a/src/devices/bus/odyssey2/slot.h +++ b/src/devices/bus/odyssey2/slot.h @@ -81,22 +81,21 @@ 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(); } - - int get_type() { return m_type; } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "odyssey_cart"; } - virtual const char *file_extensions() const override { return "bin,rom"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "odyssey_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,rom"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_type() { return m_type; } + // reading and writing DECLARE_READ8_MEMBER(read_rom04); DECLARE_READ8_MEMBER(read_rom0c); @@ -109,6 +108,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 rom_software_list_loader::instance(); } + int m_type; device_o2_cart_interface* m_cart; }; diff --git a/src/devices/bus/pce/pce_slot.h b/src/devices/bus/pce/pce_slot.h index 6605666ae20..cabff4f47e3 100644 --- a/src/devices/bus/pce/pce_slot.h +++ b/src/devices/bus/pce/pce_slot.h @@ -83,25 +83,24 @@ 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 noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual bool is_reset_on_load() const noexcept override { return true; } + virtual const char *image_interface() const noexcept override { return m_interface; } + virtual const char *file_extensions() const noexcept override { return "pce,bin"; } + + // slot interface overrides + virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; int get_type() { return m_type; } static int get_cart_type(const uint8_t *ROM, uint32_t len); void set_intf(const char * interface) { m_interface = interface; } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual bool is_reset_on_load() const override { return 1; } - virtual const char *image_interface() const override { return m_interface; } - virtual const char *file_extensions() const override { return "pce,bin"; } - - // slot interface overrides - virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; - // reading and writing virtual DECLARE_READ8_MEMBER(read_cart); virtual DECLARE_WRITE8_MEMBER(write_cart); @@ -110,6 +109,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 rom_software_list_loader::instance(); } + const char *m_interface; int m_type; device_pce_cart_interface *m_cart; diff --git a/src/devices/bus/plus4/exp.h b/src/devices/bus/plus4/exp.h index 7ef8b3f4080..369480281b3 100644 --- a/src/devices/bus/plus4/exp.h +++ b/src/devices/bus/plus4/exp.h @@ -98,15 +98,15 @@ protected: virtual image_init_result call_load() 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_CARTSLOT; } - - 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 1; } - virtual const char *image_interface() const override { return "plus4_cart"; } - virtual const char *file_extensions() const override { return "rom,bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + + 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 true; } + virtual const char *image_interface() const noexcept override { return "plus4_cart"; } + virtual const char *file_extensions() const noexcept override { return "rom,bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/pofo/ccm.h b/src/devices/bus/pofo/ccm.h index 974489ff1bf..74175a7dc56 100644 --- a/src/devices/bus/pofo/ccm.h +++ b/src/devices/bus/pofo/ccm.h @@ -123,15 +123,15 @@ protected: virtual image_init_result call_load() 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_CARTSLOT; } - - 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 1; } - virtual const char *image_interface() const override { return "pofo_card"; } - virtual const char *file_extensions() const override { return "rom,bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + + 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 true; } + virtual const char *image_interface() const noexcept override { return "pofo_card"; } + virtual const char *file_extensions() const noexcept override { return "rom,bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/psx/memcard.h b/src/devices/bus/psx/memcard.h index e292d89e589..05bba518d60 100644 --- a/src/devices/bus/psx/memcard.h +++ b/src/devices/bus/psx/memcard.h @@ -15,14 +15,14 @@ class psxcard_device : public device_t, public: psxcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual iodevice_t image_type() const override { return IO_MEMCARD; } - - 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 *file_extensions() const override { return "mc"; } + virtual iodevice_t image_type() const noexcept override { return IO_MEMCARD; } + + 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 "mc"; } virtual image_init_result call_load() override; virtual image_init_result call_create(int format_type, util::option_resolution *format_options) override; diff --git a/src/devices/bus/ql/rom.h b/src/devices/bus/ql/rom.h index de2a680b2b0..4b79406aca9 100644 --- a/src/devices/bus/ql/rom.h +++ b/src/devices/bus/ql/rom.h @@ -99,15 +99,15 @@ protected: virtual image_init_result call_load() 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_CARTSLOT; } - - 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 1; } - virtual const char *image_interface() const override { return "ql_cart"; } - virtual const char *file_extensions() const override { return "rom,bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + + 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 true; } + virtual const char *image_interface() const noexcept override { return "ql_cart"; } + virtual const char *file_extensions() const noexcept override { return "rom,bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/saturn/sat_slot.h b/src/devices/bus/saturn/sat_slot.h index 51f8ef3a2aa..dca26d7e8ae 100644 --- a/src/devices/bus/saturn/sat_slot.h +++ b/src/devices/bus/saturn/sat_slot.h @@ -82,22 +82,21 @@ 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(); } - - int get_cart_type(); - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "sat_cart"; } - virtual const char *file_extensions() const override { return "bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "sat_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_cart_type(); + // reading and writing virtual DECLARE_READ32_MEMBER(read_rom); virtual DECLARE_READ32_MEMBER(read_ext_dram0); @@ -111,6 +110,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 rom_software_list_loader::instance(); } + private: device_sat_cart_interface* m_cart; }; diff --git a/src/devices/bus/scv/slot.h b/src/devices/bus/scv/slot.h index 93c874c4d42..97c49af8be4 100644 --- a/src/devices/bus/scv/slot.h +++ b/src/devices/bus/scv/slot.h @@ -81,26 +81,25 @@ 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 void call_unload() override { } + + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "scv_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } + + // slot interface overrides + virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; int get_type() { return m_type; } static int get_cart_type(const uint8_t *ROM, uint32_t len); void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "scv_cart"; } - virtual const char *file_extensions() const override { return "bin"; } - - // slot interface overrides - virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; - // reading and writing virtual DECLARE_READ8_MEMBER(read_cart); virtual DECLARE_WRITE8_MEMBER(write_cart); @@ -110,6 +109,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 rom_software_list_loader::instance(); } + int m_type; device_scv_cart_interface* m_cart; }; diff --git a/src/devices/bus/sega8/sega8_slot.h b/src/devices/bus/sega8/sega8_slot.h index 12d7244e0f8..5226b175d2a 100644 --- a/src/devices/bus/sega8/sega8_slot.h +++ b/src/devices/bus/sega8/sega8_slot.h @@ -117,9 +117,20 @@ 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 const char *custom_instance_name() const override { return "cartridge"; } - virtual const char *custom_brief_instance_name() const override { return "cart"; } + virtual const char *custom_instance_name() const noexcept override { return "cartridge"; } + virtual const char *custom_brief_instance_name() const noexcept override { return "cart"; } + + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 is_reset_on_load() const noexcept override { return true; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override { return "sms_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } + + // slot interface overrides + virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; int get_type() { return m_type; } int get_cart_type(const uint8_t *ROM, uint32_t len) const; @@ -131,18 +142,6 @@ public: void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 is_reset_on_load() const override { return 1; } - virtual bool must_be_loaded() const override { return false; } - virtual const char *image_interface() const override { return "sms_cart"; } - virtual const char *file_extensions() const override { return "bin"; } - - // slot interface overrides - virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; - // reading and writing virtual DECLARE_READ8_MEMBER(read_cart); virtual DECLARE_WRITE8_MEMBER(write_cart); @@ -161,6 +160,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 rom_software_list_loader::instance(); } + int m_type; bool const m_is_card; device_sega8_cart_interface* m_cart; @@ -174,8 +176,8 @@ public: // construction/destruction sega8_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *custom_instance_name() const override { return "card"; } - virtual const char *custom_brief_instance_name() const override { return "card"; } + virtual const char *custom_instance_name() const noexcept override { return "card"; } + virtual const char *custom_brief_instance_name() const noexcept override { return "card"; } protected: // construction/destruction @@ -198,9 +200,9 @@ public: set_fixed(false); } sg1000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual bool must_be_loaded() const override { return true; } - virtual const char *image_interface() const override { return "sg1000_cart"; } - virtual const char *file_extensions() const override { return "bin,sg"; } + virtual bool must_be_loaded() const noexcept override { return true; } + virtual const char *image_interface() const noexcept override { return "sg1000_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,sg"; } }; // ======================> omv_cart_slot_device @@ -219,9 +221,9 @@ public: set_fixed(false); } omv_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual bool must_be_loaded() const override { return false; } - virtual const char *image_interface() const override { return "sg1000_cart"; } - virtual const char *file_extensions() const override { return "bin,sg"; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override { return "sg1000_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,sg"; } }; // ======================> sc3000_cart_slot_device @@ -240,9 +242,9 @@ public: set_fixed(false); } sc3000_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual bool must_be_loaded() const override { return true; } - virtual const char *image_interface() const override { return "sg1000_cart"; } - virtual const char *file_extensions() const override { return "bin,sg,sc"; } + virtual bool must_be_loaded() const noexcept override { return true; } + virtual const char *image_interface() const noexcept override { return "sg1000_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,sg,sc"; } }; // ======================> sg1000mk3_cart_slot_device @@ -261,9 +263,9 @@ public: set_fixed(false); } sg1000mk3_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual bool must_be_loaded() const override { return false; } - virtual const char *image_interface() const override { return "sms_cart,sg1000_cart"; } - virtual const char *file_extensions() const override { return "bin,sms,sg"; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override { return "sms_cart,sg1000_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,sms,sg"; } }; // ======================> sms_cart_slot_device @@ -282,9 +284,9 @@ public: set_fixed(false); } sms_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual bool must_be_loaded() const override { return false; } - virtual const char *image_interface() const override { return "sms_cart"; } - virtual const char *file_extensions() const override { return "bin,sms"; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override { return "sms_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,sms"; } }; // ======================> gamegear_cart_slot_device @@ -303,9 +305,9 @@ public: set_fixed(false); } gamegear_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual bool must_be_loaded() const override { return true; } - virtual const char *image_interface() const override { return "gamegear_cart"; } - virtual const char *file_extensions() const override { return "bin,gg"; } + virtual bool must_be_loaded() const noexcept override { return true; } + virtual const char *image_interface() const noexcept override { return "gamegear_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,gg"; } }; @@ -325,9 +327,9 @@ public: set_fixed(false); } sms_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual bool must_be_loaded() const override { return false; } - virtual const char *image_interface() const override { return "sms_card"; } - virtual const char *file_extensions() const override { return "bin"; } + virtual bool must_be_loaded() const noexcept override { return false; } + virtual const char *image_interface() const noexcept override { return "sms_card"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } }; // ======================> sg1000_card_slot_device @@ -346,8 +348,8 @@ public: set_fixed(false); } sg1000_card_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *image_interface() const override { return "sg1000_cart"; } - virtual const char *file_extensions() const override { return "bin,sg"; } + virtual const char *image_interface() const noexcept override { return "sg1000_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,sg"; } }; DECLARE_DEVICE_TYPE(SG1000_CART_SLOT, sg1000_cart_slot_device) diff --git a/src/devices/bus/snes/snes_slot.h b/src/devices/bus/snes/snes_slot.h index 0df0fd14e10..6c415a596cc 100644 --- a/src/devices/bus/snes/snes_slot.h +++ b/src/devices/bus/snes/snes_slot.h @@ -176,7 +176,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 noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual bool is_reset_on_load() const noexcept override { return true; } + + // slot interface overrides + virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; void get_cart_type_addon(const uint8_t *ROM, uint32_t len, int &type, int &addon) const; uint32_t snes_skip_header(const uint8_t *ROM, uint32_t snes_rom_size) const; @@ -188,16 +197,6 @@ public: void save_ram() { if (m_cart && m_cart->get_nvram_size()) m_cart->save_nvram(); if (m_cart && m_cart->get_rtc_ram_size()) m_cart->save_rtc_ram(); } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual bool is_reset_on_load() const override { return 1; } - - // slot interface overrides - virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; - // reading and writing uint8_t read_l(offs_t offset); uint8_t read_h(offs_t offset); @@ -228,10 +227,13 @@ public: device_sns_cart_interface* m_cart; protected: + base_sns_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + // device-level overrides virtual void device_start() override; - base_sns_cart_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } private: devcb_write_line m_irq_callback; @@ -254,8 +256,8 @@ public: set_fixed(false); } sns_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *image_interface() const override { return "snes_cart"; } - virtual const char *file_extensions() const override { return "sfc"; } + virtual const char *image_interface() const noexcept override { return "snes_cart"; } + virtual const char *file_extensions() const noexcept override { return "sfc"; } }; // ======================> sns_sufami_cart_slot_device @@ -274,9 +276,9 @@ public: set_fixed(false); } sns_sufami_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *image_interface() const override { return "st_cart"; } - virtual const char *file_extensions() const override { return "st"; } - virtual bool must_be_loaded() const override { return 0; } + virtual const char *image_interface() const noexcept override { return "st_cart"; } + virtual const char *file_extensions() const noexcept override { return "st"; } + virtual bool must_be_loaded() const noexcept override { return false; } }; // ======================> sns_sufami_cart_slot_device @@ -295,9 +297,9 @@ public: set_fixed(false); } sns_bsx_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual const char *image_interface() const override { return "bspack"; } - virtual const char *file_extensions() const override { return "bs"; } - virtual bool must_be_loaded() const override { return 0; } + virtual const char *image_interface() const noexcept override { return "bspack"; } + virtual const char *file_extensions() const noexcept override { return "bs"; } + virtual bool must_be_loaded() const noexcept override { return false; } }; diff --git a/src/devices/bus/ti99/gromport/cartridges.h b/src/devices/bus/ti99/gromport/cartridges.h index e2e729f2d59..3fc3afebf26 100644 --- a/src/devices/bus/ti99/gromport/cartridges.h +++ b/src/devices/bus/ti99/gromport/cartridges.h @@ -95,14 +95,14 @@ protected: void prepare_cartridge(); // device_image_interface - iodevice_t image_type() const override { return IO_CARTSLOT; } - bool is_readable() const override { return true; } - bool is_writeable() const override { return false; } - bool is_creatable() const override { return false; } - bool must_be_loaded() const override { return false; } - bool is_reset_on_load() const override { return false; } - const char *image_interface() const override { return "ti99_cart"; } - const char *file_extensions() const override { return "rpk"; } + iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + bool is_readable() const noexcept override { return true; } + bool is_writeable() const noexcept override { return false; } + bool is_creatable() const noexcept override { return false; } + bool must_be_loaded() const noexcept override { return false; } + bool is_reset_on_load() const noexcept override { return false; } + const char *image_interface() const noexcept override { return "ti99_cart"; } + const char *file_extensions() const noexcept override { return "rpk"; } private: diff --git a/src/devices/bus/ti99/peb/ti_rs232.h b/src/devices/bus/ti99/peb/ti_rs232.h index 3c3b1e89d4b..dd15c989478 100644 --- a/src/devices/bus/ti99/peb/ti_rs232.h +++ b/src/devices/bus/ti99/peb/ti_rs232.h @@ -133,14 +133,14 @@ class ti_rs232_attached_device : public device_t, public device_image_interface public: ti_rs232_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - iodevice_t image_type() const override { return IO_SERIAL; } - bool is_readable() const override { return true; } - bool is_writeable() const override { return true; } - bool is_creatable() const override { return true; } - bool must_be_loaded() const override { return false; } - bool is_reset_on_load() const override { return false; } - const char *image_interface() const override { return ""; } - const char *file_extensions() const override { return ""; } + iodevice_t image_type() const noexcept override { return IO_SERIAL; } + bool is_readable() const noexcept override { return true; } + bool is_writeable() const noexcept override { return true; } + bool is_creatable() const noexcept override { return true; } + bool must_be_loaded() const noexcept override { return false; } + bool is_reset_on_load() const noexcept override { return false; } + const char *image_interface() const noexcept override { return ""; } + const char *file_extensions() const noexcept override { return ""; } void connect(tms9902_device *dev) { m_uart = dev; } protected: @@ -161,14 +161,14 @@ class ti_pio_attached_device : public device_t, public device_image_interface public: ti_pio_attached_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - iodevice_t image_type() const override { return IO_PARALLEL; } - bool is_readable() const override { return true; } - bool is_writeable() const override { return true; } - bool is_creatable() const override { return true; } - bool must_be_loaded() const override { return false; } - bool is_reset_on_load() const override { return false; } - const char *image_interface() const override { return ""; } - const char *file_extensions() const override { return ""; } + iodevice_t image_type() const noexcept override { return IO_PARALLEL; } + bool is_readable() const noexcept override { return true; } + bool is_writeable() const noexcept override { return true; } + bool is_creatable() const noexcept override { return true; } + bool must_be_loaded() const noexcept override { return false; } + bool is_reset_on_load() const noexcept override { return false; } + const char *image_interface() const noexcept override { return ""; } + const char *file_extensions() const noexcept override { return ""; } protected: void device_start() override { }; diff --git a/src/devices/bus/ti99x/990_tap.cpp b/src/devices/bus/ti99x/990_tap.cpp index cafefbffda8..c60af16e24c 100644 --- a/src/devices/bus/ti99x/990_tap.cpp +++ b/src/devices/bus/ti99x/990_tap.cpp @@ -895,20 +895,22 @@ public: ti990_tape_image_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // image-level overrides - 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 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 "tap"; } + 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 "tap"; } virtual image_init_result call_load() override; virtual void call_unload() override; + protected: // device-level overrides virtual void device_start() override; + private: int tape_get_id(); }; diff --git a/src/devices/bus/vc4000/slot.h b/src/devices/bus/vc4000/slot.h index 237253b5c42..7d9df824d4e 100644 --- a/src/devices/bus/vc4000/slot.h +++ b/src/devices/bus/vc4000/slot.h @@ -74,24 +74,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 rom_software_list_loader::instance(); } - - int get_type() { return m_type; } - - void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "vc4000_cart"; } - virtual const char *file_extensions() const override { return "bin,rom"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "vc4000_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,rom"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_type() { return m_type; } + + void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } + // reading and writing virtual uint8_t read_rom(offs_t offset); virtual uint8_t extra_rom(offs_t offset); @@ -99,9 +98,6 @@ public: virtual void write_ram(offs_t offset, uint8_t data); protected: - // device-level overrides - virtual void device_start() override; - vc4000_cart_slot_device( const machine_config &mconfig, device_type type, @@ -109,6 +105,12 @@ protected: device_t *owner, uint32_t clock); + // device-level overrides + virtual void device_start() override; + + // device_image_interface implementation + virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } + int m_type; device_vc4000_cart_interface *m_cart; }; @@ -129,7 +131,7 @@ public: h21_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~h21_cart_slot_device(); - virtual const char *image_interface() const override { return "h21_cart"; } + virtual const char *image_interface() const noexcept override { return "h21_cart"; } }; // device type definition diff --git a/src/devices/bus/vcs/vcs_slot.h b/src/devices/bus/vcs/vcs_slot.h index 4ab70d65e0c..11be9dd47c5 100644 --- a/src/devices/bus/vcs/vcs_slot.h +++ b/src/devices/bus/vcs/vcs_slot.h @@ -104,33 +104,36 @@ 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(); } - - int get_cart_type() { return m_type; }; - static int identify_cart_type(const uint8_t *ROM, uint32_t len); - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual bool is_reset_on_load() const override { return 1; } - virtual const char *image_interface() const override { return "a2600_cart"; } - virtual const char *file_extensions() const override { return "bin,a26"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual bool is_reset_on_load() const noexcept override { return true; } + virtual const char *image_interface() const noexcept override { return "a2600_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,a26"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_cart_type() { return m_type; }; + static int identify_cart_type(const uint8_t *ROM, uint32_t len); + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_READ8_MEMBER(read_bank); virtual DECLARE_WRITE8_MEMBER(write_bank); virtual DECLARE_WRITE8_MEMBER(write_ram); -private: +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 rom_software_list_loader::instance(); } + +private: device_vcs_cart_interface* m_cart; int m_type; diff --git a/src/devices/bus/vectrex/slot.h b/src/devices/bus/vectrex/slot.h index a65b4cbb1ba..2427e4be7f3 100644 --- a/src/devices/bus/vectrex/slot.h +++ b/src/devices/bus/vectrex/slot.h @@ -70,23 +70,22 @@ 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(); } - int get_type() { return m_type; } - int get_vec3d() { return m_vec3d; } - - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "vectrex_cart"; } - virtual const char *file_extensions() const override { return "bin,gam,vec"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "vectrex_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin,gam,vec"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + int get_type() { return m_type; } + int get_vec3d() { return m_vec3d; } + // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_ram); @@ -96,6 +95,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 rom_software_list_loader::instance(); } + int m_type, m_vec3d; device_vectrex_cart_interface* m_cart; }; diff --git a/src/devices/bus/vic10/exp.h b/src/devices/bus/vic10/exp.h index a6ece5b9f5f..8dd977550ac 100644 --- a/src/devices/bus/vic10/exp.h +++ b/src/devices/bus/vic10/exp.h @@ -98,15 +98,15 @@ protected: virtual image_init_result call_load() 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_CARTSLOT; } - - 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 1; } - virtual bool is_reset_on_load() const override { return 1; } - virtual const char *image_interface() const override { return "vic10_cart"; } - virtual const char *file_extensions() const override { return "80,e0"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + + 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 true; } + virtual bool is_reset_on_load() const noexcept override { return true; } + virtual const char *image_interface() const noexcept override { return "vic10_cart"; } + virtual const char *file_extensions() const noexcept override { return "80,e0"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/vic20/exp.h b/src/devices/bus/vic20/exp.h index d0c2cbe50ec..b643c9089b2 100644 --- a/src/devices/bus/vic20/exp.h +++ b/src/devices/bus/vic20/exp.h @@ -96,15 +96,15 @@ protected: virtual image_init_result call_load() 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_CARTSLOT; } - - 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 1; } - virtual const char *image_interface() const override { return "vic1001_cart"; } - virtual const char *file_extensions() const override { return "20,40,60,70,a0,b0,crt"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + + 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 true; } + virtual const char *image_interface() const noexcept override { return "vic1001_cart"; } + virtual const char *file_extensions() const noexcept override { return "20,40,60,70,a0,b0,crt"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/vidbrain/exp.h b/src/devices/bus/vidbrain/exp.h index 934e5a89e2e..4850de91f9e 100644 --- a/src/devices/bus/vidbrain/exp.h +++ b/src/devices/bus/vidbrain/exp.h @@ -123,15 +123,15 @@ protected: virtual image_init_result call_load() 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_CARTSLOT; } - - 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 1; } - virtual const char *image_interface() const override { return "vidbrain_cart"; } - virtual const char *file_extensions() const override { return "bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + + 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 true; } + virtual const char *image_interface() const noexcept override { return "vidbrain_cart"; } + virtual const char *file_extensions() const noexcept override { return "bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; diff --git a/src/devices/bus/vsmile/vsmile_slot.h b/src/devices/bus/vsmile/vsmile_slot.h index 129c6d356e2..d103dfb309c 100644 --- a/src/devices/bus/vsmile/vsmile_slot.h +++ b/src/devices/bus/vsmile/vsmile_slot.h @@ -84,23 +84,22 @@ 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(); } - - void save_nvram() { if (m_cart && m_cart->get_nvram_size()) m_cart->save_nvram(); } - uint32_t get_rom_size() { if (m_cart) return m_cart->get_rom_size(); return 0; } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual const char *image_interface() const override { return "vsmile_cart"; } - virtual const char *file_extensions() const override { return "u1,u3,bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual const char *image_interface() const noexcept override { return "vsmile_cart"; } + virtual const char *file_extensions() const noexcept override { return "u1,u3,bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; + void save_nvram() { if (m_cart && m_cart->get_nvram_size()) m_cart->save_nvram(); } + uint32_t get_rom_size() { return m_cart ? m_cart->get_rom_size() : 0; } + // reading and writing virtual DECLARE_READ16_MEMBER(bank0_r); virtual DECLARE_READ16_MEMBER(bank1_r); @@ -118,6 +117,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 rom_software_list_loader::instance(); } + int m_type; device_vsmile_cart_interface* m_cart; }; diff --git a/src/devices/bus/wswan/slot.h b/src/devices/bus/wswan/slot.h index c6b4ee3d3c8..85bda911c89 100644 --- a/src/devices/bus/wswan/slot.h +++ b/src/devices/bus/wswan/slot.h @@ -148,7 +148,18 @@ 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 noexcept override { return IO_CARTSLOT; } + 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 true; } + virtual bool is_reset_on_load() const noexcept override { return true; } + virtual const char *image_interface() const noexcept override { return "wswan_cart"; } + virtual const char *file_extensions() const noexcept override { return "ws,wsc,bin"; } + + // slot interface overrides + virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; int get_type() { return m_type; } int get_is_rotated() { return m_cart->get_is_rotated(); } @@ -157,18 +168,6 @@ public: void save_nvram() { if (m_cart && m_cart->get_nvram_size()) m_cart->save_nvram(); } - virtual iodevice_t image_type() const override { return IO_CARTSLOT; } - 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 1; } - virtual bool is_reset_on_load() const override { return 1; } - virtual const char *image_interface() const override { return "wswan_cart"; } - virtual const char *file_extensions() const override { return "ws,wsc,bin"; } - - // slot interface overrides - virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; - // reading and writing virtual uint8_t read_rom20(offs_t offset); virtual uint8_t read_rom30(offs_t offset); @@ -182,6 +181,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 rom_software_list_loader::instance(); } + int m_type; device_ws_cart_interface* m_cart; }; diff --git a/src/devices/bus/z88/z88.h b/src/devices/bus/z88/z88.h index e239a48f8e0..923765517b0 100644 --- a/src/devices/bus/z88/z88.h +++ b/src/devices/bus/z88/z88.h @@ -106,16 +106,15 @@ 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_CARTSLOT; } - 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 "z88_cart"; } - virtual const char *file_extensions() const override { return "epr,bin"; } + virtual iodevice_t image_type() const noexcept override { return IO_CARTSLOT; } + 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 "z88_cart"; } + virtual const char *file_extensions() const noexcept override { return "epr,bin"; } // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; @@ -130,6 +129,9 @@ protected: 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 rom_software_list_loader::instance(); } + private: static constexpr device_timer_id TIMER_FLP_CLEAR = 0; |