summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/imagedev/bitbngr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/imagedev/bitbngr.h')
-rw-r--r--src/devices/imagedev/bitbngr.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/devices/imagedev/bitbngr.h b/src/devices/imagedev/bitbngr.h
index cb4adf54f1c..2da3096d098 100644
--- a/src/devices/imagedev/bitbngr.h
+++ b/src/devices/imagedev/bitbngr.h
@@ -14,6 +14,7 @@ class bitbanger_device : public device_t,
{
public:
static void static_set_interface(device_t &device, const char *_interface) { downcast<bitbanger_device &>(device).m_interface = _interface; }
+ static void static_set_readonly(device_t &device, bool is_readonly) { downcast<bitbanger_device &>(device).m_is_readonly = is_readonly; }
// construction/destruction
bitbanger_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -26,8 +27,8 @@ public:
// image device
virtual iodevice_t image_type() const override { return IO_SERIAL; }
virtual bool is_readable() const override { return 1; }
- virtual bool is_writeable() const override { return 1; }
- virtual bool is_creatable() const override { return 1; }
+ virtual bool is_writeable() const override { return !m_is_readonly; }
+ virtual bool is_creatable() const override { return !m_is_readonly; }
virtual bool must_be_loaded() const override { return 0; }
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *image_interface() const override { return m_interface; }
@@ -44,10 +45,13 @@ protected:
private:
char const *m_interface;
+ bool m_is_readonly;
};
#define MCFG_BITBANGER_INTERFACE(_interface) \
bitbanger_device::static_set_interface(*device, _interface);
+#define MCFG_BITBANGER_READONLY(_readonly) \
+ bitbanger_device::static_set_readonly(*device, _readonly);
// device type definition
DECLARE_DEVICE_TYPE(BITBANGER, bitbanger_device)