diff options
author | 2012-10-10 15:33:51 +0000 | |
---|---|---|
committer | 2012-10-10 15:33:51 +0000 | |
commit | 9d1aaf97ae5a4d5b2272f064fe6b6fe7df9dbf88 (patch) | |
tree | 74e3dc1e5558b42717e62f9b81cc7d7d47b90449 /src/mess/machine/isa_fdc.h | |
parent | 204b78cf00de0c3bd8b6afefa601cd26aa391c91 (diff) |
(mess) upd765: Modernize [O. Galibert]
Remaining TODO list:
- take WP into account
- test the amstrad, implement its observational format (edsk) using
pasti as a start. Or find the legendary amstrad IPFs. Or both.
- correct read track, the implementation is completely wrong. See
previous for testing, it's only used in protections the check the
inter-sector gaps.
- shake and bake on the amstrad, protections are the best to find bugs
in a fdc
- add the scan id commands, but nothing seems to use them
- debug the 2.88M formatting which is unreliable. Fix its IDAM/DAM
gap size on formatting too (but that's not what's making it
unreliable)
- test all the systems that were hit, and fix what needs to be fixed.
Beware that multiple problems may happen:
- upd765 may be wrong
- the driver may not be working
- the hookup may be wrong/incomplete (bitrate selection and floppy
rpm in particular)
- the driver may be too limited for the new implementation (the x68k
dma device does not handle non-instant dma yet for instance)
- report invalid command when appropriate depending on the actual chip
emulated
- add the russian clones with their real names
Diffstat (limited to 'src/mess/machine/isa_fdc.h')
-rw-r--r-- | src/mess/machine/isa_fdc.h | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/src/mess/machine/isa_fdc.h b/src/mess/machine/isa_fdc.h index bd37f4bb968..3d251391492 100644 --- a/src/mess/machine/isa_fdc.h +++ b/src/mess/machine/isa_fdc.h @@ -10,6 +10,7 @@ #include "emu.h" #include "machine/isa.h" +#include "machine/upd765.h" //************************************************************************** // TYPE DEFINITIONS @@ -18,66 +19,65 @@ // ======================> isa8_fdc_device class isa8_fdc_device : - public device_t, - public device_isa8_card_interface + public device_t, + public device_isa8_card_interface { public: - // construction/destruction - isa8_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - isa8_fdc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); + // construction/destruction + isa8_fdc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); + + required_device<pc_fdc_interface> fdc; - // optional information overrides - virtual machine_config_constructor device_mconfig_additions() const; protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - virtual void device_config_complete() { m_shortname = "isa_fdc"; } + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual UINT8 dack_r(int line); + virtual void dack_w(int line, UINT8 data); + virtual void eop_w(int state); + private: - // internal state -public: - virtual UINT8 dack_r(int line); - virtual void dack_w(int line,UINT8 data); - virtual void eop_w(int state); - - int status_register_a; - int status_register_b; - int digital_output_register; - int tape_drive_register; - int data_rate_register; - int digital_input_register; - int configuration_control_register; - - /* stored tc state - state present at pins */ - int tc_state; - /* stored dma drq state */ - int dma_state; - /* stored int state */ - int int_state; - - required_device<device_t> m_upd765; -}; + void irq_w(bool state); + void drq_w(bool state); +}; -// device type definition -extern const device_type ISA8_FDC; +class isa8_fdc_xt_device : public isa8_fdc_device { +public: + isa8_fdc_xt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual machine_config_constructor device_mconfig_additions() const; +}; -// ======================> isa8_fdc_smc_device +class isa8_fdc_at_device : public isa8_fdc_device { +public: + isa8_fdc_at_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual machine_config_constructor device_mconfig_additions() const; +}; -class isa8_fdc_smc_device : - public isa8_fdc_device -{ +class isa8_fdc_smc_device : public isa8_fdc_device { public: - // construction/destruction - isa8_fdc_smc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + isa8_fdc_smc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual machine_config_constructor device_mconfig_additions() const; +}; - // optional information overrides +class isa8_fdc_ps2_device : public isa8_fdc_device { +public: + isa8_fdc_ps2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); virtual machine_config_constructor device_mconfig_additions() const; - virtual void device_config_complete() { m_shortname = "isa_fdc_smc"; } }; +class isa8_fdc_superio_device : public isa8_fdc_device { +public: + isa8_fdc_superio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual machine_config_constructor device_mconfig_additions() const; +}; // device type definition +extern const device_type ISA8_FDC_XT; +extern const device_type ISA8_FDC_AT; extern const device_type ISA8_FDC_SMC; +extern const device_type ISA8_FDC_PS2; +extern const device_type ISA8_FDC_SUPERIO; #endif /* ISA_FDC_H */ |