summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/sonydriv.h
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2013-02-22 10:53:15 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2013-02-22 10:53:15 +0000
commit2b25f4a87f24cbac5480d658085517283ad67b3b (patch)
tree05259271a2a59ca6e6ee706ab96a8de0b909813b /src/mess/machine/sonydriv.h
parentb25a1c367a3409865f2b049851a0235526b96978 (diff)
Moved some mess devices to proper place (nw)
Diffstat (limited to 'src/mess/machine/sonydriv.h')
-rw-r--r--src/mess/machine/sonydriv.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/mess/machine/sonydriv.h b/src/mess/machine/sonydriv.h
new file mode 100644
index 00000000000..059a33238cd
--- /dev/null
+++ b/src/mess/machine/sonydriv.h
@@ -0,0 +1,70 @@
+/*********************************************************************
+
+ sonydriv.h
+
+ Apple/Sony 3.5" floppy drive emulation (to be interfaced with applefdc.c)
+
+*********************************************************************/
+
+#ifndef SONYDRIV_H
+#define SONYDRIV_H
+
+#include "image.h"
+#include "imagedev/flopdrv.h"
+
+#if 0
+enum
+{
+ SONY_FLOPPY_ALLOW400K = 0x0001,
+ SONY_FLOPPY_ALLOW800K = 0x0002,
+
+ SONY_FLOPPY_SUPPORT2IMG = 0x4000,
+ SONY_FLOPPY_EXT_SPEED_CONTROL = 0x8000 // means the speed is controlled by computer
+};
+#endif
+
+void sony_set_lines(device_t *device,UINT8 lines);
+void sony_set_enable_lines(device_t *device,int enable_mask);
+void sony_set_sel_line(device_t *device,int sel);
+
+void sony_set_speed(int speed);
+
+UINT8 sony_read_data(device_t *device);
+void sony_write_data(device_t *device,UINT8 data);
+int sony_read_status(device_t *device);
+
+class sonydriv_floppy_image_device : public legacy_floppy_image_device
+{
+public:
+ // construction/destruction
+ sonydriv_floppy_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ virtual void call_unload();
+protected:
+ virtual void device_start();
+};
+
+// device type definition
+extern const device_type FLOPPY_SONY;
+
+#define MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADD(_config) \
+ MCFG_DEVICE_ADD(FLOPPY_0, FLOPPY_SONY, 0) \
+ MCFG_DEVICE_CONFIG(_config) \
+ MCFG_DEVICE_ADD(FLOPPY_1, FLOPPY_SONY, 0) \
+ MCFG_DEVICE_CONFIG(_config)
+
+#define MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADDITIONAL_ADD(_config) \
+ MCFG_DEVICE_ADD(FLOPPY_2, FLOPPY_SONY, 0) \
+ MCFG_DEVICE_CONFIG(_config) \
+ MCFG_DEVICE_ADD(FLOPPY_3, FLOPPY_SONY, 0) \
+ MCFG_DEVICE_CONFIG(_config)
+
+#define MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_MODIFY(_config) \
+ MCFG_DEVICE_MODIFY(FLOPPY_0) \
+ MCFG_DEVICE_CONFIG(_config) \
+ MCFG_DEVICE_MODIFY(FLOPPY_1) \
+ MCFG_DEVICE_CONFIG(_config)
+
+
+
+#endif /* SONYDRIV_H */