From 7ee1cf54bcd82cd6acfa690cf92c9e1f8d00fb59 Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 25 Oct 2018 23:39:35 +0200 Subject: [PATCH] Slight refactoring of some IDE part (removed some excess else's). --- src/disk/hdc_ide.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index 03e194c15..8a9896735 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -9,7 +9,7 @@ * Implementation of the IDE emulation for hard disks and ATAPI * 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, * Miran Grca, @@ -383,25 +383,25 @@ ide_get_max(ide_t *ide, int type) switch(type) { case TYPE_PIO: /* PIO */ - if (!IDE_PCI) - return 0; /* Maximum PIO 0 for legacy PIO-only drive. */ - else - return 4; + if (IDE_PCI) + return 1; + + return 0; /* Maximum PIO 0 for legacy PIO-only drive. */ case TYPE_SDMA: /* SDMA */ - if (!IDE_PCI) - return -1; - else + if (IDE_PCI) return 2; + + return -1; case TYPE_MDMA: /* MDMA */ - if (!IDE_PCI) - return -1; - else + if (IDE_PCI) return 2; + + return -1; case TYPE_UDMA: /* UDMA */ - if (!IDE_PCI) - return -1; - else + if (IDE_PCI) return 2; + + return -1; default: fatal("Unknown transfer type: %i\n", type); return -1; @@ -417,15 +417,15 @@ ide_get_timings(ide_t *ide, int type) switch(type) { case TIMINGS_DMA: - if (!IDE_PCI) - return 0; - else + if (IDE_PCI) return 120; + + return 0; case TIMINGS_PIO: - if (!IDE_PCI) - return 0; - else + if (IDE_PCI) return 120; + + return 0; case TIMINGS_PIO_FC: return 0; default: