src/device

This commit is contained in:
Jasmine Iwanek
2022-03-13 09:28:28 -04:00
parent a52f0cca79
commit a7edaf0608
21 changed files with 1047 additions and 781 deletions

View File

@@ -354,13 +354,16 @@ bug_close(UNUSED(void *priv))
bug_read, NULL, NULL, bug_write, NULL, NULL, NULL); bug_read, NULL, NULL, bug_write, NULL, NULL, NULL);
} }
const device_t bugger_device = { const device_t bugger_device = {
"ISA/PCI Bus Bugger", .name = "ISA/PCI Bus Bugger",
"bugger", .internal_name = "bugger",
DEVICE_ISA | DEVICE_AT, .flags = DEVICE_ISA | DEVICE_AT,
0, .local = 0,
bug_init, bug_close, NULL, .init = bug_init,
{ NULL }, NULL, NULL, .close = bug_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };

View File

@@ -714,11 +714,15 @@ cassette_init(const device_t *info)
const device_t cassette_device = { const device_t cassette_device = {
"IBM PC/PCjr Cassette Device", .name = "IBM PC/PCjr Cassette Device",
"cassette", .internal_name = "cassette",
0, .flags = 0,
0, .local = 0,
cassette_init, cassette_close, NULL, .init = cassette_init,
{ NULL }, NULL, NULL, .close = cassette_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };

View File

@@ -296,25 +296,32 @@ gl518sm_init(const device_t *info)
return dev; return dev;
} }
/* GL518SM on SMBus address 2Ch */ /* GL518SM on SMBus address 2Ch */
const device_t gl518sm_2c_device = { const device_t gl518sm_2c_device = {
"Genesys Logic GL518SM Hardware Monitor", .name = "Genesys Logic GL518SM Hardware Monitor",
"gl518sm_2c", .internal_name = "gl518sm_2c",
DEVICE_ISA, .flags = DEVICE_ISA,
0x2c, .local = 0x2c,
gl518sm_init, gl518sm_close, NULL, .init = gl518sm_init,
{ NULL }, NULL, NULL, .close = gl518sm_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
/* GL518SM on SMBus address 2Dh */ /* GL518SM on SMBus address 2Dh */
const device_t gl518sm_2d_device = { const device_t gl518sm_2d_device = {
"Genesys Logic GL518SM Hardware Monitor", .name = "Genesys Logic GL518SM Hardware Monitor",
"gl518sm_2d", .internal_name = "gl518sm_2d",
DEVICE_ISA, .flags = DEVICE_ISA,
0x2d, .local = 0x2d,
gl518sm_init, gl518sm_close, NULL, .init = gl518sm_init,
{ NULL }, NULL, NULL, .close = gl518sm_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };

View File

@@ -243,24 +243,32 @@ lm75_init(const device_t *info)
/* LM75 on SMBus address 4Ah, reporting temperatures[1]. */ /* LM75 on SMBus address 4Ah, reporting temperatures[1]. */
const device_t lm75_1_4a_device = { const device_t lm75_1_4a_device = {
"National Semiconductor LM75 Temperature Sensor", .name = "National Semiconductor LM75 Temperature Sensor",
"lm75_1_4a", .internal_name = "lm75_1_4a",
DEVICE_ISA, .flags = DEVICE_ISA,
0x14a, .local = 0x14a,
lm75_init, lm75_close, NULL, .init = lm75_init,
{ NULL }, NULL, NULL, .close = lm75_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
/* LM75 secondary/tertiary temperature sensors built into /* LM75 secondary/tertiary temperature sensors built into
the Winbond W83781D family. Not to be used stand-alone. */ the Winbond W83781D family. Not to be used stand-alone. */
const device_t lm75_w83781d_device = { const device_t lm75_w83781d_device = {
"Winbond W83781D Secondary Temperature Sensor", .name = "Winbond W83781D Secondary Temperature Sensor",
"lm75_w83781d", .internal_name = "lm75_w83781d",
DEVICE_ISA, .flags = DEVICE_ISA,
0, .local = 0,
lm75_init, lm75_close, NULL, .init = lm75_init,
{ NULL }, NULL, NULL, .close = lm75_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };

View File

@@ -783,75 +783,93 @@ lm78_init(const device_t *info)
return dev; return dev;
} }
/* National Semiconductor LM78 on ISA and SMBus. */ /* National Semiconductor LM78 on ISA and SMBus. */
const device_t lm78_device = { const device_t lm78_device = {
"National Semiconductor LM78 Hardware Monitor", .name = "National Semiconductor LM78 Hardware Monitor",
"lm78", .internal_name = "lm78",
DEVICE_ISA, .flags = DEVICE_ISA,
0x290 | LM78_I2C, .local = 0x290 | LM78_I2C,
lm78_init, lm78_close, lm78_reset, .init = lm78_init,
{ NULL }, NULL, NULL, .close = lm78_close,
NULL .reset = lm78_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
/* Winbond W83781D on ISA and SMBus. */ /* Winbond W83781D on ISA and SMBus. */
const device_t w83781d_device = { const device_t w83781d_device = {
"Winbond W83781D Hardware Monitor", .name = "Winbond W83781D Hardware Monitor",
"w83781d", .internal_name = "w83781d",
DEVICE_ISA, .flags = DEVICE_ISA,
0x290 | LM78_I2C | LM78_W83781D, .local = 0x290 | LM78_I2C | LM78_W83781D,
lm78_init, lm78_close, lm78_reset, .init = lm78_init,
{ NULL }, NULL, NULL, .close = lm78_close,
NULL .reset = lm78_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
/* Winbond W83781D on ISA and SMBus. */ /* Winbond W83781D on ISA and SMBus. */
const device_t w83781d_p5a_device = { const device_t w83781d_p5a_device = {
"Winbond W83781D Hardware Monitor (ASUS P5A)", .name = "Winbond W83781D Hardware Monitor (ASUS P5A)",
"w83781d_p5a", .internal_name = "w83781d_p5a",
DEVICE_ISA, .flags = DEVICE_ISA,
0x290 | LM78_I2C | LM78_W83781D | LM78_P5A, .local = 0x290 | LM78_I2C | LM78_W83781D | LM78_P5A,
lm78_init, lm78_close, lm78_reset, .init = lm78_init,
{ NULL }, NULL, NULL, .close = lm78_close,
NULL .reset = lm78_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
/* The AS99127F is an ASIC manufactured by Holtek for ASUS, containing an /* The AS99127F is an ASIC manufactured by Holtek for ASUS, containing an
I2C-only W83781D clone with additional voltages, GPIOs and fan control. */ I2C-only W83781D clone with additional voltages, GPIOs and fan control. */
const device_t as99127f_device = { const device_t as99127f_device = {
"ASUS AS99127F Rev. 1 Hardware Monitor", .name = "ASUS AS99127F Rev. 1 Hardware Monitor",
"as99137f", .internal_name = "as99137f",
DEVICE_ISA, .flags = DEVICE_ISA,
LM78_I2C | LM78_AS99127F_REV1, .local = LM78_I2C | LM78_AS99127F_REV1,
lm78_init, lm78_close, lm78_reset, .init = lm78_init,
{ NULL }, NULL, NULL, .close = lm78_close,
NULL .reset = lm78_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
/* Rev. 2 is manufactured by Winbond and differs only in GPI registers. */ /* Rev. 2 is manufactured by Winbond and differs only in GPI registers. */
const device_t as99127f_rev2_device = { const device_t as99127f_rev2_device = {
"ASUS AS99127F Rev. 2 Hardware Monitor", .name = "ASUS AS99127F Rev. 2 Hardware Monitor",
"as99127f_rev2", .internal_name = "as99127f_rev2",
DEVICE_ISA, .flags = DEVICE_ISA,
LM78_I2C | LM78_AS99127F_REV2, .local = LM78_I2C | LM78_AS99127F_REV2,
lm78_init, lm78_close, lm78_reset, .init = lm78_init,
{ NULL }, NULL, NULL, .close = lm78_close,
NULL .reset = lm78_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
/* Winbond W83782D on ISA and SMBus. */ /* Winbond W83782D on ISA and SMBus. */
const device_t w83782d_device = { const device_t w83782d_device = {
"Winbond W83782D Hardware Monitor", .name = "Winbond W83782D Hardware Monitor",
"w83783d", .internal_name = "w83783d",
DEVICE_ISA, .flags = DEVICE_ISA,
0x290 | LM78_I2C | LM78_W83782D, .local = 0x290 | LM78_I2C | LM78_W83782D,
lm78_init, lm78_close, lm78_reset, .init = lm78_init,
{ NULL }, NULL, NULL, .close = lm78_close,
NULL .reset = lm78_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };

View File

@@ -204,13 +204,16 @@ vt82c686_init(const device_t *info)
return dev; return dev;
} }
const device_t via_vt82c686_hwm_device = { const device_t via_vt82c686_hwm_device = {
"VIA VT82C686 Integrated Hardware Monitor", .name = "VIA VT82C686 Integrated Hardware Monitor",
"via_vt82c686_hwm", .internal_name = "via_vt82c686_hwm",
DEVICE_ISA, .flags = DEVICE_ISA,
0, .local = 0,
vt82c686_init, vt82c686_close, NULL, .init = vt82c686_init,
{ NULL }, NULL, NULL, .close = vt82c686_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };

View File

@@ -111,18 +111,16 @@ ibm_5161_init(const device_t *info)
return dev; return dev;
} }
const device_t ibm_5161_device = {
const device_t ibm_5161_device = .name = "IBM Expansion Unit (5161)",
{ .internal_name = "ibm_5161",
"IBM Expansion Unit (5161)", .flags = DEVICE_ISA,
"ibm_5161", .local = 0,
DEVICE_ISA, .init = ibm_5161_init,
0, .close = ibm_5161_close,
ibm_5161_init, .reset = NULL,
ibm_5161_close, { .available = NULL },
NULL, .speed_changed = NULL,
{ NULL }, .force_redraw = NULL,
NULL, .config = NULL
NULL,
NULL
}; };

View File

@@ -693,13 +693,17 @@ static const device_config_t ibmxt_config[] = {
}; };
static const device_t ibmxt_device = { static const device_t ibmxt_device = {
"IBM PC/XT Memory Expansion", .name = "IBM PC/XT Memory Expansion",
"ibmxt", .internal_name = "ibmxt",
DEVICE_ISA, .flags = DEVICE_ISA,
ISAMEM_IBMXT_CARD, .local = ISAMEM_IBMXT_CARD,
isamem_init, isamem_close, NULL, .init = isamem_init,
{ NULL }, NULL, NULL, .close = isamem_close,
ibmxt_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = ibmxt_config
}; };
static const device_config_t genericxt_config[] = { static const device_config_t genericxt_config[] = {
@@ -719,16 +723,19 @@ static const device_config_t genericxt_config[] = {
}; };
static const device_t genericxt_device = { static const device_t genericxt_device = {
"Generic PC/XT Memory Expansion", .name = "Generic PC/XT Memory Expansion",
"genericxt", .internal_name = "genericxt",
DEVICE_ISA, .flags = DEVICE_ISA,
ISAMEM_GENXT_CARD, .local = ISAMEM_GENXT_CARD,
isamem_init, isamem_close, NULL, .init = isamem_init,
{ NULL }, NULL, NULL, .close = isamem_close,
genericxt_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = genericxt_config
}; };
static const device_config_t ibmat_config[] = { static const device_config_t ibmat_config[] = {
// clang-format off // clang-format off
{ {
@@ -746,16 +753,19 @@ static const device_config_t ibmat_config[] = {
}; };
static const device_t ibmat_device = { static const device_t ibmat_device = {
"IBM PC/AT Memory Expansion", .name = "IBM PC/AT Memory Expansion",
"ibmat", .internal_name = "ibmat",
DEVICE_ISA, .flags = DEVICE_ISA,
ISAMEM_IBMAT_CARD, .local = ISAMEM_IBMAT_CARD,
isamem_init, isamem_close, NULL, .init = isamem_init,
{ NULL }, NULL, NULL, .close = isamem_close,
ibmat_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = ibmat_config
}; };
static const device_config_t genericat_config[] = { static const device_config_t genericat_config[] = {
// clang-format off // clang-format off
{ {
@@ -773,16 +783,19 @@ static const device_config_t genericat_config[] = {
}; };
static const device_t genericat_device = { static const device_t genericat_device = {
"Generic PC/AT Memory Expansion", .name = "Generic PC/AT Memory Expansion",
"genericat", .internal_name = "genericat",
DEVICE_ISA, .flags = DEVICE_ISA,
ISAMEM_GENAT_CARD, .local = ISAMEM_GENAT_CARD,
isamem_init, isamem_close, NULL, .init = isamem_init,
{ NULL }, NULL, NULL, .close = isamem_close,
genericat_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = genericat_config
}; };
static const device_config_t p5pak_config[] = { static const device_config_t p5pak_config[] = {
// clang-format off // clang-format off
{ {
@@ -800,13 +813,17 @@ static const device_config_t p5pak_config[] = {
}; };
static const device_t p5pak_device = { static const device_t p5pak_device = {
"Paradise Systems 5-PAK", .name = "Paradise Systems 5-PAK",
"p5pak", .internal_name = "p5pak",
DEVICE_ISA, .flags = DEVICE_ISA,
ISAMEM_P5PAK_CARD, .local = ISAMEM_P5PAK_CARD,
isamem_init, isamem_close, NULL, .init = isamem_init,
{ NULL }, NULL, NULL, .close = isamem_close,
p5pak_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = p5pak_config
}; };
@@ -827,16 +844,19 @@ static const device_config_t a6pak_config[] = {
}; };
static const device_t a6pak_device = { static const device_t a6pak_device = {
"AST SixPakPlus", .name = "AST SixPakPlus",
"a6pak", .internal_name = "a6pak",
DEVICE_ISA, .flags = DEVICE_ISA,
ISAMEM_A6PAK_CARD, .local = ISAMEM_A6PAK_CARD,
isamem_init, isamem_close, NULL, .init = isamem_init,
{ NULL }, NULL, NULL, .close = isamem_close,
a6pak_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = a6pak_config
}; };
static const device_config_t ems5150_config[] = { static const device_config_t ems5150_config[] = {
// clang-format off // clang-format off
{ {
@@ -860,13 +880,17 @@ static const device_config_t ems5150_config[] = {
}; };
static const device_t ems5150_device = { static const device_t ems5150_device = {
"Micro Mainframe EMS-5150(T)", .name = "Micro Mainframe EMS-5150(T)",
"ems5150", .internal_name = "ems5150",
DEVICE_ISA, .flags = DEVICE_ISA,
ISAMEM_EMS5150_CARD, .local = ISAMEM_EMS5150_CARD,
isamem_init, isamem_close, NULL, .init = isamem_init,
{ NULL }, NULL, NULL, .close = isamem_close,
ems5150_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = ems5150_config
}; };
static const device_config_t ev159_config[] = { static const device_config_t ev159_config[] = {
@@ -928,13 +952,17 @@ static const device_config_t ev159_config[] = {
}; };
static const device_t ev159_device = { static const device_t ev159_device = {
"Everex EV-159 RAM 3000 Deluxe", .name = "Everex EV-159 RAM 3000 Deluxe",
"ev159", .internal_name = "ev159",
DEVICE_ISA, .flags = DEVICE_ISA,
ISAMEM_EV159_CARD, .local = ISAMEM_EV159_CARD,
isamem_init, isamem_close, NULL, .init = isamem_init,
{ NULL }, NULL, NULL, .close = isamem_close,
ev159_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = ev159_config
}; };
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_BRAT) #if defined(DEV_BRANCH) && defined(USE_ISAMEM_BRAT)
@@ -986,13 +1014,17 @@ static const device_config_t brat_config[] = {
}; };
static const device_t brat_device = { static const device_t brat_device = {
"BocaRAM/AT", .name = "BocaRAM/AT",
"brat", .internal_name = "brat",
DEVICE_ISA, .flags = DEVICE_ISA,
ISAMEM_BRAT_CARD, .local = ISAMEM_BRAT_CARD,
isamem_init, isamem_close, NULL, .init = isamem_init,
{ NULL }, NULL, NULL, .close = isamem_close,
brat_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = brat_config
}; };
#endif #endif
@@ -1048,17 +1080,20 @@ static const device_config_t rampage_config[] = {
}; };
static const device_t rampage_device = { static const device_t rampage_device = {
"AST RAMpage/XT", .name = "AST RAMpage/XT",
"rampage", .internal_name = "rampage",
DEVICE_ISA, .flags = DEVICE_ISA,
ISAMEM_RAMPAGEXT_CARD, .local = ISAMEM_RAMPAGEXT_CARD,
isamem_init, isamem_close, NULL, .init = isamem_init,
{ NULL }, NULL, NULL, .close = isamem_close,
rampage_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = rampage_config
}; };
#endif #endif
#if defined(DEV_BRANCH) && defined(USE_ISAMEM_IAB) #if defined(DEV_BRANCH) && defined(USE_ISAMEM_IAB)
static const device_config_t iab_config[] = { static const device_config_t iab_config[] = {
// clang-format off // clang-format off
@@ -1111,23 +1146,32 @@ static const device_config_t iab_config[] = {
}; };
static const device_t iab_device = { static const device_t iab_device = {
"Intel AboveBoard", .name = "Intel AboveBoard",
"iab", .internal_name = "iab",
DEVICE_ISA, .flags = DEVICE_ISA,
ISAMEM_ABOVEBOARD_CARD, .local = ISAMEM_ABOVEBOARD_CARD,
isamem_init, isamem_close, NULL, .init = isamem_init,
{ NULL }, NULL, NULL, .close = isamem_close,
iab_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = iab_config
}; };
#endif #endif
static const device_t isa_none_device = { static const device_t isa_none_device = {
"None", .name = "None",
"none", .internal_name = "none",
0, 0, .flags = 0,
NULL, NULL, NULL, .local = 0,
{ NULL }, NULL, NULL, .init = NULL,
NULL .close = NULL,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
static const struct { static const struct {

View File

@@ -592,7 +592,6 @@ isartc_close(void *priv)
free(dev); free(dev);
} }
static const device_config_t ev170_config[] = { static const device_config_t ev170_config[] = {
// clang-format off // clang-format off
{ {
@@ -618,16 +617,19 @@ static const device_config_t ev170_config[] = {
}; };
static const device_t ev170_device = { static const device_t ev170_device = {
"Everex EV-170 Magic I/O", .name = "Everex EV-170 Magic I/O",
"ev170", .internal_name = "ev170",
DEVICE_ISA, .flags = DEVICE_ISA,
ISARTC_EV170, .local = ISARTC_EV170,
isartc_init, isartc_close, NULL, .init = isartc_init,
{ NULL }, NULL, NULL, .close = isartc_close,
ev170_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = ev170_config
}; };
static const device_config_t pii147_config[] = { static const device_config_t pii147_config[] = {
// clang-format off // clang-format off
{ {
@@ -643,16 +645,19 @@ static const device_config_t pii147_config[] = {
}; };
static const device_t pii147_device = { static const device_t pii147_device = {
"DTK PII-147 Hexa I/O Plus", .name = "DTK PII-147 Hexa I/O Plus",
"pii147", .internal_name = "pii147",
DEVICE_ISA, .flags = DEVICE_ISA,
ISARTC_DTK, .local = ISARTC_DTK,
isartc_init, isartc_close, NULL, .init = isartc_init,
{ NULL }, NULL, NULL, .close = isartc_close,
pii147_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = pii147_config
}; };
static const device_config_t p5pak_config[] = { static const device_config_t p5pak_config[] = {
// clang-format off // clang-format off
{ {
@@ -670,16 +675,19 @@ static const device_config_t p5pak_config[] = {
}; };
static const device_t p5pak_device = { static const device_t p5pak_device = {
"Paradise Systems 5-PAK", .name = "Paradise Systems 5-PAK",
"p5pak", .internal_name = "p5pak",
DEVICE_ISA, .flags = DEVICE_ISA,
ISARTC_P5PAK, .local = ISARTC_P5PAK,
isartc_init, isartc_close, NULL, .init = isartc_init,
{ NULL }, NULL, NULL, .close = isartc_close,
p5pak_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = p5pak_config
}; };
static const device_config_t a6pak_config[] = { static const device_config_t a6pak_config[] = {
// clang-format off // clang-format off
{ {
@@ -697,22 +705,31 @@ static const device_config_t a6pak_config[] = {
}; };
static const device_t a6pak_device = { static const device_t a6pak_device = {
"AST SixPakPlus", .name = "AST SixPakPlus",
"a6pak", .internal_name = "a6pak",
DEVICE_ISA, .flags = DEVICE_ISA,
ISARTC_A6PAK, .local = ISARTC_A6PAK,
isartc_init, isartc_close, NULL, .init = isartc_init,
{ NULL }, NULL, NULL, .close = isartc_close,
a6pak_config .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = a6pak_config
}; };
static const device_t isartc_none_device = { static const device_t isartc_none_device = {
"None", .name = "None",
"none", .internal_name = "none",
0, 0, .flags = 0,
NULL, NULL, NULL, .local = 0,
{ NULL }, NULL, NULL, .init = NULL,
NULL .close = NULL,
.reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
static const struct { static const struct {

View File

@@ -2340,228 +2340,286 @@ kbd_init(const device_t *info)
return(dev); return(dev);
} }
const device_t keyboard_at_device = { const device_t keyboard_at_device = {
"PC/AT Keyboard", .name = "PC/AT Keyboard",
"keyboard_at", .internal_name = "keyboard_at",
0, .flags = 0,
KBC_TYPE_ISA | KBC_VEN_GENERIC, .local = KBC_TYPE_ISA | KBC_VEN_GENERIC,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_at_ami_device = { const device_t keyboard_at_ami_device = {
"PC/AT Keyboard (AMI)", .name = "PC/AT Keyboard (AMI)",
"keyboard_at_ami", .internal_name = "keyboard_at_ami",
0, .flags = 0,
KBC_TYPE_ISA | KBC_VEN_AMI, .local = KBC_TYPE_ISA | KBC_VEN_AMI,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_at_samsung_device = { const device_t keyboard_at_samsung_device = {
"PC/AT Keyboard (Samsung)", .name = "PC/AT Keyboard (Samsung)",
"keyboard_at_samsung", .internal_name = "keyboard_at_samsung",
0, .flags = 0,
KBC_TYPE_ISA | KBC_VEN_SAMSUNG, .local = KBC_TYPE_ISA | KBC_VEN_SAMSUNG,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_at_toshiba_device = { const device_t keyboard_at_toshiba_device = {
"PC/AT Keyboard (Toshiba)", .name = "PC/AT Keyboard (Toshiba)",
"keyboard_at_toshiba", .internal_name = "keyboard_at_toshiba",
0, .flags = 0,
KBC_TYPE_ISA | KBC_VEN_TOSHIBA, .local = KBC_TYPE_ISA | KBC_VEN_TOSHIBA,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_at_olivetti_device = { const device_t keyboard_at_olivetti_device = {
"PC/AT Keyboard (Olivetti)", .name = "PC/AT Keyboard (Olivetti)",
"keyboard_at_olivetti", .internal_name = "keyboard_at_olivetti",
0, .flags = 0,
KBC_TYPE_ISA | KBC_VEN_OLIVETTI, .local = KBC_TYPE_ISA | KBC_VEN_OLIVETTI,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_at_ncr_device = { const device_t keyboard_at_ncr_device = {
"PC/AT Keyboard (NCR)", .name = "PC/AT Keyboard (NCR)",
"keyboard_at_ncr", .internal_name = "keyboard_at_ncr",
0, .flags = 0,
KBC_TYPE_ISA | KBC_VEN_NCR, .local = KBC_TYPE_ISA | KBC_VEN_NCR,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_device = { const device_t keyboard_ps2_device = {
"PS/2 Keyboard", .name = "PS/2 Keyboard",
"keyboard_ps2", .internal_name = "keyboard_ps2",
0, .flags = 0,
KBC_TYPE_PS2_NOREF | KBC_VEN_GENERIC, .local = KBC_TYPE_PS2_NOREF | KBC_VEN_GENERIC,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_ps2_device = { const device_t keyboard_ps2_ps2_device = {
"PS/2 Keyboard", .name = "PS/2 Keyboard",
"keyboard_ps2_ps2", .internal_name = "keyboard_ps2_ps2",
0, .flags = 0,
KBC_TYPE_PS2_1 | KBC_VEN_GENERIC, .local = KBC_TYPE_PS2_1 | KBC_VEN_GENERIC,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_ps1_device = { const device_t keyboard_ps2_ps1_device = {
"PS/2 Keyboard (IBM PS/1)", .name = "PS/2 Keyboard (IBM PS/1)",
"keyboard_ps2_ps1", .internal_name = "keyboard_ps2_ps1",
0, .flags = 0,
KBC_TYPE_PS2_NOREF | KBC_VEN_IBM_PS1, .local = KBC_TYPE_PS2_NOREF | KBC_VEN_IBM_PS1,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_ps1_pci_device = { const device_t keyboard_ps2_ps1_pci_device = {
"PS/2 Keyboard (IBM PS/1)", .name = "PS/2 Keyboard (IBM PS/1)",
"keyboard_ps2_ps1_pci", .internal_name = "keyboard_ps2_ps1_pci",
DEVICE_PCI, .flags = DEVICE_PCI,
KBC_TYPE_PS2_NOREF | KBC_VEN_IBM_PS1, .local = KBC_TYPE_PS2_NOREF | KBC_VEN_IBM_PS1,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_xi8088_device = { const device_t keyboard_ps2_xi8088_device = {
"PS/2 Keyboard (Xi8088)", .name = "PS/2 Keyboard (Xi8088)",
"keyboard_ps2_xi8088", .internal_name = "keyboard_ps2_xi8088",
0, .flags = 0,
KBC_TYPE_PS2_1 | KBC_VEN_XI8088, .local = KBC_TYPE_PS2_1 | KBC_VEN_XI8088,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_ami_device = { const device_t keyboard_ps2_ami_device = {
"PS/2 Keyboard (AMI)", .name = "PS/2 Keyboard (AMI)",
"keyboard_ps2_ami", .internal_name = "keyboard_ps2_ami",
0, .flags = 0,
KBC_TYPE_PS2_NOREF | KBC_VEN_AMI, .local = KBC_TYPE_PS2_NOREF | KBC_VEN_AMI,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_olivetti_device = { const device_t keyboard_ps2_olivetti_device = {
"PS/2 Keyboard (Olivetti)", .name = "PS/2 Keyboard (Olivetti)",
"keyboard_ps2_olivetti", .internal_name = "keyboard_ps2_olivetti",
0, .flags = 0,
KBC_TYPE_PS2_NOREF | KBC_VEN_OLIVETTI, .local = KBC_TYPE_PS2_NOREF | KBC_VEN_OLIVETTI,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_mca_device = { const device_t keyboard_ps2_mca_device = {
"PS/2 Keyboard", .name = "PS/2 Keyboard",
"keyboard_ps2_mca", .internal_name = "keyboard_ps2_mca",
0, .flags = 0,
KBC_TYPE_PS2_1 | KBC_VEN_IBM_MCA, .local = KBC_TYPE_PS2_1 | KBC_VEN_IBM_MCA,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_mca_2_device = { const device_t keyboard_ps2_mca_2_device = {
"PS/2 Keyboard", .name = "PS/2 Keyboard",
"keyboard_ps2_mca_2", .internal_name = "keyboard_ps2_mca_2",
0, .flags = 0,
KBC_TYPE_PS2_2 | KBC_VEN_IBM_MCA, .local = KBC_TYPE_PS2_2 | KBC_VEN_IBM_MCA,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_quadtel_device = { const device_t keyboard_ps2_quadtel_device = {
"PS/2 Keyboard (Quadtel/MegaPC)", .name = "PS/2 Keyboard (Quadtel/MegaPC)",
"keyboard_ps2_quadtel", .internal_name = "keyboard_ps2_quadtel",
0, .flags = 0,
KBC_TYPE_PS2_NOREF | KBC_VEN_QUADTEL, .local = KBC_TYPE_PS2_NOREF | KBC_VEN_QUADTEL,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_pci_device = { const device_t keyboard_ps2_pci_device = {
"PS/2 Keyboard", .name = "PS/2 Keyboard",
"keyboard_ps2_pci", .internal_name = "keyboard_ps2_pci",
DEVICE_PCI, .flags = DEVICE_PCI,
KBC_TYPE_PS2_NOREF | KBC_VEN_GENERIC, .local = KBC_TYPE_PS2_NOREF | KBC_VEN_GENERIC,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_ami_pci_device = { const device_t keyboard_ps2_ami_pci_device = {
"PS/2 Keyboard (AMI)", .name = "PS/2 Keyboard (AMI)",
"keyboard_ps2_ami_pci", .internal_name = "keyboard_ps2_ami_pci",
DEVICE_PCI, .flags = DEVICE_PCI,
KBC_TYPE_PS2_NOREF | KBC_VEN_AMI, .local = KBC_TYPE_PS2_NOREF | KBC_VEN_AMI,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_intel_ami_pci_device = { const device_t keyboard_ps2_intel_ami_pci_device = {
"PS/2 Keyboard (AMI)", .name = "PS/2 Keyboard (AMI)",
"keyboard_ps2_intel_ami_pci", .internal_name = "keyboard_ps2_intel_ami_pci",
DEVICE_PCI, .flags = DEVICE_PCI,
KBC_TYPE_PS2_NOREF | KBC_VEN_INTEL_AMI, .local = KBC_TYPE_PS2_NOREF | KBC_VEN_INTEL_AMI,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_ps2_acer_pci_device = { const device_t keyboard_ps2_acer_pci_device = {
"PS/2 Keyboard (Acer 90M002A)", .name = "PS/2 Keyboard (Acer 90M002A)",
"keyboard_ps2_acer_pci", .internal_name = "keyboard_ps2_acer_pci",
DEVICE_PCI, .flags = DEVICE_PCI,
KBC_TYPE_PS2_NOREF | KBC_VEN_ACER, .local = KBC_TYPE_PS2_NOREF | KBC_VEN_ACER,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
void void
keyboard_at_set_mouse(void (*func)(uint8_t val, void *priv), void *priv) keyboard_at_set_mouse(void (*func)(uint8_t val, void *priv), void *priv)
{ {

View File

@@ -871,115 +871,144 @@ kbd_close(void *priv)
free(kbd); free(kbd);
} }
const device_t keyboard_pc_device = { const device_t keyboard_pc_device = {
"IBM PC Keyboard (1981)", .name = "IBM PC Keyboard (1981)",
"keyboard_pc", .internal_name = "keyboard_pc",
0, .flags = 0,
KBD_TYPE_PC81, .local = KBD_TYPE_PC81,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_pc82_device = { const device_t keyboard_pc82_device = {
"IBM PC Keyboard (1982)", .name = "IBM PC Keyboard (1982)",
"keyboard_pc82", .internal_name = "keyboard_pc82",
0, .flags = 0,
KBD_TYPE_PC82, .local = KBD_TYPE_PC82,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_xt_device = { const device_t keyboard_xt_device = {
"XT (1982) Keyboard", .name = "XT (1982) Keyboard",
"keyboard_xt", .internal_name = "keyboard_xt",
0, .flags = 0,
KBD_TYPE_XT82, .local = KBD_TYPE_XT82,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_xt86_device = { const device_t keyboard_xt86_device = {
"XT (1986) Keyboard", .name = "XT (1986) Keyboard",
"keyboard_xt86", .internal_name = "keyboard_xt86",
0, .flags = 0,
KBD_TYPE_XT86, .local = KBD_TYPE_XT86,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_xt_compaq_device = { const device_t keyboard_xt_compaq_device = {
"Compaq Portable Keyboard", .name = "Compaq Portable Keyboard",
"keyboard_xt_compaq", .internal_name = "keyboard_xt_compaq",
0, .flags = 0,
KBD_TYPE_COMPAQ, .local = KBD_TYPE_COMPAQ,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_tandy_device = { const device_t keyboard_tandy_device = {
"Tandy 1000 Keyboard", .name = "Tandy 1000 Keyboard",
"keyboard_tandy", .internal_name = "keyboard_tandy",
0, .flags = 0,
KBD_TYPE_TANDY, .local = KBD_TYPE_TANDY,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_xt_t1x00_device = { const device_t keyboard_xt_t1x00_device = {
"Toshiba T1x00 Keyboard", .name = "Toshiba T1x00 Keyboard",
"keyboard_xt_t1x00", .internal_name = "keyboard_xt_t1x00",
0, .flags = 0,
KBD_TYPE_TOSHIBA, .local = KBD_TYPE_TOSHIBA,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
#if defined(DEV_BRANCH) && defined(USE_LASERXT) #if defined(DEV_BRANCH) && defined(USE_LASERXT)
const device_t keyboard_xt_lxt3_device = { const device_t keyboard_xt_lxt3_device = {
"VTech Laser XT3 Keyboard", .name = "VTech Laser XT3 Keyboard",
"keyboard_xt_lxt3", .internal_name = "keyboard_xt_lxt3",
0, .flags = 0,
KBD_TYPE_VTECH, .local = KBD_TYPE_VTECH,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
#endif #endif
const device_t keyboard_xt_olivetti_device = { const device_t keyboard_xt_olivetti_device = {
"Olivetti XT Keyboard", .name = "Olivetti XT Keyboard",
"keyboard_xt_olivetti", .internal_name = "keyboard_xt_olivetti",
0, .flags = 0,
KBD_TYPE_OLIVETTI, .local = KBD_TYPE_OLIVETTI,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t keyboard_xt_zenith_device = { const device_t keyboard_xt_zenith_device = {
"Zenith XT Keyboard", .name = "Zenith XT Keyboard",
"keyboard_xt_zenith", .internal_name = "keyboard_xt_zenith",
0, .flags = 0,
KBD_TYPE_ZENITH, .local = KBD_TYPE_ZENITH,
kbd_init, .init = kbd_init,
kbd_close, .close = kbd_close,
kbd_reset, .reset = kbd_reset,
{ NULL }, NULL, NULL { .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };

View File

@@ -41,24 +41,33 @@ int mouse_x,
mouse_z, mouse_z,
mouse_buttons; mouse_buttons;
static const device_t mouse_none_device = { static const device_t mouse_none_device = {
"None", .name = "None",
"none", .internal_name = "none",
0, MOUSE_TYPE_NONE, .flags = 0,
NULL, NULL, NULL, .local = MOUSE_TYPE_NONE,
{ NULL }, NULL, NULL, .init = NULL,
NULL .close = NULL,
}; .reset = NULL,
static const device_t mouse_internal_device = { { .poll = NULL },
"Internal", .speed_changed = NULL,
"internal", .force_redraw = NULL,
0, MOUSE_TYPE_INTERNAL, .config = NULL
NULL, NULL, NULL,
{ NULL }, NULL, NULL,
NULL
}; };
static const device_t mouse_internal_device = {
.name = "Internal",
.internal_name = "internal",
.flags = 0,
.local = MOUSE_TYPE_INTERNAL,
.init = NULL,
.close = NULL,
.reset = NULL,
{ .poll = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
};
static mouse_t mouse_devices[] = { static mouse_t mouse_devices[] = {
// clang-format off // clang-format off

View File

@@ -765,30 +765,43 @@ static const device_config_t ms_config[] = {
}; };
const device_t mouse_logibus_device = { const device_t mouse_logibus_device = {
"Logitech/Microsoft Bus Mouse", .name = "Logitech/Microsoft Bus Mouse",
"logibus", .internal_name = "logibus",
DEVICE_ISA, .flags = DEVICE_ISA,
MOUSE_TYPE_LOGIBUS, .local = MOUSE_TYPE_LOGIBUS,
bm_init, bm_close, NULL, .init = bm_init,
{ .poll = bm_poll }, NULL, NULL, .close = bm_close,
lt_config .reset = NULL,
{ .poll = bm_poll },
.speed_changed = NULL,
.force_redraw = NULL,
.config = lt_config
}; };
const device_t mouse_logibus_onboard_device = { const device_t mouse_logibus_onboard_device = {
"Logitech Bus Mouse (On-Board)", .name = "Logitech Bus Mouse (On-Board)",
"logibus_onboard", .internal_name = "logibus_onboard",
DEVICE_ISA, .flags = DEVICE_ISA,
MOUSE_TYPE_LOGIBUS | MOUSE_TYPE_ONBOARD, .local = MOUSE_TYPE_LOGIBUS | MOUSE_TYPE_ONBOARD,
bm_init, bm_close, NULL, .init = bm_init,
{ .poll = bm_poll }, NULL, NULL .close = bm_close,
.reset = NULL,
{ .poll = bm_poll },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t mouse_msinport_device = { const device_t mouse_msinport_device = {
"Microsoft Bus Mouse (InPort)", .name = "Microsoft Bus Mouse (InPort)",
"msbus", .internal_name = "msbus",
DEVICE_ISA, .flags = DEVICE_ISA,
MOUSE_TYPE_INPORT, .local = MOUSE_TYPE_INPORT,
bm_init, bm_close, NULL, .init = bm_init,
{ .poll = bm_poll }, NULL, NULL, .close = bm_close,
ms_config .reset = NULL,
{ .poll = bm_poll },
.speed_changed = NULL,
.force_redraw = NULL,
.config = ms_config
}; };

View File

@@ -329,7 +329,6 @@ ps2_close(void *priv)
free(dev); free(dev);
} }
static const device_config_t ps2_config[] = { static const device_config_t ps2_config[] = {
// clang-format off // clang-format off
{ {
@@ -347,11 +346,15 @@ static const device_config_t ps2_config[] = {
}; };
const device_t mouse_ps2_device = { const device_t mouse_ps2_device = {
"Standard PS/2 Mouse", .name = "Standard PS/2 Mouse",
"ps2", .internal_name = "ps2",
DEVICE_PS2, .flags = DEVICE_PS2,
MOUSE_TYPE_PS2, .local = MOUSE_TYPE_PS2,
mouse_ps2_init, ps2_close, NULL, .init = mouse_ps2_init,
{ .poll = ps2_poll }, NULL, NULL, .close = ps2_close,
ps2_config .reset = NULL,
{ .poll = ps2_poll },
.speed_changed = NULL,
.force_redraw = NULL,
.config = ps2_config
}; };

View File

@@ -876,31 +876,43 @@ static const device_config_t ltsermouse_config[] = {
}; };
const device_t mouse_mssystems_device = { const device_t mouse_mssystems_device = {
"Mouse Systems Serial Mouse", .name = "Mouse Systems Serial Mouse",
"mssystems", .internal_name = "mssystems",
0, .flags = DEVICE_COM,
MOUSE_TYPE_MSYSTEMS, .local = MOUSE_TYPE_MSYSTEMS,
sermouse_init, sermouse_close, NULL, .init = sermouse_init,
{ .poll = sermouse_poll }, sermouse_speed_changed, NULL, .close = sermouse_close,
mssermouse_config .reset = NULL,
{ .poll = sermouse_poll },
.speed_changed = sermouse_speed_changed,
.force_redraw = NULL,
.config = mssermouse_config
}; };
const device_t mouse_msserial_device = { const device_t mouse_msserial_device = {
"Microsoft Serial Mouse", .name = "Microsoft Serial Mouse",
"msserial", .internal_name = "msserial",
0, .flags = DEVICE_COM,
0, .local = 0,
sermouse_init, sermouse_close, NULL, .init = sermouse_init,
{ .poll = sermouse_poll }, sermouse_speed_changed, NULL, .close = sermouse_close,
mssermouse_config .reset = NULL,
{ .poll = sermouse_poll },
.speed_changed = sermouse_speed_changed,
.force_redraw = NULL,
.config = mssermouse_config
}; };
const device_t mouse_ltserial_device = { const device_t mouse_ltserial_device = {
"Logitech Serial Mouse", .name = "Logitech Serial Mouse",
"ltserial", .internal_name = "ltserial",
0, .flags = DEVICE_COM,
1, .local = 1,
sermouse_init, sermouse_close, NULL, .init = sermouse_init,
{ .poll = sermouse_poll }, sermouse_speed_changed, NULL, .close = sermouse_close,
ltsermouse_config .reset = NULL,
{ .poll = sermouse_poll },
.speed_changed = sermouse_speed_changed,
.force_redraw = NULL,
.config = ltsermouse_config
}; };

View File

@@ -497,156 +497,145 @@ pci_bridge_init(const device_t *info)
return dev; return dev;
} }
/* PCI bridges */ /* PCI bridges */
const device_t dec21150_device = const device_t dec21150_device = {
{ .name = "DEC 21150 PCI Bridge",
"DEC 21150 PCI Bridge", .internal_name = "dec21150",
"dec21150", .flags = DEVICE_PCI,
DEVICE_PCI, .local = PCI_BRIDGE_DEC_21150,
PCI_BRIDGE_DEC_21150, .init = pci_bridge_init,
pci_bridge_init, .close = NULL,
NULL, .reset = pci_bridge_reset,
pci_bridge_reset, { .available = NULL },
{ NULL }, .speed_changed = NULL,
NULL, .force_redraw = NULL,
NULL, .config = NULL
NULL
}; };
/* AGP bridges */ /* AGP bridges */
const device_t ali5243_agp_device = const device_t ali5243_agp_device = {
{ .name = "ALi M5243 AGP Bridge",
"ALi M5243 AGP Bridge", .internal_name = "ali5243_agp",
"ali5243_agp", .flags = DEVICE_PCI,
DEVICE_PCI, .local = AGP_BRIDGE_ALI_M5243,
AGP_BRIDGE_ALI_M5243, .init = pci_bridge_init,
pci_bridge_init, .close = NULL,
NULL, .reset = pci_bridge_reset,
pci_bridge_reset, { .available = NULL },
{ NULL }, .speed_changed = NULL,
NULL, .force_redraw = NULL,
NULL, .config = NULL
NULL
}; };
/* AGP bridges */ /* AGP bridges */
const device_t ali5247_agp_device = const device_t ali5247_agp_device = {
{ .name = "ALi M5247 AGP Bridge",
"ALi M5247 AGP Bridge", .internal_name = "ali5247_agp",
"ali5247_agp", .flags = DEVICE_PCI,
DEVICE_PCI, .local = AGP_BRIDGE_ALI_M5247,
AGP_BRIDGE_ALI_M5247, .init = pci_bridge_init,
pci_bridge_init, .close = NULL,
NULL, .reset = pci_bridge_reset,
pci_bridge_reset, { .available = NULL },
{ NULL }, .speed_changed = NULL,
NULL, .force_redraw = NULL,
NULL, .config = NULL
NULL
}; };
const device_t i440lx_agp_device = const device_t i440lx_agp_device = {
{ .name = "Intel 82443LX/EX AGP Bridge",
"Intel 82443LX/EX AGP Bridge", .internal_name = "i440lx_agp",
"i440lx_agp", .flags = DEVICE_PCI,
DEVICE_PCI, .local = AGP_BRIDGE_INTEL_440LX,
AGP_BRIDGE_INTEL_440LX, .init = pci_bridge_init,
pci_bridge_init, .close = NULL,
NULL, .reset = pci_bridge_reset,
pci_bridge_reset, { .available = NULL },
{ NULL }, .speed_changed = NULL,
NULL, .force_redraw = NULL,
NULL, .config = NULL
NULL
}; };
const device_t i440bx_agp_device = const device_t i440bx_agp_device = {
{ .name = "Intel 82443BX/ZX AGP Bridge",
"Intel 82443BX/ZX AGP Bridge", .internal_name = "i440bx_agp",
"i440bx_agp", .flags = DEVICE_PCI,
DEVICE_PCI, .local = AGP_BRIDGE_INTEL_440BX,
AGP_BRIDGE_INTEL_440BX, .init = pci_bridge_init,
pci_bridge_init, .close = NULL,
NULL, .reset = pci_bridge_reset,
pci_bridge_reset, { .available = NULL },
{ NULL }, .speed_changed = NULL,
NULL, .force_redraw = NULL,
NULL, .config = NULL
NULL
}; };
const device_t i440gx_agp_device = const device_t i440gx_agp_device = {
{ .name = "Intel 82443GX AGP Bridge",
"Intel 82443GX AGP Bridge", .internal_name = "i440gx_agp",
"i440gx_agp", .flags = DEVICE_PCI,
DEVICE_PCI, .local = AGP_BRIDGE_INTEL_440GX,
AGP_BRIDGE_INTEL_440GX, .init = pci_bridge_init,
pci_bridge_init, .close = NULL,
NULL, .reset = pci_bridge_reset,
pci_bridge_reset, { .available = NULL },
{ NULL }, .speed_changed = NULL,
NULL, .force_redraw = NULL,
NULL, .config = NULL
NULL
}; };
const device_t via_vp3_agp_device = const device_t via_vp3_agp_device = {
{ .name = "VIA Apollo VP3 AGP Bridge",
"VIA Apollo VP3 AGP Bridge", .internal_name = "via_vp3_agp",
"via_vp3_agp", .flags = DEVICE_PCI,
DEVICE_PCI, .local = AGP_BRIDGE_VIA_597,
AGP_BRIDGE_VIA_597, .init = pci_bridge_init,
pci_bridge_init, .close = NULL,
NULL, .reset = pci_bridge_reset,
pci_bridge_reset, { .available = NULL },
{ NULL }, .speed_changed = NULL,
NULL, .force_redraw = NULL,
NULL, .config = NULL
NULL
}; };
const device_t via_mvp3_agp_device = const device_t via_mvp3_agp_device = {
{ .name = "VIA Apollo MVP3 AGP Bridge",
"VIA Apollo MVP3 AGP Bridge", .internal_name = "via_mvp3_agp",
"via_mvp3_agp", .flags = DEVICE_PCI,
DEVICE_PCI, .local = AGP_BRIDGE_VIA_598,
AGP_BRIDGE_VIA_598, .init = pci_bridge_init,
pci_bridge_init, .close = NULL,
NULL, .reset = pci_bridge_reset,
pci_bridge_reset, { .available = NULL },
{ NULL }, .speed_changed = NULL,
NULL, .force_redraw = NULL,
NULL, .config = NULL
NULL
}; };
const device_t via_apro_agp_device = const device_t via_apro_agp_device = {
{ .name = "VIA Apollo Pro AGP Bridge",
"VIA Apollo Pro AGP Bridge", .internal_name = "via_apro_agp",
"via_apro_agp", .flags = DEVICE_PCI,
DEVICE_PCI, .local = AGP_BRIDGE_VIA_691,
AGP_BRIDGE_VIA_691, .init = pci_bridge_init,
pci_bridge_init, .close = NULL,
NULL, .reset = pci_bridge_reset,
pci_bridge_reset, { .available = NULL },
{ NULL }, .speed_changed = NULL,
NULL, .force_redraw = NULL,
NULL, .config = NULL
NULL
}; };
const device_t via_vt8601_agp_device = const device_t via_vt8601_agp_device = {
{ .name = "VIA Apollo ProMedia AGP Bridge",
"VIA Apollo ProMedia AGP Bridge", .internal_name = "via_vt8601_agp",
"via_vt8601_agp", .flags = DEVICE_PCI,
DEVICE_PCI, .local = AGP_BRIDGE_VIA_8601,
AGP_BRIDGE_VIA_8601, .init = pci_bridge_init,
pci_bridge_init, .close = NULL,
NULL, .reset = pci_bridge_reset,
pci_bridge_reset, { .available = NULL },
{ NULL }, .speed_changed = NULL,
NULL, .force_redraw = NULL,
NULL, .config = NULL
NULL
}; };

View File

@@ -123,24 +123,30 @@ phoenix_486_jumper_init(const device_t *info)
return dev; return dev;
} }
const device_t phoenix_486_jumper_device = { const device_t phoenix_486_jumper_device = {
"Phoenix 486 Jumper Readout", .name = "Phoenix 486 Jumper Readout",
"phoenix_486_jumper", .internal_name = "phoenix_486_jumper",
0, .flags = 0,
0, .local = 0,
phoenix_486_jumper_init, phoenix_486_jumper_close, phoenix_486_jumper_reset, .init = phoenix_486_jumper_init,
{ NULL }, NULL, NULL, .close = phoenix_486_jumper_close,
NULL .reset = phoenix_486_jumper_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t phoenix_486_jumper_pci_device = { const device_t phoenix_486_jumper_pci_device = {
"Phoenix 486 Jumper Readout (PCI machines)", .name = "Phoenix 486 Jumper Readout (PCI machines)",
"phoenix_486_jumper_pci", .internal_name = "phoenix_486_jumper_pci",
0, .flags = 0,
1, .local = 1,
phoenix_486_jumper_init, phoenix_486_jumper_close, phoenix_486_jumper_reset, .init = phoenix_486_jumper_init,
{ NULL }, NULL, NULL, .close = phoenix_486_jumper_close,
NULL .reset = phoenix_486_jumper_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };

View File

@@ -141,11 +141,15 @@ postcard_close(UNUSED(void *priv))
const device_t postcard_device = { const device_t postcard_device = {
"POST Card", .name = "POST Card",
"postcard", .internal_name = "postcard",
DEVICE_ISA, .flags = DEVICE_ISA,
0, .local = 0,
postcard_init, postcard_close, NULL, .init = postcard_init,
{ NULL }, NULL, NULL, .close = postcard_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };

View File

@@ -721,83 +721,114 @@ serial_standalone_init(void) {
device_add_inst(&ns8250_device, next_inst + 1); device_add_inst(&ns8250_device, next_inst + 1);
}; };
const device_t ns8250_device = { const device_t ns8250_device = {
"National Semiconductor 8250(-compatible) UART", .name = "National Semiconductor 8250(-compatible) UART",
"ns8250", .internal_name = "ns8250",
0, .flags = 0,
SERIAL_8250, .local = SERIAL_8250,
serial_init, serial_close, NULL, .init = serial_init,
{ NULL }, serial_speed_changed, NULL, .close = serial_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = serial_speed_changed,
.force_redraw = NULL,
.config = NULL
}; };
const device_t ns8250_pcjr_device = { const device_t ns8250_pcjr_device = {
"National Semiconductor 8250(-compatible) UART for PCjr", .name = "National Semiconductor 8250(-compatible) UART for PCjr",
"ns8250_pcjr", .internal_name = "ns8250_pcjr",
DEVICE_PCJR, .flags = DEVICE_PCJR,
SERIAL_8250_PCJR, .local = SERIAL_8250_PCJR,
serial_init, serial_close, NULL, .init = serial_init,
{ NULL }, serial_speed_changed, NULL, .close = serial_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = serial_speed_changed,
.force_redraw = NULL,
.config = NULL
}; };
const device_t ns16450_device = { const device_t ns16450_device = {
"National Semiconductor NS16450(-compatible) UART", .name = "National Semiconductor NS16450(-compatible) UART",
"ns16450", .internal_name = "ns16450",
0, .flags = 0,
SERIAL_16450, .local = SERIAL_16450,
serial_init, serial_close, NULL, .init = serial_init,
{ NULL }, serial_speed_changed, NULL, .close = serial_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = serial_speed_changed,
.force_redraw = NULL,
.config = NULL
}; };
const device_t ns16550_device = { const device_t ns16550_device = {
"National Semiconductor NS16550(-compatible) UART", .name = "National Semiconductor NS16550(-compatible) UART",
"ns16550", .internal_name = "ns16550",
0, .flags = 0,
SERIAL_16550, .local = SERIAL_16550,
serial_init, serial_close, NULL, .init = serial_init,
{ NULL }, serial_speed_changed, NULL, .close = serial_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = serial_speed_changed,
.force_redraw = NULL,
.config = NULL
}; };
const device_t ns16650_device = { const device_t ns16650_device = {
"Startech Semiconductor 16650(-compatible) UART", .name = "Startech Semiconductor 16650(-compatible) UART",
"ns16650", .internal_name = "ns16650",
0, .flags = 0,
SERIAL_16650, .local = SERIAL_16650,
serial_init, serial_close, NULL, .init = serial_init,
{ NULL }, serial_speed_changed, NULL, .close = serial_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = serial_speed_changed,
.force_redraw = NULL,
.config = NULL
}; };
const device_t ns16750_device = { const device_t ns16750_device = {
"Texas Instruments 16750(-compatible) UART", .name = "Texas Instruments 16750(-compatible) UART",
"ns16750", .internal_name = "ns16750",
0, .flags = 0,
SERIAL_16750, .local = SERIAL_16750,
serial_init, serial_close, NULL, .init = serial_init,
{ NULL }, serial_speed_changed, NULL, .close = serial_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = serial_speed_changed,
.force_redraw = NULL,
.config = NULL
}; };
const device_t ns16850_device = { const device_t ns16850_device = {
"Exar Corporation NS16850(-compatible) UART", .name = "Exar Corporation NS16850(-compatible) UART",
"ns16850", .internal_name = "ns16850",
0, .flags = 0,
SERIAL_16850, .local = SERIAL_16850,
serial_init, serial_close, NULL, .init = serial_init,
{ NULL }, serial_speed_changed, NULL, .close = serial_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = serial_speed_changed,
.force_redraw = NULL,
.config = NULL
}; };
const device_t ns16950_device = { const device_t ns16950_device = {
"Oxford Semiconductor NS16950(-compatible) UART", .name = "Oxford Semiconductor NS16950(-compatible) UART",
"ns16950", .internal_name = "ns16950",
0, .flags = 0,
SERIAL_16950, .local = SERIAL_16950,
serial_init, serial_close, NULL, .init = serial_init,
{ NULL }, serial_speed_changed, NULL, .close = serial_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = serial_speed_changed,
.force_redraw = NULL,
.config = NULL
}; };

View File

@@ -299,13 +299,16 @@ smbus_ali7101_close(void *priv)
free(dev); free(dev);
} }
const device_t ali7101_smbus_device = { const device_t ali7101_smbus_device = {
"ALi M7101-compatible SMBus Host Controller", .name = "ALi M7101-compatible SMBus Host Controller",
"ali7101_smbus", .internal_name = "ali7101_smbus",
DEVICE_AT, .flags = DEVICE_AT,
0, .local = 0,
smbus_ali7101_init, smbus_ali7101_close, smbus_ali7101_reset, .init = smbus_ali7101_init,
{ NULL }, NULL, NULL, .close = smbus_ali7101_close,
NULL .reset = smbus_ali7101_reset,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };

View File

@@ -384,23 +384,30 @@ smbus_piix4_close(void *priv)
free(dev); free(dev);
} }
const device_t piix4_smbus_device = { const device_t piix4_smbus_device = {
"PIIX4-compatible SMBus Host Controller", .name = "PIIX4-compatible SMBus Host Controller",
"piix4_smbus", .internal_name = "piix4_smbus",
DEVICE_AT, .flags = DEVICE_AT,
SMBUS_PIIX4, .local = SMBUS_PIIX4,
smbus_piix4_init, smbus_piix4_close, NULL, .init = smbus_piix4_init,
{ NULL }, NULL, NULL, .close = smbus_piix4_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };
const device_t via_smbus_device = { const device_t via_smbus_device = {
"VIA VT82C686B SMBus Host Controller", .name = "VIA VT82C686B SMBus Host Controller",
"via_smbus", .internal_name = "via_smbus",
DEVICE_AT, .flags = DEVICE_AT,
SMBUS_VIA, .local = SMBUS_VIA,
smbus_piix4_init, smbus_piix4_close, NULL, .init = smbus_piix4_init,
{ NULL }, NULL, NULL, .close = smbus_piix4_close,
NULL .reset = NULL,
{ .available = NULL },
.speed_changed = NULL,
.force_redraw = NULL,
.config = NULL
}; };