diff options
Diffstat (limited to 'src/devices/bus/pce')
-rw-r--r-- | src/devices/bus/pce/pce_slot.cpp | 9 | ||||
-rw-r--r-- | src/devices/bus/pce/pce_slot.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/devices/bus/pce/pce_slot.cpp b/src/devices/bus/pce/pce_slot.cpp index 3d8987efbea..fb9676a22fc 100644 --- a/src/devices/bus/pce/pce_slot.cpp +++ b/src/devices/bus/pce/pce_slot.cpp @@ -315,22 +315,21 @@ int pce_cart_slot_device::get_cart_type(const uint8_t *ROM, uint32_t len) get default card software -------------------------------------------------*/ -std::string pce_cart_slot_device::get_default_card_software() +std::string pce_cart_slot_device::get_default_card_software(get_default_card_software_hook &hook) const { - if (open_image_file(mconfig().options())) + if (hook.image_file()) { const char *slot_string; - uint32_t len = m_file->size(); + uint32_t len = hook.image_file()->size(); std::vector<uint8_t> rom(len); int type; - m_file->read(&rom[0], len); + hook.image_file()->read(&rom[0], len); type = get_cart_type(&rom[0], len); slot_string = pce_get_slot(type); //printf("type: %s\n", slot_string); - clear(); return std::string(slot_string); } diff --git a/src/devices/bus/pce/pce_slot.h b/src/devices/bus/pce/pce_slot.h index 5b24c6d27ae..3aa6b3593dd 100644 --- a/src/devices/bus/pce/pce_slot.h +++ b/src/devices/bus/pce/pce_slot.h @@ -89,7 +89,7 @@ public: virtual const char *file_extensions() const override { return "pce,bin"; } // slot interface overrides - virtual std::string get_default_card_software() override; + virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; // reading and writing virtual DECLARE_READ8_MEMBER(read_cart); |