summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/odyssey2/slot.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/odyssey2/slot.h')
-rw-r--r--src/devices/bus/odyssey2/slot.h24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/devices/bus/odyssey2/slot.h b/src/devices/bus/odyssey2/slot.h
index db187b10bc0..386a6a3aeb5 100644
--- a/src/devices/bus/odyssey2/slot.h
+++ b/src/devices/bus/odyssey2/slot.h
@@ -5,7 +5,7 @@
#pragma once
-#include "softlist_dev.h"
+#include "imagedev/cartrom.h"
/*
@@ -68,7 +68,7 @@ public:
virtual u8 io_read(offs_t offset) { return 0xff; }
virtual void bus_write(u8 data) { }
virtual u8 bus_read() { return 0xff; }
- virtual DECLARE_READ_LINE_MEMBER(t0_read) { return 0; }
+ virtual int t0_read() { return 0; }
virtual int b_read() { return -1; }
virtual void cart_init() { } // called after loading ROM
@@ -94,7 +94,7 @@ protected:
// ======================> o2_cart_slot_device
class o2_cart_slot_device : public device_t,
- public device_image_interface,
+ public device_cartrom_image_interface,
public device_single_card_slot_interface<device_o2_cart_interface>
{
public:
@@ -112,20 +112,15 @@ public:
o2_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
virtual ~o2_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 "odyssey_cart"; }
virtual const char *file_extensions() const noexcept override { return "bin,rom"; }
- // 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; }
@@ -138,19 +133,16 @@ public:
u8 io_read(offs_t offset);
void bus_write(u8 data);
u8 bus_read();
- DECLARE_READ_LINE_MEMBER(t0_read);
+ int t0_read();
int b_read();
void write_p1(u8 data) { if (m_cart) m_cart->write_p1(data); }
void write_p2(u8 data) { if (m_cart) m_cart->write_p2(data); }
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_o2_cart_interface* m_cart;
int m_b;