Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

juanstdio

macrumors member
Original poster
Jun 3, 2021
60
116
Argentina
Hello everyone,
after seeing this video
and getting exicted plus im on vacation of my job, I have tried to build xash3d from the source code multiple times in two powerbooks (g4 12" and g4 15") running Tiger and failed, the most recent one was failed when it reached 100% of the build during" Linking C shared library "libxash.dylib"

I installed brew and tried to avoid macports (xcode 2.5 required anyways).
here what I have done at thhis point
-get sld2 from Alex_free https://github.com/alex-free/panther_sdl2 (2.0.3)
-install some brews "brew install gcc6 git binutils"
-An "archived" version of the Build and running from archive.org https://web.archive.org/web/20200905061636/https://github.com/FWGS/xash3d/wiki/Building-and-running
-get hlsdk dev : git clone https://github.com/FWGS/vgui-dev hlsdk/

-get xash3d source codes:
https://github.com/FWGS/xash3d/archive/refs/tags/v0.18.zip does not work, https://github.com/FWGS/xash3d/archive/refs/tags/v0.19.2.zip does not work, https://github.com/FWGS/xash3d/archive/refs/tags/v0.19.1.zip does not work,
https://github.com/FWGS/xash3d/archive/refs/tags/v0.19.zip This one works but:

I had to define the architecture in xashfloder/engine/common/build.c:

elif defined mips || defined(LITTLE_ENDIAN)
archname = "mips";
#elif defined __EMSCRIPTEN__
archname = "javascript";

Then on another file Sequence.h I have fixed:
typedef unsigned char byte to typedef unsigned char Byte and then modified the Byte function in every usage on the header file (only two times appeard so not a big concern).

After that I had customized the cmake file (VGUI will not work for PPC) following the "archived" version of the Build and running:

cmake -DHL_SDK_DIR=../hlsdk -DXASH_SDL=yes -DXASH_VGUI=no ../ && make
Output:
[ 23%] Linking C shared library libxash.dylib
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: can't locate file for: -lX11
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/libtool: file: -lX11 is not an object file (not allowed in a library)


aaand failed at 23%, so I tuned it a bit more..
cmake -DHL_SDK_DIR=../hlsdk -DXASH_SDL=yes -DXASH_VGUI=no -DCMAKE_C_FLAGS="-I/usr/X11R6/include -L/usr/X11R6/lib" -DCMAKE_OSX_ARCHITECTURES=ppc ../ && make -j4

r/PowerPC - Trying to build xash3d on 10.4 Tiger (PPC)
r/PowerPC - Trying to build xash3d on 10.4 Tiger (PPC)
and Failed at 100%... Both G4s failed at 100% :(

I tried to deep dive more and gave up eventually, because I didn't have much idea on the specific error..

Any idea how to clean that error during compilation? maybe it is the GCC Version or something releated to it..

Thank you!
 
I did the change but it failed again.. it is failing on the same part when it tries to link libxash.dylib

I'll keep investigating until I have something.. I want to have the binary

1660273725099.png
 
Any chance there is a live community that is working on complete PPC port of half-life? I would like to keep an eye on them and eventually play HL on my iBook :)
 
Hi,

Sorry to revive a very old thread but.. I experienced the same issues porting Xash3D to Xbox 360 as it also shares the PPC big endian CPU. I got to a similar point to the above video where it boots and you can move around, but then was fighting to fix many other byte order issues that I'm not skilled enough to resolve.

I can share the source code for the PPC big endian Xbox 360 version I was working on that semi runs as below if anyone is interested in using it to try get the Mac version working.


Thanks
 
  • Like
Reactions: wicknix
I recently managed to compile a somewhat usable Tiger compatible build of Xash3D for PPC using a big endian patched repo of the original Source I found on Github.

I've uploaded the binary here in case anyone's interested in testing it out - should work with the Steam version of the Half-Life resource files - just put them in the Valve folder located in the Resources dir of the Half-Life PPC app (without overwriting the existing files.)


Don't get your hopes up too high tho, this build is still far from playable - sound is garbled, loading and saving doesn't work, as do map transitions and random crashes are very common. I'd say it runs a little bit better than the version larbob demoed in that YouTube video so it's still the best porting attempt I've seen so far and maybe you'll be able to get some enjoyment out of it.

hlppc.png

hlppc2.png
 
Last edited:
I'm speechless...I downloaded the file and used a 1999 cd version file just to test and worked at first try!!

IMG_3029.jpeg


Tomorrow I'll try the steam version, seems like its not able to read the maps, maybe due to an expected map name or something similar, since the hazard course loads the first part
 
You can load maps through the in-game console by typing "map mapname" the netmaps all seem to load just fine that way, c1a1c and c1a2 also seem to be at least somewhat playable - haven't really tested beyond that. You can get all weapons and ammo by typing "impulse 101" into the console btw.
 
Last edited:
  • Like
Reactions: juanstdio
This got a bit out of control...
BTW it does not work with the bulit in wifi, it uses the LAN Port...sadly
image.jpg
 
I'm speechless...I downloaded the file and used a 1999 cd version file just to test and worked at first try!!

View attachment 2241256

Tomorrow I'll try the steam version, seems like its not able to read the maps, maybe due to an expected map name or something similar, since the hazard course loads the first part

Is this the game with the “pick up that can” cop?
 
I'm wondering how difficult/time consuming it would be to fix the remaining issues.

I've added the repo of the PPC patched source to my github account in case anyone wants to do a collab on this:


Code:
#elif defined(__ppc__) || defined(__ppc64__)
    archname = "powerpc";

If this is what you actually want and bitness does not matter.

Standard name for the arch is `ppc` or `ppc64`, while `powerpc` is platform. However software may use its own specific definitions.
 
Don't get your hopes up too high tho, this build is still far from playable - sound is garbled, loading and saving doesn't work, as do map transitions and random crashes are very common.

I found a solution for this issue, it's not due to the binary, it's due to a config for a default value.. seems like apple sound cards have higher gain and thus the audio sounds like hell. solution is to lower it to a value like "0.0040"

The keyboard map is in a default state, so you only have the arrow keys unless you map them manually, so I did it and now I can use a more comfortable "wasd".

Here are the two files, just replace them inside the "valve" folder and give it a try:)


I'm still dealing with the fact of the missing textures, could be something due to the folders or buffers.. because sometimes they load and sometimes they don't

EDIT:
I've tried to host a "crossfire" server via LAN, but only the internal LAN Port is an option, Airport will not work.. same as my steam version in my lab... so.. I'll have to connect two of my G4's to have the "first LAN Game of HL1 in PPC"? we'll see.

Counter-strike 1.6 works? I haven't tested yet, I just dragged the "cstrike" folder from my steam version next to the "valve" folder and the game recognized it as an option and allowed me to swap to it, we'll see soon too
 

Attachments

  • valveConfigs.zip
    2.6 KB · Views: 66
Actual gameplay in a PowerBook G4 12", after fixing the audio/ keyboard issue.


 
I found a solution for this issue, it's not due to the binary, it's due to a config for a default value.. seems like apple sound cards have higher gain and thus the audio sounds like hell. solution is to lower it to a value like "0.0040"

The keyboard map is in a default state, so you only have the arrow keys unless you map them manually, so I did it and now I can use a more comfortable "wasd".

Here are the two files, just replace them inside the "valve" folder and give it a try:)


I'm still dealing with the fact of the missing textures, could be something due to the folders or buffers.. because sometimes they load and sometimes they don't

EDIT:
I've tried to host a "crossfire" server via LAN, but only the internal LAN Port is an option, Airport will not work.. same as my steam version in my lab... so.. I'll have to connect two of my G4's to have the "first LAN Game of HL1 in PPC"? we'll see.

Counter-strike 1.6 works? I haven't tested yet, I just dragged the "cstrike" folder from my steam version next to the "valve" folder and the game recognized it as an option and allowed me to swap to it, we'll see soon too
Considering the fact that the Intel Mac build of Xash plays Audio just fine I'd say the problems are still related to the code.
Your fix is a neat find though, however I noticed that some of the louder sounds still overmodulate.
 
I assume you're using the old xash3d sources as base and not the xash3d-fwgs sources? I am currently working on fixing up the xash3d-fwgs sources so they work for big endian systems. Plan is to upstream the changes, so that others can benefit from that as well. My current target platform is Amiga, however I am using a powerbook g4 running linux to test out the changes. :)
 
Thanks for the info - I'll check out your repo. We're indeed using the old Xash3D v1.19.2 source for this, I've been told the FWGS one won't compile on Mac, although that info is pretty outdated as well.
 
I assume you're using the old xash3d sources as base and not the xash3d-fwgs sources? I am currently working on fixing up the xash3d-fwgs sources so they work for big endian systems. Plan is to upstream the changes, so that others can benefit from that as well. My current target platform is Amiga, however I am using a powerbook g4 running linux to test out the changes. :)

Oh, by the way: have you tried building SDL2 and VLC for Amiga? Do they build and work?

I was able to fix building, using X11 backend, but they do not yet work correctly. VLC via X11 output messes up colors and duplicates video picture. Other outputs do not work.
 
Hi guys! I’ve embarked on this quest for a friend to get HL1 on a slot-loading iMac G3 running 10.3.9, but doctor45x’s app seems to crash as soon as it opens. I know this is probably for OS X Tiger, but does anybody know any workarounds to get it on Panther?
Thanks!
 
I assume you're using the old xash3d sources as base and not the xash3d-fwgs sources? I am currently working on fixing up the xash3d-fwgs sources so they work for big endian systems. Plan is to upstream the changes, so that others can benefit from that as well. My current target platform is Amiga, however I am using a powerbook g4 running linux to test out the changes. :)

I've had no luck with compiling the FWGS source on Tiger fyi. gcc7 doesn't seem to be supported and I don't have any newer compiler available on PPC 10.4 atm....
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.