]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
VGA (non-SVGA linear framebuffer) mode refresh update.
authorToni Wilen <twilen@winuae.net>
Thu, 10 Sep 2015 15:41:10 +0000 (18:41 +0300)
committerToni Wilen <twilen@winuae.net>
Thu, 10 Sep 2015 15:41:10 +0000 (18:41 +0300)
gfxboard.cpp
qemuvga/cirrus_vga.cpp
qemuvga/qemumemory.h
qemuvga/qemuuaeglue.cpp
qemuvga/qemuuaeglue.h
qemuvga/vga.cpp

index af11820203f1548b8ec5a09b1bc9f9db7270c80f..99f97da29c8eb7c7a5681953392a737f77984124 100644 (file)
@@ -399,6 +399,18 @@ void qemu_console_resize(QemuConsole *con, int width, int height)
        vga_height = height;
 }
 
+void linear_memory_region_set_dirty(MemoryRegion *mr, hwaddr addr, hwaddr size)
+{
+}
+
+void vga_memory_region_set_dirty(MemoryRegion *mr, hwaddr addr, hwaddr size)
+{
+       if (vga.vga.graphic_mode != 1)
+               return;
+       if (!fullrefresh)
+               fullrefresh = 1;
+}
+
 #if 0
 static uae_u8 pal64 (uae_u8 v)
 {
index 7b6161366c9b76191864bd8e163ac8743441b563..8ee3681acd3a940557e809dddc657303210141bf 100644 (file)
@@ -561,7 +561,8 @@ static void cirrus_invalidate_region(CirrusVGAState * s, int off_begin,
                                     int off_pitch, int bytesperline,
                                     int lines)
 {
-    int y;
+#if 0
+       int y;
     int off_cur;
     int off_cur_end;
 
@@ -571,6 +572,7 @@ static void cirrus_invalidate_region(CirrusVGAState * s, int off_begin,
         memory_region_set_dirty(&s->vga.vram, off_cur, off_cur_end - off_cur);
        off_begin += off_pitch;
     }
+#endif
 }
 
 static int cirrus_bitblt_common_patterncopy(CirrusVGAState * s,
@@ -1987,7 +1989,7 @@ static void cirrus_mem_writeb_mode4and5_8bpp(CirrusVGAState * s,
        val <<= 1;
        dst++;
     }
-    memory_region_set_dirty(&s->vga.vram, offset, 8);
+    linear_memory_region_set_dirty(&s->vga.vram, offset, 8);
 }
 
 static void cirrus_mem_writeb_mode4and5_16bpp(CirrusVGAState * s,
@@ -2011,7 +2013,7 @@ static void cirrus_mem_writeb_mode4and5_16bpp(CirrusVGAState * s,
        val <<= 1;
        dst += 2;
     }
-    memory_region_set_dirty(&s->vga.vram, offset, 16);
+    linear_memory_region_set_dirty(&s->vga.vram, offset, 16);
 }
 
 /***************************************
@@ -2107,7 +2109,7 @@ static void cirrus_vga_mem_write(void *opaque,
                mode = s->vga.gr[0x05] & 0x7;
                if (mode < 4 || mode > 5 || ((s->vga.gr[0x0B] & 0x4) == 0)) {
                    *(s->vga.vram_ptr + bank_offset) = mem_value;
-                    memory_region_set_dirty(&s->vga.vram, bank_offset,
+                    linear_memory_region_set_dirty(&s->vga.vram, bank_offset,
                                             sizeof(mem_value));
                } else {
                    if ((s->vga.gr[0x0B] & 0x14) != 0x14) {
@@ -2405,7 +2407,7 @@ static void cirrus_linear_write(void *opaque, hwaddr addr,
        mode = s->vga.gr[0x05] & 0x7;
        if (mode < 4 || mode > 5 || ((s->vga.gr[0x0B] & 0x4) == 0)) {
            *(s->vga.vram_ptr + addr) = (uint8_t) val;
-            memory_region_set_dirty(&s->vga.vram, addr, 1);
+            linear_memory_region_set_dirty(&s->vga.vram, addr, 1);
        } else {
            if ((s->vga.gr[0x0B] & 0x14) != 0x14) {
                cirrus_mem_writeb_mode4and5_8bpp(s, mode, addr, val);
index 0c30a8e250a141ba7124f2c14b9761d54e94ac01..997a64de18504b2e82a30575e980ab1bd7e06d9f 100644 (file)
@@ -450,8 +450,10 @@ bool memory_region_get_dirty(MemoryRegion *mr, hwaddr addr,
  * @addr: the address (relative to the start of the region) being dirtied.
  * @size: size of the range being dirtied.
  */
-void memory_region_set_dirty(MemoryRegion *mr, hwaddr addr,
+void linear_memory_region_set_dirty(MemoryRegion *mr, hwaddr addr,
                              hwaddr size);
+void vga_memory_region_set_dirty(MemoryRegion *mr, hwaddr addr,
+                                                        hwaddr size);
 
 /**
  * memory_region_test_and_clear_dirty: Check whether a range of bytes is dirty
index b08342d6a6c158da3a007b9b071538dc1f853d0f..13acc1b29d92aeba30051774b642f98a637c1fd0 100644 (file)
@@ -12,9 +12,6 @@ void memory_region_transaction_begin(void)
 void memory_region_transaction_commit(void)
 {
 }
-void memory_region_set_dirty(MemoryRegion *mr, hwaddr addr, hwaddr size)
-{
-}
 void memory_region_add_subregion(MemoryRegion *mr,
                                  hwaddr offset,
                                  MemoryRegion *subregion)
index 374c4bd6ac759486f117d92d47085c1630c6c2d7..5d6c1d0758d07481d320ffb9c2f5b3dde6a1d0d8 100644 (file)
@@ -25,7 +25,6 @@ typedef int ssize_t;
 #define container_of(address, type, field) ((type *)( \
         (PCHAR)(address) - \
         (ULONG_PTR)(&((type *)0)->field)))
-#define STATIC_INLINE static __forceinline
 
 #define snprintf c99_snprintf
 inline int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap)
index cc641d36e534e477f3d815fbe89dc1b825dcc1c0..ffd086d08ed1984569a953dd62789bff2eb73259 100644 (file)
@@ -910,7 +910,7 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val)
             write_log("vga: chain4: [0x" TARGET_FMT_plx "]\n", addr);
 #endif
             s->plane_updated |= mask; /* only used to detect font change */
-            memory_region_set_dirty(&s->vram, addr, 1);
+            vga_memory_region_set_dirty(&s->vram, addr, 1);
         }
     } else if (s->gr[VGA_GFX_MODE] & 0x10) {
         /* odd/even mode (aka text mode mapping) */
@@ -923,7 +923,7 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val)
             write_log("vga: odd/even: [0x" TARGET_FMT_plx "]\n", addr);
 #endif
             s->plane_updated |= mask; /* only used to detect font change */
-            memory_region_set_dirty(&s->vram, addr, 1);
+            vga_memory_region_set_dirty(&s->vram, addr, 1);
         }
     } else {
         /* standard VGA latched access */
@@ -998,7 +998,7 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val)
         write_log("vga: latch: [0x" TARGET_FMT_plx "] mask=0x%08x val=0x%08x\n",
                addr * 4, write_mask, val);
 #endif
-        memory_region_set_dirty(&s->vram, addr << 2, sizeof(uint32_t));
+        vga_memory_region_set_dirty(&s->vram, addr << 2, sizeof(uint32_t));
     }
 }