summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/wd_fdc.h
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2012-12-08 10:05:46 +0000
committer Olivier Galibert <galibert@pobox.com>2012-12-08 10:05:46 +0000
commit857bd55d77105f77b17532164041d0613d39ea9c (patch)
treee64f0fc14b98c30e530a48cbdd85c76887b297e9 /src/emu/machine/wd_fdc.h
parent12dace4e6ed4b182477767799e98914c887c4960 (diff)
wd_fdc: Fix sector sizes and (most) timings [O. Galibert]
Still need to fix up the timings w.r.t head loading and settling time.
Diffstat (limited to 'src/emu/machine/wd_fdc.h')
-rw-r--r--src/emu/machine/wd_fdc.h35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/emu/machine/wd_fdc.h b/src/emu/machine/wd_fdc.h
index 1a07f225a09..88db9dd194b 100644
--- a/src/emu/machine/wd_fdc.h
+++ b/src/emu/machine/wd_fdc.h
@@ -164,12 +164,18 @@ protected:
bool motor_control;
bool ready_hooked;
int clock_ratio;
+ const int *step_times;
+ int delay_register_commit;
+ int delay_command_commit;
+
+ static const int fd179x_step_times[4];
+ static const int fd176x_step_times[4];
virtual void device_start();
virtual void device_reset();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
- virtual int step_time(int mode) const;
+ virtual int calc_sector_size(UINT8 size, UINT8 command) const;
virtual int settle_time() const;
virtual void pll_reset(bool fm, attotime when) = 0;
@@ -429,6 +435,8 @@ public:
wd_fdc_digital_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
protected:
+ static const int wd_digital_step_times[4];
+
virtual void pll_reset(bool fm, attotime when);
virtual void pll_start_writing(attotime tm);
virtual void pll_commit(floppy_image_device *floppy, attotime tm);
@@ -469,11 +477,17 @@ private:
class fd1771_t : public wd_fdc_analog_t {
public:
fd1771_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ virtual int calc_sector_size(UINT8 size, UINT8 command) const;
};
class fd1781_t : public wd_fdc_analog_t {
public:
fd1781_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ virtual int calc_sector_size(UINT8 size, UINT8 command) const;
};
class fd1791_t : public wd_fdc_analog_t {
@@ -499,11 +513,17 @@ public:
class fd1795_t : public wd_fdc_analog_t {
public:
fd1795_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ virtual int calc_sector_size(UINT8 size, UINT8 command) const;
};
class fd1797_t : public wd_fdc_analog_t {
public:
fd1797_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ virtual int calc_sector_size(UINT8 size, UINT8 command) const;
};
class mb8866_t : public wd_fdc_analog_t {
@@ -534,11 +554,17 @@ public:
class fd1765_t : public wd_fdc_analog_t {
public:
fd1765_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ virtual int calc_sector_size(UINT8 size, UINT8 command) const;
};
class fd1767_t : public wd_fdc_analog_t {
public:
fd1767_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ virtual int calc_sector_size(UINT8 size, UINT8 command) const;
};
class wd2791_t : public wd_fdc_analog_t {
@@ -554,11 +580,17 @@ public:
class wd2795_t : public wd_fdc_analog_t {
public:
wd2795_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ virtual int calc_sector_size(UINT8 size, UINT8 command) const;
};
class wd2797_t : public wd_fdc_analog_t {
public:
wd2797_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ virtual int calc_sector_size(UINT8 size, UINT8 command) const;
};
class wd1770_t : public wd_fdc_digital_t {
@@ -571,7 +603,6 @@ public:
wd1772_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
protected:
- virtual int step_time(int mode) const;
virtual int settle_time() const;
};