Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
#123347 03/20/24 11:22 AM
Joined: May 2007
Posts: 582
Likes: 9
M
mizapf Offline OP
Senior Member
OP Offline
Senior Member
M
Joined: May 2007
Posts: 582
Likes: 9
I just noticed something strange on startup, before I saw that the recent update of my openSUSE Linux silently switched me to Wayland.

-video opengl is working

With -video bgfx -videodriver x11, the gameinfo screen stays displayed; the emulated screen is not rendered, although the emulation is running (reacts to keypresses).

With -video bgfx -videodriver wayland, I'm getting a segfault:

BGFX: Unsupported SDL window manager type 6
Setting BGFX platform data failed
BGFX library initialization failed
Segmentation fault (core dumped)

Found on three different installations, for MAME 0.261 and 0.263.

mizapf #123349 03/20/24 01:35 PM
Joined: Aug 2009
Posts: 1,229
Likes: 114
Very Senior Member
Offline
Very Senior Member
Joined: Aug 2009
Posts: 1,229
Likes: 114
1. Run MAME with -bgfx_debug, pickup a snapshot of that.
2. Run MAME with -verbose flag and paste the output here.

mizapf #123350 03/20/24 02:24 PM
Joined: Mar 2001
Posts: 17,137
Likes: 163
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,137
Likes: 163
Wayland in general is extremely experimental both from the SDL2 and bgfx ends. If you can force an X11 session, I highly recommend it.

mizapf #123351 03/20/24 04:36 PM
Joined: May 2007
Posts: 582
Likes: 9
M
mizapf Offline OP
Senior Member
OP Offline
Senior Member
M
Joined: May 2007
Posts: 582
Likes: 9
Actually, I don't really feel like going to Wayland; there are still lots of open issues. The desktop login still allows you to select "Plasma (X11)".

I just want to make sure I don't blame it for something on our side.

There are lots of Wayland advocates out there who give you downvotes in every forum should you dare to express anything less than enthusiasm for Wayland. wink

[Linked Image from mizapf.eu]



-verbose:
$ ./mame ti99_4ae -window -verbose
Attempting load of mame.ini
Parsing mame.ini
Loading translation file language/English/strings.mo
Reading translation file: 1 strings, original table at word offset 7, translated table at word offset 9
Loaded 0 translated string from file
Starting plugin data...
Available videodrivers: x11 wayland KMSDRM offscreen dummy evdev
Current Videodriver: x11
Display #0
Desktop Mode: 2560x1440-24@60
Current Display Mode: 2560x1440-24@60
Renderdrivers:
opengl (0x0)
opengles2 (0x0)
opengles (0x0)
software (0x0)
Display #1
Desktop Mode: 2560x1440-24@60
Current Display Mode: 2560x1440-24@60
Renderdrivers:
opengl (0x0)
opengles2 (0x0)
opengles (0x0)
software (0x0)
Available audio drivers:
pulseaudio
alsa
pipewire
dsp
disk
dummy
Build version: 0.263 (mame0263-283-gcbace25352c)
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=5001 USE_OPENGL=1
Compiler defines A: __GNUC__=13 __GNUC_MINOR__=2 __GNUC_PATCHLEVEL__=1 __VERSION__="13.2.1 20240206 [revision 67ac78caf31f7cb3202177e6428a46d829b70f23]"
Compiler defines B: __amd64__=1 __x86_64__=1 __unix__=1
Compiler defines C: __USE_FORTIFY_LEVEL=0
Enter init_monitors
Adding monitor screen0 (2560 x 1440)
Adding monitor screen1 (2560 x 1440)
Leave init_monitors
Enter sdlwindow_init

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
Initializing BGFX library
Audio: Start initialization
Audio: Driver is pulseaudio
Audio: frequency: 48000, channels: 2, samples: 512
sdl_create_buffers: creating stream buffer of 25600 bytes
Audio: End initialization
Keyboard: Start initialization
Input: Adding keyboard #1: System keyboard (device id: System keyboard)
Keyboard: Registered System keyboard
Keyboard: End initialization
Mouse: Start initialization
Input: Adding mouse #1: System mouse (device id: System mouse)
Mouse: Registered System mouse
Mouse: End initialization
Lightgun: Begin initialization
Events types to register: motion:-1, press:-1, release:-1
Lightgun: End initialization
Game Controller: Start initialization
Game Controller: End initialization
Searching font Liberation Sans in -. path/s
Matching font: 0x61ce650
unzip: opened archive file roms/ti99_4a.zip
unzip: found roms/ti99_4a.zip ECD at 1002
unzip: roms/ti99_4a.zip has no ZIP64 ECD locator
unzip: read roms/ti99_4a.zip central directory
unzip: closing archive file roms/ti99_4a.zip and sending to cache
unzip: found roms/ti99_4a.zip in cache
unzip: opened archive file roms/ti99_4a.zip
unzip: closing archive file roms/ti99_4a.zip and sending to cache
unzip: found roms/ti99_4a.zip in cache
unzip: opened archive file roms/ti99_4a.zip
unzip: closing archive file roms/ti99_4a.zip and sending to cache
unzip: found roms/ti99_4a.zip in cache
unzip: opened archive file roms/ti99_4a.zip
unzip: closing archive file roms/ti99_4a.zip and sending to cache
unzip: found roms/ti99_4a.zip in cache
unzip: opened archive file roms/ti99_4a.zip
unzip: closing archive file roms/ti99_4a.zip and sending to cache
Optional memory region ':screen' not found
Starting TI-99/4A Home Computer (Europe) ':'
(missing dependencies; rescheduling)
Starting Texas Instruments TMS9900 ':maincpu'
Starting TMS9901 Programmable System Interface ':tms9901'
Starting TI-99 Databus multiplexer ':datamux_16_8'
Starting TI-99 Cartridge port ':gromport'
Starting TI-99 Standard cartridge connector ':gromport:single'
Starting TI-99 cartridge ':gromport:single:cartridge'
Starting TMC0430 GROM ':gromport:single:cartridge:grom3'
Starting TMC0430 GROM ':gromport:single:cartridge:grom4'
Starting TMC0430 GROM ':gromport:single:cartridge:grom5'
Starting TMC0430 GROM ':gromport:single:cartridge:grom6'
Starting TMC0430 GROM ':gromport:single:cartridge:grom7'
Starting RAM ':scratchpad'
Starting RAM ':internal_32k_mod'
Starting Software List ':cart_list_ti99'
Starting Speaker ':cass_out'
(missing dependencies; rescheduling)
Starting Cassette ':cassette1'
Starting Cassette ':cassette2'
Starting TMC0430 GROM ':console_grom_0'
Starting TMC0430 GROM ':console_grom_1'
Starting TMC0430 GROM ':console_grom_2'
Starting TI-99 I/O Port ':ioport'
Starting Speaker ':sound_out'
(missing dependencies; rescheduling)
Starting SN94624 ':soundchip'
Starting TI-99 Joystick port ':joyport'
Starting TI-99/4(A) Twin Joysticks ':joyport:twinjoy'
Starting TMS9929A VDP ':vdp'
Starting Video Screen ':screen'
Starting TI-99/4A Home Computer (Europe) ':'
(missing dependencies; rescheduling)
Starting Speaker ':cass_out'
Starting Speaker ':sound_out'
Starting TI-99/4A Home Computer (Europe) ':'
Attempting to parse: default.cfg
Attempting to parse: ti99_4ae.cfg
BGFX: Found configuration for window 0
BGFX: Applying configuration for window 0


