diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index f4f3f8834..f39187dd9 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -173,20 +173,21 @@ enum { MACHINE_TYPE_486 = 8, MACHINE_TYPE_486_S2 = 9, MACHINE_TYPE_486_S3 = 10, - MACHINE_TYPE_486_MISC = 11, - MACHINE_TYPE_SOCKET4 = 12, - MACHINE_TYPE_SOCKET5 = 13, - MACHINE_TYPE_SOCKET7_3V = 14, - MACHINE_TYPE_SOCKET7 = 15, - MACHINE_TYPE_SOCKETS7 = 16, - MACHINE_TYPE_SOCKET8 = 17, - MACHINE_TYPE_SLOT1 = 18, - MACHINE_TYPE_SLOT1_2 = 19, - MACHINE_TYPE_SLOT1_370 = 20, - MACHINE_TYPE_SLOT2 = 21, - MACHINE_TYPE_SOCKET370 = 22, - MACHINE_TYPE_MISC = 23, - MACHINE_TYPE_MAX = 24 + MACHINE_TYPE_486_S3_PCI = 11, + MACHINE_TYPE_486_MISC = 12, + MACHINE_TYPE_SOCKET4 = 13, + MACHINE_TYPE_SOCKET5 = 14, + MACHINE_TYPE_SOCKET7_3V = 15, + MACHINE_TYPE_SOCKET7 = 16, + MACHINE_TYPE_SOCKETS7 = 17, + MACHINE_TYPE_SOCKET8 = 18, + MACHINE_TYPE_SLOT1 = 19, + MACHINE_TYPE_SLOT1_2 = 20, + MACHINE_TYPE_SLOT1_370 = 21, + MACHINE_TYPE_SLOT2 = 22, + MACHINE_TYPE_SOCKET370 = 23, + MACHINE_TYPE_MISC = 24, + MACHINE_TYPE_MAX = 25 }; enum { @@ -320,27 +321,29 @@ typedef struct _machine_ { int ram_granularity; int nvrmask; #ifdef EMU_DEVICE_H - const device_t *kbc_device; + const device_t *kbc_device; #else - void *kbc_device; + void *kbc_device; #endif /* EMU_DEVICE_H */ - uint8_t kbc_p1; - uint32_t gpio; - uint32_t gpio_acpi; + uintptr_t kbc_params; + /* Bits 23-16: XOR mask, bits 15-8: OR mask, bits 7-0: AND mask. */ + uint32_t kbc_p1; + uint32_t gpio; + uint32_t gpio_acpi; #ifdef EMU_DEVICE_H - const device_t *device; - const device_t *fdc_device; - const device_t *sio_device; - const device_t *vid_device; - const device_t *snd_device; - const device_t *net_device; + const device_t *device; + const device_t *fdc_device; + const device_t *sio_device; + const device_t *vid_device; + const device_t *snd_device; + const device_t *net_device; #else - void *device; - void *fdc_device; - void *sio_device; - void *vid_device; - void *snd_device; - void *net_device; + void *device; + void *fdc_device; + void *sio_device; + void *vid_device; + void *snd_device; + void *net_device; #endif } machine_t; diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index febdc0e0c..f5cc30782 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -31,12 +31,14 @@ #include <86box/rom.h> #include <86box/device.h> #include <86box/machine.h> +#include <86box/timer.h> +#include <86box/fdd.h> +#include <86box/fdc.h> #include <86box/keyboard.h> #include <86box/sound.h> #include <86box/video.h> #include <86box/plat_unused.h> #include <86box/thread.h> -#include <86box/timer.h> #include <86box/network.h> // Temporarily here till we move everything out into the right files @@ -79,6 +81,7 @@ const machine_filter_t machine_types[] = { { "[1992] i486 (Socket 168 and 1)", MACHINE_TYPE_486 }, { "[1992] i486 (Socket 2)", MACHINE_TYPE_486_S2 }, { "[1994] i486 (Socket 3)", MACHINE_TYPE_486_S3 }, + { "[1994] i486 (Socket 3 PCI)", MACHINE_TYPE_486_S3_PCI }, { "[1992] i486 (Miscellaneous)", MACHINE_TYPE_486_MISC }, { "[1993] Socket 4", MACHINE_TYPE_SOCKET4 }, { "[1994] Socket 5", MACHINE_TYPE_SOCKET5 }, @@ -7427,7 +7430,7 @@ const machine_t machines[] = { { .name = "[ALi M1429G] TriGem 486GP", .internal_name = "tg486gp", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1429G, .init = machine_at_tg486gp_init, .p1_handler = NULL, @@ -7467,7 +7470,7 @@ const machine_t machines[] = { { .name = "[ALi M1489] AAEON SBC-490", .internal_name = "sbc490", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1489, .init = machine_at_sbc490_init, .p1_handler = NULL, @@ -7508,7 +7511,7 @@ const machine_t machines[] = { { .name = "[ALi M1489] ABIT AB-PB4", .internal_name = "abpb4", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1489, .init = machine_at_abpb4_init, .p1_handler = NULL, @@ -7596,7 +7599,7 @@ const machine_t machines[] = { { .name = "[ALi M1489] MSI MS-4145", .internal_name = "ms4145", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1489, .init = machine_at_ms4145_init, .p1_handler = NULL, @@ -7636,7 +7639,7 @@ const machine_t machines[] = { { .name = "[ALi M1489] ESA TF-486", .internal_name = "tf486", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1489, .init = machine_at_tf486_init, .p1_handler = NULL, @@ -7676,7 +7679,7 @@ const machine_t machines[] = { { .name = "[ALi M1489] Acrosser AR-B1476", .internal_name = "arb1476", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_ALI_M1489, .init = machine_at_arb1476_init, .p1_handler = NULL, @@ -7716,7 +7719,7 @@ const machine_t machines[] = { { .name = "[OPTi 802G] IBM Aptiva 510/710/Vision", .internal_name = "aptiva510", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_OPTI_895_802G, .init = machine_at_aptiva510_init, .p1_handler = NULL, @@ -7756,7 +7759,7 @@ const machine_t machines[] = { { .name = "[OPTi 802G] IBM PC 330 (type 6573)", .internal_name = "pc330_6573", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_OPTI_895_802G, .init = machine_at_pc330_6573_init, .p1_handler = NULL, @@ -7796,7 +7799,7 @@ const machine_t machines[] = { { .name = "[i420EX] ASUS PVI-486AP4", .internal_name = "486ap4", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420EX, .init = machine_at_486ap4_init, .p1_handler = NULL, @@ -7836,7 +7839,7 @@ const machine_t machines[] = { { .name = "[i420EX] Intel Classic/PCI ED", .internal_name = "ninja", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420EX, .init = machine_at_ninja_init, .p1_handler = NULL, @@ -7876,7 +7879,7 @@ const machine_t machines[] = { { .name = "[i420EX] Anigma BAT4IP3e", .internal_name = "bat4ip3e", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420EX, .init = machine_at_bat4ip3e_init, .p1_handler = NULL, @@ -7916,7 +7919,7 @@ const machine_t machines[] = { { .name = "[i420EX] Advanced Integration Research 486PI", .internal_name = "486pi", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420EX, .init = machine_at_486pi_init, .p1_handler = NULL, @@ -7956,7 +7959,7 @@ const machine_t machines[] = { { .name = "[i420EX] ICS SB486P", .internal_name = "sb486p", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420EX, .init = machine_at_sb486p_init, .p1_handler = NULL, @@ -7996,7 +7999,7 @@ const machine_t machines[] = { { .name = "[i420TX] ASUS PCI/I-486SP3", .internal_name = "486sp3", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420TX, .init = machine_at_486sp3_init, .p1_handler = NULL, @@ -8036,7 +8039,7 @@ const machine_t machines[] = { { .name = "[i420TX] Intel Classic/PCI", .internal_name = "alfredo", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420TX, .init = machine_at_alfredo_init, .p1_handler = NULL, @@ -8076,7 +8079,7 @@ const machine_t machines[] = { { .name = "[i420TX] AMI Super Voyager PCI", .internal_name = "amis76", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420TX, .init = machine_at_amis76_init, .p1_handler = NULL, @@ -8117,7 +8120,7 @@ const machine_t machines[] = { { .name = "[i420ZX] ASUS PCI/I-486SP3G", .internal_name = "486sp3g", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_INTEL_420ZX, .init = machine_at_486sp3g_init, .p1_handler = NULL, @@ -8157,7 +8160,7 @@ const machine_t machines[] = { { .name = "[IMS 8848] J-Bond PCI400C-B", .internal_name = "pci400cb", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_IMS_8848, .init = machine_at_pci400cb_init, .p1_handler = NULL, @@ -8197,7 +8200,7 @@ const machine_t machines[] = { { .name = "[SiS 496] ASUS PVI-486SP3C", .internal_name = "486sp3c", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_SIS_496, .init = machine_at_486sp3c_init, .p1_handler = NULL, @@ -8237,7 +8240,7 @@ const machine_t machines[] = { { .name = "[SiS 496] Lucky Star LS-486E", .internal_name = "ls486e", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_SIS_496, .init = machine_at_ls486e_init, .p1_handler = NULL, @@ -8277,7 +8280,7 @@ const machine_t machines[] = { { .name = "[SiS 496] Micronics M4Li", .internal_name = "m4li", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_SIS_496, .init = machine_at_m4li_init, .p1_handler = NULL, @@ -8317,7 +8320,7 @@ const machine_t machines[] = { { .name = "[SiS 496] Rise Computer R418", .internal_name = "r418", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_SIS_496, .init = machine_at_r418_init, .p1_handler = NULL, @@ -8358,7 +8361,7 @@ const machine_t machines[] = { { .name = "[SiS 496] Soyo 4SAW2", .internal_name = "4saw2", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_SIS_496, .init = machine_at_4saw2_init, .p1_handler = NULL, @@ -8399,7 +8402,7 @@ const machine_t machines[] = { { .name = "[SiS 496] Zida Tomato 4DP", .internal_name = "4dps", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_SIS_496, .init = machine_at_4dps_init, .p1_handler = NULL, @@ -8439,7 +8442,7 @@ const machine_t machines[] = { { .name = "[SiS 496] MSI MS-4144", .internal_name = "ms4144", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_SIS_496, .init = machine_at_ms4144_init, .p1_handler = NULL, @@ -8479,7 +8482,7 @@ const machine_t machines[] = { { .name = "[UMC 8881] A-Trend ATC-1415", .internal_name = "atc1415", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_atc1415_init, .p1_handler = NULL, @@ -8519,7 +8522,7 @@ const machine_t machines[] = { { .name = "[UMC 8881] ECS Elite UM8810P-AIO", .internal_name = "ecs486", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_ecs486_init, .p1_handler = NULL, @@ -8559,7 +8562,7 @@ const machine_t machines[] = { { .name = "[UMC 8881] Epson ActionPC 2600", .internal_name = "actionpc2600", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_actionpc2600_init, .p1_handler = NULL, @@ -8600,7 +8603,7 @@ const machine_t machines[] = { { .name = "[UMC 8881] Epson ActionTower 8400", .internal_name = "actiontower8400", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_actiontower8400_init, .p1_handler = NULL, @@ -8641,7 +8644,7 @@ const machine_t machines[] = { { .name = "[UMC 8881] PC Chips M919", .internal_name = "m919", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_m919_init, .p1_handler = NULL, @@ -8681,7 +8684,7 @@ const machine_t machines[] = { { .name = "[UMC 8881] Samsung SPC7700P-LW", .internal_name = "spc7700plw", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_spc7700plw_init, .p1_handler = NULL, @@ -8721,7 +8724,7 @@ const machine_t machines[] = { { .name = "[UMC 8881] Shuttle HOT-433A", .internal_name = "hot433a", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_UMC_UM8881, .init = machine_at_hot433a_init, .p1_handler = NULL, @@ -8802,7 +8805,7 @@ const machine_t machines[] = { { .name = "[VIA VT82C496G] DFI G486VPA", .internal_name = "g486vpa", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_VIA_VT82C496G, .init = machine_at_g486vpa_init, .p1_handler = NULL, @@ -8842,7 +8845,7 @@ const machine_t machines[] = { { .name = "[VIA VT82C496G] FIC VIP-IO2", .internal_name = "486vipio2", - .type = MACHINE_TYPE_486_S3, + .type = MACHINE_TYPE_486_S3_PCI, .chipset = MACHINE_CHIPSET_VIA_VT82C496G, .init = machine_at_486vipio2_init, .p1_handler = NULL, @@ -16222,8 +16225,8 @@ const machine_t machines[] = { /* Saved copies - jumpers get applied to these. We use also machine_gpio to store IBM PC/XT jumpers as they need more than one byte. */ -static uint8_t machine_p1_default; -static uint8_t machine_p1; +static uint32_t machine_p1_default; +static uint32_t machine_p1; static uint32_t machine_gpio_default; static uint32_t machine_gpio;