Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
06715 Speed Major Always Oct 14, 2017, 10:32 29 days ago
Tester wuemura View Status Public Platform SDLMAME
Assigned To Resolution Open OS Linux (64-bit)
Status [?] Driver cps1.cpp
Version 0.190 Fixed in Version Build 64-bit
Summary 06715: Huge slowdown with bezels
Description Emulation get a huge slowdown if a bezel artwork is used, this only happens on Linux. It happened with a cps1 game, it might happen with others too.
Sorry, I don't have a rom collection to test it out.
Steps To Reproduce - Copy the attached bezel file over artwork
- ./mame64 sf2
- Enable demo sounds
- As the audio start the emulation start to drag.
Additional Information
Flags SDL specific
Regression Version
Affected Sets / Systems
Attached Files
zip file icon sf2.zip (3,510,660 bytes) Oct 14, 2017, 10:32 Uploaded by wuemura
sf2 Bezel Artwork
Relationships
There are no relationsihp linked to this issue.
Notes
12
User avatar
No.14269
Tafoid
Administrator
Oct 14, 2017, 12:28
Some video modes are not as robust as others, I'd imagine.
From what I understand using Linux is an extreme exercise of finding just the right video setup/driver for your setup.
I'll let someone using SDL test/respond, but I assume it breaks down to what video mode you are using with MAME and what video libraries you may have installed.
User avatar
No.14270
wuemura
Tester
Oct 14, 2017, 12:34
Strange...
It only happens if the combination of bezels and sound are enabled, turning off sound or bezels makes the issue goes away.
User avatar
No.14271
wuemura
Tester
Oct 14, 2017, 12:55
I'm wrong, using "-audio none" it drags the same.
This is my main settings:
Linux Debian
GIGABYTE AM3+ ATX GA-990FXA-UD5 R5
AMD FX-8350 Vishera
Corsair Vengeance 16GB (2x8GB) 1866MHz DDR3 CL10 Red CMZ16GX3M2A1866C10R
wellington@Dragon:~/Downloads/_mame$ lspci|grep VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde PRO [Radeon HD 7750/8740 / R7 250E

This info is from the git version, it might help.
Available videodrivers: x11 wayland dummy
Current Videodriver: x11
Display #0
Renderdrivers:
opengl (0x0)
opengles2 (0x0)
software (0x0)
Available audio drivers:
pulseaudio
alsa
sndio
dsp
disk
dummy
Build version: 0.190 (mame0190-364-gd1acf72abb-dirty)
Build architecure:
Build defines 1: SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1
Build defines 1: LSB_FIRST=1 PTR64=1 MAME_DEBUG=1
SDL/OpenGL defines: SDL_COMPILEDVERSION=2005 USE_OPENGL=1
Compiler defines A: __GNUC__=6 __GNUC_MINOR__=3 __GNUC_PATCHLEVEL__=0 __VERSION__="6.3.0 20170516"
Compiler defines B: __amd64__=1 __x86_64__=1 __unix__=1
Compiler defines C: __USE_FORTIFY_LEVEL=0
Enter init_monitors
Adding monitor screen0 (1920 x 1080)
Leave init_monitors
Invalid video value dummy; reverting to software
Invalid prescale option, reverting to '1'
Enter sdlwindow_init
Using SDL multi-window soft driver (SDL 2.0+)

Hints:
SDL_FRAMEBUFFER_ACCELERATION (null)
SDL_RENDER_DRIVER (null)
SDL_RENDER_OPENGL_SHADERS (null)
SDL_RENDER_SCALE_QUALITY (null)
SDL_RENDER_VSYNC (null)
SDL_VIDEO_X11_XVIDMODE (null)
SDL_VIDEO_X11_XINERAMA (null)
SDL_VIDEO_X11_XRANDR (null)
SDL_GRAB_KEYBOARD (null)
SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS (null)
SDL_IOS_IDLE_TIMER_DISABLED (null)
SDL_IOS_ORIENTATIONS (null)
SDL_XINPUT_ENABLED (null)
SDL_GAMECONTROLLERCONFIG (null)
SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS (null)
SDL_ALLOW_TOPMOST (null)
SDL_TIMER_RESOLUTION (null)
SDL_RENDER_DIRECT3D_THREADSAFE (null)
SDL_VIDEO_ALLOW_SCREENSAVER (null)
SDL_ACCELEROMETER_AS_JOYSTICK (null)
SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK (null)
SDL_VIDEO_WIN_D3DCOMPILER (null)
SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT (null)
SDL_VIDEO_MAC_FULLSCREEN_SPACES (null)
SDL_MOUSE_RELATIVE_MODE_WARP (null)
SDL_RENDER_DIRECT3D11_DEBUG (null)
SDL_VIDEO_HIGHDPI_DISABLED (null)
SDL_WINRT_PRIVACY_POLICY_URL (null)
SDL_WINRT_PRIVACY_POLICY_LABEL (null)
SDL_WINRT_HANDLE_BACK_BUTTON (null)
User avatar
No.14281
Tafoid
Administrator
Oct 15, 2017, 16:39
Invalid video value dummy; reverting to software
Invalid prescale option, reverting to '1'

You seem to be using software which is the lowest speed/most compatible video available. Also, prescale appears to be set somewhere and MAME is reverting because it is an invalid value.
User avatar
No.14287
wuemura
Tester
Oct 17, 2017, 10:53
That's MAME default, I didn't set any video driver.
The prescale, was set to "0" zero, "1" is the only valid option?

What if the user want prescale disabled? It would enable it any way?
I'll do some tests latter to see if I change the video driver the issue get's better.
User avatar
No.14288
Justin Kerk
Developer
Oct 17, 2017, 17:22
prescale = 2 means to scale the output to 2x its natural size, prescale = 1 is 1x natural size which is the same as no prescale, so prescale = 0 is meaningless.

Are you sure you don't have a mame.ini tucked away somewhere, the actual MAME defaults would not be invalid.
User avatar
No.14291
wuemura
Tester
Oct 18, 2017, 00:57
edited on: Oct 18, 2017, 01:00
Looking further, there was a hidden folder at ~/.mame with a mame.ini inside, about the prescale issue, MAME allowed me to change it to "0" from that video setting option, it was set that way because I was testing the video option crashing bug. And by the way, there is another bug that I need to fill about that.

The video issue, the default value for video was "auto" and so is shown at the internal interface, MAME should pick up the best driver available, why it choose "dummy"? The best option for videorender was - if available - opengl, not dummy or software.

If we took the audio driver for example, MAME uses the best driver available, in my case pulseaudio, it didn't choose "dummy" in auto settings. Why in video it chooses "dummy" than moves to software? There should be a condition inside MAME to decide witch best driver to use in his auto settings, dummy and software should be the last options if nothing else are available.

Specific to this slowdown, manually changing the video from "auto" to "opengl" is a workaround to the problem, not a fix, MAME should decide and go with a better option if available.

User avatar
No.14292
Tafoid
Administrator
Oct 18, 2017, 03:13
If you provide an video option to MAME which doesn't work or isn't valid (the 'dummy' mentioned), it doesn't determine "best use" - it simply drops to the most compatible/baseline one guaranteed to work to all video cards (Software for SDL, GDL for Windows). With -audio assigments, it defaults to whatever AUTO is for the environment you are in.
User avatar
No.14294
wuemura
Tester
Oct 18, 2017, 12:01
We understand that, if the user set an invalid option.
In my case it was "auto", MAME correctly detected my environment, listed the best options and still choose dummy first. If the audio assignment choose the best environment I'm in, why can't video do the same?

As the output show, MAME already does that:
Renderdrivers:
opengl (0x0)
opengles2 (0x0)
software (0x0)

I'm not a programmer, can MAME do if this this and this options available, than use it, else use the best compatible option available. Mame already listed the best available option "opengl" as first but didn't use it for auto.

Windows is a very different environment, the video set as "auto" MAME chooses the best option available, Direct 3D in my case:
D:\Mame>mame64d
Video: Monitor 65537 = "\\.\DISPLAY1" (primary)
Direct3D: Using Direct3D 9
Physical width 1351, height 1040
Direct3D: Initialize
Direct3D: Configuring adapter #0 = AMD Radeon R7 200 Series
User avatar
No.14313
B2K24
Moderator
29 days ago
Requesting more feedback on this one...
User avatar
No.14314
wuemura
Tester
29 days ago
What do you need?
User avatar
No.14315
Tafoid
Administrator
29 days ago
He means Developer feedback.. Devs that have access to a Linux machine and can answer issues with more authority.