Previous 199869 Revisions Next

r23656 Wednesday 12th June, 2013 at 19:28:18 UTC by smf
moved a couple more variables (nw)
[src/emu/machine]idectrl.c idectrl.h idehd.c idehd.h

trunk/src/emu/machine/idehd.c
r23655r23656
263263
264264   save_item(NAME(gnetreadlock));
265265   save_item(NAME(block_count));
266
267   save_item(NAME(dma_active));
268   save_item(NAME(verify_only));
266269}
267270
268271//-------------------------------------------------
trunk/src/emu/machine/idehd.h
r23655r23656
3636   UINT16          sector_count;
3737   UINT16          block_count;
3838
39   UINT8           dma_active;
40   UINT8           verify_only;
41
3942   UINT8           master_password_enable;
4043   UINT8           user_password_enable;
4144   const UINT8 *   master_password;
trunk/src/emu/machine/idectrl.c
r23655r23656
312312   count = dev->read_sector(lba, dev->buffer);
313313
314314   /* by default, mark the buffer ready and the seek complete */
315   if (!verify_only)
315   if (!dev->verify_only)
316316      status |= IDE_STATUS_BUFFER_READY;
317317   status |= IDE_STATUS_SEEK_COMPLETE;
318318
r23655r23656
332332      error = IDE_ERROR_NONE;
333333
334334      /* signal an interrupt */
335      if (!verify_only)
335      if (!dev->verify_only)
336336         sectors_until_int--;
337337      if (sectors_until_int == 0 || dev->sector_count == 1)
338338      {
r23655r23656
341341      }
342342
343343      /* handle DMA */
344      if (dma_active)
344      if (dev->dma_active)
345345         set_dmarq(1);
346346
347347      /* if we're just verifying we can read the next sector */
348      if (verify_only)
348      if (dev->verify_only)
349349         read_buffer_empty();
350350   }
351351
r23655r23656
554554         status &= ~IDE_STATUS_BUFFER_READY;
555555
556556      /* keep going for DMA */
557      if (dma_active && dev->sector_count != 0)
557      if (dev->dma_active && dev->sector_count != 0)
558558      {
559559         set_dmarq(1);
560560      }
r23655r23656
599599         /* reset the buffer */
600600         dev->buffer_offset = 0;
601601         sectors_until_int = 1;
602         dma_active = 0;
603         verify_only = 0;
602         dev->dma_active = 0;
603         dev->verify_only = 0;
604604
605605         /* start the read going */
606606         read_first_sector();
r23655r23656
613613         /* reset the buffer */
614614         dev->buffer_offset = 0;
615615         sectors_until_int = 1;
616         dma_active = 0;
617         verify_only = 0;
616         dev->dma_active = 0;
617         dev->verify_only = 0;
618618
619619         /* start the read going */
620620         read_first_sector();
r23655r23656
628628         /* reset the buffer */
629629         dev->buffer_offset = 0;
630630         sectors_until_int = 1;
631         dma_active = 0;
632         verify_only = 1;
631         dev->dma_active = 0;
632         dev->verify_only = 1;
633633
634634         /* start the read going */
635635         read_first_sector();
r23655r23656
642642         /* reset the buffer */
643643         dev->buffer_offset = 0;
644644         sectors_until_int = dev->sector_count;
645         dma_active = 1;
646         verify_only = 0;
645         dev->dma_active = 1;
646         dev->verify_only = 0;
647647
648648         /* start the read going */
649649         read_first_sector();
r23655r23656
657657         /* reset the buffer */
658658         dev->buffer_offset = 0;
659659         sectors_until_int = 1;
660         dma_active = 0;
660         dev->dma_active = 0;
661661
662662         /* mark the buffer ready */
663663         status |= IDE_STATUS_BUFFER_READY;
r23655r23656
670670         /* reset the buffer */
671671         dev->buffer_offset = 0;
672672         sectors_until_int = 1;
673         dma_active = 0;
673         dev->dma_active = 0;
674674
675675         /* mark the buffer ready */
676676         status |= IDE_STATUS_BUFFER_READY;
r23655r23656
683683         /* reset the buffer */
684684         dev->buffer_offset = 0;
685685         sectors_until_int = dev->sector_count;
686         dma_active = 1;
686         dev->dma_active = 1;
687687
688688         /* start the read going */
689689         set_dmarq(1);
r23655r23656
695695         /* reset the buffer */
696696         dev->buffer_offset = 0;
697697         sectors_until_int = 0;
698         dma_active = 0;
698         dev->dma_active = 0;
699699
700700         /* mark the buffer ready */
701701         status |= IDE_STATUS_BUFFER_READY;
r23655r23656
803803         /* reset the buffer */
804804         dev->buffer_offset = 0;
805805         sectors_until_int = 0;
806         dma_active = 0;
806         dev->dma_active = 0;
807807
808808         /* mark the buffer ready */
809809         status |= IDE_STATUS_BUFFER_READY;
r23655r23656
12751275   command(0),
12761276   interrupt_pending(0),
12771277   sectors_until_int(0),
1278   verify_only(0),
12791278   config_unknown(0),
12801279   config_register_num(0),
12811280   cur_drive(0),
r23655r23656
12921291   command(0),
12931292   interrupt_pending(0),
12941293   sectors_until_int(0),
1295   verify_only(0),
12961294   config_unknown(0),
12971295   config_register_num(0),
12981296   cur_drive(0),
r23655r23656
13231321   save_item(NAME(interrupt_pending));
13241322
13251323   save_item(NAME(sectors_until_int));
1326
1327   save_item(NAME(dma_active));
1328
13291324   save_item(NAME(config_unknown));
13301325   save_item(NAME(config_register));
13311326   save_item(NAME(config_register_num));
trunk/src/emu/machine/idectrl.h
r23655r23656
129129   UINT8           error;
130130   UINT8           command;
131131
132   UINT8           dma_active;
133132   UINT8           interrupt_pending;
134
135133   UINT16          sectors_until_int;
136   UINT8           verify_only;
137134
138135   UINT8           config_unknown;
139136   UINT8           config_register[IDE_CONFIG_REGISTERS];

Previous 199869 Revisions Next


© 1997-2024 The MAME Team