]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
NCR/SVGA minor updates.
authorToni Wilen <twilen@winuae.net>
Thu, 28 Dec 2023 10:01:38 +0000 (12:01 +0200)
committerToni Wilen <twilen@winuae.net>
Thu, 28 Dec 2023 10:01:38 +0000 (12:01 +0200)
gfxboard.cpp
pcem/vid_ncr.cpp
pcem/vid_svga.cpp

index b417eeb6c8da7701216e62de8d8b8ed21a7c4769..b5b63901e5073300f35b37b67d65de53562304a6 100644 (file)
@@ -237,14 +237,14 @@ static const struct gfxboard boards[] =
        },
        {
                GFXBOARD_ID_RETINA_Z2,
-               _T("Retina [Zorro II]"), _T("Macro System"), _T("Retina_Z2"),
+               _T("Retina [Zorro II]"), _T("MacroSystem"), _T("Retina_Z2"),
                18260, 6, 0, 0,
                0x00000000, 0x00100000, 0x00400000, 0x00020000, 0, 2, 2, false, false,
                0, 0, NULL, &ncr_retina_z2_device
        },
        {
                GFXBOARD_ID_RETINA_Z3,
-               _T("Retina [Zorro III]"), _T("Macro System"), _T("Retina_Z3"),
+               _T("Retina [Zorro III]"), _T("MacroSystem"), _T("Retina_Z3"),
                18260, 16, 0, 0,
                0x00000000, 0x00100000, 0x00400000, 0x00400000, 0, 3, 2, false, false,
                0, 0, NULL, &ncr_retina_z3_device
index e64a469fa0466f884465ef4328cb3998916f4a5a..5fcf8d053b73b31c08448ce484dc6ef84c702872 100644 (file)
@@ -286,9 +286,6 @@ void ncr_out(uint16_t addr, uint8_t val, void *p)
                     {
                             case 0x11:
                             if (!(val & 0x10)) {
-                                if (ncr->vblank_irq > 0)
-                                    ncr->vblank_irq = -1;
-                            } else if (ncr->vblank_irq < 0) {
                                 ncr->vblank_irq = 0;
                             }
                             ncr_update_irqs(ncr);
@@ -759,7 +756,9 @@ static void blitter_start(ncr_t *ncr)
         dst /= 3;
         int off = dst & 3;
         int rgboff = 0;
-        if (off == 2) {
+        if (off == 1) {
+            rgboff = 3;
+        } else if (off == 2) {
             rgboff = 5;
         } else if (off == 3) {
             rgboff = 10;
@@ -994,7 +993,7 @@ void ncr_updatebanking(ncr_t *ncr)
     }
     int mode = svga->seqregs[0x1e] >> 5;
     if (mode != 2 && mode != 3 && mode != 6) {
-        pclog("unsupport banking mode %d\n", mode);
+        pclog("unsupported banking mode %d\n", mode);
     }
     // Primary at A0000h-AFFFFh, Secondary at B0000h-BFFFFh. Both Read / Write.
     if (mode == 2) {
@@ -1120,7 +1119,6 @@ static void *ncr_init(char *bios_fn, int chip)
         }
                 
         svga->vblank_start = ncr_vblank_start;
-        ncr->vblank_irq = -1;
 
         ncr_io_set(ncr);
 
index f01681bae628a3eb2c2f411117f1efa38caea0c7..00da7515b9149e8825a599164c39521a628521e5 100644 (file)
@@ -24,7 +24,7 @@ static svga_t *svga_pri;
 bool svga_on(void *p)
 {
     svga_t *svga = (svga_t*)p;
-    return svga->scrblank == 0 && svga->hdisp >= 128;
+    return svga->scrblank == 0 && svga->hdisp >= 128 && (svga->crtc[0x17] & 0x80);
 }
 
 int svga_get_vtotal(void *p)
@@ -170,6 +170,7 @@ void svga_out(uint16_t addr, uint8_t val, void *p)
                         svga->vgapal[svga->dac_write].r = svga->dac_r;
                         svga->vgapal[svga->dac_write].g = svga->dac_g;
                         svga->vgapal[svga->dac_write].b = val; 
+                        //pclog("%d: %02x %02x %02x\n", svga->dac_write, svga->dac_r, svga->dac_g, val);
                         if (svga->ramdac_type == RAMDAC_8BIT)
                                 svga->pallook[svga->dac_write] = makecol32(svga->vgapal[svga->dac_write].r, svga->vgapal[svga->dac_write].g, svga->vgapal[svga->dac_write].b);
                         else
@@ -699,7 +700,7 @@ int svga_poll(void *p)
                 }
                 if (svga->vc == svga->dispend)
                 {
-                        if (svga->vblank_start)
+                        if (svga->vblank_start && (svga->crtc[0x17] & 0x80))
                                 svga->vblank_start(svga);
 //                        pclog("VC dispend\n");
                         svga->dispon=0;