Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on ARM linux (raspberry pi) #443

Open
ghost opened this issue Oct 9, 2018 · 28 comments
Open

on ARM linux (raspberry pi) #443

ghost opened this issue Oct 9, 2018 · 28 comments

Comments

@ghost
Copy link

ghost commented Oct 9, 2018

Loved this game and your remake. I know its a difficult task, but i think the raspberry pi matches all the specs needed to run these game (opengl include). Could I ask if it possible to compile it on raspberry (with lazarus) and use wine to run it natively (not emulated) like I did with other "windows" arm recompiled apps. It could be an amazing port to ARM. so, if you tell me that its possible than something like that could work I will try it. I know it will try to use some windows API, so I need to know if at least if possible to make it run, theoretically. it could take me a long time to compile it (because of a lack of knowledge), so I need at least some hope before start.

@LauraRozier
Copy link
Contributor

LauraRozier commented Oct 9, 2018

With Laz you can cross-compile to any architecture, but the issue is the random bits and bobs of assembler. I think those are x86/x64 only... I could theoretically try to compile it once and try it on my B+
The real issue is that you can not play with "official" releases, as the security check won't allow this.
I did already work on a full-on linux-dist build and it works without wine.

@ghost
Copy link
Author

ghost commented Oct 9, 2018

Thanks for the quick answer. I follow your work from long time ago. This game has some economic mechanics were never present on another SRT games. if you could test it on your own pi I will appreciate that so much. I have a copy of the game and just need it on my pi because it should can :)

@ghost
Copy link
Author

ghost commented Oct 9, 2018

No wine? good!! that is an start!

@ghost
Copy link
Author

ghost commented Oct 11, 2018

