summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/pce/pce_slot.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/pce/pce_slot.h')
-rw-r--r--src/devices/bus/pce/pce_slot.h45
1 files changed, 15 insertions, 30 deletions
diff --git a/src/devices/bus/pce/pce_slot.h b/src/devices/bus/pce/pce_slot.h
index 79934087a0e..337214d0b81 100644
--- a/src/devices/bus/pce/pce_slot.h
+++ b/src/devices/bus/pce/pce_slot.h
@@ -5,7 +5,7 @@
#pragma once
-#include "softlist_dev.h"
+#include "imagedev/cartrom.h"
/***************************************************************************
@@ -21,7 +21,9 @@ enum
PCE_CDSYS3U,
PCE_POPULOUS,
PCE_SF2,
- PCE_TENNOKOE
+ PCE_TENNOKOE,
+ PCE_ACARD_DUO,
+ PCE_ACARD_PRO
};
@@ -33,11 +35,9 @@ public:
// construction/destruction
virtual ~device_pce_cart_interface();
- // reading and writing
- virtual uint8_t read_cart(offs_t offset) { return 0xff; }
- virtual void write_cart(offs_t offset, uint8_t data) {};
+ virtual void install_memory_handlers(address_space &space) { }
- void rom_alloc(uint32_t size, const char *tag);
+ void rom_alloc(uint32_t size);
void ram_alloc(uint32_t size);
uint8_t* get_rom_base() { return m_rom; }
uint8_t* get_ram_base() { return &m_ram[0]; }
@@ -61,7 +61,7 @@ protected:
// ======================> pce_cart_slot_device
class pce_cart_slot_device : public device_t,
- public device_image_interface,
+ public device_cartrom_image_interface,
public device_single_card_slot_interface<device_pce_cart_interface>
{
public:
@@ -80,20 +80,18 @@ public:
pce_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~pce_cart_slot_device();
- // image-level overrides
- virtual image_init_result call_load() override;
+ // configuration
+ template <typename T> void set_address_space(T &&tag, int no) { m_address_space.set_tag(std::forward<T>(tag), no); }
+
+ // 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 m_interface; }
virtual const char *file_extensions() const noexcept override { return "pce,bin"; }
- // 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; }
@@ -101,20 +99,14 @@ public:
void set_intf(const char * interface) { m_interface = interface; }
- // reading and writing
- uint8_t read_cart(offs_t offset);
- void write_cart(offs_t offset, uint8_t 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(); }
-
const char *m_interface;
int m_type;
device_pce_cart_interface *m_cart;
+ required_address_space m_address_space;
};
@@ -122,11 +114,4 @@ protected:
// device type definition
DECLARE_DEVICE_TYPE(PCE_CART_SLOT, pce_cart_slot_device)
-
-/***************************************************************************
- DEVICE CONFIGURATION MACROS
- ***************************************************************************/
-
-#define PCESLOT_ROM_REGION_TAG ":cart:rom"
-
#endif // MAME_BUS_PCE_PCE_SLOT_H