diff options
Diffstat (limited to 'src/devices/bus/wswan/slot.h')
-rw-r--r-- | src/devices/bus/wswan/slot.h | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/src/devices/bus/wswan/slot.h b/src/devices/bus/wswan/slot.h index 21abdb7fc13..6c84f093450 100644 --- a/src/devices/bus/wswan/slot.h +++ b/src/devices/bus/wswan/slot.h @@ -66,7 +66,7 @@ #pragma once -#include "softlist_dev.h" +#include "imagedev/cartrom.h" /*************************************************************************** @@ -101,7 +101,7 @@ public: virtual u16 read_io(offs_t offset, u16 mem_mask) { return 0xffff; } virtual void write_io(offs_t offset, u16 data, u16 mem_mask) { } - void rom_alloc(u32 size, const char *tag); + void rom_alloc(u32 size); void nvram_alloc(u32 size); u16* get_rom_base() { return m_rom; } uint8_t* get_nvram_base() { return &m_nvram[0]; } @@ -128,7 +128,7 @@ protected: // ======================> ws_cart_slot_device class ws_cart_slot_device : public device_t, - public device_image_interface, + public device_cartrom_image_interface, public device_single_card_slot_interface<device_ws_cart_interface> { public: @@ -145,20 +145,15 @@ public: ws_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual ~ws_cart_slot_device(); - // image-level overrides - virtual image_init_result call_load() override; + // device_image_interface implementation + virtual std::pair<std::error_condition, std::string> call_load() override; 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 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 + // device_slot_interface implementation virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; int get_type() { return m_type; } @@ -177,14 +172,11 @@ public: virtual void write_io(offs_t offset, u16 data, u16 mem_mask); protected: - // device-level overrides + // device_t implementation 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; + device_ws_cart_interface *m_cart; }; @@ -192,11 +184,4 @@ protected: // device type definition DECLARE_DEVICE_TYPE(WS_CART_SLOT, ws_cart_slot_device) - -/*************************************************************************** - DEVICE CONFIGURATION MACROS - ***************************************************************************/ - -#define WSSLOT_ROM_REGION_TAG ":cart:rom" - #endif // MAME_BUS_WSWAN_SLOT_H |