Open GrimSqueaker opened 2 years ago
It is awesome that you tried this!
Can we close this now with the latest merge?
No, this is more of a long term project to figure out all the needed fixes for ARM builds. The last merge was unrelated to this here.
On my experience, If something works perfectly on X86_64 but doesn't work well on aarch64, it's usually because of char signedness: on arm, plain char is unsigned, while on x86 it's signed.
Thanks for the hint. I did not know that. And this will most probably be a problem in our code base.
So I am trying to get it to build on the Pi 4 (which is Arm64), I will have another go this weekend. I ran into some errors finding SDL but I think it was looking for source directory we have in our source as the Pi comes with SDL2 installed.
System-installed SDL2 is the way to go: I for one use SDL2 with KMS/DRM enabled.
@vanfanel we could maybe fix that by replacing all chars with int8_t as most of the time it is either a number or a pointer to a memory address. If I can get it to compile, I will try this.
@thobbsinteractive Yes, that should fix the ARM-specific issues, as far as I know. I will test if you try to fix it!
So even though I used apt-get to get the sdl2 library I seem to be getting this error, which probably means I have some environment vars unset or need to build SDL2?
CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message): Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR) Call Stack (most recent call first): /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE) cmake/sdl2/FindSDL2.cmake:313 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:22 (find_package)
So i need to tell cmake to find sdl2 in CMakeCache.txt?
Hi @thobbsinteractive , no, that should not be necessary. Did you install the devel packages? I think those were all the libs I needed to install:
sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libpng-dev libpng++-dev libboost-system-dev
No I did not. My mistake lol. I am new to the linux world,
No problem. We could give this command line as an example for debian-based systems in the readme.md. On my main system (Fedora) the packages have different names. That is why I vaguely wrote "install the dev packages of these libs".
Yeah I figured. I was thinking of putting a link to the pi/debian? install instructions rather than have it on the main readme page.
or we make a bash script to do it
Now I am getting this crap. apt does not seem to have an entry for findfirst
CMake Error at remc2/CMakeLists.txt:148 (add_library):
Cannot find source file:
../findfirst/findfirst.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at remc2/CMakeLists.txt:148 (add_library):
No SOURCES given to target: findfirst
Did you init the submodule whilst cloning the repo? If not, you have to do it manually. I do not know how VSCode handles this. Just do the following in the working copy of the repo
git submodule init
git submodule update
It should be in the repo. It would seem it was not pulled down with the rest of the code for some reason
Findfirst comes with our repo as a git submodule to the github repo of findfirst. In my "remc2clean" repo I replaced all file accesses by C++17 code and did not need it as a dependency. I am planning to do the same here in the future.
Btw.: we should have a slack channel or some other chat tool for these discussions :-)
Yeah I was thinking we need slack or discord when I was saying to tom yesterday about testing multi-player. So @GrimSqueaker @turican0, Slack or Discord? Discord is more games orientated, but I know Slack better from work.
This is strange I cannot pull the contents of /findfirst onto the Pi. It is fine in the development branch on my windows machine. But I have tried deleting and re-cloning the repo and it will not pull the contents of /findfirst. It is the strangest thing
So I copied to a memory stick and got it on the pi that way. Maybe it is because it is a git repo, has a .get file and needs to be pull itself?
The git submodule commands from above should initialise the submodule and provide you with the contents of that directory. Alternatively, you can also initialise them during cloning:
git clone --recurse-submodules https://github.com/thobbsinteractive/magic-carpet-2-hd.git
I have not used Slack and Discord before. Just pick any and I will join there.
Okay. I will set up something today.
Like GrimSqueaker, I don't use either, but I have no problem signing up somewhere.
Here it is: https://discord.gg/mFMRUVeu I have a PR to include it in the Readme
So my current plan is to convert all the left and right shifted bits to their likely original calculations.
E.g. (n << 1)
is actually (n * 2)
.
I will also to look at the flow, as the level loading screen is showing and not the map/level selection screen indicating some sort of flow issue, likely to do with indexing
I have tried to build on Raspberry Pi OS 11 (32 bit). The build works fine and the game can reach the main menu. Intro videos play well. But there are graphical glitches in the main menu and the level selection screen cannot be reached (segfault). This issue is intended to report the current state and maybe track progress to get the game running on ARM.