On Sun, Aug 13, 2017, at 16:35, Jeremy Evans wrote: > On 08/12 11:06, Anthony J. Bentley wrote: > > Jeremy Evans writes: > > > On 08/12 09:08, Anthony J. Bentley wrote: > > > > Jeremy Evans writes: > > > > > Update to the latest mednafen, reminder from the medna...@sent.com. > > > > > > > > > > Release notes can be found at: https://mednafen.github.io/ > > > > > > > > > > Note that the default sound driver now tries to open /dev/audio, set > > > > > "sound.driver sdl" in the config file to get the previous behavior. > > > > > > > > > > I'm unable to test this, as mednafen no longer runs on my machine, > > > > > neither the previous version nor this update. In both cases, running > > > > > mednafen with any game results in a black window and requires > > > > > kill -9 to exit. I tested with gcc-only, and the result was the same. > > > > > > > > > > Is anyone able to get mednafen to work, either with the current > > > > > version > > > > > or with this update? I know the current version worked when I > > > > > committed > > > > > it, but I haven't really used it since. > > > > > > > > Both mednafen-0.9.39.2p1 and mednafen-0.9.46 work fine on my machine. > > > > Mednafen uses OpenGL; could be a graphics driver problem? Have you tried > > > > software rendering (LIBGL_ALWAYS_SOFTWARE=1)? > > > > > > > > The diff is ok with me. > > > > > > I did try software rendering and also using sdl instead of opengl as the > > > video driver, but it made no difference. What graphics card are you > > > using? I'm using: > > > > > > radeondrm0 at pci1 dev 0 function 0 "ATI Radeon HD 5450" rev 0x00 > > > > inteldrm0 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07 > > > > When I get home in a few days I'll try radeondrm. > > As mentioned by Micah, it doesn't appear this is a video card issue, > but rather an issue with SDL Joystick support. Things work fine with > the patch below. Is anyone able to use SDL Joystick support > successfully (either with mednafen or with something else)? > > The weird thing is, I don't even have a joystick connected, but it > thinks I do: > > uhidev0 at uhub2 port 3 configuration 1 interface 0 "NOVATEK USB > Keyboard" rev 1.10/1.04 addr 2 > uhidev0: iclass 3/1 > ukbd0 at uhidev0: 8 variable keys, 6 key codes > uhidev1 at uhub2 port 3 configuration 1 interface 1 "NOVATEK USB > Keyboard" rev 1.10/1.04 addr 2 > uhidev1: iclass 3/0, 2 report ids > uhid0 at uhidev1 reportid 1: input=1, output=0, feature=0 > uhid1 at uhidev1 reportid 2: input=3, output=0, feature=0 > > If I had to guess, uhid0 is for the sleep button on the keyboard, and > uhid1 is for the mute, volume up, and volume down buttons. > > Here's the gdb output for mednafen without the patch below, if mednafen > recognizes a joystick: > > Thread 2 (thread 532442): > #0 _thread_sys_read () at -:3 > #1 0x000000021b23400f in _libc_read_cancel (fd=Variable "fd" is not > available.) at /usr/src/lib/libc/sys/w_read.c:27 > #2 0x00000002618d445d in SDL_SYS_JoystickUpdate () from > /usr/local/lib/libSDL.so.8.0 > #3 0x00000002618b9a35 in SDL_JoystickUpdate () from > /usr/local/lib/libSDL.so.8.0 > #4 0x00000000008ea7bb in __register_frame_info () > > Thanks, > Jeremy > > Index: patches/patch-src_drivers_Joystick_SDL_cpp > =================================================================== > RCS file: patches/patch-src_drivers_Joystick_SDL_cpp > diff -N patches/patch-src_drivers_Joystick_SDL_cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-src_drivers_Joystick_SDL_cpp 14 Aug 2017 00:10:23 > -0000 > @@ -0,0 +1,20 @@ > +$OpenBSD$ > + > +Index: src/drivers/Joystick_SDL.cpp > +--- src/drivers/Joystick_SDL.cpp.orig > ++++ src/drivers/Joystick_SDL.cpp > +@@ -177,12 +177,14 @@ Joystick *JoystickDriver_SDL::GetJoystick(unsigned > ind > + > + void JoystickDriver_SDL::UpdateJoysticks(void) > + { > ++ /* > + SDL_JoystickUpdate(); > + > + for(unsigned int n = 0; n < joys.size(); n++) > + { > + joys[n]->UpdateInternal(); > + } > ++ */ > + } > + > + JoystickDriver *JoystickDriver_SDL_New(void) >
With that patch, mednafen 0.9.46 now works even when a gamepad is plugged in. But I can't get mednafen to recognize the gamepad; it doesn't let me map any of its keys. Also, I can say that mgba (the sdl version) has the same problem as the unpatched mednafen. If a controller is plugged in, it shows only a black screen and has to be killed. Works fine without a controller. Micah