Serious-Engine icon indicating copy to clipboard operation
Serious-Engine copied to clipboard

Black screen when using on aarch64 (asahi linux/m1)

Open BetterUnborn opened this issue 2 years ago • 8 comments

Hi,

I compiled it from sources using latest commit 4c0b882e8564d73be457c3c6e196e476d11d3cb0 on my up-to-date asahi linux on aarch64 apple M1. It compiles without any modifications using the build-linux64.sh script, and I copied the *.gro files from a windows TSE installation from steam into it.

When I launch the game the menu screen shows up. But when I start a game, it is stuck with a black screen. Gnome tells me that the program does not react anymore (--> stuck in a loop?). The console shows this:

./ssam                                                                                  ─╯
STUBBED: load window icon in /home/donald/.bin/Serious-Engine/Sources/SeriousSam/MainWindow.cpp, line 168.
STUBBED: Need SDL invisible window or something in /home/donald/.bin/Serious-Engine/Sources/SeriousSam/MainWindow.cpp, line 327.
STUBBED: !!! FIXME: get the code back in from Ryan's original port. in /home/donald/.bin/Serious-Engine/Sources/Engine/Base/Stream.cpp, line 921.
STUBBED: Report actual SDL device name? in /home/donald/.bin/Serious-Engine/Sources/Engine/Sound/SoundLibrary.cpp, line 265.
STUBBED: co-opt the existing T-buffer support for multisampling? in /home/donald/.bin/Serious-Engine/Sources/Engine/Graphics/SDL/SDLOpenGL.cpp, line 113.
STUBBED: this can't possibly be right, yeah? in /home/donald/.bin/Serious-Engine/Sources/Engine/Base/SDL/SDLEvents.cpp, line 147.
STUBBED: SDL2 can handle these events in /home/donald/.bin/Serious-Engine/Sources/SeriousSam/SeriousSam.cpp, line 1031.
STUBBED: Not 64-bit clean in /home/donald/.bin/Serious-Engine/Sources/EntitiesMP/Player.es, line 6561.

Any help appreciated :)

BetterUnborn avatar Feb 23 '23 13:02 BetterUnborn

What compiler did you use?

severusseptimius avatar Feb 23 '23 18:02 severusseptimius

The one that came preinstalled with Asahi:

gcc --version                                                                           ─╯
gcc (GCC) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

BetterUnborn avatar Feb 23 '23 18:02 BetterUnborn

Just to test out ... tried also with clang, the result is the same. Verified in build output that indeed the compiler I thought is chosen.

clang --version                                                                         ─╯
clang version 15.0.7
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Remark: I can also see the Croteam and Godgames logos including seemingly correct animations. Just whenever the engine should draw its in-game graphics screen is black and the game hangs. Also when I don't interrupt at the logos and the games does circle through the initial demos.

BetterUnborn avatar Feb 23 '23 18:02 BetterUnborn

Can you try the workaround in #40 ?

severusseptimius avatar Feb 23 '23 18:02 severusseptimius

Can confirm with that workaround the level starts, and I could play for a few minutes without a problem :+1:

BetterUnborn avatar Feb 23 '23 18:02 BetterUnborn

Oh, so some speicifc bug on Aarch64. I'll have to check if some the hack for armhf maybe need to be enable on Aarch64 as well.

ptitSeb avatar Feb 23 '23 19:02 ptitSeb

Okay, thanks for the help!! I have tried several levels and have seen no issues so far ... just the resolution was capped at something 1400ish, dunno why ... but that's another topic.

Shall I close this issue or leave it open as reference for a possible aarch64 fix?

BetterUnborn avatar Feb 23 '23 20:02 BetterUnborn

Leave it open yeah, I'll try to work on that later.

ptitSeb avatar Feb 23 '23 21:02 ptitSeb