diff options
Diffstat (limited to 'src/devices/bus/adam/exp.cpp')
-rw-r--r-- | src/devices/bus/adam/exp.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/devices/bus/adam/exp.cpp b/src/devices/bus/adam/exp.cpp index 59c677144f3..33b950a1776 100644 --- a/src/devices/bus/adam/exp.cpp +++ b/src/devices/bus/adam/exp.cpp @@ -9,6 +9,8 @@ #include "emu.h" #include "exp.h" +#include <tuple> + //************************************************************************** @@ -54,7 +56,7 @@ device_adam_expansion_slot_card_interface::device_adam_expansion_slot_card_inter adam_expansion_slot_device::adam_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, ADAM_EXPANSION_SLOT, tag, owner, clock), device_single_card_slot_interface<device_adam_expansion_slot_card_interface>(mconfig, *this), - device_image_interface(mconfig, *this), + device_cartrom_image_interface(mconfig, *this), m_write_irq(*this), m_card(nullptr) { } @@ -67,9 +69,6 @@ adam_expansion_slot_device::adam_expansion_slot_device(const machine_config &mco void adam_expansion_slot_device::device_start() { m_card = get_card_device(); - - // resolve callbacks - m_write_irq.resolve_safe(); } @@ -77,17 +76,20 @@ void adam_expansion_slot_device::device_start() // call_load - //------------------------------------------------- -image_init_result adam_expansion_slot_device::call_load() +std::pair<std::error_condition, std::string> adam_expansion_slot_device::call_load() { + std::error_condition err; + if (m_card) { - size_t size; - if (!loaded_through_softlist()) { - size = length(); + size_t const size = length(); - fread(m_card->m_rom, size); + std::size_t actual; + std::tie(err, m_card->m_rom, actual) = read(image_core_file(), size); + if (!err && (actual != size)) + err = std::errc::io_error; } else { @@ -95,7 +97,7 @@ image_init_result adam_expansion_slot_device::call_load() } } - return image_init_result::PASS; + return std::make_pair(err, std::string()); } |