Previous 15994 Revisions Next

r2556 Tuesday 6th May, 2008 at 09:35:00 UTC by Miodrag Milanović
[WD17xx] made new call wd17xx_set_pause_time to be able to set pause time, default is 40usec
[src/mess/machine]b2m.c wd17xx.c wd17xx.h

src/mess/machine/b2m.c
r2555r2556
374374MACHINE_START(b2m)
375375{
376376   wd17xx_init(machine, WD_TYPE_1793, NULL , NULL);   
377   wd17xx_set_pause_time(10);
377378   msm8251_init(&b2m_msm8251_interface);
378379}
379380
src/mess/machine/wd17xx.c
r2555r2556
178178   emu_timer   *timer, *timer_rs, *timer_ws, *timer_rid;
179179   int      data_direction;
180180
181   UINT8   ipl;               /* index pulse */
181   UINT8   ipl;               /* index pulse */   
182182};
183183
184184
r2555r2556
257257/* this is the head currently selected */
258258static UINT8 hd = 0;
259259
260/* pause time when writeing/reading sector */
261static int wd17xx_pause_time;
260262/**************************************************************************/
261263
262264static const device_config *wd17xx_current_image(void)
r2555r2556
402404   wd.timer = timer_alloc(wd17xx_misc_timer_callback, NULL);
403405   wd.timer_rs = timer_alloc(wd17xx_read_sector_callback, NULL);
404406   wd.timer_ws = timer_alloc(wd17xx_write_sector_callback, NULL);
405
407   wd17xx_pause_time = 40;
406408   wd17xx_reset();
407409}
408410
r2555r2556
10241026   int usecs;
10251027   wd17xx_info *w = &wd;
10261028
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? */
10281030
10291031   /* set new timer */
10301032   timer_reset(w->timer_rs, ATTOTIME_IN_USEC(usecs));
r2555r2556
10381040   int usecs;
10391041   wd17xx_info *w = &wd;
10401042
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? */
10421044
10431045   /* set new timer */
10441046   timer_reset(w->timer_ws, ATTOTIME_IN_USEC(usecs));
10451047}
10461048
1049void wd17xx_set_pause_time(int usec)
1050{
1051   wd17xx_pause_time = usec;
1052}
10471053
1048
10491054/* read the FDC status register. This clears IRQ line too */
10501055 READ8_HANDLER ( wd17xx_status_r )
10511056{
src/mess/machine/wd17xx.h
r2555r2556
7373READ8_HANDLER( wd17xx_r );
7474WRITE8_HANDLER( wd17xx_w );
7575
76void wd17xx_set_pause_time(int usec); /* default is 40 usec if not set */
7677#endif /* WD179X_H */
7778
7879

Previous 15994 Revisions Next


© 1998-2018 The MESS Team