Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
03478 Crash/Freeze Critical (emulator) Always Oct 19, 2009, 21:24 May 25, 2016, 10:51
Tester DrewLight View Status Public Platform MAME (Official Binary)
Assigned To Tourniquet Resolution Fixed OS
Status [?] Resolved Driver
Version 0.134u3 Fixed in Version 0.165 Build
Fixed in Git Commit Github Pull Request #
Summary 03478: MAME in Fullscreen crashes on Windows 7 with Display set to 150%
Description I'm currently using Windows 7 with the Display set to 150% (Start > Control Panel > Display). When trying to launch MAME in fullscreen I receive the following error:

Unable to create the Direct3D device (8876086C)
Unable to initialize Direct3D.
Unable to complete window creation

If I launch in a window, MAME launches as expected. If I change Windows 7 Display to 125% or 100%, MAME launches as expected. I have reproduced this on multiple PCs with both 32 bit & 64 bit builds.
Steps To Reproduce 1.)Set the display in Windows 7 to 150% (Start > Control Panel > Display)
2.)logoff, logon
3.)Open an command prompt, navigate to MAME path and execute "mame <gamename>"
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
9
User avatar
No.05038
Tafoid
Administrator
Oct 19, 2009, 23:33
edited on: Oct 19, 2009, 23:36
Since I do not have Windows 7 - I need to have others test this and report findings.

pSXAuthor has some insight about this:
<pSXAuthor> best way to find out whats wrong is to switch to the debug runtime, enable full debug output, then run in debugger (or use watson, whatever)
<pSXAuthor> d3d will tell you whats wrong
<pSXAuthor> 8876086C is D3DERR_INVALIDCALL
<pSXAuthor> which usually means some problem with parameters or state
User avatar
No.05040
Haze
Senior Tester
Oct 20, 2009, 11:33
I can confirm this, it works when set to 100% / 125%, but as soon as you set it to 150% it bails out.

G:\mame191009>mame shangon -verbose
Parsing mame.ini
Parsing mame.ini
Video: Monitor 00010001 = "\\.\DISPLAY1" (primary)
Direct3D: Using Direct3D 9
Direct3D: Configuring adapter #0 = NVIDIA GeForce 8800 GTS
Direct3D: Using dynamic textures
Direct3D: YUV format = RGB
Unable to create the Direct3D device (8876086C)
Unable to initialize Direct3D.
Unable to complete window creation
User avatar
No.05042
Tafoid
Administrator
Oct 20, 2009, 15:21
Thank you for the check, Haze.
User avatar
No.07999
dyerseve
Tester
Dec 28, 2011, 00:54
On a large display running without 150% is often not an option.
This workaround worked for me:
open regedit
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
Create a new String.
The name of the string should be the full path to mame.exe
for example: H:\Mame\mameuihiscore64.exe
The value of the string is HIGHDPIAWARE

This set the app compatibility flag for this program, for some reason it is greyed out in the GUI but this seemed to work for me.
Now I can run mame without the errors and without changing the global dpi setting.
User avatar
No.08938
Firewave
Senior Tester
Sep 21, 2012, 17:03
edited on: Sep 21, 2012, 17:04
http://msdn.microsoft.com/en-us/library/windows/desktop/dd464659(v=vs.85).aspx

I think we just need to adjust the manifest files.
User avatar
No.08957
Firewave
Senior Tester
Sep 24, 2012, 14:04
I am not able to reproduce this with Windows 7 x64:

Video: Monitor 00010001 = "\.\DISPLAY1" (primary)
Direct3D: Using Direct3D 9
Direct3D: Configuring adapter #0 = Intel(R) HD Graphics 3000
Direct3D: Using dynamic textures
Direct3D: YUV format = UYVY
Direct3D: Device created at 1280x720
Direct3D: Max texture size = 8192x8192

The YUV Format is different though.
User avatar
No.08968
Firewave
Senior Tester
Sep 26, 2012, 09:30
I was able to reproduce it on a different system:

Video: Monitor 0000000000010001 = "\.\DISPLAY1" (primary)
Direct3D: Using Direct3D 9
Direct3D: Configuring adapter #0 = NVIDIA Quadro FX 880M
Direct3D: Using dynamic textures
Direct3D: YUV format = RGB
Unable to create the Direct3D device (8876086C)
Unable to initialize Direct3D.
  0000000000227CB8: 00000000015EE6B9 (not found)
  0000000000227CC0: 000007FEFFBA3FC0 (_iob_func)
  0000000000227CC8: 0000000000227CC0 (not found)
  0000000000227CD0: 0000000000227CC8 (not found)
  0000000000227CD8: 0000000000227020 (not found)
  0000000000227CE0: 0000000000227E30 (not found)
Unable to complete window creation

It is related to the "YUV Format".
User avatar
No.09885
burnin.rubber999
Tester
Oct 18, 2013, 21:00
While trying to run mame from Windows Media Center I receive the same error message.
User avatar
No.12709
Tourniquet
Developer
May 24, 2016, 21:06
I fixed this with https://github.com/mamedev/mame/commit/be853627b22277936c1265321b3a9289b32e2cb3 on 11/08/2015.
I changed the manifest to fix issues on my Surface Pro 3 at 150%.