Home Page
Posted By: epicurusx Mame doesn't detect devices - 04/14/21 12:44 AM
Hey all,

I'm using Mame on Arch Linux. I was following the instructions for stable controllers but realized MAME doesn't find my devices. Only "system keyboard" and "system mouse" get picked up. I've tried up to the latest mame, v0.230, and my mame config has joystick, mouse, and lightgun enabled (I've also tried with the associated CLI flags). Sudo doesn't seem to have an effect, and Steam correctly detects my controller. Has anyone else run into this, or have any suggestions? Below is my verbose output.

Code
Attempting load of mame.ini
Parsing mame.ini
Attempting load of mame.ini
Available videodrivers: x11 wayland KMSDRM KMSDRM_LEGACY dummy
Current Videodriver: x11
        Display #0
                Renderdrivers:
                            opengl (0x0)
                         opengles2 (0x0)
                          software (0x0)
Available audio drivers:
        pulseaudio
        alsa
        dsp
        jack
        disk
        dummy
Build version:      0.209 (unknown)
Build architecure:
Build defines 1:    SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1
Build defines 1:    LSB_FIRST=1 PTR64=1
SDL/OpenGL defines: SDL_COMPILEDVERSION=2009 USE_OPENGL=1
Compiler defines A: __GNUC__=8 __GNUC_MINOR__=3 __GNUC_PATCHLEVEL__=0 __VERSION__="8.3.0"
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
Enter sdlwindow_init
Using SDL multi-window OpenGL 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)
Leave sdlwindow_init
Enter sdl_info::create
OpenGL: NVIDIA Corporation
OpenGL: GeForce GTX 780/PCIe/SSE2
OpenGL: 4.6.0 NVIDIA 460.67
OpenGL: texture rectangle supported
OpenGL: non-power-of-2 textures supported (new method)
OpenGL: vertex buffer supported
OpenGL: pixel buffers supported
OpenGL: framebuffer object supported
OpenGL: GLSL supported, but disabled
OpenGL: max texture size 16384 x 16384
Leave renderer_ogl::create
Audio: Start initialization
Audio: Driver is alsa
Audio: frequency: 48000, channels: 2, samples: 1024
sdl_create_buffers: creating stream buffer of 25600 bytes
Audio: End initialization
Keyboard: Start initialization
Input: Adding keyboard #0: System keyboard (device id: System keyboard)
Keyboard: Registered System keyboard
Keyboard: End initialization
Mouse: Start initialization
Input: Adding mouse #0: System mouse (device id: System mouse)
Mouse: Registered System mouse
Mouse: End initialization
Joystick: Start initialization
Joystick: End initialization
Searching font Liberation Sans in -. path/s
Matching font: /usr/share/fonts/liberation/LiberationSans-Regular.ttf
OpenGL: VBO supported
OpenGL: PBO supported
OpenGL: FBO supported
OpenGL: using vid filter: 1
Region ':user1' created
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: gunmouse.cfg
Attempting to parse: default.cfg
Attempting to parse: ___empty.cfg
sdl_kill: closing audio
Enter sdlwindow_exit
Leave sdlwindow_exit
Posted By: Golden Child Re: Mame doesn't detect devices - 04/14/21 09:10 AM
What controller(s) are you trying to use?

What do you get if you don't try to do stable controller ids?

You should see something where it's adding a joystick

Code
Keyboard: Start initialization
Input: Adding keyboard #0: System keyboard (device id: System keyboard)
Keyboard: Registered System keyboard
Keyboard: End initialization
Mouse: Start initialization
Input: Adding mouse #0: System mouse (device id: System mouse)
Mouse: Registered System mouse
Mouse: End initialization
Lightgun: Begin initialization
Lightgun: End initialization
Joystick: Start initialization
Input: Adding joystick #0: UserspaceJoystick (device id: 03000000030000000300000002000000)
Joystick: Userspace Joystick [GUID 03000000030000000300000002000000]
Joystick:   ...  3 axes, 25 buttons 0 hats 1 balls
Joystick:   ...  Physical id 0 mapped to logical id 1
Joystick:   ...  Does not have haptic capability
Joystick: End initialization
Posted By: R. Belmont Re: Mame doesn't detect devices - 04/14/21 11:39 AM
Stable controller IDs only really work on Windows, but that's not the problem here. SDL isn't detecting any joysticks, which normally means the kernel didn't recognize them. (Steam doesn't use the kernel services, IIRC, so it seeing a controller doesn't mean anything else on Linux will). On Fedora that means you have to install the kernel-modules-extras package to get all of the controller drivers, I don't know what the situation is on Arch (OG runs Arch I think? Maybe he knows).
Posted By: epicurusx Re: Mame doesn't detect devices - 04/14/21 02:37 PM
That's great information, thanks! To test further I attached several additional mice and enabled multimouse to see if it would pick those up, and it did not. I was able to split and use them each with x-input multi-pointer though. So this seems like a more general SDL input issue
Posted By: Golden Child Re: Mame doesn't detect devices - 04/14/21 08:45 PM
It'd be great to be able to have SDL open a mouse or keyboard in an exclusive mode EVIOCGRAB because otherwise the rest of the system interprets the events as coming from the primary mouse and keyboard.

As it currently stands, you can have multiple joysticks, just not multiple mice and keyboards.
© Forums