Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Green tint textures with Voodoo 3 #429

Open
Vort opened this issue Dec 26, 2024 · 1 comment
Open

Green tint textures with Voodoo 3 #429

Vort opened this issue Dec 26, 2024 · 1 comment

Comments

@Vort
Copy link
Contributor

Vort commented Dec 26, 2024

When 3DMark 99 Max in demo mode starts rendering sun with Voodoo 3 card, green rectangles appear:

bochs_green_tex

To see this effect better, I enlarged this screenshot and enhanced its contrast:
image

There are several videos which show how it should be rendered with real hardware.
This one have decent quality so I took screenshot of the same scene from it. No rectangles appear:

3dmark_realhw

Version: 42ae1e8

@Vort
Copy link
Contributor Author

Vort commented Jan 6, 2025

Here's a fix for this problem, based on mamedev/mame@d6d5d89:

diff --git a/bochs/iodev/display/voodoo_data.h b/bochs/iodev/display/voodoo_data.h
index f9046eec4..05160cba8 100644
--- a/bochs/iodev/display/voodoo_data.h
+++ b/bochs/iodev/display/voodoo_data.h
@@ -2531,9 +2531,8 @@ do
   if (ALPHAMODE_ALPHABLEND(ALPHAMODE))                                           \
   {                                                                              \
     int dpix = dest[XX];                                                         \
-    int dr = (dpix >> 8) & 0xf8;                                                 \
-    int dg = (dpix >> 3) & 0xfc;                                                 \
-    int db = (dpix << 3) & 0xf8;                                                 \
+    int dr, dg, db;                                                              \
+    EXTRACT_565_TO_888(dpix, dr, dg, db);                                        \
     int da = FBZMODE_ENABLE_ALPHA_PLANES(FBZMODE) ? depth[XX] : 0xff;            \
     int sr = (RR);                                                               \
     int sg = (GG);                                                               \ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant