mamedev / mame

MAME
https://www.mamedev.org/
Other
8.29k stars 2.02k forks source link

misc/crystal.cpp: The Crystal of Kings some white graphics become black #11161

Open ghost opened 1 year ago

ghost commented 1 year ago

MAME version

0.254 - 0.255

System information

Windows 10 Home, 64-bit, version 22H2, USA, US English Installed RAM 8.00 GB AMD A6-5200 APU with Radeon(TM) HD Graphics 2.00 GHz

INI configuration details

mame -cc

Emulated system/software

crysking

Incorrect behaviour

Some of the white graphics appear black when rendering in bgfx mode. Looks like bad alpha blending. The text in the intro scenes will correct itself during a fade out sometimes.

Setting the bgfx chains to "none" fixes it I think. I can't go far enough into the game at the slow speed it renders. I don't remember this game being this slow before, because I have played it on this very machine before.

Expected behaviour

Correct colors on graphics

Steps to reproduce

  1. run mame crysking -video bgfx -bgfx_backend d3d11 or mame crysking -video bgfx -bgfx_backend d3d12 or mame crysking -video bgfx -bgfx_backend opengl or mame crysking -video bgfx -bgfx_backend vulkan
  2. observe the text and scenes where colors should be brightest white are black

Additional details

This is not a new problem but I decided to pull the finger out after a post on reddit just a few hours ago by another user reporting this: https://www.reddit.com/r/MAME/comments/130ch29/bgfx_issues_with_the_crystal_of_kings_crysking/

I think this has been an issue since September of last year? I have an old ini file I made just for this game and that's when it was created. At some point running this in a window actually crashed mame but I didn't mark the version, I just made a comment in the file about it.

labelled comparisons: 1 2

Now if you set the bgfx chains to "none" the problem goes away. Seems like a good clue: bgfx none

If someone with a good pc can look at this more I'd greatly appreciate it. I'll have to try to remember what settings I used to get this one full speed again if that's even possible any more.

ICEknigh7 commented 1 year ago

Can't reproduce using bgfx opengl (any shaders). image

angelosa commented 1 year ago

Need more details about the -bgfx_backend used here.

ghost commented 1 year ago

It's all backends except d3d9 specifically for me. I don't know how ICEknigh7 wasn't able to reproduce this with opengl as I can get it every time using just what mame sets as default from a clean install. See for yourself below (open image in new tab). compare F12 doesn't capture the bad rendering, and Alt+F12 (take rendered snapshot) doesn't seem to work for bgfx?

On top of this, and something I didn't notice before, the game will get stuck with bgfx at the screen with 2 vertical lines on it that shows just before the "Brezzasoft" screen when the game boots. stuck

Seems to happen randomly or every other boot? Tried with just the regular d3d and d3d hlsl and doesn't seem to get stuck there ever with those. When it does get stuck, hitting F3 doesn't work here, but going into the UI and selecting "Reset system" in the Dip Switches menu does work. I don't know what to make of this.

ghost commented 1 year ago

Last post on this for now. Tried all backends available to windows on new 0.255 and I get the same results as 0.254, including the sketchy freezing at random times. Changing the Mame versions affected to reflect this.

ghost commented 1 year ago

Spent the rest of the day and all night going through a lot of the previous versions of mame, and this kind of goes off in different directions. Bgfx in itself has a lot of weird things going on in its history with different backends using defaults, with the branch off starting at 0.173. Things like:

On version 0.245 I got an Access Violation error with d3d9 when it got stuck at the first screen again on crysking and I pressed Shift+F3. I don't know if it was the exiting or full reset that triggered it. 245error_crysking_d3d9randomness.txt

All I know is that with version 0.172 all was well in BGFX land using d3d9, d3d11, and opengl. This issue probably needs a better title now with all of this new information, but I honestly don't know what to do with this. It looks really tangled to me? And is this just a "me problem"? AMD drivers are kind of sketchy and this machine is better off in the scrap heap with as old as it is.