[Bug 38581] New: Petka 1: some objects render without transparency
https://bugs.winehq.org/show_bug.cgi?id=38581 Bug ID: 38581 Summary: Petka 1: some objects render without transparency Product: Wine Version: 1.7.42 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: otaku(a)rambler.ru Distribution: --- Created attachment 51474 --> https://bugs.winehq.org/attachment.cgi?id=51474 console output Wine 1.7.42, 32-bit prefix, Debian Unstable amd64 Game works without these glitches under WinXP There's interesting d3d-related fixmes in terminal (see attachment) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 ax 34noff <otaku(a)rambler.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |otaku(a)rambler.ru --- Comment #1 from ax 34noff <otaku(a)rambler.ru> --- Created attachment 51475 --> https://bugs.winehq.org/attachment.cgi?id=51475 screenshot 1 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #2 from ax 34noff <otaku(a)rambler.ru> --- Created attachment 51476 --> https://bugs.winehq.org/attachment.cgi?id=51476 screenshot 2 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #3 from ax 34noff <otaku(a)rambler.ru> --- Created attachment 51477 --> https://bugs.winehq.org/attachment.cgi?id=51477 screenshot 3 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 ax 34noff <otaku(a)rambler.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |http://www.buka.ru/cgi-bin/ | |show.pl?id=100 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 Henri Verbeet <hverbeet(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan(a)codeweavers.com Component|-unknown |directx-d3d --- Comment #4 from Henri Verbeet <hverbeet(a)gmail.com> --- Looks like a color-keying issue, probably because we don't actually implement WINED3D_CKEY_COLORSPACE. Does this have a demo or free download? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #5 from ax 34noff <otaku(a)rambler.ru> --- Yes, it has demo but there's no glitches in it in Wine: http://www.ag.ru/games/petka-i-vasiliy-ivanovich-spasayut-galaktiku/demos/36... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #6 from Stefan Dösinger <stefan(a)codeweavers.com> --- Is this because the glitches are only visible in a few levels, or because the demo is an older or newer version of the game than the one you run? In the former case, can you attach a +ddraw log? In any case try to install game updates, if any. To my knowledge Windows doesn't support range color keys either, but maybe that was because I made a mistake when testing this a while ago (I think I didn't set DDCKEY_COLORSPACE). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #7 from ax 34noff <otaku(a)rambler.ru> --- Demo is old and has it's own scenes and objects that mostly aren't used in non-demo. Running game with WINEDEBUG=+ddraw... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #8 from ax 34noff <otaku(a)rambler.ru> --- Created attachment 51521 --> https://bugs.winehq.org/attachment.cgi?id=51521 console output with WINEDEBUG=+ddraw, Wine 1.7.43 zipped because it's large -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #9 from Stefan Dösinger <stefan(a)codeweavers.com> --- Created attachment 52152 --> https://bugs.winehq.org/attachment.cgi?id=52152 ddraw: Return the right error if range color keys are used. Can you give this patch a try? It changes the error handling if a range color key is used to match the behavior of my Geforce 7300 driver, which doesn't support color keys. If this doesn't fix the game: Which GPU are you running it on Windows? I haven't found a GPU that supports range color keys on Windows yet. (Tested a few Nvidia and AMD ones) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #10 from ax 34noff <otaku(a)rambler.ru> --- The patch doesn't solve the problem.
Which GPU are you running it on Windows? I run the game in VirtualBox and VMWare Player. I also ran it before under Win98 on some old machines. Does the game use hardware acceleration at all in Windows?
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #11 from ax 34noff <otaku(a)rambler.ru> --- Now i see the only fixme:
fixme:d3d_surface:surface_cpu_blt Filter WINED3D_TEXF_LINEAR not supported in software blit.
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #12 from Stefan Dösinger <stefan(a)codeweavers.com> --- Does the transparency issue still show up? The LINEAR filtering FIXME is mostly harmless. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #13 from Stefan Dösinger <stefan(a)codeweavers.com> --- Wrt HW acceleration, it probably doesn't require it at all. However, none of my windows systems support range color key (DDCKEY_COLORSPACE) with software nor hardware blits. I found some online evidence that old GPUs (i810, some SiS cards) support src key color spaces, but nothing from Nvidia or ATI, and nothing from the DirectX 9 era or newer. If the game indeed needs range color keys I'll implement this in Wine, but I need a Windows machine that supports this feature to find out how it is supposed to work... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #14 from ax 34noff <otaku(a)rambler.ru> --- (In reply to Stefan Dösinger from comment #12)
Does the transparency issue still show up? Yes, it does.
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #15 from Stefan Dösinger <stefan(a)codeweavers.com> --- Created attachment 52163 --> https://bugs.winehq.org/attachment.cgi?id=52163 Range color key test The attached file is a patch for the ddraw test that tests range color keys. Can you run it on a Windows installation where Petka renders correctly and attach the output in a text file here? I'll try to attach a pre-built .exe as well for your convenience, but I don't know if Bugzilla will allow this. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #16 from Stefan Dösinger <stefan(a)codeweavers.com> --- Created attachment 52164 --> https://bugs.winehq.org/attachment.cgi?id=52164 Test binary The modified test can be run with "ddraw_crosstest.exe ddraw7" -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #17 from ax 34noff <otaku(a)rambler.ru> --- Created attachment 52165 --> https://bugs.winehq.org/attachment.cgi?id=52165 output of "ddraw_crosstest.exe ddraw7" p.s. What have i to do with attachment 52163 ? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #18 from ax 34noff <otaku(a)rambler.ru> --- Comment on attachment 52165 --> https://bugs.winehq.org/attachment.cgi?id=52165 output of "ddraw_crosstest.exe ddraw7" VMWare Player 7.1.2, Arch Linux amd64 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #19 from Stefan Dösinger <stefan(a)codeweavers.com> --- Ok, no range color key support on this box. You don't have to do anything special with 52163. I attached it in case you want to compile the test yourself instead of running my binary. I'll extend my previous ddraw test with extra debugging... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 Stefan Dösinger <stefan(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52152|0 |1 is obsolete| | --- Comment #20 from Stefan Dösinger <stefan(a)codeweavers.com> --- Created attachment 52167 --> https://bugs.winehq.org/attachment.cgi?id=52167 DDCKEY_COLORSPACE patch with extra debug Hi again, Can you test the game with this patch? It is a slightly modified version of 52152 that writes the rejected color key to the ERR debug channel. Look (in the regular output, no debug flags needed) for "Range color keys are not supported..." and copypaste one of those lines into the bug report. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #21 from Stefan Dösinger <stefan(a)codeweavers.com> --- Created attachment 52168 --> https://bugs.winehq.org/attachment.cgi?id=52168 Write a debug line when converting surfaces The DDCKEY_COLORSPACE thing may be a red herring altogether. I noticed that the app calls SetColorKey with a non-range key shortly after the failing SetColorKey call and before the surface is used for blitting. I did notice though that the game mixes 16 bit and 32 bit pixel formats. It's possible that we're doing converted blits, and we don't take the color key along during the conversion. This patch adds a debug statement ("converting surface from...") that prints the color key flags of the source surface. Please run the game with this patch and look for these lines. Attach the output (no debug flags needed). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #22 from ax 34noff <otaku(a)rambler.ru> --- Some these lines:
err:ddraw:ddraw_surface_set_color_key Range color keys are not supported, returning DDERR_NOCOLORKEYHW 00000000 7fffffff. Can't see any "converting surface from". Wine Git 32bit build with both patches. I did notice though that the game mixes 16 bit and 32 bit pixel formats. Doesn't it use 8bit (indexed) format for some sprites? I can see significant dithering on buggy sprites but i don't see it on the rest of picture.
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #23 from Stefan Dösinger <stefan(a)codeweavers.com> --- Hmm indeed, there's only one 32 bit surface, and it is never used for blitting. I am running out of ideas. Is there any way I can get my hands on the real game, other than trying to find a torrent somewhere? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #24 from ax 34noff <otaku(a)rambler.ru> ---
Is there any way I can get my hands on the real game, other than trying to find a torrent somewhere?
http://petka-vich.ru/ is official site but i'm unsure if Windows version is still available for purchase. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 Stefan Dösinger <stefandoesinger(a)gmx.at> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|stefan(a)codeweavers.com |stefandoesinger(a)gmx.at -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 joaopa <jeremielapuree(a)yahoo.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree(a)yahoo.fr --- Comment #25 from joaopa <jeremielapuree(a)yahoo.fr> --- Still a bug in current wine? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #26 from ax 34noff <otaku(a)rambler.ru> --- Wine 2.2, bug still here. p.s. English name of this game is "Red Comrades Save The Galaxy" -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #27 from joaopa <jeremielapuree(a)yahoo.fr> --- Is still a bug with current wine (wine-3.19)? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #28 from ax 34noff <otaku(a)rambler.ru> --- Yes, it is. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #29 from ax 34noff <otaku(a)rambler.ru> --- Here is the game in Steam but i'm unsure if it's the same version as on my old CD: https://store.steampowered.com/app/415610/Red_Comrades_Save_the_Galaxy_Reloa... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #30 from joaopa <jeremielapuree(a)yahoo.fr> --- Does the bug still occur with wine-5.10? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #31 from ax 34noff <otaku(a)rambler.ru> --- @joaopa, yes, it does. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #32 from joaopa <jeremielapuree(a)yahoo.fr> --- Does the bug still occur with wine-6.17? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #33 from ax 34noff <otaku(a)rambler.ru> --- @joaopa, yes, it does. I also experienced such issue in other apps (not games) earlier, but sadly i can't remember what apps. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #34 from joaopa <jeremielapuree(a)yahoo.fr> --- Does the bug still occur with wine-7.16? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #35 from ax 34noff <otaku(a)rambler.ru> --- @joaopa, yes, it does. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 Stefan Dösinger <stefan(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan(a)codeweavers.com --- Comment #36 from Stefan Dösinger <stefan(a)codeweavers.com> --- Did you have a chance to test the Steam version in the meantime? If not I guess I'll try it myself somewhen. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #37 from ax 34noff <otaku(a)rambler.ru> --- I think Steam version is completely different under the hood. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=38581 Alex Henrie <alexhenrie24@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexhenrie24@gmail.com --- Comment #38 from Alex Henrie <alexhenrie24@gmail.com> --- Did you have to do anything special to get the game to run? I have the Russian version, which is now at <https://archive.org/download/petka_202603/Petka.iso>, but when I try to start a new game from the game's main menu, the game crashes on a null pointer. I tried Wine 1.7.42, 5.10, 7.16, 8.0, and 11.2. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #39 from ax 34noff <otaku@rambler.ru> --- For me it stopped working at all, shows "Please reinstall game" message. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=38581 ax 34noff <otaku@rambler.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.buka.ru/cgi-bin/ |https://archive.org/downloa |show.pl?id=100 |d/petka_202603/Petka.iso -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #40 from Alex Henrie <alexhenrie24@gmail.com> --- (In reply to ax 34noff from comment #39)
For me it stopped working at all, shows "Please reinstall game" message.
Do you mean that neither your version of Petka nor mine works for you now? If so, what was the last version of Wine that worked? I should have mentioned that I had to set the Windows version to Windows 95 in winecfg before installing Petka and I ran `wine 'D:\SETUP.EXE'` to make sure that the installer was running from the CD drive. Otherwise the game would complain that the CD was not inserted. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=38581 Alex Henrie <alexhenrie24@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=59636 Hardware|x86-64 |x86 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #41 from Alex Henrie <alexhenrie24@gmail.com> --- I opened Bug 59636 about the crash, but I figured it out and I am able to reproduce the transparency problem now :-D -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=38581 Doug Johnson <dougvj@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dougvj@gmail.com --- Comment #42 from Doug Johnson <dougvj@gmail.com> --- Created attachment 80734 --> http://bugs.winehq.org/attachment.cgi?id=80734 Screenshot with transparency working Surfaces are not palletized but are RGB555 (Looked up FourCC code on surface pixelformat struct, which is 0, and the bits is 16, which means rgb555, see https://fourcc.org/pixel-format/rgb-bi_rgb/) These are the color keys I captured and their respective rgb values (after proper masking): 0x0 0x1f 0x5cec 0x6ce7 0x7e0 0x7ff 0xfffff81f 0xffffffff (0, 0, 0) (0, 0, 255) (189, 57, 98) (222, 57, 57) (8, 255, 0) (8, 255, 255) (246, 0, 255) -> Magenta! (255, 255, 255) Magenta is the failing color key, and it appears to be sign-extended for some bizarre reason So, I made this fix: @@ -5118,7 +5120,10 @@ static HRESULT ddraw_surface_set_color_key(struct ddraw_surface *surface, DWORD if (color_key) { - fixed_color_key.dwColorSpaceLowValue = fixed_color_key.dwColorSpaceHighValue = color_key->dwColorSpaceLowValue; + fixed_color_key.dwColorSpaceLowValue = fixed_color_key.dwColorSpaceHighValue = (color_key->dwColorSpaceLowValue & + (surface->surface_desc.ddpfPixelFormat.dwRBitMask | + surface->surface_desc.ddpfPixelFormat.dwGBitMask | + surface->surface_desc.ddpfPixelFormat.dwBBitMask )); switch (flags & ~DDCKEY_COLORSPACE) And, Voila! I am working on a test case to make sure this fix doesn't cause problems for other pixel format types and palette indices. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=38581 --- Comment #43 from Stefan Dösinger <stefan@codeweavers.com> --- Good work! Just to clarify, the sign extending is happening in the game code, right? It passes ckey 0xfffff81f for a 16 bit surface. ANDing the ckey with the valid bits for the surface's format in some place sounds like a reasonable thing to do. Probably SetColorKey is the wrong place. I suspect it needs to be done when preparing blits, as blits accept a color key override parameter, and when sending the ckey to glsl for 3D rendering. You can test if native fixes things up in SetColorKey by reading it back with GetColorKey. It is certainly possible native fixes the ckey in multiple places. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (3)
-
wine-bugs@winehq.org -
WineHQ Bugzilla -
WineHQ Bugzilla