-
Notifications
You must be signed in to change notification settings - Fork 750
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
Initial powerpc and arm support, Gentoo crossdev support #70
Conversation
Nice PR, how well are the new platform running with these changes? Is this powerpc LE or BE? I believe char is normal signed on x86 maybe you meant that it is normally unsigned on powerpc (and arm)? Are there any decisions in the compile process (and dependencies) when building for these targets (maybe it's worth updating the Readme)? |
Not tested just yet. More on this later.
All PPCs do not have a hardware based rotr like x86 does. However, the crossdev toolchain file I committed is specifically for 64-bit Big-Endian PowerPC, such as Cell Broadband Engine, Xenon or G5. Little-Endian PowerPC is often denoted as ppc64le. Being LE isn't the only difference.
Snap, you're totally right! Sorry, it's midnight and I'm tired from putting together stuff from Ikea all day long after work.
None. These targets run as such:
Provided that your crossdev toolchains have world-installed the dependencies:
and their toolchain's compiler has Here's the cherry on the cake: |
The rotate functions have been a pain since the start of the project, however I do think we have gotten it down to the few that where actually in the original C code. They may eventually be removed from devilutionX, but probably not before further cleanup has happened upstream. @pbekesky has already done some initial work on getting the game running on big endian PowerPc (running AmigaOS). The menu is working (after fixing pcx loading), but there are some issues in regards to handling the save game creation /loading. Arm should be in a must better state with mostly only being affected by the unsigned char issue, we even had a prototype that was able load in to town. However the code has improved dramatically since then so you might even have a playable game without much trouble. As you might now powerpc and playstation support is highly sought-after by the project, in order to work on the modern versions of the original supported platforms. Still with the PR being untested I would like for that to happen before we think about merging the PR, but let's keep it open to track the progress for now. |
@AJenbo last night I was trying to form a CMake toolchain file for the free software PS3 SDK available here https://github.com/ps3dev/ps3toolchain |
Ok, that's fine we can always dive in to it at later point after we get some more of the other related platforms working :) |
The code parts are not implemented in master. The game is also fully working on Raspberry Pi 3B+. I didn't setup cross compiling but instead compiled directly on the Pi. Any chance you could test if this now works with your cross compiling setup for Pi 1B+? I think most of all I'm missing a guide for how to set up the cross compiler. I'm also working on bringing 32bit PowerPC to a working state, so fare I have the menu mostly working and will probably start to merge in some of the needed changes for it. |
The menu should now work on PowerPC and other Big-Endian systems. |
# ifdef __x86__ | ||
# include <x86intrin.h> | ||
# else | ||
# define _rotr(a,b) ((a >> b) ^ (a << (32-b))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the last usages of _rotl
and _rotr
in 2cc0c2c
x86intrin shouldn't be needed anymore
Closing this PR as the given targets are untested and I don't have a way to test them (my PowerPC is 32bit). Feel free to open the PR if you get a fully running port going. |
@AJenbo I would like to help out with the port in any way. I do own a RaptorCS Blackbird system running Linux ppc64le. |
@runlevel5 excelent, my expectations is that at this point it should just build (tm), so the biggest issue at this point is finding a machine to test on. Do you need any help in doing so? |
@AJenbo Travis CI does offer ppc64le build option however they aren't useful for dev. What do you think about using my box for development instead? I could set up SSH with X11 forwarding for you. |
@runlevel5 I have previously attempted running the game via X11 forwarding but apparently this doesn't work. But I'm willing to give it ago. However, if you can just test the game an confirm that it works that would also be good enough :) |
@AJenbo I will get onto it and let you know later. Feel free to drop me your ssh public key if you want me to setup you an account on my box |
You can find users public keys here on GitHub :) |
Ran into issue with CMake failed to pick up libsodium, reported that to upstream libsodium as you suggested and they came back to me saying that file has been removed. The compilation run fine (if disabling the multiplayer network feature) without any hiccup. The only issue I could pick up is that |
The reply from libsodium basically amounts to "won't fix" and then deleting it to not get any more reports of issues, so no help from them I guess. We have used the one from Facebook previously but that didn't work for some Mac users, so I'm hesitant to just switch to it. You probably meant "Show Credits", you need to copy CharisSILB.ttf font from Packaging/resources to wherever you put the application. Glad to see that it worked other then that, feel free to report if you find any issues while playing. |
@runlevel5 Can you list all the package files? Per your error message, it finds the header and is able to extract version information, but fails to find |
@AJenbo Which library are you referring to here as an alternative to libsodium? Just curious. |
@kraileth It's just the findlibsodium.cmake helper script we are talking about. It's unclear where to find the upstream or maintained version. |
The findlibsodium is broken on Amiga as well, but it’s easily fixed by
modifying the file. It’s not part of our PR though since we got into other
issues regarding the net code.
…On Sat, 8 Feb 2020 at 17:00, Anders Jenbo ***@***.***> wrote:
@kraileth <https://github.com/kraileth> It's just the findlibsodium.cmake
helper script we are talking about.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#70?email_source=notifications&email_token=ACC5VBPICDRAIE2NAI6GGFDRB3JIZA5CNFSM4HB3SL72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELFU7JQ#issuecomment-583749542>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACC5VBIQD5BN5CWPS4QFFBTRB3JIZANCNFSM4HB3SL7Q>
.
|
@AJenbo Ah, I see. That kind of stuff is pretty annoying... |
I have offered to maintain the script in libsodiums official repo, where can I find the needed changes for Amiga support? |
if(UNIX OR CMAKE_SYSTEM_NAME STREQUAL "Generic") -> if(UNIX OR
CMAKE_SYSTEM_NAME STREQUAL "Generic" OR CMAKE_SYSTEM_NAME STREQUAL
“AmigaOS”)
Previously this was only if (UNIX) which obviously wouldn’t work.
I’ve added the os-type AmigaOS to the Amiga docker container and cmake
toolchain.
…On Sat, 8 Feb 2020 at 17:47, Anders Jenbo ***@***.***> wrote:
I have offered to maintain the script in libsodiums official repo, where
can I find the needed changes for Amiga support?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#70?email_source=notifications&email_token=ACC5VBK4D2MZSJSODRERXSTRB3O2NA5CNFSM4HB3SL72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELFWEAA#issuecomment-583754240>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACC5VBJQWVBYUGNOAEWXCMDRB3O2NANCNFSM4HB3SL7Q>
.
|
OR AMIGA also works and covers all Amiga based platforms!
…On Sat, 8 Feb 2020 at 17:54, Marlon Beijer ***@***.***> wrote:
if(UNIX OR CMAKE_SYSTEM_NAME STREQUAL "Generic") -> if(UNIX OR
CMAKE_SYSTEM_NAME STREQUAL "Generic" OR CMAKE_SYSTEM_NAME STREQUAL
“AmigaOS”)
Previously this was only if (UNIX) which obviously wouldn’t work.
I’ve added the os-type AmigaOS to the Amiga docker container and cmake
toolchain.
On Sat, 8 Feb 2020 at 17:47, Anders Jenbo ***@***.***>
wrote:
> I have offered to maintain the script in libsodiums official repo, where
> can I find the needed changes for Amiga support?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#70?email_source=notifications&email_token=ACC5VBK4D2MZSJSODRERXSTRB3O2NA5CNFSM4HB3SL72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELFWEAA#issuecomment-583754240>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACC5VBJQWVBYUGNOAEWXCMDRB3O2NANCNFSM4HB3SL7Q>
> .
>
|
Thanks I think we will go with AMIGA |
Yeah, that’ll probably be best! All Amiga toolchains are nix based, so
that’s why this works. :)
…On Sat, 8 Feb 2020 at 18:09, Anders Jenbo ***@***.***> wrote:
Thanks I think we will go with AMIGA
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#70?email_source=notifications&email_token=ACC5VBLZJQSWTX7FI2HFJRTRB3ROHA5CNFSM4HB3SL72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELFWU7Y#issuecomment-583756415>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACC5VBP2HIGN56NNMDMOUZDRB3ROHANCNFSM4HB3SL7Q>
.
|
Just to clarify is it |
if(UNIX OR CMAKE_SYSTEM_NAME STREQUAL "Generic" OR AMIGA)
…On Sat, 8 Feb 2020 at 18:14, Anders Jenbo ***@***.***> wrote:
Just to clarify is it if(UNIX OR CMAKE_SYSTEM_NAME STREQUAL "Generic" OR
CMAKE_SYSTEM_NAME STREQUAL “AMIGA”), or just feel free to throw a PR for
this one :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#70?email_source=notifications&email_token=ACC5VBLGTUM74JNB6YDPDITRB3R6FA5CNFSM4HB3SL72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELFWYAI#issuecomment-583756801>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACC5VBLHWNSNOJQ76KANV53RB3R6FANCNFSM4HB3SL7Q>
.
|
@AJenbo I've setup an account for you on my box
Let me know if you could gain access |
ssh: connect to host 100.68.27.243 port 2200: Network is unreachable |
@AJenbo Sorry I give you the wrong IP address, please try:
|
@AJenbo a quick update from me, the v1.0.1 release is successfully compiled with libsodium for Linux ppc64le. I could verify that LAN game works as expected Wondering if the project should offer Linux ppc64le binary for v1.0.1 release too? |
Does that issue apply to ppc64 too? I could see what I could do to test if ppc64 (Big Endian) could talk to ppc64le or not.
I am not a FreeBSD man so unable to help here. But if you like, I could set up FreeBSD on my box for you to poke into
Yes. I confirm that Linux ppc64le client could successfully connect to x86_64 host (in my case, I am using macOS build). The ppc64le can also successfully host game for x86_64 clients.
Feel free to experiment. |
Excelent, in that case I would say that ppc64le is supported, but work still needs to be done for ppc64be. |
@AJenbo if you are looking into CI that supports ppc64le, please have a look at TravisCI https://blog.travis-ci.com/2019-11-12-multi-cpu-architecture-ibm-power-ibm-z |
We already use TravisCI for Mac builds, could you make a PR that sets it up to also build for ppc64le? |
signed char
because justchar
is unsigned on x86 but signed on powerpc