Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
00574 Crash/Freeze Critical (emulator) Sometimes Jan 31, 2008, 01:23 May 25, 2016, 13:56
Tester -Misc Reporters- View Status Public Platform
Assigned To Resolution Fixed OS
Status [?] Resolved Driver
Version 0.117u3 Fixed in Version Build
Fixed in Git Commit Github Pull Request #
Summary 00574: d3d mode and switch display mode
Description I start MAME with a default mame.ini (it starts full screen using d3d), if I then hit ALT+ENTER to switch to window mode, I get an empty frame of a window (maximized), whilst hundreds of "Unable to create the Direct3D device (88760868)" messages scroll down the command prompt window (that I used to start MAME).If I use -video ddraw or -video gdi it is fine and the problem only happens with 0117u2 (0117 is fine, haven't tried u1).

If i start MAME with -d3d -window, I can then switch to full screen, then back to window, over and over with no problems !!

D:\mame>mame pacman -nowindow -verbose
Video: Monitor 00010001 = "\.\DISPLAY1" (primary)
Direct3D: Using Direct3D 9
Direct3D: Configuring adapter #0 = NVIDIA GeForce 7600 GS
Direct3D: Using dynamic textures
Direct3D: YUV format = RGB
Direct3D: Device created at 1280x1024
DirectSound: Primary buffer: 48000 Hz, 16 bits, 2 channels
RawInput: APIs detected
Input: Adding Mouse #1: \??\HID#Vid_046d&Pid_c50e#6&988371&0&0000#{378de44c-56ef
-11d1-bc8c-00a0c91405dd}
Input: Adding Gun #1: \??\HID#Vid_046d&Pid_c50e#6&988371&0&0000#{378de44c-56ef-1
1d1-bc8c-00a0c91405dd}
Input: Adding Kbd #1: \??\HID#Vid_0e6a&Pid_6000#6&3a05a86b&0&0000#{884b96c3-56ef
-11d1-bc8c-00a0c91405dd}
DirectInput: Using DirectInput 7
Input: Adding Joy #1: 3 ??? 8 ?a??e??a? ?e??ao?en?e??aa?eu?aa?e? ?aA?aa?ae ?e??e
n?aa?au??y?ui
Input: Changing default joystick map = s8.4s8.44s8.4445
s8888888s
4s88888s6
44s888s66
444555666
444555666
444555666
44s222s66
4s22222s6
s2222222s
Direct3D: Configuring adapter #0 = NVIDIA GeForce 7600 GS
Direct3D: Using dynamic textures
Direct3D: YUV format = RGB
Unable to create the Direct3D device (88760868)
Direct3D: Using dynamic textures
Direct3D: YUV format = RGB
Unable to create the Direct3D device (88760868)
Direct3D: Using dynamic textures
Direct3D: YUV format = RGB
... 

Firefox: According to the changelog, that MAMEPlus! team fixed this issue in 0.122u1a. I will try to contact Emuman to forward his patch (or maybe it was rejected!?).

RB:Emuman's fix works but isn't quite up to DirectX specs (so it could fail on some drivers/cards/versions of Windows). Aaron made a better one. This was fixed with 0.122u5.

Tafoid:In 0.122u7, Emuman's fix was reverted as it interfered and caused the bug switchres0122u5gre. We are currently back to this being an issue.
Steps To Reproduce Tafoid: Switching works when starting windowed but not when starting fullscreen. I tried -d3dversion 8 as well with no change.

Radeon All-In-Wonder 9600, Windows 2000 w/latest W2k ATI Driver downloaded. DXDIAG output available if requested.

Using 0.122u7:

Here is a test run, with -verbose. I let it reach the Title screen, then hit LeftAlt+Enter. This brings up a window, but does not draw anything in it - my command window shows fast scrolling text. The 1st output is when I hit ESC soon after the LeftAlt+Enter I could (edited for repeating commands).

d:\emulator\arcade\mame>mame -verbose pacman
Parsing mame.ini
Parsing mame.ini
Video: Monitor 00010001 = "\.\DISPLAY1" (primary)
Direct3D: Using Direct3D 9
Direct3D: Configuring adapter #0 = ALL-IN-WONDER 9600 SERIES
Direct3D: Using dynamic textures
Direct3D: YUV format = UYVY
Direct3D: Device created at 1152x864
DirectSound: Primary buffer: 48000 Hz, 16 bits, 2 channels
DirectInput: Using DirectInput 7
Input: Adding Kbd #1: Keyboard
Input: Adding Mouse #1: Mouse
Input: Adding Gun #1: Mouse
Input: Adding Joy #1: USB Game Device
Input: Adding Joy #2: USB Game Device
Input: Changing default joystick map = s8.4s8.44s8.4445
  s8888888s
  4s88888s6
  44s888s66
  444555666
  444555666
  444555666
  44s222s66
  4s22222s6
  s2222222s
Direct3D: Configuring adapter #0 = ALL-IN-WONDER 9600 SERIES
Direct3D: Using dynamic textures
Direct3D: YUV format = UYVY
Unable to create the Direct3D device (88760868)
Direct3D: Using dynamic textures

--------------------------------------------
continues those 3 messages until ESC is hit:
--------------------------------------------

Average speed: 94.98% (7 seconds)
Sound: buffer overflows=3 underflows=0


The 2nd is when the window appears but doesn't populate with graphics and instead of pressing ESC, I clicked on or otherwise gained control of the command prompt window, MAME seems to promptly give me a window resolution to use - the window contents get drawn, the messages stop and the game plays as normal.

