]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Keep FB only mode unless VGA planar mode is selected (4 or 16 colors).
authorToni Wilen <twilen@winuae.net>
Sun, 4 May 2025 10:11:22 +0000 (13:11 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 4 May 2025 10:11:22 +0000 (13:11 +0300)
pcem/vid_cl5429.cpp
pcem/vid_svga.cpp
pcem/vid_svga.h

index 40d93b6d73e8bc3d5fed16e8a345386e796e6af2..f0fff68b7da1a54ee82dd85ab59b86fe82b0a2fe 100644 (file)
@@ -2897,7 +2897,8 @@ static void *cl_init(int type, char *fn, int pci_card, uint32_t force_vram_size)
                 gd5429->pci_regs[0x33] = 0x00;
         }
 
-        gd5429->svga.fb_only = 0;
+        gd5429->svga.fb_only = -1;
+        gd5429->svga.fb_auto = 1;
         
         return gd5429;
 }
index 478eaa65ad20049a2e313180533c7516cbbc71d0..51d3715ce80519c0542b219b20782ad67a69a1c8 100644 (file)
@@ -342,6 +342,10 @@ void svga_recalctimings(svga_t *svga)
         double _dispontime, _dispofftime, disptime;
         int text = 0;
 
+        if (svga->fb_auto == 1) {
+            svga->fb_only = -1;
+        }
+
         svga->vtotal = svga->crtc[6];
         svga->dispend = svga->crtc[0x12];
         svga->vsyncstart = svga->crtc[0x10];
@@ -416,6 +420,9 @@ void svga_recalctimings(svga_t *svga)
             }
             svga->hdisp_old = svga->hdisp;
             text = 1;
+            if (svga->fb_auto) {
+                svga->fb_only = 0;
+            }
         }
         else
         {
@@ -429,12 +436,18 @@ void svga_recalctimings(svga_t *svga)
                     svga->render = svga_render_4bpp_lowres;
                 else
                     svga->render = svga_render_4bpp_highres;
+                if (svga->fb_auto) {
+                    svga->fb_only = 0;
+                }
                 break;
             case 0x20: /*4 colours*/
                 if (svga->seqregs[1] & 8) /*Low res (320)*/
                     svga->render = svga_render_2bpp_lowres;
                 else
                     svga->render = svga_render_2bpp_highres;
+                if (svga->fb_auto) {
+                    svga->fb_only = 0;
+                }
                 break;
             case 0x40: case 0x60: /*256+ colours*/
                 switch (svga->bpp)
index 5ca4a6b9ff9938654d15c94b90d3a7e1afc789b9..6f4364ca34764fe59c2384c6c7f59cb6fb595c08 100644 (file)
@@ -55,7 +55,7 @@ typedef struct svga_t
         
         uint8_t plane_mask;
         
-        int fb_only;
+        int fb_only, fb_auto;
         
         int fast;
         uint8_t colourcompare, colournocare;