]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
S3Trio64 PCI, Pixel 64 color fix.
authorToni Wilen <twilen@winuae.net>
Mon, 22 Jan 2024 16:54:01 +0000 (18:54 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Jan 2024 16:54:01 +0000 (18:54 +0200)
gfxboard.cpp
include/gfxboard.h
pcem/vid_cl5429.cpp
pcem/vid_cl5429.h
pcem/vid_s3.cpp
pcem/vid_s3.h

index aced8bc4731a3483d4860c8a47c3c00f228aa59e..8da3ddb91d57597aef31b8ada32a9de8e67bfaad 100644 (file)
@@ -257,6 +257,13 @@ static const struct gfxboard boards[] =
                0x00000000, 0x00400000, 0x00400000, 0x00400000, 0, 4, 3, false, false,
                0, 0, NULL, &ncr_retina_z3_device, 0, GFXBOARD_BUSTYPE_DRACO
        },
+       {
+               GFXBOARD_ID_PIXEL64,
+               _T("Pixel64 [AteoBus]"), _T("Atéo Concepts"), _T("Pixel64"),
+               2026, 255, 254, 0, // 255: type=$c7 flags=$40, 254: type=$c2 flags=$40 128k, 252: type=$c2 flags=$40, 128k
+               0x00000000, 0x00200000, 0x00200000, 0x00400000, CIRRUS_ID_CLGD5434, 2, 0, false, false,
+               0, 0, NULL, &gd5434_vlb_device
+       },
        {
                GFXBOARD_ID_HARLEQUIN,
                _T("Harlequin [Zorro II]"), _T("ACS"), _T("Harlequin_PAL"),
@@ -287,20 +294,20 @@ static const struct gfxboard boards[] =
                0x00000000, 0x00400000, 0x00400000, 0x10000000, 0, 0, -1, false, false,
                0, 0, NULL, &s3_virge_device, 0, GFXBOARD_BUSTYPE_PCI
        },
+       {
+               GFXBOARD_ID_S3TRIO64_PCI,
+               _T("Trio64 [PCI]"), _T("S3"), _T("S3TRIO64_PCI"),
+               0, 0, 0, 0,
+               0x00000000, 0x00200000, 0x00400000, 0x10000000, 0, 0, -1, false, false,
+               0, 0, NULL, &s3_trio64_device, 0, GFXBOARD_BUSTYPE_PCI
+       },
        {
                GFXBOARD_ID_VGA,
-               _T("x86 bridgeboard VGA [ISA]"), _T("x86"), _T("VGA"),
+               _T("x86 Bridgeboard VGA [ISA]"), _T("x86"), _T("VGA"),
                0, 0, 0, 0,
                0x00000000, 0x00100000, 0x00200000, 0x00000000, CIRRUS_ID_CLGD5426, 0, 0, false, false,
                ROMTYPE_x86_VGA
        },
-       {
-               GFXBOARD_ID_PIXEL64,
-               _T("Pixel64 [AteoBus]"), _T("Atéo Concepts"), _T("Pixel64"),
-               2026, 255, 254, 0, // 255: type=$c7 flags=$40, 254: type=$c2 flags=$40 128k, 252: type=$c2 flags=$40, 128k
-               0x00000000, 0x00200000, 0x00200000, 0x00400000, CIRRUS_ID_CLGD5434, 2, 0, false, false,
-               0, 0, NULL, &gd5434_vlb_swapped_device
-       },
        {
                NULL
        }
@@ -3690,7 +3697,7 @@ static void pci_change_config(struct pci_board_state *pci)
                                reinit_vram(gb, pci->bar[1] + pci->bridge->memory_start_offset, false);
                        }
                }
