src/mess/machine/wd17xx.c
| r2555 | r2556 | |
| 178 | 178 | emu_timer *timer, *timer_rs, *timer_ws, *timer_rid; |
| 179 | 179 | int data_direction; |
| 180 | 180 | |
| 181 | | UINT8 ipl; /* index pulse */ |
| 181 | UINT8 ipl; /* index pulse */ |
| 182 | 182 | }; |
| 183 | 183 | |
| 184 | 184 | |
| r2555 | r2556 | |
| 257 | 257 | /* this is the head currently selected */ |
| 258 | 258 | static UINT8 hd = 0; |
| 259 | 259 | |
| 260 | /* pause time when writeing/reading sector */ |
| 261 | static int wd17xx_pause_time; |
| 260 | 262 | /**************************************************************************/ |
| 261 | 263 | |
| 262 | 264 | static const device_config *wd17xx_current_image(void) |
| r2555 | r2556 | |
| 402 | 404 | wd.timer = timer_alloc(wd17xx_misc_timer_callback, NULL); |
| 403 | 405 | wd.timer_rs = timer_alloc(wd17xx_read_sector_callback, NULL); |
| 404 | 406 | wd.timer_ws = timer_alloc(wd17xx_write_sector_callback, NULL); |
| 405 | | |
| 407 | wd17xx_pause_time = 40; |
| 406 | 408 | wd17xx_reset(); |
| 407 | 409 | } |
| 408 | 410 | |
| r2555 | r2556 | |
| 1024 | 1026 | int usecs; |
| 1025 | 1027 | wd17xx_info *w = &wd; |
| 1026 | 1028 | |
| 1027 | | usecs = 10; /* How long should we wait? How about 40 micro seconds? */ |
| 1029 | usecs = wd17xx_pause_time; /* How long should we wait? How about 40 micro seconds? */ |
| 1028 | 1030 | |
| 1029 | 1031 | /* set new timer */ |
| 1030 | 1032 | timer_reset(w->timer_rs, ATTOTIME_IN_USEC(usecs)); |
| r2555 | r2556 | |
| 1038 | 1040 | int usecs; |
| 1039 | 1041 | wd17xx_info *w = &wd; |
| 1040 | 1042 | |
| 1041 | | usecs = 10; /* How long should we wait? How about 40 micro seconds? */ |
| 1043 | usecs = wd17xx_pause_time; /* How long should we wait? How about 40 micro seconds? */ |
| 1042 | 1044 | |
| 1043 | 1045 | /* set new timer */ |
| 1044 | 1046 | timer_reset(w->timer_ws, ATTOTIME_IN_USEC(usecs)); |
| 1045 | 1047 | } |
| 1046 | 1048 | |
| 1049 | void wd17xx_set_pause_time(int usec) |
| 1050 | { |
| 1051 | wd17xx_pause_time = usec; |
| 1052 | } |
| 1047 | 1053 | |
| 1048 | | |
| 1049 | 1054 | /* read the FDC status register. This clears IRQ line too */ |
| 1050 | 1055 | READ8_HANDLER ( wd17xx_status_r ) |
| 1051 | 1056 | { |