mizapf #123352 03/20/24 07:12 PM
Joined: Feb 2014
Posts: 1,024
Likes: 112
G
Very Senior Member
Offline
Very Senior Member
G
Joined: Feb 2014
Posts: 1,024
Likes: 112
don't know if it makes any difference, but I've noticed that -bgfx defaults to vulkan (at least for me on ubuntu) you could try experimenting with -bgfx_backend opengl

mizapf #123354 03/21/24 10:38 AM
Joined: Nov 2004
Posts: 15
Likes: 3
S
Member
Offline
Member
S
Joined: Nov 2004
Posts: 15
Likes: 3
support will probably depend on how complete the wayland compositor is openSUSE chose to go with. I am not running into unexpected issues with wayland (kwin) on debian12.

Originally Posted by mizapf
With -video bgfx -videodriver x11, the gameinfo screen stays displayed; the emulated screen is not rendered, although the emulation is running (reacts to keypresses).
the xwayland xserver will need to be configured and running for the x11 driver to be supported on wayland

Originally Posted by mizapf
With -video bgfx -videodriver wayland, I'm getting a segfault:

BGFX: Unsupported SDL window manager type 6
Setting BGFX platform data failed
BGFX library initialization failed
Segmentation fault (core dumped)

This will happen when the MAME build is not compiled with USE_WAYLAND=1, wayland support is not the default.

Last edited by sairuk; 03/21/24 10:40 AM.
mizapf #123355 03/21/24 01:15 PM
Joined: Mar 2004
Posts: 698
Likes: 2
Senior Member
Offline
Senior Member
Joined: Mar 2004
Posts: 698
Likes: 2
FWIW, on fedora both of these work:
Code
$ mame -intscaley 3 -autostretchxy -videodriver x11 -video bgfx -bgfx_backend vulkan mvsc
$ mame -intscaley 3 -autostretchxy -videodriver wayland -video bgfx -bgfx_backend vulkan mvsc
I am on a different GPU (RADV RENOIR) though.

mizapf #123356 03/21/24 01:51 PM
Joined: May 2007
Posts: 582
Likes: 9
M
mizapf Offline OP
Senior Member
OP Offline
Senior Member
M
Joined: May 2007
Posts: 582
Likes: 9
OK, I added USE_WAYLAND=1, but I'm having some problems when compiling. Seems as if the /usr/include/wayland directory is not in the include search path, as the files that were reported as missing are actually in that directory. I'll check a bit further.

mizapf #123357 03/21/24 02:28 PM
Joined: Mar 2001
Posts: 17,137
Likes: 163
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,137
Likes: 163
Sounds like maybe it needs to use pkgconfig or whatever to locate the Wayland includes?

mizapf #123358 03/23/24 03:17 PM
Joined: Mar 2004
Posts: 698
Likes: 2
Senior Member
Offline
Senior Member
Joined: Mar 2004
Posts: 698
Likes: 2
The only additional header needed by wayland is wayland-egl.h AFAIR:
https://github.com/mamedev/mame/pull/11451/files
Where is it located on your distro? On Fedora it is directly in /usr/include. If this is not a standard location, we need pkg-config indeed.

Page 1 of 2 1 2

Link Copied to Clipboard
Who's Online Now
0 members (), 31 guests, and 5 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,273
Posts121,387
Members5,064
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com