Previous 15994 Revisions Next

r9854 Thursday 30th December, 2010 at 21:20:14 UTC by Wilbert Pol
wd17xx.c: Fixed status register reading after aborting a running command.
[src/mess/machine]wd17xx.c

src/mess/machine/wd17xx.c
r9853r9854
350350    /* complete command delay */
351351    int complete_command_delay;
352352
353   /* Were we busy when we received a FORCE_INT command */
354   UINT8   was_busy;
355
353356   /* Pointer to interface */
354357   const wd17xx_interface *intf;
355358};
r9853r9854
13711374   result = w->status;
13721375
13731376   /* type 1 command or force int command? */
1374   if ((w->command_type==TYPE_I) || (w->command_type==TYPE_IV))
1377   if ((w->command_type==TYPE_I) || (w->command_type==TYPE_IV && ! w->was_busy))
13751378   {
13761379      result &= ~(STA_1_IPL | STA_1_TRACK0);
13771380
r9853r9854
14701473
14711474      w->data_count = 0;
14721475      w->data_offset = 0;
1476      w->was_busy = w->status & STA_2_BUSY;
14731477      w->status &= ~STA_2_BUSY;
1474      w->status &= ~STA_2_LOST_DAT;
14751478
14761479      wd17xx_clear_drq(device);
14771480
r9853r9854
15021505      /* terminate command */
15031506      wd17xx_complete_command(device, DELAY_ERROR);
15041507
1505//      w->status_ipl = STA_1_IPL;
1506/*      w->status_ipl = 0; */
1507
15081508      w->busy_count = 0;
15091509      w->command_type = TYPE_IV;
15101510      return;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team