diff options
Diffstat (limited to 'src/devices/bus/snes/snes_slot.h')
-rw-r--r-- | src/devices/bus/snes/snes_slot.h | 42 |
1 files changed, 22 insertions, 20 deletions
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; } }; |