MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Threaded Mode Threaded  

Pages: 1

nutte
MAME Fan
Reged: 07/05/15
Posts: 23
Send PM


Why 20s delay when starting any game in MAME?
#394354 - 07/02/22 09:46 AM


I don’t play MAME game very often nowadays, so I’m not sure when it started, but every time I start any MAME game it takes 20s before it actually starts. I.e., I just see a black screen with a spinning icon for 20s whenever I start a game before it actually appears. This happens if I use a frontend, or just type e.g. "mame dkongj".

I've unpacked MAME to a new directory, and tried older versions (back to 2019), but I still see the same thing. Has anyone else experienced this?

Edited by nutte (07/02/22 09:47 AM)



TafoidAdministrator
I keep on testing.. testing.. testing... into the future!
Reged: 04/19/06
Posts: 3135
Loc: USA
Send PM


Re: Why 20s delay when starting any game in MAME? new [Re: nutte]
#394356 - 07/02/22 10:32 AM


> I don’t play MAME game very often nowadays, so I’m not sure when it started, but
> every time I start any MAME game it takes 20s before it actually starts. I.e., I just
> see a black screen with a spinning icon for 20s whenever I start a game before it
> actually appears. This happens if I use a frontend, or just type e.g. "mame dkongj".
>
> I've unpacked MAME to a new directory, and tried older versions (back to 2019), but I
> still see the same thing. Has anyone else experienced this?

I can only guess since you give no machine statistics, no MAME version/Operating System or if you are using mamedev.org produced MAME or otherwise.

Are you using a lot of .dat files for information (mameinfo, etc)? This could slow things down. I've read some people having issues with NAS setups with ROMS and delays in loading/starting. Also, I experienced issues with Windows 8.1 (Windows Server 2012) when starting a machine there was a long unexplained pause the first time I ran a machine in a 'session'. You can also try other video modes such as "-video bgfx" or "-video opengl" to see if that improves your experience.



nutte
MAME Fan
Reged: 07/05/15
Posts: 23
Send PM


Re: Why 20s delay when starting any game in MAME? new [Re: Tafoid]
#394358 - 07/02/22 11:10 AM


Thanks for comments...
I use standard Windows x64 MAME, i.e. from https://www.mamedev.org/. This happens on a clean install, i.e. if I create a new directory, unpack MAME 0.245 and add a few ROM-files, and then try to start any of the added games, I do see that 20s delay.

This is on a high-end computer running Windows 10 x64. It might be specific to my environment, but I've no idea why that might be, which is why I'm asking here. I've tried to use different command line arguments, as it almost seems like MAME tries to detect something, like video modes, like you kind of hinted at.
I did try "-video bgfx" and "-video opengl", but it's the same. I do use a local drive with a throughput of 14GB/s (yes, I'm a storage maniac that lives for benchmarks).

It should be noted that during that 20s delay that I can't alt-tab out of it, i.e. I'm, really stuck in MAME.



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4462
Loc: Melbourne, Australia
Send PM


Re: Why 20s delay when starting any game in MAME? new [Re: nutte]
#394359 - 07/02/22 11:37 AM


Do you have history.xml? That can take quite a while to load the first time you start MAME.



nutte
MAME Fan
Reged: 07/05/15
Posts: 23
Send PM


Re: Why 20s delay when starting any game in MAME? new [Re: Vas Crabb]
#394360 - 07/02/22 11:48 AM


