trunk/src/emu/machine/idectrl.c
| r23655 | r23656 | |
| 312 | 312 | count = dev->read_sector(lba, dev->buffer); |
| 313 | 313 | |
| 314 | 314 | /* by default, mark the buffer ready and the seek complete */ |
| 315 | | if (!verify_only) |
| 315 | if (!dev->verify_only) |
| 316 | 316 | status |= IDE_STATUS_BUFFER_READY; |
| 317 | 317 | status |= IDE_STATUS_SEEK_COMPLETE; |
| 318 | 318 | |
| r23655 | r23656 | |
| 332 | 332 | error = IDE_ERROR_NONE; |
| 333 | 333 | |
| 334 | 334 | /* signal an interrupt */ |
| 335 | | if (!verify_only) |
| 335 | if (!dev->verify_only) |
| 336 | 336 | sectors_until_int--; |
| 337 | 337 | if (sectors_until_int == 0 || dev->sector_count == 1) |
| 338 | 338 | { |
| r23655 | r23656 | |
| 341 | 341 | } |
| 342 | 342 | |
| 343 | 343 | /* handle DMA */ |
| 344 | | if (dma_active) |
| 344 | if (dev->dma_active) |
| 345 | 345 | set_dmarq(1); |
| 346 | 346 | |
| 347 | 347 | /* if we're just verifying we can read the next sector */ |
| 348 | | if (verify_only) |
| 348 | if (dev->verify_only) |
| 349 | 349 | read_buffer_empty(); |
| 350 | 350 | } |
| 351 | 351 | |
| r23655 | r23656 | |
| 554 | 554 | status &= ~IDE_STATUS_BUFFER_READY; |
| 555 | 555 | |
| 556 | 556 | /* keep going for DMA */ |
| 557 | | if (dma_active && dev->sector_count != 0) |
| 557 | if (dev->dma_active && dev->sector_count != 0) |
| 558 | 558 | { |
| 559 | 559 | set_dmarq(1); |
| 560 | 560 | } |
| r23655 | r23656 | |
| 599 | 599 | /* reset the buffer */ |
| 600 | 600 | dev->buffer_offset = 0; |
| 601 | 601 | sectors_until_int = 1; |
| 602 | | dma_active = 0; |
| 603 | | verify_only = 0; |
| 602 | dev->dma_active = 0; |
| 603 | dev->verify_only = 0; |
| 604 | 604 | |
| 605 | 605 | /* start the read going */ |
| 606 | 606 | read_first_sector(); |
| r23655 | r23656 | |
| 613 | 613 | /* reset the buffer */ |
| 614 | 614 | dev->buffer_offset = 0; |
| 615 | 615 | sectors_until_int = 1; |
| 616 | | dma_active = 0; |
| 617 | | verify_only = 0; |
| 616 | dev->dma_active = 0; |
| 617 | dev->verify_only = 0; |
| 618 | 618 | |
| 619 | 619 | /* start the read going */ |
| 620 | 620 | read_first_sector(); |
| r23655 | r23656 | |
| 628 | 628 | /* reset the buffer */ |
| 629 | 629 | dev->buffer_offset = 0; |
| 630 | 630 | sectors_until_int = 1; |
| 631 | | dma_active = 0; |
| 632 | | verify_only = 1; |
| 631 | dev->dma_active = 0; |
| 632 | dev->verify_only = 1; |
| 633 | 633 | |
| 634 | 634 | /* start the read going */ |
| 635 | 635 | read_first_sector(); |
| r23655 | r23656 | |
| 642 | 642 | /* reset the buffer */ |
| 643 | 643 | dev->buffer_offset = 0; |
| 644 | 644 | sectors_until_int = dev->sector_count; |
| 645 | | dma_active = 1; |
| 646 | | verify_only = 0; |
| 645 | dev->dma_active = 1; |
| 646 | dev->verify_only = 0; |
| 647 | 647 | |
| 648 | 648 | /* start the read going */ |
| 649 | 649 | read_first_sector(); |
| r23655 | r23656 | |
| 657 | 657 | /* reset the buffer */ |
| 658 | 658 | dev->buffer_offset = 0; |
| 659 | 659 | sectors_until_int = 1; |
| 660 | | dma_active = 0; |
| 660 | dev->dma_active = 0; |
| 661 | 661 | |
| 662 | 662 | /* mark the buffer ready */ |
| 663 | 663 | status |= IDE_STATUS_BUFFER_READY; |
| r23655 | r23656 | |
| 670 | 670 | /* reset the buffer */ |
| 671 | 671 | dev->buffer_offset = 0; |
| 672 | 672 | sectors_until_int = 1; |
| 673 | | dma_active = 0; |
| 673 | dev->dma_active = 0; |
| 674 | 674 | |
| 675 | 675 | /* mark the buffer ready */ |
| 676 | 676 | status |= IDE_STATUS_BUFFER_READY; |
| r23655 | r23656 | |
| 683 | 683 | /* reset the buffer */ |
| 684 | 684 | dev->buffer_offset = 0; |
| 685 | 685 | sectors_until_int = dev->sector_count; |
| 686 | | dma_active = 1; |
| 686 | dev->dma_active = 1; |
| 687 | 687 | |
| 688 | 688 | /* start the read going */ |
| 689 | 689 | set_dmarq(1); |
| r23655 | r23656 | |
| 695 | 695 | /* reset the buffer */ |
| 696 | 696 | dev->buffer_offset = 0; |
| 697 | 697 | sectors_until_int = 0; |
| 698 | | dma_active = 0; |
| 698 | dev->dma_active = 0; |
| 699 | 699 | |
| 700 | 700 | /* mark the buffer ready */ |
| 701 | 701 | status |= IDE_STATUS_BUFFER_READY; |
| r23655 | r23656 | |
| 803 | 803 | /* reset the buffer */ |
| 804 | 804 | dev->buffer_offset = 0; |
| 805 | 805 | sectors_until_int = 0; |
| 806 | | dma_active = 0; |
| 806 | dev->dma_active = 0; |
| 807 | 807 | |
| 808 | 808 | /* mark the buffer ready */ |
| 809 | 809 | status |= IDE_STATUS_BUFFER_READY; |
| r23655 | r23656 | |
| 1275 | 1275 | command(0), |
| 1276 | 1276 | interrupt_pending(0), |
| 1277 | 1277 | sectors_until_int(0), |
| 1278 | | verify_only(0), |
| 1279 | 1278 | config_unknown(0), |
| 1280 | 1279 | config_register_num(0), |
| 1281 | 1280 | cur_drive(0), |
| r23655 | r23656 | |
| 1292 | 1291 | command(0), |
| 1293 | 1292 | interrupt_pending(0), |
| 1294 | 1293 | sectors_until_int(0), |
| 1295 | | verify_only(0), |
| 1296 | 1294 | config_unknown(0), |
| 1297 | 1295 | config_register_num(0), |
| 1298 | 1296 | cur_drive(0), |
| r23655 | r23656 | |
| 1323 | 1321 | save_item(NAME(interrupt_pending)); |
| 1324 | 1322 | |
| 1325 | 1323 | save_item(NAME(sectors_until_int)); |
| 1326 | | |
| 1327 | | save_item(NAME(dma_active)); |
| 1328 | | |
| 1329 | 1324 | save_item(NAME(config_unknown)); |
| 1330 | 1325 | save_item(NAME(config_register)); |
| 1331 | 1326 | save_item(NAME(config_register_num)); |