Open nickbailuc opened 2 weeks ago
Your startup log looks completely normal. The unknown event is likely SDL_CLIPBOARDUPDATE = 0x900
, which is not explicitly handled by the game's eventloop. However, one good thing is that it shows the event loop is running.
As an aside, the only unexpected thing is that your implementation does not seem to support VK_EXT_memory_budget
. I don't think this will cause problems since it's only used for the overlay stats display. Once you get things working I would like to know if you can set com_showFPS 2
in the console. I don't want the game to crash if this Vulkan extension is not supported.
Back to the original problem, the only thing I can think of is SDL which provides windowing, events, and keyboard/mouse input handling. How did you install your SDL library and what version is it?
We know the game compiles and runs fine on arm64, but is officially tested on this arch using macOS not linux. It would be cool to get this working if possible.
Your startup log looks completely normal. The unknown event is likely
SDL_CLIPBOARDUPDATE = 0x900
, which is not explicitly handled by the game's eventloop. However, one good thing is that it shows the event loop is running.As an aside, the only unexpected thing is that your implementation does not seem to support
VK_EXT_memory_budget
. I don't think this will cause problems since it's only used for the overlay stats display. Once you get things working I would like to know if you can setcom_showFPS 2
in the console. I don't want the game to crash if this Vulkan extension is not supported.Back to the original problem, the only thing I can think of is SDL which provides windowing, events, and keyboard/mouse input handling. How did you install your SDL library and what version is it?
We know the game compiles and runs fine on arm64, but is officially tested on this arch using macOS not linux. It would be cool to get this working if possible.
Here's the result of dpkg -l | grep sdl
ii libsdl1.2-dev:arm64 1.2.68-2+b1 arm64 SDL 1.2 binary compatibility library - development files
ii libsdl1.2debian:arm64 1.2.68-2+b1 arm64 SDL 1.2 binary compatibility library wrapping SDL 2.0
ii libsdl2-2.0-0:arm64 2.30.9+dfsg-1 arm64 Simple DirectMedia Layer
ii libsdl2-dev:arm64 2.30.9+dfsg-1 arm64 Simple DirectMedia Layer development files
ii libsdl2-doc 2.30.9+dfsg-1 all Reference manual for libsdl2
ii libsdl2-gfx-1.0-0:arm64 1.0.4+dfsg-5+b2 arm64 drawing and graphical effects extension for SDL2
ii libsdl2-gfx-dev:arm64 1.0.4+dfsg-5+b2 arm64 development files for SDL2_gfx
ii libsdl2-gfx-doc 1.0.4+dfsg-5 all documentation files for SDL2_gfx
ii libsdl2-image-2.0-0:arm64 2.8.2+dfsg-1+b2 arm64 Image loading library for Simple DirectMedia Layer 2, libraries
ii libsdl2-image-dev:arm64 2.8.2+dfsg-1+b2 arm64 Image loading library for Simple DirectMedia Layer 2, development files
ii libsdl2-image-tests 2.8.2+dfsg-1+b2 arm64 Image loading library for Simple DirectMedia Layer 2 - tests
ii libsdl2-mixer-2.0-0:arm64 2.8.0+dfsg-1+b3 arm64 Mixer library for Simple DirectMedia Layer 2, libraries
ii libsdl2-mixer-dev:arm64 2.8.0+dfsg-1+b3 arm64 Mixer library for Simple DirectMedia Layer 2, development files
ii libsdl2-net-2.0-0:arm64 2.2.0+dfsg-2+b2 arm64 Network library for Simple DirectMedia Layer 2, libraries
ii libsdl2-net-dev:arm64 2.2.0+dfsg-2+b2 arm64 Network library for Simple DirectMedia Layer 2, development files
ii libsdl2-tests 2.30.9+dfsg-1 arm64 Simple DirectMedia Layer automated and manual tests
ii libsdl2-ttf-2.0-0:arm64 2.22.0+dfsg-1+b1 arm64 TrueType Font library for Simple DirectMedia Layer 2, libraries
ii libsdl2-ttf-dev:arm64 2.22.0+dfsg-1+b1 arm64 TrueType Font library for Simple DirectMedia Layer 2, development files
I haven't had any issues with SDL on this system (whether the game is from Debian packages, or compiled). I'm assuming the SDL instance is probably fine, unless Doom 3 requires some bleeding edge version, or some kind of extension not provided in Debian packages.
How can I get SDL to ignore the unknown event SDL_CLIPBOARDUPDATE = 0x900
. Is there an environment variable I can try launching the game with? I was also wondering if this is an X.org issue (the game launches in Xwayland and I'm unable to force it to launch in pure Wayland). That often causes/fixes input issues as well.
The SDL version seems fine (needs to be sdl2). Unknown events are ignored by default, so no worry there.
Wayland might be an issue - I have never tried it personally, although others use it successfully. And if I understand it correctly, XWayland is an X compatibility layer on top of Wayland, so that could be something to look into.
Some suggestions for now:
SDL_Init( SDL_INIT_GAMECONTROLLER )
for game controllers. Do you have a PS4 or other game controller that you could plug in via USB? Might be worth a try.The SDL version seems fine (needs to be sdl2). Unknown events are ignored by default, so no worry there.
Wayland might be an issue - I have never tried it personally, although others use it successfully. And if I understand it correctly, XWayland is an X compatibility layer on top of Wayland, so that could be something to look into.
Some suggestions for now:
1. The game does an explicit `SDL_Init( SDL_INIT_GAMECONTROLLER )` for game controllers. Do you have a PS4 or other game controller that you could plug in via USB? Might be worth a try. 2. Can you run try running the game on X11 directly vs. XWayland? 3. Run natively on Wayland, i.e. SDL_VIDEODRIVER=wayland
Ran some tests (took a while cuz I messed up or corrupted base/
somehow, had to reinstall from scratch (did the GOG.com verify integrity, and compressed into .tar
with a checksum before transferring it from an amd64
to this aarch64
MacBook). Game didn't launch at all, but now with fresh install and fresh compilation of RBDOOM3BFG back at the same stage I was before with the "no input" problem.
Anyways, I don't have any controllers plugged into the laptop (in fact I ran these tests with no USB devices or Bluetooth mice just in case). I'm gonna skip the loading files/Vulkan/OpenAL part straight to the tail of what the terminal reads, but I'll have the full logs available as files:
--------------------------------------
------- Initializing renderSystem --------
renderSystem initialized.
--------------------------------------
Skipping Intro Videos!
Reading strings/english.lang as UTF-8
9104 strings read
--------- Initializing Game ----------
gamename: baseDOOM-1
gamedate: Nov 13 2024
WARNING: file def/_tb_models.def, line 5230: entityDef 'genmodel_mapobjects_monitors_hangingmonitor' previously defined at def/_tb_models.def:5216
Initializing event system
...543 eve
SDL_VIDEODRIVER=wayland
------- Initializing renderSystem --------
WARNING: Couldn't set gamma ramp: That operation is not supported
WARNING: Couldn't set gamma ramp: That operation is not supported
renderSystem initialized.
--------------------------------------
Skipping Intro Videos!
Reading strings/english.lang as UTF-8
9104 strings read
--------- Initializing Game ----------
gamename: baseDOOM-1
game
QT_QPA_PLATFORM=wayland GDK_BACKEND=wayland SDL_VIDEODRIVER=wayland
------- Initializing renderSystem --------
WARNING: Couldn't set gamma ramp: That operation is not supported
WARNING: Couldn't set gamma ramp: That operation is not supported
renderSystem initialized.
--------------------------------------
Skipping Intro Videos!
Reading strings/english.lang as UTF-8
9104 strings read
--------- Initializing Game ----------
gamename: baseDOOM-1
game
QT_QPA_PLATFORM=xcb GDK_BACKEND=x11 SDL_VIDEODRIVER=x11
------- Initializing renderSystem --------
renderSystem initialized.
--------------------------------------
Skipping Intro Videos!
Reading strings/english.lang as UTF-8
9104 strings read
--------- Initializing Game ----------
gamename: baseDOOM-1
gamedate: Nov 13 2024
WARNING: file def/_tb_models.def, line 5230: entityDef 'genmodel_mapobjects_monitors_hangingmonitor' previously defined at def/_tb_models.def:5216
Initializing event system
...543 eve
------- Initializing renderSystem --------
renderSystem initialized.
--------------------------------------
Skipping Intro Videos!
Reading strings/english.lang as UTF-8
9104 strings read
--------- Initializing Game ----------
gamename: baseDOOM-1
gamedate: Nov 13 2024
WARNING: file def/_tb_models.def, line 5230: entityDef 'genmodel_mapobjects_monitors_hangingmonitor' previously defined at def/_tb_models.def:5216
Initializing event system
...543 eve
Results are essentially the same, except when forcing wayland it doesn't capture the mouse whereas normally it captures the cursor but I cannot see it. Each time the music plays and nothing happens (tried waiting 5 minutes in case it was caching something in Vulkan). In the end I have to force quit the game.
Interestingly, i also get
WARNING: Unable to open resource file maps/_startup.resources
WARNING: Unable to open resource file maps/_startup.resources
Not sure if this is actually file related, all I did was copy base/
into DoomCode
but 'skipped' overriding files, so that the base/
files in this git repo trump those that come with the original game. If this might be an actual issue with the files, please let me know. I remain very interested in getting this working!
force-wayland.txt force-Xwayland.txt normal.txt super-force-wayland.txt x11-native.txt
Thanks for testing so extensively. All of these combinations and logs show expected behaviour, but unfortunately don't give much of a clue regarding the underlying problem.
If you are able to use a debugger, I would be interested in starting with basic keyboard input. The file in question is case SDL_KEYUP:
, and inside that block the relevant code is:
res.evType = SE_KEY;
res.evValue = key;
res.evValue2 = ev.key.state == SDL_PRESSED ? 1 : 0;
--> kbd_polls.Append( kbd_poll_t( key, ev.key.state == SDL_PRESSED ) );
if( key == K_BACKSPACE && ev.key.state == SDL_PRESSED )
{
uniChar = key;
}
return res;
Place a breakpoint on the indicated line above then start the game. After you see the game selector screen, simply hit "enter" (to select a game) and the breakpoint should be hit. What is the value of key
in the above line? As long as the breakpoint is hit, we can make progress inside the game. If the breakpoint is not hit, then the problem is with SDL input in your environment (SDL_PollEvent
) and is external to the game.
If you get nothing I guess you could go a level up and check for all SDL events by looking in the same file at:
// loop until there is an event we care about (will return then) or no more events
while( SDL_PollEvent( &ev ) )
{
--> switch( ev.type )
{
...
System
Vulkan (backstory)
Since the Asahi project recently added conformant Vulkan support, I decided to compile some Vulkan games. The system runs the
vkcube
model as well as GZDoom and vkQuake perfectly, but I wanted something that actually has some nice visuals and thought of RBDOOM-3-BFG's move to Vulkan.How I installed Doom 3
Anyways, there's no aarch64-linux build of Vulkan SDK, so I first compiled Vulkan SDK, added the binaries to
$PATH
, compiled RBDOOM-3-BFG, copied thebase/
from the latest patched install ongog.com
.The problem
Launching the executable opens a window, loads the screen where you select Doom 1, 3, or 2, plays the music, but I have no mouse cursor to move around nor does it respond to any keyboard input. Given this odd platform (aarch-64-linux) I have to compile most of my games. Thus far, I haven't had any issues with other 3D games utilizing SDL and Vulkan/OpenGL, so I think the system (Mesa, Vulkan, SDL) are functioning correctly. The
stdout
produces some missing file errors, however not sure if that's causing the no input issue. I've tried the originalbase/
from GOG, as well as applying the 1.3 or 1.5 patches from Moddb (one of them didn't launch the game at all, the other launched and same no input result).stdout
Here's the
stdout
. I am determined to get this port working, so I am willing to do further tests and provide whatever info necessary.