From eb20365cec66491344586d905ecb5aa7ebb6bae6 Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Sun, 15 Feb 2026 00:26:59 -0600 Subject: [PATCH] Cirrus: Give the Commodore SL386SX/25 its own 5402 device and make the original onboard device not load a VBIOS. Tandy 1000 RSX now loads the correct VBIOS from the system ROM. --- src/include/86box/video.h | 1 + src/machine/m_at_386sx.c | 2 +- src/machine/machine_table.c | 2 +- src/video/vid_cl54xx.c | 16 ++++++++++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/include/86box/video.h b/src/include/86box/video.h index b7f86ac18..32e1ace03 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -375,6 +375,7 @@ extern const device_t gd5401_isa_device; extern const device_t gd5401_onboard_device; extern const device_t gd5402_isa_device; extern const device_t gd5402_onboard_device; +extern const device_t gd5402_onboard_commodore_device; extern const device_t gd5420_isa_device; extern const device_t gd5420_onboard_device; extern const device_t gd5422_isa_device; diff --git a/src/machine/m_at_386sx.c b/src/machine/m_at_386sx.c index 6b5c4414c..d996a14bc 100644 --- a/src/machine/m_at_386sx.c +++ b/src/machine/m_at_386sx.c @@ -586,7 +586,7 @@ machine_at_cmdsl386sx25_init(const machine_t *model) return ret; if (gfxcard[0] == VID_INTERNAL) - device_add(&gd5402_onboard_device); + device_add(&gd5402_onboard_commodore_device); machine_at_common_init_ex(model, 2); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 66d119520..e05477c96 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -5905,7 +5905,7 @@ const machine_t machines[] = { .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, - .vid_device = &gd5402_onboard_device, + .vid_device = &gd5402_onboard_commodore_device, .snd_device = NULL, .net_device = NULL }, diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index 0a3060467..007d47db7 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -4284,6 +4284,8 @@ gd54xx_init(const device_t *info) case CIRRUS_ID_CLGD5402: if (info->local & 0x200) + romfn = NULL; + else if (info->local & 0x100) romfn = BIOS_GD5402_ONBOARD_PATH; else romfn = BIOS_GD5402_PATH; @@ -5032,6 +5034,20 @@ const device_t gd5402_onboard_device = { .config = NULL, }; +const device_t gd5402_onboard_commodore_device = { + .name = "Cirrus Logic GD5402 (ISA) (ACUMOS AVGA2) (On-Board) (Commodore)", + .internal_name = "cl_gd5402_onboard_commodore", + .flags = DEVICE_ISA16, + .local = CIRRUS_ID_CLGD5402 | 0x100, + .init = gd54xx_init, + .close = gd54xx_close, + .reset = gd54xx_reset, + .available = NULL, + .speed_changed = gd54xx_speed_changed, + .force_redraw = gd54xx_force_redraw, + .config = NULL, +}; + const device_t gd5420_isa_device = { .name = "Cirrus Logic GD5420 (ISA)", .internal_name = "cl_gd5420_isa",