2018-10-11-103845_1600x900_scrot
could you give me a little explanation of how to compile it? because its different from windows to linux. I dont know how to git revert the files from the replaced .data folder for example (following this guide https://github.com/Kromster80/kam_remake/wiki/ProjectCompilation). I only used git revert before to get revert a commit. please note than I am just a newbie than love this game my mail its salva.liebana@gmail.com . thanks to everything!

@ghost
Copy link
Author

ghost commented Oct 11, 2018

I use "git pull origin master" just in case it could help... but I barely think that.
so, I continue and when compiling this come out:
2018-10-11-104736_1600x900_scrot

@LauraRozier
Copy link
Contributor

From Krom his repo you are unable to compile to Linux, this is broken and not supported. I have a fork with a specific branch I was using for Linux compilation.
I am just looking for time (Of which I don't have a lot) to test it on my own Pi, then I could help out.

@ghost
Copy link
Author

ghost commented Oct 11, 2018 via email

@ghost
Copy link
Author

ghost commented Oct 17, 2018

Hi Thibmo! I know than you dont have so much time to give me some help! I am sorry if I am getting heavy on this, its only because I love this game and want to remind you than I count on you. Ive tested your linux client branch but unsuccesfully :( . seems broken to me, not an arm or x86 warning. just an "Error: Function is already declared".

@ghost
Copy link
Author

ghost commented Nov 10, 2018

nothing yet? sorry if you find me a little dens. I love to get this game working on rpi

@Kromster80
Copy link
Owner

@Askmewho please attach the exact error message you are getting. It is behind the hint on the above screenshot ..

@ghost
Copy link
Author

ghost commented Nov 27, 2018

Free Pascal Compiler version 3.0.0+dfsg-11+rpi1+deb9u1 [2017/07/27] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: Linux for ARMHF
(3104) Compiling KaM_Remake.dpr
(3104) Compiling src/KM_FormMain.pas
(3104) Compiling src/render/KM_RenderControl.pas
(3104) Compiling src/ext/KromOGLUtils.pas
(3104) Compiling ./src/ext/dglOpenGL.pas
(9009) Assembling dglopengl
/home/pi/kam_remake/src/ext/KromOGLUtils.pas(41,10) Warning: (5033) Function result does not seem to be set
/home/pi/kam_remake/src/ext/KromOGLUtils.pas(43,3) Note: (5025) Local variable "nPixelFormat" not used
/home/pi/kam_remake/src/ext/KromOGLUtils.pas(44,3) Note: (5027) Local variable "PixelDepth" is assigned but never used
/home/pi/kam_remake/src/ext/KromOGLUtils.pas(147,25) Warning: (5036) Local variable "NumFormats" does not seem to be initialized
/home/pi/kam_remake/src/ext/KromOGLUtils.pas(147,8) Warning: (5036) Local variable "ValidFormat" does not seem to be initialized
/home/pi/kam_remake/src/ext/KromOGLUtils.pas(149,17) Warning: (5036) Local variable "pixelFormat" does not seem to be initialized
(9009) Assembling kromoglutils
(3104) Compiling ./src/ext/LazarusOpenGL/openglcontext.pas
(3104) Compiling ./src/ext/LazarusOpenGL/glgtkglxcontext.pas
(9009) Assembling glgtkglxcontext
(9009) Assembling openglcontext
/home/pi/kam_remake/src/render/KM_RenderControl.pas(33,17) Note: (3250) Virtual method "DoOnResize;" has a lower visibility (private) than parent class TControl (protected)
(9009) Assembling km_rendercontrol
(3104) Compiling src/KM_Settings.pas
(3104) Compiling src/KM_Resolutions.pas
(3104) Compiling src/common/KM_Defaults.pas
(9009) Assembling km_defaults
/home/pi/kam_remake/src/KM_Resolutions.pas(83,3) Note: (5025) Local variable "I" not used
/home/pi/kam_remake/src/KM_Resolutions.pas(83,5) Note: (5025) Local variable "M" not used
/home/pi/kam_remake/src/KM_Resolutions.pas(83,7) Note: (5025) Local variable "N" not used
(9009) Assembling km_resolutions
(3104) Compiling src/KM_WareDistribution.pas
(3104) Compiling src/res/KM_ResWares.pas
(3104) Compiling src/res/KM_ResTexts.pas
(3104) Compiling src/ext/KromUtils.pas
/home/pi/kam_remake/src/ext/KromUtils.pas(62,13) Error: (3120) Function is already declared Public/Forward "SwapInt(var LongWord;var LongWord);"
/home/pi/kam_remake/src/ext/KromUtils.pas(81,25) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcarm returned an error exitcode

@ghost
Copy link
Author

ghost commented Nov 27, 2018

I use the branch linux-client on the fork of thibmo

@LauraRozier
Copy link
Contributor

Setting up a RPi with guacamole at the moment, crosscompile from the Windows machine just ended up in a linker error so I'll try it this way (saves me having to add yet another monitor to the desk)

@ghost
Copy link
Author

ghost commented Nov 29, 2018 via email

@Kromster80
Copy link
Owner

KromUtils.pas(62,13) Error: (3120) Function is already declared Public/Forward "SwapInt(var LongWord;var LongWord);" is likely caused by type collision - both Cardinal and NativeUInt map to LongWord on your system. You might need to ensure that WDC conditional define is turned off.

@ghost
Copy link
Author

ghost commented Dec 21, 2018

Couldnt make it (basically, I dont know how to turn off WCD conditional define on lazarus). thibmo, if you make any progress please contact me, my mail its salva.liebana@gmail.com . thanks for everything guys. you all made the best remake possible for the most underrated RTS game of all time.

@LauraRozier
Copy link
Contributor

The WDC define DOES NOT exist within lazarus.
Only the FPC define exists. WDC is a customly set define that is set via the .inc file in the repo root. It is only set when a delphi-specific conditional define is set.

@ghost
Copy link
Author

ghost commented Dec 21, 2018

ok, btw, whats the opengl needed on this project? because vc4 mesa driver its only 2.1 capable

@ghost
Copy link
Author

ghost commented Jan 17, 2019

2019-01-17-031354_1600x900_scrot

ok, WDC conditionals problem resolved. now its opengl.

@LauraRozier
Copy link
Contributor

KaM Remake requires:
– 500MHz or faster processor;
– 256MB or more of RAM;
– 3D graphics accelerator OpenGL 1.4 compliant;
– Sound card.

@ghost
Copy link
Author

ghost commented Jan 17, 2019

it should work. I will keep trying.

@LauraRozier
Copy link
Contributor

Which branch are you using, btw?
I mainly work from the Linux-native-game-client branch on my fork.
It has (most of?) the modifications by Rey and should compile to "normal" GNU/Linux systems.

@ghost
Copy link
Author

ghost commented Jan 19, 2019

Yes, i am on that branch. could you give me a few instructions of how to compile it, what the project I have to open on lazarus, etc. because its a mess and maybe its not the same procces like on windows compilation.

@LauraRozier
Copy link
Contributor

In Laz you just have to open the file KaM_Remake.lpi
Then you compile ot for your system, with Laz you have to clean before you rebuild the sources.

@ghost
Copy link
Author

ghost commented Mar 11, 2019

Hi, thibmo. One last thing. Have you any linux binary release? I will try it under emulation. It will be easier if you could supply a binary.

@LauraRozier
Copy link
Contributor

Sadly I don't. There is also the fact that CPU architectures have to match, if a binary is compiled for x86 it won't run on ARM, etc.

@ghost
Copy link
Author

ghost commented Mar 15, 2019

Yeah. But i wanna run trought emulation... X86 emulation. But its ok.

@ghost ghost closed this as completed Mar 20, 2019
@ghost
Copy link
Author

ghost commented Jun 5, 2021

https://youtu.be/yORdTDzlUds years later. it's now possible!!! that being said rpi4 is too weak on the gpu to run it perfectly, my rk3399 does a much better job. @thibmo @Kromster80

@ghost ghost reopened this Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants