diff options
author | 2015-09-13 08:41:44 +0200 | |
---|---|---|
committer | 2015-09-13 08:41:44 +0200 | |
commit | f88cefad27a1737c76e09d99c9fb43e173506081 (patch) | |
tree | 2d8167d03579c46e226471747eb4407bd00ed6fa /src/devices/imagedev/bitbngr.h | |
parent | e92ac9e0fa8e99869894bea00589bbb526be30aa (diff) |
Move all devices into separate part of src tree (nw)
Diffstat (limited to 'src/devices/imagedev/bitbngr.h')
-rw-r--r-- | src/devices/imagedev/bitbngr.h | 46 |
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__ */ |