diff options
Diffstat (limited to 'src/devices/bus/chanf/slot.cpp')
-rw-r--r-- | src/devices/bus/chanf/slot.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/devices/bus/chanf/slot.cpp b/src/devices/bus/chanf/slot.cpp index 3a4a9008c95..6092103eb1d 100644 --- a/src/devices/bus/chanf/slot.cpp +++ b/src/devices/bus/chanf/slot.cpp @@ -44,11 +44,11 @@ device_channelf_cart_interface::~device_channelf_cart_interface() // rom_alloc - alloc the space for the cart //------------------------------------------------- -void device_channelf_cart_interface::rom_alloc(uint32_t size, const char *tag) +void device_channelf_cart_interface::rom_alloc(uint32_t size) { if (m_rom == nullptr) { - m_rom = device().machine().memory().region_alloc(std::string(tag).append(CHANFSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(device().subtag("^cart:rom"), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -73,7 +73,7 @@ void device_channelf_cart_interface::ram_alloc(uint32_t size) //------------------------------------------------- channelf_cart_slot_device::channelf_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, CHANF_CART_SLOT, tag, owner, clock), - device_image_interface(mconfig, *this), + device_cartrom_image_interface(mconfig, *this), device_single_card_slot_interface<device_channelf_cart_interface>(mconfig, *this), m_type(CF_CHESS), m_cart(nullptr) { @@ -146,12 +146,12 @@ static const char *chanf_get_slot(int type) call load -------------------------------------------------*/ -image_init_result channelf_cart_slot_device::call_load() +std::pair<std::error_condition, std::string> channelf_cart_slot_device::call_load() { if (m_cart) { - uint32_t len = !loaded_through_softlist() ? length() : get_software_region_length("rom"); - m_cart->rom_alloc(len, tag()); + uint32_t const len = !loaded_through_softlist() ? length() : get_software_region_length("rom"); + m_cart->rom_alloc(len); if (!loaded_through_softlist()) fread(m_cart->get_rom_base(), len); @@ -180,11 +180,9 @@ image_init_result channelf_cart_slot_device::call_load() } //printf("Type: %s\n", chanf_get_slot(m_type)); - - return image_init_result::PASS; } - return image_init_result::PASS; + return std::make_pair(std::error_condition(), std::string()); } |