Slight refactoring of some IDE part (removed some excess else's).

This commit is contained in:
OBattler
2018-10-25 23:39:35 +02:00
parent ae0969d974
commit 7ee1cf54bc

View File

@@ -9,7 +9,7 @@
* Implementation of the IDE emulation for hard disks and ATAPI * Implementation of the IDE emulation for hard disks and ATAPI
* CD-ROM devices. * CD-ROM devices.
* *
* Version: @(#)hdc_ide.c 1.0.54 2018/10/25 * Version: @(#)hdc_ide.c 1.0.55 2018/10/25
* *
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/> * Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com> * Miran Grca, <mgrca8@gmail.com>
@@ -383,25 +383,25 @@ ide_get_max(ide_t *ide, int type)
switch(type) { switch(type) {
case TYPE_PIO: /* PIO */ case TYPE_PIO: /* PIO */
if (!IDE_PCI) if (IDE_PCI)
return 1;
return 0; /* Maximum PIO 0 for legacy PIO-only drive. */ return 0; /* Maximum PIO 0 for legacy PIO-only drive. */
else
return 4;
case TYPE_SDMA: /* SDMA */ case TYPE_SDMA: /* SDMA */
if (!IDE_PCI) if (IDE_PCI)
return -1;
else
return 2; return 2;
return -1;
case TYPE_MDMA: /* MDMA */ case TYPE_MDMA: /* MDMA */
if (!IDE_PCI) if (IDE_PCI)
return -1;
else
return 2; return 2;
return -1;
case TYPE_UDMA: /* UDMA */ case TYPE_UDMA: /* UDMA */
if (!IDE_PCI) if (IDE_PCI)
return -1;
else
return 2; return 2;
return -1;
default: default:
fatal("Unknown transfer type: %i\n", type); fatal("Unknown transfer type: %i\n", type);
return -1; return -1;
@@ -417,15 +417,15 @@ ide_get_timings(ide_t *ide, int type)
switch(type) { switch(type) {
case TIMINGS_DMA: case TIMINGS_DMA:
if (!IDE_PCI) if (IDE_PCI)
return 0;
else
return 120; return 120;
return 0;
case TIMINGS_PIO: case TIMINGS_PIO:
if (!IDE_PCI) if (IDE_PCI)
return 0;
else
return 120; return 120;
return 0;
case TIMINGS_PIO_FC: case TIMINGS_PIO_FC:
return 0; return 0;
default: default: