summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/imagedev/harddriv.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/imagedev/harddriv.h')
-rw-r--r--src/devices/imagedev/harddriv.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/devices/imagedev/harddriv.h b/src/devices/imagedev/harddriv.h
index 032d449ad68..93eb4e3c19f 100644
--- a/src/devices/imagedev/harddriv.h
+++ b/src/devices/imagedev/harddriv.h
@@ -18,10 +18,26 @@
TYPE DEFINITIONS
***************************************************************************/
+// ======================> harddisk_image_base_device
+
+class harddisk_image_base_device : public device_t, public device_image_interface
+{
+protected:
+ // construction/destruction
+ harddisk_image_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
+ // image-level overrides
+ 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 false; }
+ virtual bool is_reset_on_load() const noexcept override { return false; }
+ virtual const char *image_type_name() const noexcept override { return "harddisk"; }
+ virtual const char *image_brief_type_name() const noexcept override { return "hard"; }
+};
+
// ======================> harddisk_image_device
-class harddisk_image_device : public device_t,
- public device_image_interface
+class harddisk_image_device : public harddisk_image_base_device
{
public:
// construction/destruction
@@ -42,13 +58,7 @@ public:
virtual image_init_result call_create(int create_format, util::option_resolution *create_args) override;
virtual void call_unload() override;
- virtual iodevice_t image_type() const noexcept override { return IO_HARDDISK; }
-
- virtual bool is_readable() const noexcept override { return 1; }
- virtual bool is_writeable() const noexcept override { return 1; }
- virtual bool is_creatable() const noexcept override { return 0; }
- virtual bool must_be_loaded() const noexcept override { return 0; }
- virtual bool is_reset_on_load() const noexcept override { return 0; }
+ virtual bool image_is_chd_type() 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 "chd,hd,hdv,2mg,hdi"; }
virtual const util::option_guide &create_option_guide() const override;