From c2840cf6cb525c8a9db094539210f83ba77bf69e Mon Sep 17 00:00:00 2001 From: TC1995 Date: Tue, 16 Jun 2020 16:33:36 +0200 Subject: [PATCH] Fixed the UI for the external FDC. --- src/floppy/fdc.c | 2 +- src/floppy/fdc_pii15xb.c | 2 +- src/include/86box/fdc.h | 12 ------- src/include/86box/fdc_ext.h | 42 +++++++++++++++++++++++++ src/include/86box/fdc_pii15xb.h | 56 --------------------------------- 5 files changed, 44 insertions(+), 70 deletions(-) create mode 100644 src/include/86box/fdc_ext.h delete mode 100644 src/include/86box/fdc_pii15xb.h diff --git a/src/floppy/fdc.c b/src/floppy/fdc.c index 5301804ba..6882fea70 100644 --- a/src/floppy/fdc.c +++ b/src/floppy/fdc.c @@ -35,7 +35,7 @@ #include <86box/ui.h> #include <86box/fdd.h> #include <86box/fdc.h> -#include <86box/fdc_pii15xb.h> +#include <86box/fdc_ext.h> extern uint64_t motoron[FDD_NUM]; diff --git a/src/floppy/fdc_pii15xb.c b/src/floppy/fdc_pii15xb.c index 2f3c4c1f3..38d7c53d3 100644 --- a/src/floppy/fdc_pii15xb.c +++ b/src/floppy/fdc_pii15xb.c @@ -68,8 +68,8 @@ #include <86box/plat.h> #include <86box/ui.h> #include <86box/fdc.h> +#include <86box/fdc_ext.h> #include <86box/fdd.h> -#include <86box/fdc_pii15xb.h> #define ROM_PII_151B L"floppy/dtk/pii-151b.rom" #define ROM_PII_158B L"floppy/dtk/pii-158b.rom" diff --git a/src/include/86box/fdc.h b/src/include/86box/fdc.h index 726f7cedb..56249069b 100644 --- a/src/include/86box/fdc.h +++ b/src/include/86box/fdc.h @@ -24,10 +24,6 @@ extern int fdc_type; -/* Controller types. */ -#define FDC_NONE 0 -#define FDC_INTERNAL 1 - #define FDC_FLAG_PCJR 0x01 /* PCjr */ #define FDC_FLAG_DISKCHG_ACTLOW 0x02 /* Amstrad, PS/1, PS/2 ISA */ #define FDC_FLAG_AT 0x04 /* AT+, PS/x */ @@ -187,12 +183,4 @@ extern const device_t fdc_at_nsc_device; extern const device_t fdc_dp8473_device; #endif -extern char *fdc_ext_get_name(int fdc_ext); -extern char *fdc_ext_get_internal_name(int fdc_ext); -extern int fdc_ext_get_id(char *s); -extern int fdc_ext_get_from_internal_name(char *s); -extern const device_t *fdc_ext_get_device(int fdc_ext); -extern int fdc_ext_has_config(int fdc_ext); -extern int fdc_ext_available(int fdc_ext); - #endif /*EMU_FDC_H*/ diff --git a/src/include/86box/fdc_ext.h b/src/include/86box/fdc_ext.h new file mode 100644 index 000000000..735a06d88 --- /dev/null +++ b/src/include/86box/fdc_ext.h @@ -0,0 +1,42 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Implementation of the NEC uPD-765 and compatible floppy disk + * controller. + * + * + * + * Authors: Sarah Walker, + * Miran Grca, + * Fred N. van Kempen, + * + * Copyright 2008-2020 Sarah Walker. + * Copyright 2016-2020 Miran Grca. + * Copyright 2018-2020 Fred N. van Kempen. + */ +#ifndef EMU_FDC_EXT_H +# define EMU_FDC_EXT_H + +extern int fdc_type; + +/* Controller types. */ +#define FDC_NONE 0 +#define FDC_INTERNAL 1 + +extern const device_t fdc_pii151b_device; +extern const device_t fdc_pii158b_device; + +extern char *fdc_ext_get_name(int fdc_ext); +extern char *fdc_ext_get_internal_name(int fdc_ext); +extern int fdc_ext_get_id(char *s); +extern int fdc_ext_get_from_internal_name(char *s); +extern const device_t *fdc_ext_get_device(int fdc_ext); +extern int fdc_ext_has_config(int fdc_ext); +extern int fdc_ext_available(int fdc_ext); + +#endif /*EMU_FDC_H*/ diff --git a/src/include/86box/fdc_pii15xb.h b/src/include/86box/fdc_pii15xb.h deleted file mode 100644 index 157004474..000000000 --- a/src/include/86box/fdc_pii15xb.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. - * - * This file is part of the VARCem Project. - * - * Implementation of the DTK PII-151B and PII-158B cards. - * - * These are DP8473-based floppy controller ISA cards for XT - * class systems, and allow usage of standard and high-density - * drives on them. They have their own BIOS which takes over - * from the standard system BIOS. - * - * Author: Fred N. van Kempen, - * - * Copyright 2019 Fred N. van Kempen. - * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: - * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. - * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef FLOPPY_PII15XB_H -# define FLOPPY_PII15XB_H - -extern const device_t fdc_pii151b_device; -extern const device_t fdc_pii158b_device; - -#endif /*FLOPPY_PII15XB_H*/