This commit is contained in:
Jasmine Iwanek
2022-01-31 05:32:16 -05:00
parent 7c4395a54c
commit bc5147a428
4 changed files with 35 additions and 17 deletions

View File

@@ -1076,6 +1076,12 @@ load_ports(void)
for (c = 0; c < SERIAL_MAX; c++) {
sprintf(temp, "serial%d_enabled", c + 1);
serial_enabled[c] = !!config_get_int(cat, temp, (c >= 2) ? 0 : 1);
/*
sprintf(temp, "serial%d_device", c + 1);
p = (char *) config_get_string(cat, temp, "none");
com_ports[c].device = com_device_get_from_internal_name(p);
*/
}
for (c = 0; c < PARALLEL_MAX; c++) {
@@ -2554,6 +2560,15 @@ save_ports(void)
config_delete_var(cat, temp);
else
config_set_int(cat, temp, serial_enabled[c]);
/*
sprintf(temp, "serial%d_device", c + 1);
if (com_ports[c].device == 0)
config_delete_var(cat, temp);
else
config_set_string(cat, temp,
(char *) com_device_get_internal_name(com_ports[c].device));
*/
}
for (c = 0; c < PARALLEL_MAX; c++) {

View File

@@ -378,9 +378,7 @@ device_get_name(const device_t *d, int bus, char *name)
name[0] = 0x00;
if (bus) {
if (d->flags & DEVICE_LPT)
sbus = "LPT";
else if (d->flags & DEVICE_ISA)
if (d->flags & DEVICE_ISA)
sbus = (d->flags & DEVICE_AT) ? "ISA16" : "ISA";
else if (d->flags & DEVICE_CBUS)
sbus = "C-BUS";
@@ -396,6 +394,10 @@ device_get_name(const device_t *d, int bus, char *name)
sbus = "AGP";
else if (d->flags & DEVICE_AC97)
sbus = "AMR";
else if (d->flags & DEVICE_COM)
sbus = "COM";
else if (d->flags & DEVICE_LPT)
sbus = "LPT";
if (sbus != NULL) {
/* First concatenate [<Bus>] before the device's name. */
@@ -406,7 +408,7 @@ device_get_name(const device_t *d, int bus, char *name)
/* Then change string from ISA16 to ISA if applicable. */
if (!strcmp(sbus, "ISA16"))
sbus = "ISA";
else if (!strcmp(sbus, "LPT")) {
else if (!strcmp(sbus, "COM")|| !strcmp(sbus, "LPT")) {
sbus = NULL;
strcat(name, d->name);
return;

View File

@@ -55,18 +55,19 @@
enum {
DEVICE_NOT_WORKING = 1, /* does not currently work correctly and will be disabled in a release build */
DEVICE_LPT = 2, /* requires a parallel port */
DEVICE_PCJR = 4, /* requires an IBM PCjr */
DEVICE_AT = 8, /* requires an AT-compatible system */
DEVICE_PS2 = 0x10, /* requires a PS/1 or PS/2 system */
DEVICE_ISA = 0x20, /* requires the ISA bus */
DEVICE_CBUS = 0x40, /* requires the C-BUS bus */
DEVICE_MCA = 0x80, /* requires the MCA bus */
DEVICE_EISA = 0x100, /* requires the EISA bus */
DEVICE_VLB = 0x200, /* requires the PCI bus */
DEVICE_PCI = 0x400, /* requires the VLB bus */
DEVICE_AGP = 0x800, /* requires the AGP bus */
DEVICE_AC97 = 0x1000 /* requires the AC'97 bus */
DEVICE_PCJR = 2, /* requires an IBM PCjr */
DEVICE_AT = 4, /* requires an AT-compatible system */
DEVICE_PS2 = 8, /* requires a PS/1 or PS/2 system */
DEVICE_ISA = 0x10, /* requires the ISA bus */
DEVICE_CBUS = 0x20, /* requires the C-BUS bus */
DEVICE_MCA = 0x40, /* requires the MCA bus */
DEVICE_EISA = 0x80, /* requires the EISA bus */
DEVICE_VLB = 0x100, /* requires the PCI bus */
DEVICE_PCI = 0x200, /* requires the VLB bus */
DEVICE_AGP = 0x400, /* requires the AGP bus */
DEVICE_AC97 = 0x800, /* requires the AC'97 bus */
DEVICE_COM = 0x1000, /* requires a serial port */
DEVICE_LPT = 0x2000 /* requires a parallel port */
};

View File

@@ -85,7 +85,6 @@ static const SOUND_CARD sound_cards[] =
{
{ "none", NULL },
{ "internal", NULL },
{ "pssj_isa", &pssj_isa_device },
{ "adlib", &adlib_device },
{ "adlibgold", &adgold_device },
{ "azt2316a", &azt2316a_device },
@@ -105,6 +104,7 @@ static const SOUND_CARD sound_cards[] =
#if defined(DEV_BRANCH) && defined(USE_PAS16)
{ "pas16", &pas16_device },
#endif
{ "pssj_isa", &pssj_isa_device },
{ "wss", &wss_device },
{ "adlib_mca", &adlib_mca_device },
{ "ncraudio", &ncr_business_audio_device },