From 2c0966637399e802a856024a3d753346d226b666 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 7 Jun 2025 17:14:35 +0200 Subject: [PATCH] Added the Tulip AT Compact (TC7). --- src/include/86box/machine.h | 2 ++ src/machine/m_at_286_386sx.c | 33 ++++++++++++++++++++++++----- src/machine/machine_table.c | 41 ++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 5 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 112d140f8..85b55ae51 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -473,7 +473,9 @@ extern int machine_at_spc4216p_init(const machine_t *); extern int machine_at_spc4620p_init(const machine_t *); extern int machine_at_kmxc02_init(const machine_t *); extern int machine_at_deskmaster286_init(const machine_t *); + extern int machine_at_dells200_init(const machine_t *); +extern int machine_at_tuliptc7_init(const machine_t *); extern int machine_at_pc8_init(const machine_t *); extern int machine_at_3302_init(const machine_t *); diff --git a/src/machine/m_at_286_386sx.c b/src/machine/m_at_286_386sx.c index 6ac5b0195..29298510c 100644 --- a/src/machine/m_at_286_386sx.c +++ b/src/machine/m_at_286_386sx.c @@ -262,6 +262,19 @@ machine_at_px286_init(const machine_t *model) return ret; } +static void +machine_at_ctat_common_init(const machine_t *model) +{ + machine_at_common_init(model); + + device_add(&cs8220_device); + + if (fdc_current[0] == FDC_INTERNAL) + device_add(&fdc_at_device); + + device_add(&keyboard_at_phoenix_device); +} + int machine_at_dells200_init(const machine_t *model) { @@ -274,14 +287,24 @@ machine_at_dells200_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_at_common_init(model); + machine_at_ctat_common_init(model); - device_add(&cs8220_device); + return ret; +} - if (fdc_current[0] == FDC_INTERNAL) - device_add(&fdc_at_device); +int +machine_at_tuliptc7_init(const machine_t *model) +{ + int ret; - device_add(&keyboard_at_phoenix_device); + ret = bios_load_interleavedr("roms/machines/tuliptc7/tc7be.bin", + "roms/machines/tuliptc7/tc7bo.bin", + 0x000f8000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_ctat_common_init(model); return ret; } diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 611e70c4d..c90cbf0bb 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -3415,6 +3415,47 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* No proper pictures of the KBC exist, though it seems to have the IBM AT KBC + firmware. */ + { + .name = "[C&T PC/AT] Tulip AT Compact", + .internal_name = "tuliptc7", + .type = MACHINE_TYPE_286, + .chipset = MACHINE_CHIPSET_CT_AT, + .init = machine_at_tuliptc7_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_286, + .block = CPU_BLOCK_NONE, + .min_bus = 6000000, + .max_bus = 12000000, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_AT, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 640, + .max = 16384, + .step = 128 + }, + .nvrmask = 127, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Has Quadtel KBC firmware. */ { .name = "[GC103] Quadtel 286 clone",