d:\emulator\arcade\mame>mame -verbose pacman
Parsing mame.ini
Parsing mame.ini
Video: Monitor 00010001 = "\.\DISPLAY1" (primary)
Direct3D: Using Direct3D 9
Direct3D: Configuring adapter #0 = ALL-IN-WONDER 9600 SERIES
Direct3D: Using dynamic textures
Direct3D: YUV format = UYVY
Direct3D: Device created at 1152x864
DirectSound: Primary buffer: 48000 Hz, 16 bits, 2 channels
DirectInput: Using DirectInput 7
Input: Adding Kbd #1: Keyboard
Input: Adding Mouse #1: Mouse
Input: Adding Gun #1: Mouse
Input: Adding Joy #1: USB Game Device
Input: Adding Joy #2: USB Game Device
Input: Changing default joystick map = s8.4s8.44s8.4445
  s8888888s
  4s88888s6
  44s888s66
  444555666
  444555666
  444555666
  44s222s66
  4s22222s6
  s2222222s
Direct3D: Configuring adapter #0 = ALL-IN-WONDER 9600 SERIES
Direct3D: Using dynamic textures
Direct3D: YUV format = UYVY
Unable to create the Direct3D device (88760868)

--------------------------------------------------------------
continues those 3 messages until I get command window control:
--------------------------------------------------------------

Direct3D: Device created at 651x837

Finally, this is what I get when I redo LeftAlt+Enter to go back to fullscreen.

Direct3D: Configuring adapter #0 = ALL-IN-WONDER 9600 SERIES
Direct3D: Using dynamic textures
Direct3D: YUV format = UYVY
Unable to create the Direct3D device (88760868)
Unable to initialize Direct3D.

I can do more testing if needed, but the issue from where I stand seems to indicate focus is not being given to MAME when the window switch is being made, so it sits waiting... possible?
Additional Information Posted by r0ast3r
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
related to 00829Resolved -switchres not working. 
Notes
12
User avatar
No.00018
Iaspis
Tester
Mar 1, 2008, 12:21
Also happens on my newly bought computer (Core 2 Duo @ 2.6 with 2gig RAM and a GeForce 8600GT running on Windows XP Pro SP2 with latest drivers, updates etc....)
User avatar
No.00883
Iaspis
Tester
May 5, 2008, 20:19
Still happens in 0.125. Seeing that no solution to that bug has been found yet, is it by any chance possible that the Alt-Enter function will be entirely removed from MAME?
User avatar
No.00884
Tafoid
Administrator
May 5, 2008, 20:32
I guess I don't understand what that would accomplish (taking Alt-Enter out)?
Just because a bug is not fixed immediately does not mean it will never be fixed - so the functionality should not be taken out.. Aaron knows about the bug (he assigned it to himself). Previous attempts to fix the bug has resulted in different bugs - so those fixes were reverted. When a solution can be found that will not hurt other commands - I'm sure it will be posted and added to mainline. Until then, simply resist the urge to jump from Full Screen to Windowed mode and choose one or the other.
User avatar
No.00885
Iaspis
Tester
May 5, 2008, 20:45
My point was that taking that function out would make this bug entry invalid, therefore there would be no bug to fix
User avatar
No.00886
etabeta
Developer
May 5, 2008, 22:04
no, imho it would take out a MAME functionality (possibility to switch between windowed mode & full screen at runtime)

on the same line of thoughts (just a bit more drastic): why not to throw away buggy drivers? that would make bug entries invalid ;)
User avatar
No.01069
Iaspis
Tester
May 23, 2008, 20:24
On the same hardware as mentioned above (Core 2 Duo @ 2.6 with 2gig RAM and a GeForce 8600GT) but on a different OS (Windows Vista Ultimate 64bit), the bug does NOT happen. Could it be OS specific?
User avatar
No.03210
Iaspis
Tester
Dec 3, 2008, 20:12
Due to a PSU failure, I dug up my old XP rig today (the one that had the bug) and connected it to my newer LG Flatron monitor only to find that the bug wasn't happening anymore! Maybe all this time, it was monitor related?
User avatar
No.03496
chap
Tester
Jan 5, 2009, 00:46
I'm not sure if this has been noted, but I've found that this only happens when there is a USB controller of some sort plugged in. When there's no controller plugged in it is able to switch to windowed mode and back without any errors. (Observed with HRAP3 and logitech dual action, both generated the error. Running MAME 0.128u7.)
User avatar
No.03500
Iaspis
Tester
Jan 5, 2009, 05:57
edited on: Jan 5, 2009, 06:12
Well, I have Logitech Dual Action gamepads connected in both my PCs. The 1st one had the bug but, as I said, it was gone when I switched monitor (the one I had been using on my second PC that didn't have the problem).

EDIT: Since I was not using the older PC for a long time, it seems that I had removed the logitech driver so you may be right... It should be confirmed by more users though. My newer PC has the 64-bit logitech driver and the window-fullscreen switch is ok.
User avatar
No.03504
Tafoid
Administrator
Jan 5, 2009, 13:36
I can confirm the problem I had with this issue 'disappeared' as soon as I unplugged my simple USB gampad and ran MAME without it.
We have a cause, it seems - but can it be fixed?
User avatar
No.12715
Robbbert
Senior Tester
May 25, 2016, 07:16
Is this still a problem?
User avatar
No.12716
Tafoid
Administrator
May 25, 2016, 13:55
This doesn't seem to happen anymore - probably an old relic from before numerous d3d rewrites since then.
Resolving