PS2 How to Compile SM64 for PS2

Charles_n_town

Senior Member
this is a pretty straight-forward tutorial. it's not hard or anything.

1. first, install Git: https://git-scm.com/download/win you can also install this with winget through powershell (google it).

2. now, download and install docker desktop: https://www.docker.com/ iirc, both automatically add the right environmental variables' path (let me know if they don't), so you can call them in cmd prompt.

3. open cmd prompt, and type
git clone https://github.com/fgsfdsfgs/sm64-port.git -b ps2 --recursive
then, cd sm64-port

4. copy your legally obtained rom into the root, named baserom.us.z64

5. now, type: docker build . -t sm64_ps2 . this will create the docker image file.

6. lastly, tweak this command, as it says on github, from docker run --rm -ti -v $(pwd):/sm64 sm64_ps2 make --jobs 4 to docker run --rm -ti -v %cd%:/sm64 sm64_ps2 make --jobs 4 . the first command is for linux, but we want it to work with current directory in cmd prompt. remember, use cmd prompt instead of powershell, because the command doesn't work in powershell.

let me know if you have success.
 
upload_2024-7-9_10-50-52.png
 
Yeah, it error'd. I think gsKit.h is part of the PS2 sdk. Docker is supposed to create an environment with a working sdk. Let me check if I have a problem currently. yep, it happens to me too, in both linux and windows. it looks like the sm64 port was updated two months ago, so it seems to have broken something in the docker image. it has gsKit listed, but it's not working for some reason, so I tested a normal build w/out docker. it does still build normally, but I have no way of testing the game, since I don't have a ps2. I guess I could try a ps2 emulator, if it can read standalone elf:

upload_2024-11-17_4-33-59.png


it seems to work on the emulator:

upload_2024-11-17_4-41-55.png


edit: I think I know what the problem is. I think it's the spelling of gsKit, where docker has it listed with a lowercase K. I'm not sure if this can be corrected or not on our end. the docker container has it spelled correctly, so I dunno. it appears this was a problem originally with the Makefile, but that seems to have been corrected but maybe not the docker image itself has this edit. linux, and probably docker in general, is case-sensitive, so lower/uppercase matters, unlike in windows. I might be able to help you get the ps2 toolchain installed. that's the way I compiled it in this post.
 
Last edited:

Similar threads

Back
Top