-       } else if (gb->rbc->rtgmem_type == GFXBOARD_ID_S3VIRGE_PCI) {
+       } else if (gb->rbc->rtgmem_type == GFXBOARD_ID_S3VIRGE_PCI || gb->rbc->rtgmem_type == GFXBOARD_ID_S3TRIO64_PCI) {
                if (pci->memory_map_active) {
                        reinit_vram(gb, pci->bar[0] + pci->bridge->memory_start_offset, false);
                }
index 985c77a17d18ac9c2c65027961c74d08428cbab1..22863a88415d74f1203288016e74f3edf1b84ac2 100644 (file)
@@ -85,6 +85,7 @@ int pcem_getvramsize(void);
 #define GFXBOARD_ID_RETINA_Z3 22
 #define GFXBOARD_ID_ALTAIS_Z3 23
 #define GFXBOARD_ID_VOODOO5_PCI 24
+#define GFXBOARD_ID_S3TRIO64_PCI 25
 
 #define GFXBOARD_BUSTYPE_Z 0
 #define GFXBOARD_BUSTYPE_PCI 1
index 92ea4819e00fb95ab8b9ee01fcc766c10580e35d..744e2e69811db1e19e3b1378d9d60a560f1119b1 100644 (file)
@@ -2904,11 +2904,18 @@ static void *gd5434_init()
 }
 static void *gd5434_vlb_swapped_init()
 {
-    gd5429_t *gd5429 = (gd5429_t *)cl_init(CL_TYPE_GD5434, "PicccoSD64", -1, 0);
+    gd5429_t *gd5429 = (gd5429_t *)cl_init(CL_TYPE_GD5434, "CL", -1, 0);
     has_vlb = 1;
     gd5429->svga.swaprb = 1;
     return gd5429;
 }
+static void *gd5434_vlb_init()
+{
+    gd5429_t *gd5429 = (gd5429_t *)cl_init(CL_TYPE_GD5434, "CL", -1, 0);
+    has_vlb = 1;
+    gd5429->svga.swaprb = 0;
+    return gd5429;
+}
 static void *gd5446_init()
 {
     PCI = 1;
@@ -3214,6 +3221,19 @@ device_t gd5434_device =
         gd5434_config
 };
 
+device_t gd5434_vlb_device =
+{
+    "Cirrus Logic GD5434",
+    0,
+    gd5434_vlb_init,
+    gd5429_close,
+    gd5434_available,
+    gd5429_speed_changed,
+    gd5429_force_redraw,
+    gd5429_add_status_info,
+    gd5434_config
+};
+
 device_t gd5434_vlb_swapped_device =
 {
     "Cirrus Logic GD5434",
index 0997b6073b72d4d81256655f70777eac9bf9377f..087f726204169ae292fa82d367af34c1996880ce 100644 (file)
@@ -6,6 +6,7 @@ extern device_t gd5426_device;
 extern device_t gd5428_swapped_device;
 extern device_t gd5426_swapped_device;
 extern device_t gd5434_vlb_swapped_device;
+extern device_t gd5434_vlb_device;
 extern device_t gd5446_device;
 extern device_t ibm_gd5428_device;
 extern device_t gd5429_device;
index d41bd328fa6830dc84d7376138942fecd71e8579..8b65deacb7bdc54fd39854d11584aea3294ce192 100644 (file)
@@ -2953,6 +2953,22 @@ int s3_phoenix_trio64_available()
 
 #endif
 
+void *s3_trio64_init()
+{
+    s3_t *s3 = (s3_t*)s3_init("86c764x1.bin", S3_TRIO64);
+
+    s3->id = 0xe1; /*Trio64*/
+    s3->id_ext = s3->id_ext_pci = 0x11;
+    s3->packed_mmio = 1;
+
+    s3->getclock = s3_trio64_getclock;
+    s3->getclock_p = s3;
+    s3->svga.fb_only = -1;
+
+    return s3;
+}
+
+
 void *s3_cybervision_init()
 {
     s3_t *s3 = (s3_t*)s3_init("86c764x1.bin", S3_TRIO64);
@@ -3209,4 +3225,17 @@ device_t s3_cybervision_trio64_device =
     NULL
 };
 
+device_t s3_trio64_device =
+{
+    "S3Trio64",
+    0,
+    s3_trio64_init,
+    s3_close,
+    NULL,
+    s3_speed_changed,
+    s3_force_redraw,
+    s3_add_status_info,
+    NULL
+};
+
 #endif
index aa453fa1fff5493d379b5ff36caa69bc9c980562..6336d40635b19b3337fa872aed955b6c733ec643 100644 (file)
@@ -3,3 +3,4 @@ extern device_t s3_9fx_device;
 extern device_t s3_phoenix_trio32_device;
 extern device_t s3_phoenix_trio64_device;
 extern device_t s3_cybervision_trio64_device;
+extern device_t s3_trio64_device;