[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bochs-cvs
Subject:    [Bochs-cvs] [13922] trunk/bochs/iodev/display
From:       vruppert--- via Bochs-cvs <bochs-cvs () lists ! sourceforge ! net>
Date:       2020-08-20 9:20:23
Message-ID: 1597915223.718703.25815 () sfp-scm-3 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]

Revision: 13922
Author:   vruppert
Date:     2020-08-20 09:20:23 +0000 (Thu, 20 Aug 2020)
Log Message:
-----------
Some small changes for Banshee/Voodoo3 BitBlt.
- Added stub for host-to-screen stretch blt.
- Improved stub for "polygon fill" command.

Modified Paths:
--------------
    trunk/bochs/iodev/display/banshee.cc
    trunk/bochs/iodev/display/voodoo_data.h

Modified: trunk/bochs/iodev/display/banshee.cc
===================================================================
--- trunk/bochs/iodev/display/banshee.cc	2020-08-16 20:43:49 UTC (rev 13921)
+++ trunk/bochs/iodev/display/banshee.cc	2020-08-20 09:20:23 UTC (rev 13922)
@@ -1203,6 +1203,9 @@
         delete [] BLT.lamem;
         BLT.lamem = NULL;
       }
+      if (BLT.cmd == 8) {
+        BLT.pgn_index = 0;
+      }
       if (BLT.immed) {
         blt_execute();
       } else {
@@ -1245,6 +1248,7 @@
       BLT.lacnt = 1;
       break;
     case 3:
+    case 4:
       BLT.h2s_alt_align = 0;
       pxpack = (BLT.reg[blt_srcFormat] >> 22) & 3;
       BLT.src_wizzle = (BLT.reg[blt_srcFormat] >> 20) & 0x03;
@@ -1315,6 +1319,9 @@
       BLT.reg[blt_dstXY] = value;
       BLT.dst_x = value & 0x1fff;
       BLT.dst_y = (value >> 16) & 0x1fff;
+    } if (BLT.cmd >= 8) {
+      BLT.pgn_x = value & 0x1fff;
+      BLT.pgn_y = (value >> 16) & 0x1fff;
     }
     if (--BLT.lacnt == 0) {
       blt_execute();
@@ -1349,12 +1356,17 @@
       }
       break;
     case 3:
+    case 4:
       if (!BLT.immed) {
-        BLT.busy = 1;
-        if (BLT.rop_flags[BLT.rop0] & BX_ROP_PATTERN) {
-          blt_host_to_screen_pattern();
+        if (BLT.cmd == 3) {
+          BLT.busy = 1;
+          if (BLT.rop_flags[BLT.rop0] & BX_ROP_PATTERN) {
+            blt_host_to_screen_pattern();
+          } else {
+            blt_host_to_screen();
+          }
         } else {
-          blt_host_to_screen();
+          BX_INFO(("TODO: 2D Host to screen stretch blt"));
         }
         delete [] BLT.lamem;
         BLT.lamem = NULL;
@@ -1362,9 +1374,6 @@
         BX_ERROR(("Host to screen blt: immediate execution not supported"));
       }
       break;
-    case 4:
-      BX_INFO(("TODO: 2D Host to screen stretch blt"));
-      break;
     case 5:
       BLT.busy = 1;
       if (BLT.rop_flags[BLT.rop0] & BX_ROP_PATTERN) {
@@ -1389,7 +1398,18 @@
       }
       break;
     case 8:
-      BX_INFO(("TODO: 2D Polygon fill"));
+      if (!BLT.immed) {
+        if (BLT.pgn_index == 0) {
+          BX_INFO(("TODO: 2D Polygon fill start (x0 = %d y0 = %d x1 = %d y1 = %d)",
+                   BLT.src_x, BLT.src_y, BLT.dst_x, BLT.dst_y));
+        }
+        BX_INFO(("TODO: 2D Polygon fill launch value (x = %d y = %d)",
+                 BLT.pgn_x, BLT.pgn_y));
+        BLT.pgn_index++;
+      } else {
+        BLT.reg[blt_dstXY] = BLT.reg[blt_srcXY];
+        BLT.immed = 0;
+      }
       BLT.lacnt = 1;
       break;
     case 13:

Modified: trunk/bochs/iodev/display/voodoo_data.h
===================================================================
--- trunk/bochs/iodev/display/voodoo_data.h	2020-08-16 20:43:49 UTC (rev 13921)
+++ trunk/bochs/iodev/display/voodoo_data.h	2020-08-20 09:20:23 UTC (rev 13922)
@@ -1778,6 +1778,9 @@
     Bit16u h2s_pitch;
     Bit8u h2s_pxstart;
     bx_bool h2s_alt_align;
+    Bit16u pgn_index;
+    Bit16u pgn_x;
+    Bit16u pgn_y;
     Bit32u lacnt;
     Bit32u laidx;
     Bit8u *lamem;



_______________________________________________
Bochs-cvs mailing list
Bochs-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bochs-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic