http://bugs.winehq.org/show_bug.cgi?id=9584
Summary: Mame will not start due to missing Direct3D functionality Product: Wine Version: CVS/GIT Platform: PC URL: http://mame.net OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: jpakkane@yahoo.com
The windows version of MAME will not start. The following error text is printed when using Mame's verbose mode.
Video: Monitor 00000001 = "\.\DISPLAY1" (primary) fixme:win:EnumDisplayDevicesW ((null),0,0x2a6f7c0,0x00000000), stub! Direct3D: Using Direct3D 9 Direct3D: Configuring adapter #0 = Direct3D HAL Direct3D: Error - Device does not support per-refresh presentations Direct3D: Using dynamic textures Error: Device does not meet minimum requirements for Direct3D rendering Unable to initialize Direct3D. Unable to complete window creation
I quickly went through Mame's source code. This text is printed in function device_create in src/osd/windows/drawd3d.c. The actual test for capabilities is done in the function device_verify_caps: tempcaps & D3DPRESENT_INTERVAL_ONE.
Steps to reproduce:
1. Download Mame (I used version 118) 2. Download e.g. Gridlee rom set from http://www.mamedev.org/roms/ 3. Install Mame, place gridlee.zip to the roms subdirectory 4. cd to mame directory 5. wine mame.exe -v roms/gridlee.zip
The rom file is not strictly necessary but having one is the common use case.
http://bugs.winehq.org/show_bug.cgi?id=9584
Lei Zhang thestig@google.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source
http://bugs.winehq.org/show_bug.cgi?id=9584
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #1 from Austin English austinenglish@gmail.com 2007-09-04 19:51:09 --- Confirming in wine 0.9.44, kubuntu gusty, nvidia 5200 w/ proprietary drivers.
http://bugs.winehq.org/show_bug.cgi?id=9584
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xerox_xerox2000@yahoo.co.uk
--- Comment #2 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-09-05 10:43:20 ---
The actual test for capabilities is done in the function device_verify_caps: >tempcaps & D3DPRESENT_INTERVAL_ONE.
Your analysis looks right, hack below makes the game start fine. Maybe we could add this flag to the capabilities without problems, but i dunno really much about d3d. Maybe Stefan could comment on this?
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index e199f36..ed53d8c 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1810,7 +1810,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3DCAPS2_FULLSCREENGAMMA | WINED3DCAPS2_DYNAMICTEXTURES; *pCaps->Caps3 = WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD; - *pCaps->PresentationIntervals = WINED3DPRESENT_INTERVAL_IMMEDIATE; + *pCaps->PresentationIntervals = WINED3DPRESENT_INTERVAL_IMMEDIATE | WINED3DPRESENT_INTERVAL_ONE;
*pCaps->CursorCaps = WINED3DCURSORCAPS_COLOR | WINED3DCURSORCAPS_LOWRES;
http://bugs.winehq.org/show_bug.cgi?id=9584
--- Comment #3 from JussiP jpakkane@yahoo.com 2007-09-08 05:47:34 --- Microsoft docs say that D3DPRESENT_INTERVAL_ONE means that the hardware is capable of syncing buffer swaps to vsync.
Since Mame aims for frame perfection (no tearing) rather than speed it needs this.
http://bugs.winehq.org/show_bug.cgi?id=9584
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #4 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-09-10 15:00:51 --- Is fixed in current git by http://www.winehq.org/pipermail/wine-cvs/2007-September/035896.html
http://bugs.winehq.org/show_bug.cgi?id=9584
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2007-09-10 15:01:06 --- closing
http://bugs.winehq.org/show_bug.cgi?id=9584
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified