trunk/src/mess/machine/wd1772.c
| r18866 | r18867 | |
| 38 | 38 | const device_type WD1770x = &device_creator<wd1770_t>; |
| 39 | 39 | const device_type WD1772x = &device_creator<wd1772_t>; |
| 40 | 40 | const device_type WD1773x = &device_creator<wd1773_t>; |
| 41 | const device_type WD2793x = &device_creator<wd2793_t>; |
| 41 | 42 | |
| 42 | 43 | wd177x_t::wd177x_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) : |
| 43 | 44 | device_t(mconfig, type, name, tag, owner, clock) |
| r18866 | r18867 | |
| 1364 | 1365 | if(read_one_bit(limit)) |
| 1365 | 1366 | return; |
| 1366 | 1367 | if(cur_live.bit_counter != 16 |
| 1367 | | && cur_live.shift_reg != 0x4489 |
| 1368 | | && cur_live.shift_reg != 0x5224) |
| 1368 | && cur_live.shift_reg != 0x4489 |
| 1369 | && cur_live.shift_reg != 0x5224) |
| 1369 | 1370 | break; |
| 1370 | 1371 | |
| 1371 | 1372 | // Incorrect, hmmm |
| r18866 | r18867 | |
| 1777 | 1778 | { |
| 1778 | 1779 | return false; |
| 1779 | 1780 | } |
| 1781 | |
| 1782 | wd2793_t::wd2793_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : wd177x_t(mconfig, WD2793x, "WD2793", tag, owner, clock) |
| 1783 | { |
| 1784 | } |
| 1785 | |
| 1786 | bool wd2793_t::has_motor() const |
| 1787 | { |
| 1788 | return false; |
| 1789 | } |
| 1790 | |
| 1791 | bool wd2793_t::has_side_check() const |
| 1792 | { |
| 1793 | return false; |
| 1794 | } |
trunk/src/mess/machine/wd1772.h
| r18866 | r18867 | |
| 4 | 4 | #include "emu.h" |
| 5 | 5 | #include "imagedev/floppy.h" |
| 6 | 6 | |
| 7 | | #define MCFG_WD1770x_ADD(_tag, _clock) \ |
| 7 | #define MCFG_WD1770x_ADD(_tag, _clock) \ |
| 8 | 8 | MCFG_DEVICE_ADD(_tag, WD1770x, _clock) |
| 9 | 9 | |
| 10 | | #define MCFG_WD1772x_ADD(_tag, _clock) \ |
| 10 | #define MCFG_WD1772x_ADD(_tag, _clock) \ |
| 11 | 11 | MCFG_DEVICE_ADD(_tag, WD1772x, _clock) |
| 12 | 12 | |
| 13 | | #define MCFG_WD1773x_ADD(_tag, _clock) \ |
| 13 | #define MCFG_WD1773x_ADD(_tag, _clock) \ |
| 14 | 14 | MCFG_DEVICE_ADD(_tag, WD1773x, _clock) |
| 15 | 15 | |
| 16 | #define MCFG_WD2793x_ADD(_tag, _clock) \ |
| 17 | MCFG_DEVICE_ADD(_tag, WD2793x, _clock) |
| 18 | |
| 16 | 19 | class wd177x_t : public device_t { |
| 17 | 20 | public: |
| 18 | 21 | typedef delegate<void (bool state)> line_cb; |
| r18866 | r18867 | |
| 26 | 29 | |
| 27 | 30 | void cmd_w(UINT8 val); |
| 28 | 31 | UINT8 status_r(); |
| 32 | DECLARE_READ8_MEMBER( status_r ) { return status_r(); } |
| 33 | DECLARE_WRITE8_MEMBER( cmd_w ) { cmd_w(data); } |
| 29 | 34 | |
| 30 | 35 | void track_w(UINT8 val); |
| 31 | 36 | UINT8 track_r(); |
| 37 | DECLARE_READ8_MEMBER( track_r ) { return track_r(); } |
| 38 | DECLARE_WRITE8_MEMBER( track_w ) { track_w(data); } |
| 32 | 39 | |
| 33 | 40 | void sector_w(UINT8 val); |
| 34 | 41 | UINT8 sector_r(); |
| 42 | DECLARE_READ8_MEMBER( sector_r ) { return sector_r(); } |
| 43 | DECLARE_WRITE8_MEMBER( sector_w ) { sector_w(data); } |
| 35 | 44 | |
| 36 | 45 | void data_w(UINT8 val); |
| 37 | 46 | UINT8 data_r(); |
| 47 | DECLARE_READ8_MEMBER( data_r ) { return data_r(); } |
| 48 | DECLARE_WRITE8_MEMBER( data_w ) { data_w(data); } |
| 38 | 49 | |
| 39 | 50 | void gen_w(int reg, UINT8 val); |
| 40 | 51 | UINT8 gen_r(int reg); |
| r18866 | r18867 | |
| 314 | 325 | virtual bool has_side_check() const; |
| 315 | 326 | }; |
| 316 | 327 | |
| 328 | class wd2793_t : public wd177x_t { |
| 329 | public: |
| 330 | wd2793_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 331 | |
| 332 | protected: |
| 333 | virtual bool has_motor() const; |
| 334 | virtual bool has_side_check() const; |
| 335 | }; |
| 336 | |
| 317 | 337 | extern const device_type WD1770x; |
| 318 | 338 | extern const device_type WD1772x; |
| 319 | 339 | extern const device_type WD1773x; |
| 340 | extern const device_type WD2793x; |
| 320 | 341 | |
| 321 | 342 | #endif |