charlestevens70 1 Posted August 14, 2020 Report Share Posted August 14, 2020 Cheers! I've been wondering for some time now if it would be possible to compile the source code of TDM to the Raspberry Pi, especially the models 3 and 4. I've seen some videos online of people running Doom3 on it, so how hard would it be to compile the source of TDM for the raspberry pi? Would it need a major rewrite of some parts of the code? I've been "tinkering" with the source for some days, and as I was expecting, all the configuration files are made for x86 architectures (Linux and Windows). I've been searching online for some info about the toolchains needed to even start compiling the source for these arm machines, but the information has been quite lackluster and outdated. I've managed to track down a toolchain to compile c++ code for the raspberry pi, made by the pi foundation but I'm not quite sure how to use it and I guess the support for it has been dropped for quite some time now. Anyway, I figured that instead of wasting more of my time, it would be best to ask here what you guys think. Is it possible to even think about this, or does TDM use some kind of libraries or other external code which makes it impossible to compile for the pi? Is there anything related to the game that makes almost impossible or too much of a hassle to try to port the game for the raspberry pi? Performance isn't an issue for me. I just want to know if it can be run in that machine. If it is possible to do this without a major code rewrite of the game, where should I start? I have no experience on compiling anything for arm, only some experience in x86, so this might be a fool's errand, but I would like to give it a try nonetheless. If it is possible to do this and if some of you could help me in any way, that would be appreciated. On the other hand, if you think this is a really hard thing to even try to do, please feel free to tell me so I don't waste more of my time. Thanks in advance 1 Quote Link to post Share on other sites
New Horizon 524 Posted August 15, 2020 Report Share Posted August 15, 2020 As I understand it from a few searches, the raspberry pi architecture only supports Opengl 2.1 and doesn't work with stock Doom 3. The Dhewm port of the D3 source uses Vulkan which is apparently supported on Pi 4. Dark Mod is now running on Opengl 3.1 if I recall and I doubt there are any plans to abandon that for Vulkan. Someone with a better working knowledge may prove me wrong on all of that but that's my understanding. 1 Quote Link to post Share on other sites
Abusimplea 168 Posted August 16, 2020 Report Share Posted August 16, 2020 TDM is heavy on GPU, CPU, and RAM. The top tier Pi 4 has 8 GiB RAM, but i would still expect a slide show because of the meager CPU and GPU power. Quote Link to post Share on other sites
clort 0 Posted February 15 Report Share Posted February 15 I'm interested in building TDM for khadas vim3. The new open-source panfrost drivers support up to opengl 3.1, so TDM could be in-scope for mali g52 and g72 GPUs. Beyond the -sse2 in CMakeLists.txt there is code requiring intel's SIMD instructions idlib/sys/sys_defines.h renderer/tr_light.cpp I haven't looked further. These would need to be modified to use arm NEON or plain old c++. It can be done - I have doom3 running on aarch64. I'm not qualified to do it though. Cheers Quote Link to post Share on other sites
stgatilov 1251 Posted February 15 Report Share Posted February 15 36 minutes ago, clort said: I'm interested in building TDM for khadas vim3. The new open-source panfrost drivers support up to opengl 3.1, so TDM could be in-scope for mali g52 and g72 GPUs. TDM 2.09 requires OpenGL 3.3. Quote Beyond the -sse2 in CMakeLists.txt there is code requiring intel's SIMD instructions idlib/sys/sys_defines.h renderer/tr_light.cpp I haven't looked further. These would need to be modified to use arm NEON or plain old c++. I built TDM for Elbrus, so the architecture by itself should not be a problem. But Elbrus compiler supported SSE intrinsics. I have a plan to clean this mess in 4550. Did not get to it yet. The plan was to ensure that all intrinsics are disabled if __SSE__ and __SSE2__ are not defined. It should be enough to make TDM compile on various architectures, as long as they have good GPU support and normal Linux OS. To be honest, the fact that this vim3 uses Android instead of standard Linux will be the critical problem. If it won't work on X windows, then someone will have to rewrite quite a bunch of OS-specific code to make TDM run. 1 Quote Link to post Share on other sites
clort 0 Posted February 15 Report Share Posted February 15 (edited) 1 hour ago, stgatilov said: "TDM 2.09 requires OpenGL 3.3" Ok after a good cry, I've recovered. Will look at older revs. Quote "To be honest, the fact that this vim3 uses Android instead of standard Linux will be the critical problem. If it won't work on X windows, then someone will have to rewrite quite a bunch of OS-specific code to make TDM run." Good news here! It runs bog standard linux too! Currently running devuan beowulf on it. Building now with sse2neon.h headers and it looks like it might work. https://github.com/DLTcollab/sse2neon It's a bit more involved. The Simd.cpp wants AVX stuff, which might be supplyable with: https://github.com/kunpengcompute/AvxToNeon Which does build on my box and passes tests AVX2NEONTest Complete: Passed 335 tests : Failed 0 -------------------- Since we won't be getting opengl 3.3 soon (all that gl 4 compute stuff would need backporting), I'll look at the last TDM that uses opengl 3.1. Can anyone suggest a mission with low amount of geometry in the assets? I'd be wanting around 130k triangles or lower. Cheers! Edited February 15 by clort typo Quote Link to post Share on other sites
stgatilov 1251 Posted February 16 Report Share Posted February 16 7 hours ago, clort said: Can anyone suggest a mission with low amount of geometry in the assets? I'd be wanting around 130k triangles or lower. Closemouthed Shadows is my FM of choice when I need level of minimum size. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.