http://bugs.winehq.org/show_bug.cgi?id=21878
Summary: Sonic R produces a blank screen in Direct3D mode Product: Wine Version: 1.1.39 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-ddraw AssignedTo: wine-bugs@winehq.org ReportedBy: RandomAccountName@mail.com CC: stefan@codeweavers.com
Created an attachment (id=26517) --> (http://bugs.winehq.org/attachment.cgi?id=26517) Terminal output from 1.1.39
Sonic R has an option to use DirectDraw or Direct3D, and while DirectDraw mode works fine, Direct3D mode just produces a blank screen. If I blindly navigate to the character selection screen, I can see textureless character models, but that's it.
Older AppDB tests for this game show that Direct3D mode worked ages ago, but this bug appeared sometime between 0.9.35 and 0.9.38. After much reverse regression testing, I confirmed this and tracked down the problematic commit:
d9fef10b71b9add27cfaeffa6d7e3ab42342bba7 is first bad commit commit d9fef10b71b9add27cfaeffa6d7e3ab42342bba7 Author: Stefan Dösinger stefan@codeweavers.com Date: Wed May 9 11:49:27 2007 +0200
ddraw: Some caps fixes.
Cards at DirectX7 times did not support non power of 2 textures, and some games check the capatiblity flags incorrectly. Rollcage expects the D3DPTEXTURECAPS_POW2 (limitation) flag set and fails with the reference rasterizer which support NP2 textures and doesn't have the cap set.
:040000 040000 1013c4b33687335d59f27ceb09eece1453c41f27 f06bfc86b0a1bfa5c37b1b46819019018d57d770 M dlls
Since I doubt the patch would still revert cleanly after all this time, I tried the first version with it included (0.9.37). Vanilla 0.9.37 shows a blank screen in Direct3D mode; with the patch reverted, the game can be seen, albeit with graphical bugs (apparently from an even older regression).
My video hardware is Intel GMA 950, driver version 2.9.0.
http://bugs.winehq.org/show_bug.cgi?id=21878
A Wine user RandomAccountName@mail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
http://bugs.winehq.org/show_bug.cgi?id=21878
James Huk Huk256@wp.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Huk256@wp.pl
--- Comment #1 from James Huk Huk256@wp.pl 2010-02-27 12:37:49 --- Confirming in wine-1.1.39
http://bugs.winehq.org/show_bug.cgi?id=21878
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #2 from Vitaliy Margolen vitaliy@kievinfo.com 2010-02-27 16:09:05 --- Confirming per comment 1.
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #3 from James Huk Huk@wine.x.pl 2010-03-07 02:54:45 --- Confirming in wine-1.1.40
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #4 from James Huk Huk@wine.x.pl 2010-03-07 14:34:42 --- Created an attachment (id=26674) --> (http://bugs.winehq.org/attachment.cgi?id=26674) This should allow us to play in D3D mode - some glitches still present
This patch is for wine-1.1.40, however it should be possible to apply it by hand to older versions of wine (this is one line of code after all).
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #5 from James Huk Huk@wine.x.pl 2010-03-07 14:36:41 --- I managed to fix half of the problem. With the patch I attached, we can start the game with D3D, there are still glitches like on this screenshot however:
http://appdb.winehq.org/appimage.php?iId=9421
(the green stuff around some objects)
it would seem they are related to one HUGE commit, namely this:
commit c8901d6f6253f6c97610eb1068ac4ff89758ed0a Author: Stefan Dösinger stefandoesinger@gmx.at Date: Fri Jun 9 19:36:12 2006 +0200
ddraw: Rewrite most of ddraw using WineD3D.
Unfortunately, this commit is old, and because of the size (41000 lines of code) it is very hard to know where exactly problem lays.
I think that those glitches are related to transparency of some objects, which is not handled correctly (it was before rewrite - the graphics are perfect with wine-0.9.15), but since I'm not a developer I can't really tell...
Hopefully someone will look at this, since it worked with older wine versions it should be fairly easy to fix. And then we would have another PLATINUM title in database :)
http://bugs.winehq.org/show_bug.cgi?id=21878
James Huk Huk@wine.x.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #26674|This should allow us to |This patch should allow us description|play in D3D mode - some |to play in D3D mode - some |glitches still present |glitches still present
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #6 from A Wine user RandomAccountName@mail.com 2010-03-07 16:53:36 ---
Hopefully someone will look at this, since it worked with older wine versions it should be fairly easy to fix.
Many things seem easy to fix when you aren't the one who has to fix them. ;)
We should probably have a separate bug for the green stuff everywhere. Since it was caused by a different commit, it's probably a different problem in the code somewhere.
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #7 from James Huk Huk@wine.x.pl 2010-03-08 02:00:27 ---
Many things seem easy to fix when you aren't the one who has to fix them. ;)
Very true ;] - but here, we know on what wine version this bugs were not present (0.9.15), and we know what broken the game.
We should probably have a separate bug for the green stuff everywhere. Since it was caused by a different commit, it's probably a different problem in the code somewhere.
Well the bug is caused by this:
commit c8901d6f6253f6c97610eb1068ac4ff89758ed0a Author: Stefan Dösinger stefandoesinger@gmx.at Date: Fri Jun 9 19:36:12 2006 +0200
ddraw: Rewrite most of ddraw using WineD3D.
as for separate bug thread... well you may be right - but I'm not sure because after all, this game doesn't work in D3D without the patch I posted here, so this thread may be appropriate for other related problems anyway. If I'm wrong, somebody please correct me.
http://bugs.winehq.org/show_bug.cgi?id=21878
A Wine user RandomAccountName@mail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www2.sega.co.jp/down | |load/pc/sonicr/sonicr.exe
--- Comment #8 from A Wine user RandomAccountName@mail.com 2010-03-10 09:45:50 --- I finally found a demo for this game which shows the same behavior; adding that to the URL field.
Note that the game itself has a bug where it will crash immediately if too much processing power is available, so you might need to have a CPU-intensive program running in the background or something to get it to start.
http://bugs.winehq.org/show_bug.cgi?id=21878
A Wine user RandomAccountName@mail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22347
http://bugs.winehq.org/show_bug.cgi?id=21878
Bug 21878 depends on bug 22347, which changed state.
Bug 22347 Summary: Sonic R crashes when choosing a rendering mode http://bugs.winehq.org/show_bug.cgi?id=22347
What |Old Value |New Value ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #9 from James Huk Huk@wine.x.pl 2010-06-27 03:06:07 --- Still present in wine-1.2-rc5 :(
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #10 from James Huk Huk@wine.x.pl 2010-11-07 02:21:18 CST --- Still there with wine-1.3.6
http://bugs.winehq.org/show_bug.cgi?id=21878
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |d9fef10b71b9add27cfaeffa6d7 | |e3ab42342bba7
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #11 from Stefan Dösinger stefan@codeweavers.com 2011-10-17 15:50:53 CDT --- Can you give attachment 36961 from bug 22744 a try? It fixes the black screen issue for me.
The green color looks like broken color keying.
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #12 from Stefan Dösinger stefan@codeweavers.com 2011-10-17 16:14:58 CDT --- Created attachment 36962 --> http://bugs.winehq.org/attachment.cgi?id=36962 ddraw: Make sure the color key is properly applied
This patch fixes the color keying for me. This patch, and d3d color keying in general need some more tests.
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #13 from A Wine user RandomAccountName@mail.com 2011-10-18 07:10:10 CDT --- (In reply to comment #11)
Can you give attachment 36961 [details] from bug 22744 a try? It fixes the black screen issue for me.
The green color looks like broken color keying.
The patch works fine for me with the full version of the game, and attachment 36962 also fixed the green color issue for me. Direct3D mode appears as expected with both patches applied.
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #14 from James Huk Huk256@gmail.com 2011-10-23 03:57:53 CDT --- @Stefan Dösinger:
I can confirm as well, that applying both patches fixed the problem.
I can see that those patches didn't make it into wine-1.3.31... I guess that's because they are hacks... however I would like to ask: is there any hope that somebody will have time fix this bug properly before wine-1.3.32 release? I am not trying to "push" anybody :), I'm just curious.
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #15 from Stefan Dösinger stefan@codeweavers.com 2011-10-23 10:28:14 CDT --- I didn't even send them yet. And 1.3.32 is unlikely from my side because I'm away from home this week and especially the color keying patch needs a bit more work. You're welcome to write a test for this one ;-) , take a look at dlls/ddraw/tests/visual.c for starters
http://bugs.winehq.org/show_bug.cgi?id=21878
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |9e0baa55cec232656048c972e94 | |a9dc2a15ec30b Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #16 from Stefan Dösinger stefan@codeweavers.com 2011-11-17 11:58:24 CST --- The first patch is in Wine now, this bug is fixed by 9e0baa55cec232656048c972e94a9dc2a15ec30b. Please file a new bug for the color keying issue, or even better, write a test for the other patch and submit it to wine-patches :-)
http://bugs.winehq.org/show_bug.cgi?id=21878
--- Comment #17 from A Wine user RandomAccountName@mail.com 2011-11-18 06:34:19 CST --- (In reply to comment #16)
The first patch is in Wine now, this bug is fixed by 9e0baa55cec232656048c972e94a9dc2a15ec30b. Please file a new bug for the color keying issue, or even better, write a test for the other patch and submit it to wine-patches :-)
Great. Thanks for taking a look at this. :)
Unfortunately, I'm not really proficient enough at C programming to write tests myself, so I've filed bug 29122 for the color keying issue.
http://bugs.winehq.org/show_bug.cgi?id=21878
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #18 from Alexandre Julliard julliard@winehq.org 2011-11-18 13:05:00 CST --- Closing bugs fixed in 1.3.33.
http://bugs.winehq.org/show_bug.cgi?id=21878
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-ddraw |directx-d3d