From 43339bd44a89e267adcccc6c603812223818fbbe Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Thu, 28 Jul 2022 20:39:34 -0400 Subject: [PATCH] Add orchid varients of the GD5430 and 5434 --- src/include/86box/video.h | 1 + src/video/vid_cl54xx.c | 39 +++++++++++++++++++++++++++++++++++---- src/video/vid_table.c | 1 + 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/include/86box/video.h b/src/include/86box/video.h index 3a1cb0d77..8661fcef8 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -326,6 +326,7 @@ extern const device_t gd5428_onboard_device; extern const device_t gd5429_isa_device; extern const device_t gd5429_vlb_device; extern const device_t gd5430_diamond_speedstar_pro_se_a8_vlb_device; +extern const device_t gd5430_vlb_device; extern const device_t gd5430_pci_device; extern const device_t gd5434_isa_device; extern const device_t gd5434_diamond_speedstar_64_a3_isa_device; diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index c18e4c532..7cded795e 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -54,6 +54,7 @@ #define BIOS_GD5428_BOCA_ISA_PATH "roms/video/cirruslogic/boca_gd5428_1.30b.bin" #define BIOS_GD5429_PATH "roms/video/cirruslogic/5429.vbi" #define BIOS_GD5430_DIAMOND_A8_VLB_PATH "roms/video/cirruslogic/diamondvlbus.bin" +#define BIOS_GD5430_ORCHID_VLB_PATH "roms/video/cirruslogic/orchidvlbus.bin" #define BIOS_GD5430_PATH "roms/video/cirruslogic/pci.bin" #define BIOS_GD5434_DIAMOND_A3_ISA_PATH "roms/video/cirruslogic/Diamond Multimedia SpeedStar 64 v2.02 EPROM Backup from ST M27C256B-12F1.BIN" #define BIOS_GD5434_PATH "roms/video/cirruslogic/gd5434.BIN" @@ -3944,6 +3945,8 @@ static void if (info->local & 0x200) { romfn = NULL; gd54xx->has_bios = 0; + } else if (gd54xx->vlb) { + romfn = BIOS_GD5430_ORCHID_VLB_PATH; } else { if (info->local & 0x100) romfn = BIOS_GD5434_DIAMOND_A3_ISA_PATH; @@ -3970,8 +3973,10 @@ static void if (info->local & 0x200) { romfn = NULL; gd54xx->has_bios = 0; - } else if (gd54xx->pci) + } else if (gd54xx->pci) { romfn = BIOS_GD5430_PATH; + } else if ((gd54xx->vlb) && (info->local & 0x100)) + romfn = BIOS_GD5430_ORCHID_VLB_PATH; else romfn = BIOS_GD5430_DIAMOND_A8_VLB_PATH; } @@ -4233,6 +4238,18 @@ gd5434_available(void) return rom_present(BIOS_GD5434_PATH); } +static int +gd5434_isa_available(void) +{ + return rom_present(BIOS_GD5434_PATH); +} + +static int +gd5430_orchid_vlb_available(void) +{ + return rom_present(BIOS_GD5430_ORCHID_VLB_PATH); +} + static int gd5434_diamond_a3_available(void) { @@ -4791,7 +4808,7 @@ const device_t gd5429_vlb_device = { /*According to a Diamond bios file listing and vgamuseum*/ const device_t gd5430_diamond_speedstar_pro_se_a8_vlb_device = { .name = "Cirrus Logic GD5430 (VLB) (Diamond SpeedStar Pro SE Rev. A8)", - .internal_name = "cl_gd5430_vlb", + .internal_name = "cl_gd5430_vlb_diamond", .flags = DEVICE_VLB, .local = CIRRUS_ID_CLGD5430, .init = gd54xx_init, @@ -4803,6 +4820,20 @@ const device_t gd5430_diamond_speedstar_pro_se_a8_vlb_device = { .config = gd5429_config }; +const device_t gd5430_vlb_device = { + .name = "Cirrus Logic GD5430", + .internal_name = "cl_gd5430_vlb", + .flags = DEVICE_VLB, + .local = CIRRUS_ID_CLGD5430 | 0x100, + .init = gd54xx_init, + .close = gd54xx_close, + .reset = gd54xx_reset, + { .available = gd5430_orchid_vlb_available }, + .speed_changed = gd54xx_speed_changed, + .force_redraw = gd54xx_force_redraw, + .config = gd5429_config +}; + const device_t gd5430_pci_device = { .name = "Cirrus Logic GD5430 (PCI)", .internal_name = "cl_gd5430_pci", @@ -4825,7 +4856,7 @@ const device_t gd5434_isa_device = { .init = gd54xx_init, .close = gd54xx_close, .reset = gd54xx_reset, - { .available = gd5434_available }, + { .available = gd5434_isa_available }, .speed_changed = gd54xx_speed_changed, .force_redraw = gd54xx_force_redraw, .config = gd5434_config @@ -4868,7 +4899,7 @@ const device_t gd5434_vlb_device = { .init = gd54xx_init, .close = gd54xx_close, .reset = gd54xx_reset, - { .available = gd5434_available }, + { .available = gd5430_orchid_vlb_available }, .speed_changed = gd54xx_speed_changed, .force_redraw = gd54xx_force_redraw, .config = gd5434_config diff --git a/src/video/vid_table.c b/src/video/vid_table.c index 6935769fd..5f53f4d8a 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -222,6 +222,7 @@ video_cards[] = { { &gd5428_diamond_speedstar_pro_b1_vlb_device }, { &gd5429_vlb_device }, { &gd5430_diamond_speedstar_pro_se_a8_vlb_device }, + { &gd5430_vlb_device }, { &gd5434_vlb_device }, { &s3_metheus_86c928_vlb_device }, { &s3_mirocrystal_8s_805_vlb_device },