trunk/src/emu/machine/idehd.h
r241583 | r241584 | |
44 | 44 | |
45 | 45 | virtual int read_sector(UINT32 lba, void *buffer) = 0; |
46 | 46 | virtual int write_sector(UINT32 lba, const void *buffer) = 0; |
| 47 | virtual attotime seek_time(); |
47 | 48 | |
48 | 49 | void ide_build_identify_device(); |
49 | 50 | |
r241583 | r241584 | |
72 | 73 | void security_error(); |
73 | 74 | void read_first_sector(); |
74 | 75 | void soft_reset(); |
75 | | attotime seek_time(); |
76 | 76 | |
77 | 77 | UINT32 m_cur_lba; |
78 | 78 | UINT16 m_block_count; |
r241583 | r241584 | |
93 | 93 | ide_hdd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
94 | 94 | ide_hdd_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); |
95 | 95 | |
96 | | virtual int read_sector(UINT32 lba, void *buffer) { if (m_disk == NULL) return 0; return hard_disk_read(m_disk, lba, buffer); } |
97 | | virtual int write_sector(UINT32 lba, const void *buffer) { if (m_disk == NULL) return 0; return hard_disk_write(m_disk, lba, buffer); } |
98 | | |
99 | 96 | protected: |
100 | 97 | // device-level overrides |
101 | 98 | virtual void device_start(); |
r241583 | r241584 | |
104 | 101 | // optional information overrides |
105 | 102 | virtual machine_config_constructor device_mconfig_additions() const; |
106 | 103 | |
| 104 | virtual int read_sector(UINT32 lba, void *buffer) { if (m_disk == NULL) return 0; return hard_disk_read(m_disk, lba, buffer); } |
| 105 | virtual int write_sector(UINT32 lba, const void *buffer) { if (m_disk == NULL) return 0; return hard_disk_write(m_disk, lba, buffer); } |
107 | 106 | virtual UINT8 calculate_status(); |
108 | 107 | |
109 | 108 | chd_file *m_handle; |