summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/mc6843.h
diff options
context:
space:
mode:
author Curt Coder <curtcoder@mail.com>2013-03-07 15:28:25 +0000
committer Curt Coder <curtcoder@mail.com>2013-03-07 15:28:25 +0000
commit76ac08a0b805820f12be6dac3daee17f8eb26953 (patch)
tree74a1a81d8e2a6cf242d498978b3573015c4d7a0c /src/emu/machine/mc6843.h
parent7e0b63efa9978e8611337c4ac80ffc293bb527ee (diff)
Moved some files to where they belong. (nw)
Diffstat (limited to 'src/emu/machine/mc6843.h')
-rw-r--r--src/emu/machine/mc6843.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/emu/machine/mc6843.h b/src/emu/machine/mc6843.h
new file mode 100644
index 00000000000..677899c817f
--- /dev/null
+++ b/src/emu/machine/mc6843.h
@@ -0,0 +1,59 @@
+/**********************************************************************
+
+ Copyright (C) Antoine Mine' 2007
+
+ Motorola 6843 Floppy Disk Controller emulation.
+
+**********************************************************************/
+
+#ifndef MC6843_H
+#define MC6843_H
+
+class mc6843_device : public device_t
+{
+public:
+ mc6843_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ~mc6843_device() { global_free(m_token); }
+
+ // access to legacy token
+ void *token() const { assert(m_token != NULL); return m_token; }
+protected:
+ // device-level overrides
+ virtual void device_config_complete();
+ virtual void device_start();
+ virtual void device_reset();
+private:
+ // internal state
+ void *m_token;
+};
+
+extern const device_type MC6843;
+
+
+
+/* ---------- configuration ------------ */
+
+struct mc6843_interface
+{
+ void ( * irq_func ) ( device_t *device, int state );
+};
+
+
+#define MCFG_MC6843_ADD(_tag, _intrf) \
+ MCFG_DEVICE_ADD(_tag, MC6843, 0) \
+ MCFG_DEVICE_CONFIG(_intrf)
+
+#define MCFG_MC6843_REMOVE(_tag) \
+ MCFG_DEVICE_REMOVE(_tag)
+
+
+/* ---------- functions ------------ */
+
+extern DECLARE_READ8_DEVICE_HANDLER ( mc6843_r );
+extern DECLARE_WRITE8_DEVICE_HANDLER ( mc6843_w );
+
+extern void mc6843_set_drive ( device_t *device, int drive );
+extern void mc6843_set_side ( device_t *device, int side );
+extern void mc6843_set_index_pulse ( device_t *device, int index_pulse );
+
+#endif