summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/plus4/exp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/plus4/exp.cpp')
-rw-r--r--src/devices/bus/plus4/exp.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/devices/bus/plus4/exp.cpp b/src/devices/bus/plus4/exp.cpp
index 487de7ea3c2..b475875145c 100644
--- a/src/devices/bus/plus4/exp.cpp
+++ b/src/devices/bus/plus4/exp.cpp
@@ -67,9 +67,9 @@ device_plus4_expansion_card_interface::~device_plus4_expansion_card_interface()
plus4_expansion_slot_device::plus4_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, PLUS4_EXPANSION_SLOT, tag, owner, clock),
device_single_card_slot_interface<device_plus4_expansion_card_interface>(mconfig, *this),
- device_image_interface(mconfig, *this),
+ device_cartrom_image_interface(mconfig, *this),
m_write_irq(*this),
- m_read_dma_cd(*this),
+ m_read_dma_cd(*this, 0xff),
m_write_dma_cd(*this),
m_write_aec(*this),
m_card(nullptr)
@@ -84,12 +84,6 @@ plus4_expansion_slot_device::plus4_expansion_slot_device(const machine_config &m
void plus4_expansion_slot_device::device_start()
{
m_card = get_card_device();
-
- // resolve callbacks
- m_write_irq.resolve_safe();
- m_read_dma_cd.resolve_safe(0xff);
- m_write_dma_cd.resolve_safe();
- m_write_aec.resolve_safe();
}
@@ -97,13 +91,14 @@ void plus4_expansion_slot_device::device_start()
// call_load -
//-------------------------------------------------
-image_init_result plus4_expansion_slot_device::call_load()
+std::pair<std::error_condition, std::string> plus4_expansion_slot_device::call_load()
{
if (m_card)
{
if (!loaded_through_softlist())
{
// TODO
+ return std::make_pair(image_error::UNSUPPORTED, "Plus/4 Expansion software must be loaded from the software list");
}
else
{
@@ -117,14 +112,11 @@ image_init_result plus4_expansion_slot_device::call_load()
m_card->m_c2h_size = get_software_region_length("c2h");
if ((m_card->m_c1l_size & (m_card->m_c1l_size - 1)) || (m_card->m_c1h_size & (m_card->m_c1h_size - 1)) || (m_card->m_c2l_size & (m_card->m_c2l_size - 1)) || (m_card->m_c2h_size & (m_card->m_c2h_size - 1)))
- {
- seterror(image_error::INVALIDIMAGE, "ROM size must be power of 2");
- return image_init_result::FAIL;
- }
+ return std::make_pair(image_error::INVALIDLENGTH, "All ROM sizes must be powers of 2");
}
}
- return image_init_result::PASS;
+ return std::make_pair(std::error_condition(), std::string());
}