mirror of
https://github.com/86Box/86Box.git
synced 2026-02-21 17:15:32 -07:00
ECP DMA jumpers, configuration via MBDMA where supported, and the Radisys Configuration device.
This commit is contained in:
@@ -215,6 +215,7 @@ int hook_enabled = 1; /* (C) Keyboar
|
||||
int test_mode = 0; /* (C) Test mode */
|
||||
char uuid[MAX_UUID_LEN] = { '\0' }; /* (C) UUID or machine identifier */
|
||||
int sound_muted = 0; /* (C) Is sound muted? */
|
||||
int jumpered_internal_ecp_dma = 0; /* (C) Jumpered internal EPC DMA */
|
||||
int inhibit_multimedia_keys; /* (G) Inhibit multimedia keys on Windows. */
|
||||
int force_10ms; /* (C) Force 10ms CPU frame intervals. */
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <86box/hdc_ide.h>
|
||||
#include <86box/hdc_ide_sff8038i.h>
|
||||
#include <86box/usb.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/smbus.h>
|
||||
#include <86box/chipset.h>
|
||||
@@ -618,6 +619,13 @@ piix_write(int func, int addr, uint8_t val, void *priv)
|
||||
}
|
||||
break;
|
||||
case 0x76:
|
||||
if (dev->type > 1)
|
||||
fregs[addr] = val & 0x87;
|
||||
else if (dev->type <= 4)
|
||||
fregs[addr] = val & 0x8f;
|
||||
if ((dev->type == 1) && machine_has_jumpered_ecp_dma(machine, MACHINE_DMA_USE_MBDMA))
|
||||
lpt1_dma(((val & 0x08) || ((val & 0x07) == 0x04)) ? 0xff : (val & 0x07));
|
||||
break;
|
||||
case 0x77:
|
||||
if (dev->type > 1)
|
||||
fregs[addr] = val & 0x87;
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
#include <86box/io.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/timer.h>
|
||||
|
||||
#include <86box/dma.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/nvr.h>
|
||||
#include <86box/hdd.h>
|
||||
@@ -319,6 +320,8 @@ sis_5513_00_pci_to_isa_write(int addr, uint8_t val, sis_5513_pci_to_isa_t *dev)
|
||||
|
||||
case 0x62: /* On-board Device DMA Control Register */
|
||||
dev->pci_conf[addr] = val;
|
||||
if (machine_has_jumpered_ecp_dma(machine, MACHINE_DMA_USE_MBDMA))
|
||||
lpt1_dma(((val & 0x08) || ((val & 0x07) == 0x04)) ? 0xff : (val & 0x07));
|
||||
break;
|
||||
|
||||
case 0x63: /* IDEIRQ Remapping Control Register */
|
||||
|
||||
18
src/config.c
18
src/config.c
@@ -798,6 +798,14 @@ load_ports(void)
|
||||
char temp[512];
|
||||
memset(temp, 0, sizeof(temp));
|
||||
|
||||
int has_jumpers = machine_has_jumpered_ecp_dma(machine, DMA_ANY);
|
||||
int def_jumper = machine_get_default_jumpered_ecp_dma(machine);
|
||||
|
||||
jumpered_internal_ecp_dma = ini_section_get_int(cat, "jumpered_internal_ecp_dma", -1);
|
||||
|
||||
if (!has_jumpers || (jumpered_internal_ecp_dma == def_jumper))
|
||||
ini_section_delete_var(cat, "jumpered_internal_ecp_dma");
|
||||
|
||||
for (int c = 0; c < (SERIAL_MAX - 1); c++) {
|
||||
sprintf(temp, "serial%d_enabled", c + 1);
|
||||
com_ports[c].enabled = !!ini_section_get_int(cat, temp, (c >= 2) ? 0 : 1);
|
||||
@@ -2050,6 +2058,8 @@ config_load(void)
|
||||
for (int i = 0; i < HDC_MAX; i++)
|
||||
hdc_current[i] = hdc_get_from_internal_name("none");
|
||||
|
||||
jumpered_internal_ecp_dma = -1;
|
||||
|
||||
com_ports[0].enabled = 1;
|
||||
com_ports[1].enabled = 1;
|
||||
for (i = 2; i < (SERIAL_MAX - 1); i++)
|
||||
@@ -2711,6 +2721,14 @@ save_ports(void)
|
||||
ini_section_t cat = ini_find_or_create_section(config, "Ports (COM & LPT)");
|
||||
char temp[512];
|
||||
|
||||
int has_jumpers = machine_has_jumpered_ecp_dma(machine, DMA_ANY);
|
||||
int def_jumper = machine_get_default_jumpered_ecp_dma(machine);
|
||||
|
||||
if (!has_jumpers || (jumpered_internal_ecp_dma == def_jumper))
|
||||
ini_section_delete_var(cat, "jumpered_internal_ecp_dma");
|
||||
else
|
||||
ini_section_set_int(cat, "jumpered_internal_ecp_dma", jumpered_internal_ecp_dma);
|
||||
|
||||
for (int c = 0; c < (SERIAL_MAX - 1); c++) {
|
||||
sprintf(temp, "serial%d_enabled", c + 1);
|
||||
if (((c < 2) && com_ports[c].enabled) || ((c >= 2) && !com_ports[c].enabled))
|
||||
|
||||
@@ -54,6 +54,7 @@ add_library(dev OBJECT
|
||||
pci_bridge.c
|
||||
phoenix_486_jumper.c
|
||||
postcard.c
|
||||
radisys_config.c
|
||||
serial.c
|
||||
serial_passthrough.c
|
||||
smbus_ali7101.c
|
||||
|
||||
@@ -25,12 +25,14 @@
|
||||
#include <86box/network.h>
|
||||
#include <86box/plat_fallthrough.h>
|
||||
|
||||
static int next_inst = 0;
|
||||
int lpt_3bc_used = 0;
|
||||
static int next_inst = 0;
|
||||
static int lpt_3bc_used = 0;
|
||||
|
||||
lpt_port_t lpt_ports[PARALLEL_MAX];
|
||||
static lpt_t *lpt1;
|
||||
|
||||
lpt_device_t lpt_devs[PARALLEL_MAX];
|
||||
lpt_port_t lpt_ports[PARALLEL_MAX];
|
||||
|
||||
lpt_device_t lpt_devs[PARALLEL_MAX];
|
||||
|
||||
const lpt_device_t lpt_none_device = {
|
||||
.name = "None",
|
||||
@@ -825,6 +827,13 @@ lpt_port_dma(lpt_t *dev, const uint8_t dma)
|
||||
lpt_log("Port %i DMA = %02X\n", dev->id, dma);
|
||||
}
|
||||
|
||||
void
|
||||
lpt1_dma(const uint8_t dma)
|
||||
{
|
||||
if (lpt1 != NULL)
|
||||
lpt_port_dma(lpt1, dma);
|
||||
}
|
||||
|
||||
void
|
||||
lpt_port_remove(lpt_t *dev)
|
||||
{
|
||||
@@ -894,6 +903,9 @@ lpt_close(void *priv)
|
||||
|
||||
}
|
||||
|
||||
if (lpt1 == dev)
|
||||
lpt1 = NULL;
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
@@ -962,7 +974,10 @@ lpt_init(const device_t *info)
|
||||
|
||||
dev->addr = 0xffff;
|
||||
dev->irq = 0xff;
|
||||
dev->dma = 0xff;
|
||||
if ((jumpered_internal_ecp_dma >= 0) && (jumpered_internal_ecp_dma != 4))
|
||||
dev->dma = jumpered_internal_ecp_dma;
|
||||
else
|
||||
dev->dma = 0xff;
|
||||
dev->enable_irq = 0x00;
|
||||
dev->cfg_regs_enabled = 0;
|
||||
dev->ext = 0;
|
||||
@@ -1005,6 +1020,9 @@ lpt_init(const device_t *info)
|
||||
if (!(info->local & 0xfff00000))
|
||||
next_inst++;
|
||||
|
||||
if (lpt1 == NULL)
|
||||
lpt1 = dev;
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
|
||||
89
src/device/radisys_config.c
Normal file
89
src/device/radisys_config.c
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* 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 Radisys EPC-2012 Configuration registers.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2025 Miran Grca.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include "cpu.h"
|
||||
#include <86box/timer.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/lpt.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/plat_unused.h>
|
||||
|
||||
typedef struct radisys_config_t {
|
||||
uint8_t regs[2];
|
||||
} radisys_config_t;
|
||||
|
||||
static uint8_t
|
||||
radisys_config_read(uint16_t port, void *priv)
|
||||
{
|
||||
radisys_config_t *dev = (radisys_config_t *) priv;
|
||||
uint8_t ret = dev->regs[port & 0x0001];
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
radisys_config_write(uint16_t port, uint8_t val, void *priv)
|
||||
{
|
||||
radisys_config_t *dev = (radisys_config_t *) priv;
|
||||
|
||||
dev->regs[port & 0x0001] = val;
|
||||
|
||||
if (!(port & 0x0001) && machine_has_jumpered_ecp_dma(machine, MACHINE_DMA_USE_CONFIG))
|
||||
lpt1_dma((val & 0x02) ? 3 : 1);
|
||||
}
|
||||
|
||||
static void
|
||||
radisys_config_close(void *priv)
|
||||
{
|
||||
radisys_config_t *dev = (radisys_config_t *) priv;
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
static void *
|
||||
radisys_config_init(UNUSED(const device_t *info))
|
||||
{
|
||||
/* We have to return something non-NULL. */
|
||||
radisys_config_t *dev = (radisys_config_t *) calloc(1, sizeof(radisys_config_t));
|
||||
|
||||
/* 370h is also supported. */
|
||||
io_sethandler(0x0270, 0x0002, radisys_config_read, NULL, NULL, radisys_config_write, NULL, NULL, dev);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
const device_t radisys_config_device = {
|
||||
.name = "Radisys EPC-2012 Configuration",
|
||||
.internal_name = "radisys_config",
|
||||
.flags = 0,
|
||||
.local = 0,
|
||||
.init = radisys_config_init,
|
||||
.close = radisys_config_close,
|
||||
.reset = NULL,
|
||||
.available = NULL,
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
@@ -159,6 +159,7 @@ extern int confirm_exit; /* (C) enable exit confirmation */
|
||||
extern int confirm_save; /* (C) enable save confirmation */
|
||||
extern int enable_discord; /* (C) enable Discord integration */
|
||||
extern int force_10ms; /* (C) force 10ms CPU frame interval */
|
||||
extern int jumpered_internal_ecp_dma; /* (C) Jumpered internal EPC DMA */
|
||||
extern int other_ide_present; /* IDE controllers from non-IDE cards are present */
|
||||
extern int other_scsi_present; /* SCSI controllers from non-SCSI cards are present */
|
||||
extern int is_pcjr; /* The current machine is PCjr. */
|
||||
|
||||
@@ -212,4 +212,6 @@ extern const device_t nec_mate_unk_device;
|
||||
|
||||
extern const device_t phoenix_486_jumper_device;
|
||||
extern const device_t phoenix_486_jumper_pci_device;
|
||||
|
||||
extern const device_t radisys_config_device;
|
||||
#endif /*EMU_CHIPSET_H*/
|
||||
|
||||
@@ -139,6 +139,7 @@ extern void lpt_set_cnfgb_readout(lpt_t *dev, const uint8_t cnfgb
|
||||
extern void lpt_port_setup(lpt_t *dev, uint16_t port);
|
||||
extern void lpt_port_irq(lpt_t *dev, uint8_t irq);
|
||||
extern void lpt_port_dma(lpt_t *dev, uint8_t dma);
|
||||
extern void lpt1_dma(const uint8_t dma);
|
||||
extern void lpt_port_remove(lpt_t *dev);
|
||||
extern void lpt1_remove_ams(lpt_t *dev);
|
||||
|
||||
|
||||
@@ -143,6 +143,24 @@
|
||||
#define MACHINE_PIIX3 (MACHINE_PIIX | MACHINE_USB)
|
||||
#define MACHINE_PIIX4 (MACHINE_PIIX3 | MACHINE_ACPI)
|
||||
|
||||
#define MACHINE_DMA_0 0x00000001
|
||||
#define MACHINE_DMA_1 0x00000002
|
||||
#define MACHINE_DMA_2 0x00000004
|
||||
#define MACHINE_DMA_3 0x00000008
|
||||
#define MACHINE_DMA_DISABLED 0x00000010
|
||||
#define MACHINE_DMA_5 0x00000020
|
||||
#define MACHINE_DMA_6 0x00000040
|
||||
#define MACHINE_DMA_7 0x00000080
|
||||
#define MACHINE_DMA_JUMPERS_MASK (MACHINE_DMA_0 | MACHINE_DMA_1 | MACHINE_DMA_2 | MACHINE_DMA_3 | \
|
||||
MACHINE_DMA_DISABLED | MACHINE_DMA_5 | MACHINE_DMA_6 | MACHINE_DMA_7)
|
||||
#define MACHINE_DMA_USE_MBDMA 0x00000100
|
||||
#define MACHINE_DMA_USE_CONFIG 0x00000200
|
||||
#define MACHINE_DMA_EXT_CONFIG (MACHINE_DMA_USE_MBDMA | MACHINE_DMA_USE_CONFIG)
|
||||
|
||||
#define DMA_DISABLED 4
|
||||
#define DMA_NONE -1
|
||||
#define DMA_ANY -1
|
||||
|
||||
#define IS_ARCH(m, a) ((machines[m].bus_flags & (a)) ? 1 : 0)
|
||||
#define IS_AT(m) (((machines[m].bus_flags & (MACHINE_BUS_ISA16 | MACHINE_BUS_EISA | MACHINE_BUS_VLB | MACHINE_BUS_MCA | MACHINE_BUS_PCI | MACHINE_BUS_PCMCIA | MACHINE_BUS_AGP | MACHINE_BUS_AC97)) && !(machines[m].bus_flags & MACHINE_PC98)) ? 1 : 0)
|
||||
|
||||
@@ -328,6 +346,8 @@ typedef struct _machine_ {
|
||||
const machine_memory_t ram;
|
||||
int ram_granularity;
|
||||
int nvrmask;
|
||||
int jumpered_ecp_dma;
|
||||
int default_jumpered_ecp_dma;
|
||||
#ifdef EMU_DEVICE_H
|
||||
const device_t *kbc_device;
|
||||
#else
|
||||
@@ -366,14 +386,14 @@ extern int machine;
|
||||
extern void * machine_snd;
|
||||
|
||||
/* Core functions. */
|
||||
extern int machine_count(void);
|
||||
extern int machine_available(int m);
|
||||
extern const char *machine_getname(void);
|
||||
extern const char *machine_getname_ex(int m);
|
||||
extern const char *machine_get_internal_name(void);
|
||||
extern const char *machine_get_nvr_name(void);
|
||||
extern int machine_get_machine_from_internal_name(const char *s);
|
||||
extern void machine_init(void);
|
||||
extern int machine_count(void);
|
||||
extern int machine_available(int m);
|
||||
extern const char * machine_getname(void);
|
||||
extern const char * machine_getname_ex(int m);
|
||||
extern const char * machine_get_internal_name(void);
|
||||
extern const char * machine_get_nvr_name(void);
|
||||
extern int machine_get_machine_from_internal_name(const char *s);
|
||||
extern void machine_init(void);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t *machine_get_kbc_device(int m);
|
||||
extern const device_t *machine_get_device(int m);
|
||||
@@ -383,53 +403,57 @@ extern const device_t *machine_get_vid_device(int m);
|
||||
extern const device_t *machine_get_snd_device(int m);
|
||||
extern const device_t *machine_get_net_device(int m);
|
||||
#endif
|
||||
extern const char *machine_get_internal_name_ex(int m);
|
||||
extern const char *machine_get_nvr_name_ex(int m);
|
||||
extern int machine_get_nvrmask(int m);
|
||||
extern int machine_has_flags(int m, int flags);
|
||||
extern int machine_has_bus(int m, int bus_flags);
|
||||
extern int machine_has_cartridge(int m);
|
||||
extern int machine_get_min_ram(int m);
|
||||
extern int machine_get_max_ram(int m);
|
||||
extern int machine_get_ram_granularity(int m);
|
||||
extern int machine_get_type(int m);
|
||||
extern int machine_get_chipset(int m);
|
||||
extern void machine_close(void);
|
||||
extern int machine_has_mouse(void);
|
||||
extern int machine_is_sony(void);
|
||||
extern const char * machine_get_internal_name_ex(int m);
|
||||
extern const char * machine_get_nvr_name_ex(int m);
|
||||
extern int machine_get_nvrmask(int m);
|
||||
extern int machine_has_flags(int m, int flags);
|
||||
extern int machine_has_bus(int m, int bus_flags);
|
||||
extern int machine_has_cartridge(int m);
|
||||
extern int machine_has_jumpered_ecp_dma(int m, int dma);
|
||||
extern int machine_get_default_jumpered_ecp_dma(int m);
|
||||
extern int machine_map_jumpered_ecp_dma(int dma);
|
||||
extern const char * machine_get_jumpered_ecp_dma_name(int dma);
|
||||
extern int machine_get_min_ram(int m);
|
||||
extern int machine_get_max_ram(int m);
|
||||
extern int machine_get_ram_granularity(int m);
|
||||
extern int machine_get_type(int m);
|
||||
extern int machine_get_chipset(int m);
|
||||
extern void machine_close(void);
|
||||
extern int machine_has_mouse(void);
|
||||
extern int machine_is_sony(void);
|
||||
|
||||
extern uint8_t machine_get_p1_default(void);
|
||||
extern uint8_t machine_get_p1(void);
|
||||
extern void machine_set_p1_default(uint8_t val);
|
||||
extern void machine_set_p1(uint8_t val);
|
||||
extern void machine_and_p1(uint8_t val);
|
||||
extern void machine_init_p1(void);
|
||||
extern uint8_t machine_handle_p1(uint8_t write, uint8_t val);
|
||||
extern uint32_t machine_get_gpio_default(void);
|
||||
extern uint32_t machine_get_gpio(void);
|
||||
extern void machine_set_gpio_default(uint32_t val);
|
||||
extern void machine_set_gpio(uint32_t val);
|
||||
extern void machine_and_gpio(uint32_t val);
|
||||
extern void machine_init_gpio(void);
|
||||
extern uint32_t machine_handle_gpio(uint8_t write, uint32_t val);
|
||||
extern uint32_t machine_get_gpio_acpi_default(void);
|
||||
extern uint32_t machine_get_gpio_acpi(void);
|
||||
extern void machine_set_gpio_acpi_default(uint32_t val);
|
||||
extern void machine_set_gpio_acpi(uint32_t val);
|
||||
extern void machine_and_gpio_acpi(uint32_t val);
|
||||
extern void machine_init_gpio_acpi(void);
|
||||
extern uint32_t machine_handle_gpio_acpi(uint8_t write, uint32_t val);
|
||||
extern uint8_t machine_get_p1_default(void);
|
||||
extern uint8_t machine_get_p1(void);
|
||||
extern void machine_set_p1_default(uint8_t val);
|
||||
extern void machine_set_p1(uint8_t val);
|
||||
extern void machine_and_p1(uint8_t val);
|
||||
extern void machine_init_p1(void);
|
||||
extern uint8_t machine_handle_p1(uint8_t write, uint8_t val);
|
||||
extern uint32_t machine_get_gpio_default(void);
|
||||
extern uint32_t machine_get_gpio(void);
|
||||
extern void machine_set_gpio_default(uint32_t val);
|
||||
extern void machine_set_gpio(uint32_t val);
|
||||
extern void machine_and_gpio(uint32_t val);
|
||||
extern void machine_init_gpio(void);
|
||||
extern uint32_t machine_handle_gpio(uint8_t write, uint32_t val);
|
||||
extern uint32_t machine_get_gpio_acpi_default(void);
|
||||
extern uint32_t machine_get_gpio_acpi(void);
|
||||
extern void machine_set_gpio_acpi_default(uint32_t val);
|
||||
extern void machine_set_gpio_acpi(uint32_t val);
|
||||
extern void machine_and_gpio_acpi(uint32_t val);
|
||||
extern void machine_init_gpio_acpi(void);
|
||||
extern uint32_t machine_handle_gpio_acpi(uint8_t write, uint32_t val);
|
||||
|
||||
/* Initialization functions for boards and systems. */
|
||||
extern void machine_common_init(const machine_t *);
|
||||
extern void machine_common_init(const machine_t *);
|
||||
|
||||
/* m_amstrad.c */
|
||||
extern int machine_pc1512_init(const machine_t *);
|
||||
extern int machine_pc1640_init(const machine_t *);
|
||||
extern int machine_pc200_init(const machine_t *);
|
||||
extern int machine_ppc512_init(const machine_t *);
|
||||
extern int machine_pc2086_init(const machine_t *);
|
||||
extern int machine_pc3086_init(const machine_t *);
|
||||
extern int machine_pc1512_init(const machine_t *);
|
||||
extern int machine_pc1640_init(const machine_t *);
|
||||
extern int machine_pc200_init(const machine_t *);
|
||||
extern int machine_ppc512_init(const machine_t *);
|
||||
extern int machine_pc2086_init(const machine_t *);
|
||||
extern int machine_pc3086_init(const machine_t *);
|
||||
|
||||
/* m_at.c */
|
||||
extern void machine_at_common_init_ex(const machine_t *, int type);
|
||||
@@ -456,92 +480,92 @@ extern int machine_at_siemens_init(const machine_t *); // Siemens PCD-2L. N8233
|
||||
|
||||
/* m_at_286.c */
|
||||
/* ISA */
|
||||
extern int machine_at_mr286_init(const machine_t *);
|
||||
extern int machine_at_pc8_init(const machine_t *);
|
||||
extern int machine_at_m290_init(const machine_t *);
|
||||
extern int machine_at_mr286_init(const machine_t *);
|
||||
extern int machine_at_pc8_init(const machine_t *);
|
||||
extern int machine_at_m290_init(const machine_t *);
|
||||
|
||||
/* C&T PC/AT */
|
||||
extern int machine_at_dells200_init(const machine_t *);
|
||||
extern int machine_at_super286c_init(const machine_t *);
|
||||
extern int machine_at_at122_init(const machine_t *);
|
||||
extern int machine_at_tuliptc7_init(const machine_t *);
|
||||
extern int machine_at_dells200_init(const machine_t *);
|
||||
extern int machine_at_super286c_init(const machine_t *);
|
||||
extern int machine_at_at122_init(const machine_t *);
|
||||
extern int machine_at_tuliptc7_init(const machine_t *);
|
||||
|
||||
/* GC103 */
|
||||
extern int machine_at_quadt286_init(const machine_t *);
|
||||
extern void machine_at_headland_common_init(const machine_t *model, int type);
|
||||
extern int machine_at_tg286m_init(const machine_t *);
|
||||
extern int machine_at_quadt286_init(const machine_t *);
|
||||
extern void machine_at_headland_common_init(const machine_t *model, int type);
|
||||
extern int machine_at_tg286m_init(const machine_t *);
|
||||
/* Wells American A*Star with custom award BIOS. */
|
||||
extern int machine_at_wellamerastar_init(const machine_t *);
|
||||
extern int machine_at_wellamerastar_init(const machine_t *);
|
||||
|
||||
/* NEAT */
|
||||
extern int machine_at_ataripc4_init(const machine_t *);
|
||||
extern int machine_at_neat_ami_init(const machine_t *);
|
||||
extern int machine_at_3302_init(const machine_t *);
|
||||
extern int machine_at_px286_init(const machine_t *);
|
||||
extern int machine_at_ataripc4_init(const machine_t *);
|
||||
extern int machine_at_neat_ami_init(const machine_t *);
|
||||
extern int machine_at_3302_init(const machine_t *);
|
||||
extern int machine_at_px286_init(const machine_t *);
|
||||
|
||||
/* SCAT */
|
||||
extern int machine_at_gw286ct_init(const machine_t *);
|
||||
extern int machine_at_gdc212m_init(const machine_t *);
|
||||
extern int machine_at_award286_init(const machine_t *);
|
||||
extern int machine_at_super286tr_init(const machine_t *);
|
||||
extern int machine_at_drsm35286_init(const machine_t *);
|
||||
extern int machine_at_deskmaster286_init(const machine_t *);
|
||||
extern int machine_at_spc4200p_init(const machine_t *);
|
||||
extern int machine_at_spc4216p_init(const machine_t *);
|
||||
extern int machine_at_spc4620p_init(const machine_t *);
|
||||
extern int machine_at_senor_scat286_init(const machine_t *);
|
||||
extern int machine_at_gw286ct_init(const machine_t *);
|
||||
extern int machine_at_gdc212m_init(const machine_t *);
|
||||
extern int machine_at_award286_init(const machine_t *);
|
||||
extern int machine_at_super286tr_init(const machine_t *);
|
||||
extern int machine_at_drsm35286_init(const machine_t *);
|
||||
extern int machine_at_deskmaster286_init(const machine_t *);
|
||||
extern int machine_at_spc4200p_init(const machine_t *);
|
||||
extern int machine_at_spc4216p_init(const machine_t *);
|
||||
extern int machine_at_spc4620p_init(const machine_t *);
|
||||
extern int machine_at_senor_scat286_init(const machine_t *);
|
||||
|
||||
/* m_at_386sx.c */
|
||||
/* ISA */
|
||||
extern int machine_at_pc916sx_init(const machine_t *);
|
||||
extern int machine_at_quadt386sx_init(const machine_t *);
|
||||
extern int machine_at_pc916sx_init(const machine_t *);
|
||||
extern int machine_at_quadt386sx_init(const machine_t *);
|
||||
|
||||
/* ACC 2036 */
|
||||
extern int machine_at_pbl300sx_init(const machine_t *);
|
||||
extern int machine_at_pbl300sx_init(const machine_t *);
|
||||
|
||||
/* ALi M1217 */
|
||||
extern int machine_at_arb1374_init(const machine_t *);
|
||||
extern int machine_at_sbc350a_init(const machine_t *);
|
||||
extern int machine_at_flytech386_init(const machine_t *);
|
||||
extern int machine_at_325ax_init(const machine_t *);
|
||||
extern int machine_at_mr1217_init(const machine_t *);
|
||||
extern int machine_at_arb1374_init(const machine_t *);
|
||||
extern int machine_at_sbc350a_init(const machine_t *);
|
||||
extern int machine_at_flytech386_init(const machine_t *);
|
||||
extern int machine_at_325ax_init(const machine_t *);
|
||||
extern int machine_at_mr1217_init(const machine_t *);
|
||||
|
||||
/* ALi M1409 */
|
||||
extern int machine_at_acer100t_init(const machine_t *);
|
||||
extern int machine_at_acer100t_init(const machine_t *);
|
||||
|
||||
/* HT18 */
|
||||
extern int machine_at_ama932j_init(const machine_t *);
|
||||
extern int machine_at_ama932j_init(const machine_t *);
|
||||
|
||||
/* Intel 82335 */
|
||||
extern int machine_at_adi386sx_init(const machine_t *);
|
||||
extern int machine_at_shuttle386sx_init(const machine_t *);
|
||||
extern int machine_at_adi386sx_init(const machine_t *);
|
||||
extern int machine_at_shuttle386sx_init(const machine_t *);
|
||||
|
||||
/* NEAT */
|
||||
extern int machine_at_cmdsl386sx16_init(const machine_t *);
|
||||
extern int machine_at_neat_init(const machine_t *);
|
||||
extern int machine_at_cmdsl386sx16_init(const machine_t *);
|
||||
extern int machine_at_neat_init(const machine_t *);
|
||||
|
||||
/* NEATsx */
|
||||
extern int machine_at_if386sx_init(const machine_t *);
|
||||
extern int machine_at_if386sx_init(const machine_t *);
|
||||
|
||||
/* OPTi 291 */
|
||||
extern int machine_at_awardsx_init(const machine_t *);
|
||||
extern int machine_at_awardsx_init(const machine_t *);
|
||||
|
||||
/* SCAMP */
|
||||
extern int machine_at_cmdsl386sx25_init(const machine_t *);
|
||||
extern int machine_at_dataexpert386sx_init(const machine_t *);
|
||||
extern int machine_at_dells333sl_init(const machine_t *);
|
||||
extern int machine_at_spc6033p_init(const machine_t *);
|
||||
extern int machine_at_cmdsl386sx25_init(const machine_t *);
|
||||
extern int machine_at_dataexpert386sx_init(const machine_t *);
|
||||
extern int machine_at_dells333sl_init(const machine_t *);
|
||||
extern int machine_at_spc6033p_init(const machine_t *);
|
||||
|
||||
/* SCATsx */
|
||||
extern int machine_at_kmxc02_init(const machine_t *);
|
||||
extern int machine_at_kmxc02_init(const machine_t *);
|
||||
|
||||
/* WD76C10 */
|
||||
extern int machine_at_wd76c10_init(const machine_t *);
|
||||
extern int machine_at_wd76c10_init(const machine_t *);
|
||||
|
||||
/* m_at_m6117.c */
|
||||
/* ALi M6117D */
|
||||
extern int machine_at_pja511m_init(const machine_t *);
|
||||
extern int machine_at_prox1332_init(const machine_t *);
|
||||
extern int machine_at_pja511m_init(const machine_t *);
|
||||
extern int machine_at_prox1332_init(const machine_t *);
|
||||
|
||||
/* m_at_386dx_486.c */
|
||||
/* Note to jriwanek: When merging this into my branch, please make
|
||||
|
||||
@@ -487,6 +487,7 @@ machine_at_epc2102_init(const machine_t *model)
|
||||
device_add(&piix3_device);
|
||||
device_add(&kbc_ps2_intel_ami_pci_device);
|
||||
device_add_params(&i82091aa_device, (void *) I82091AA_022);
|
||||
device_add(&radisys_config_device);
|
||||
device_add(&sst_flash_39sf010_device);
|
||||
|
||||
return ret;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -49,6 +49,8 @@ SettingsPorts::~SettingsPorts()
|
||||
void
|
||||
SettingsPorts::save()
|
||||
{
|
||||
jumpered_internal_ecp_dma = ui->comboBoxLptECPDMA->currentData().toInt();
|
||||
|
||||
for (int i = 0; i < PARALLEL_MAX; i++) {
|
||||
auto *cbox = findChild<QComboBox *>(QString("comboBoxLpt%1").arg(i + 1));
|
||||
auto *checkBox = findChild<QCheckBox *>(QString("checkBoxParallel%1").arg(i + 1));
|
||||
@@ -73,7 +75,52 @@ SettingsPorts::onCurrentMachineChanged(int machineId)
|
||||
{
|
||||
this->machineId = machineId;
|
||||
|
||||
int c = 0;
|
||||
int c = 0;
|
||||
|
||||
auto *lptEcpDmaModel = ui->comboBoxLptECPDMA->model();
|
||||
auto removeRowsEcpDma = lptEcpDmaModel->rowCount();
|
||||
|
||||
int has_jumpers = !!machine_has_jumpered_ecp_dma(machineId, DMA_ANY);
|
||||
|
||||
int selectedRow = -2;
|
||||
int first = -2;
|
||||
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
int j = machine_map_jumpered_ecp_dma(i);
|
||||
|
||||
if ((has_jumpers && ((j == DMA_NONE) || !machine_has_jumpered_ecp_dma(machineId, j))) ||
|
||||
(!has_jumpers && (j != DMA_NONE)))
|
||||
continue;
|
||||
|
||||
if (first == -2)
|
||||
first = j;
|
||||
|
||||
QString name = tr(machine_get_jumpered_ecp_dma_name(i));
|
||||
pclog("Found valid DMA channel: %s\n", name.toUtf8().data());
|
||||
int row = lptEcpDmaModel->rowCount();
|
||||
lptEcpDmaModel->insertRow(row);
|
||||
auto idx = lptEcpDmaModel->index(row, 0);
|
||||
|
||||
lptEcpDmaModel->setData(idx, name, Qt::DisplayRole);
|
||||
lptEcpDmaModel->setData(idx, j, Qt::UserRole);
|
||||
|
||||
if (j == jumpered_internal_ecp_dma)
|
||||
selectedRow = row - removeRowsEcpDma;
|
||||
|
||||
c++;
|
||||
}
|
||||
|
||||
if (selectedRow == -2)
|
||||
selectedRow = first;
|
||||
|
||||
lptEcpDmaModel->removeRows(0, removeRowsEcpDma);
|
||||
ui->comboBoxLptECPDMA->setCurrentIndex(-1);
|
||||
ui->comboBoxLptECPDMA->setCurrentIndex(selectedRow);
|
||||
|
||||
if ((c == 1) || !has_jumpers)
|
||||
ui->comboBoxLptECPDMA->setEnabled(false);
|
||||
else
|
||||
ui->comboBoxLptECPDMA->setEnabled(true);
|
||||
|
||||
// LPT Device
|
||||
QComboBox * cbox[PARALLEL_MAX] = { 0 };
|
||||
|
||||
@@ -27,15 +27,35 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayoutLptDevs">
|
||||
<layout class="QGridLayout" name="gridLayoutLptECPDMA">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelLptECPDMA">
|
||||
<property name="text">
|
||||
<string>Internal LPT ECP DMA:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="comboBoxLptECPDMA">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelLpt1">
|
||||
<property name="text">
|
||||
<string>LPT1 Device:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="comboBoxLpt1">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
@@ -48,21 +68,21 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="pushButtonConfigureLpt1">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelLpt2">
|
||||
<property name="text">
|
||||
<string>LPT2 Device:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<item row="2" column="2">
|
||||
<widget class="QComboBox" name="comboBoxLpt2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
@@ -75,21 +95,21 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<item row="2" column="3">
|
||||
<widget class="QPushButton" name="pushButtonConfigureLpt2">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="labelLpt3">
|
||||
<property name="text">
|
||||
<string>LPT3 Device:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<item row="3" column="2">
|
||||
<widget class="QComboBox" name="comboBoxLpt3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
@@ -102,21 +122,21 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<item row="3" column="3">
|
||||
<widget class="QPushButton" name="pushButtonConfigureLpt3">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="labelLpt4">
|
||||
<property name="text">
|
||||
<string>LPT4 Device:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<item row="4" column="2">
|
||||
<widget class="QComboBox" name="comboBoxLpt4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
@@ -129,7 +149,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<item row="4" column="3">
|
||||
<widget class="QPushButton" name="pushButtonConfigureLpt4">
|
||||
<property name="text">
|
||||
<string>Configure</string>
|
||||
|
||||
Reference in New Issue
Block a user