No, this is with just the files from the standard archive, e.g. mame0245b_64bit.exe (or any previous version I've tested, including when the executable was named mame64.exe).

I do see the same delay every time I start MAME, i.e. if I run "mame dkong" over and over, MAME is frozen for 20s every single time.

Edited by nutte (07/02/22 11:50 AM)



TafoidAdministrator
I keep on testing.. testing.. testing... into the future!
Reged: 04/19/06
Posts: 3135
Loc: USA
Send PM


Re: Why 20s delay when starting any game in MAME? new [Re: nutte]
#394361 - 07/02/22 12:07 PM


> Thanks for comments...
> I use standard Windows x64 MAME, i.e. from https://www.mamedev.org/. This happens on
> a clean install, i.e. if I create a new directory, unpack MAME 0.245 and add a few
> ROM-files, and then try to start any of the added games, I do see that 20s delay.
>
> This is on a high-end computer running Windows 10 x64. It might be specific to my
> environment, but I've no idea why that might be, which is why I'm asking here. I've
> tried to use different command line arguments, as it almost seems like MAME tries to
> detect something, like video modes, like you kind of hinted at.
> I did try "-video bgfx" and "-video opengl", but it's the same. I do use a local
> drive with a throughput of 14GB/s (yes, I'm a storage maniac that lives for
> benchmarks).
>
> It should be noted that during that 20s delay that I can't alt-tab out of it, i.e.
> I'm, really stuck in MAME.

The only other environmental thing I can think of might be a virus detection issue. Is there a way to perhaps mark MAME to not be checked by your program? You may to try to start in a -window and see if that improves things. At the same time, watch your Task Manager to see what else might be running and possibly stealing MAME's thunder.



nutte
MAME Fan
Reged: 07/05/15
Posts: 23
Send PM


Re: Why 20s delay when starting any game in MAME? new [Re: Tafoid]
#394366 - 07/02/22 10:53 PM


The only anti-virus software I use is what comes with Windows, i.e. Microsoft Defender, and I've confirmed that MAME behaves the same way even when I've that turned off.

I can't get to the Task Manager during the 20s that MAME is frozen when running MAME in full screen, but if I run "mame -window" I get the same 20s freezing behavior and can confirm that CPU-usage looks normal. I.e. there is no process that shows a spike in CPU-usage; everything is just idling at 1% or lower, including Mame.exe.



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4462
Loc: Melbourne, Australia
Send PM


Re: Why 20s delay when starting any game in MAME? new [Re: nutte]
#394371 - 07/03/22 03:54 AM


Do you have any unusual peripherals, e.g. input devices (keyboard, mouse, game controllers), or sound hardware? Sometimes a delay on start is caused by a COM server for a driver timing out. Check Device Manager for devices that aren’t actually present and remove them, try removing or reinstalling special driver software for “gaming” peripherals, etc.

Also, have you tried running with -verbose and seeing what it says in the console output immediately before/after it freezes? That could give a clue as to what it’s waiting for.



nutte
MAME Fan
Reged: 07/05/15
Posts: 23
Send PM


Re: Why 20s delay when starting any game in MAME? new [Re: Vas Crabb]
#394373 - 07/03/22 09:58 AM


Thanks a lot for taking the time to respond! COM server driver timeout definitely seems to be the reason for the 20s freeze.

I don't have any exotic device plugged in, and Device Manager doesn't give much info on what is what, so after spending the last hour(s) testing I'm still puzzled if it's my mouse or my keyboard that cause the issue, or none of them.

I did find out that if I remove these four entries from "USB Input Device", the 20s freeze goes away.

Device USB\VID_0414&PID_A00C&MI_02\8&13F7E05E&0&0002 was deleted.
Class Guid: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}

Device USB\VID_0C45&PID_7692&MI_01\7&2FAEB158&0&0001 was deleted.
Class Guid: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}

Device USB\VID_0414&PID_A00D&MI_07\6&16E5B307&0&0007 was deleted.
Class Guid: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}

Device USB\VID_0414&PID_A00C&MI_03\8&13F7E05E&0&0003 was deleted.
Class Guid: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}



However, if I re-connect either my Glorious Model O- mouse, or my WASD-keyboard, or any other USB input device, the problem re-appears. So, still have to figure out what the problem really is...



I was not aware of the verbose flag, so thanks for that. The output looks like this:

E:\emu\MAME2>mame -verbose -window
Attempting load of mame.ini
Attempting load of mame.ini
Starting plugin data...
Attempting load of mame.ini
Attempting load of mame.ini
Video: Monitor 65537 = "\\.\DISPLAY1" (primary)
Direct3D: Using Direct3D 9
Physical width 2747, height 2100
Direct3D: Initialize
Direct3D: Configuring adapter #0 = NVIDIA GeForce RTX 3090
DirectSound: Primary buffer: 48000 Hz, 16 bits, 2 channels
Input: Adding keyboard #0: HID Keyboard Device (device id: \\?\HID#VID_0C45&PID_7692&MI_00#8&33a744cc&2&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding keyboard #1: HID Keyboard Device (device id: \\?\HID#VID_0C45&PID_7692&MI_01&Col03#8&fd0070a&8&0002#{884b96c3-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding keyboard #2: HID Keyboard Device (device id: \\?\HID#VID_1038&PID_1369&MI_01&Col02#8&8ef584d&0&0001#{884b96c3-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding keyboard #3: HID Keyboard Device (device id: \\?\HID#VID_1038&PID_1369&MI_02#8&1ae7e575&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #0: HID-compliant mouse (device id: \\?\HID#VID_1038&PID_1369&MI_01&Col01#8&8ef584d&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #0: HID-compliant mouse (device id: \\?\HID#VID_1038&PID_1369&MI_01&Col01#8&8ef584d&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Optional memory region ':screen' not found
Starting No Driver Loaded ':'
(missing dependencies; rescheduling)
Starting Video Screen ':screen'
Starting No Driver Loaded ':'
Checking for icons in directory icons
No candidate icons found for machines
Attempting to parse: default.cfg
Attempting to parse: ___empty.cfg
Direct3D: YUV format = RGB
Direct3D: Max texture size = 16384x16384
Direct3D: Device created at 2725x2044
Direct3D: Initialize HLSL



It freezes after "Input: Adding lightgun", and if I disconnect the mouse, it freezes after "Adding keyboard #3".

I'll continue to experiment, but this is definitely somehow the root cause.


Pages: 1

MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 283 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 445