diff options
author | 2022-01-06 20:59:02 -0500 | |
---|---|---|
committer | 2022-01-06 20:59:02 -0500 | |
commit | 23bbd37da65e7d9783b8fa697039fa85257fa6de (patch) | |
tree | 6970df7d29d7751e560baf251af7ad173f143429 /src/devices/bus/psx | |
parent | 20adc731c24b8be2f7b963c8ed6a41829f7f5617 (diff) |
device_image_interface: Interface overhaul
- Remove the iodevice_t classification, which was not used that much and was incomplete anyway. Image device implementations must now provide their own instance names and brief instance names. Several new parent classes have been created to make it easier to use the old standard names.
- Change must_be_loaded from a pure virtual function to be overridden in implementations to a getter for a base class property that can be set on the host side (as was formerly made possible for NES, MD and "generic" cartridge slots) but defaults to false for all types. This restrictive property has been unset for a small number of cases.
- Create parent classes for paper tape and magnetic tape devices. At present these are dummy classes that do little to nothing, but may help unify implementations in the future.
- Change several member functions to take std::string_view parameters rather than const std::string & or const char *.
- Make update_names take into account brief names, as discussed in PR #2555.
- Remove the obsolete uses_file_extension function (which used thread-unsafe strtok).
* portfolio_ccm_slot: Change image type from "cartridge" to "memcard"
* i7220, datapack: Add custom instance names that weren't there before
* pc11: Add note
Diffstat (limited to 'src/devices/bus/psx')
-rw-r--r-- | src/devices/bus/psx/memcard.cpp | 2 | ||||
-rw-r--r-- | src/devices/bus/psx/memcard.h | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/devices/bus/psx/memcard.cpp b/src/devices/bus/psx/memcard.cpp index a2826083b48..ea282337746 100644 --- a/src/devices/bus/psx/memcard.cpp +++ b/src/devices/bus/psx/memcard.cpp @@ -43,7 +43,7 @@ enum transfer_states psxcard_device::psxcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, PSXCARD, tag, owner, clock), - device_image_interface(mconfig, *this), + device_memcard_image_interface(mconfig, *this), pkt_ptr(0), pkt_sz(0), cmd(0), diff --git a/src/devices/bus/psx/memcard.h b/src/devices/bus/psx/memcard.h index 05bba518d60..8a4b461cd6b 100644 --- a/src/devices/bus/psx/memcard.h +++ b/src/devices/bus/psx/memcard.h @@ -5,22 +5,18 @@ #pragma once +#include "imagedev/memcard.h" + class psx_controller_port_device; class psxcard_device : public device_t, - public device_image_interface + public device_memcard_image_interface { public: psxcard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual iodevice_t image_type() const noexcept override { return IO_MEMCARD; } - - virtual bool is_readable() const noexcept override { return true; } - virtual bool is_writeable() const noexcept override { return true; } - virtual bool is_creatable() const noexcept override { return true; } - virtual bool must_be_loaded() const noexcept override { return false; } virtual bool is_reset_on_load() const noexcept override { return false; } virtual const char *file_extensions() const noexcept override { return "mc"; } |