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.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/devices/imagedev/bitbngr.h b/src/devices/imagedev/bitbngr.h
new file mode 100644
index 00000000000..4c3b3e5b9d1
--- /dev/null
+++ b/src/devices/imagedev/bitbngr.h
@@ -0,0 +1,46 @@
+// license:BSD-3-Clause
+// copyright-holders:Nathan Woods, Miodrag Milanovic
+/*********************************************************************
+
+ bitbngr.h
+
+*********************************************************************/
+
+#ifndef __BITBNGR_H__
+#define __BITBNGR_H__
+
+class bitbanger_device : public device_t,
+ public device_image_interface
+{
+public:
+ // construction/destruction
+ bitbanger_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ // image-level overrides
+ virtual bool call_load();
+ virtual bool call_create(int format_type, option_resolution *format_options);
+ virtual void call_unload();
+
+ // image device
+ virtual iodevice_t image_type() const { return IO_SERIAL; }
+ virtual bool is_readable() const { return 1; }
+ virtual bool is_writeable() const { return 1; }
+ virtual bool is_creatable() const { return 1; }
+ virtual bool must_be_loaded() const { return 0; }
+ virtual bool is_reset_on_load() const { return 0; }
+ virtual const char *file_extensions() const { return ""; }
+ virtual const option_guide *create_option_guide() const { return NULL; }
+
+ void output(UINT8 data);
+ UINT32 input(void *buffer, UINT32 length);
+
+protected:
+ // device-level overrides
+ virtual void device_start();
+ virtual void device_config_complete();
+};
+
+// device type definition
+extern const device_type BITBANGER;
+
+#endif /* __BITBNGR_H__ */