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

PS2 Version #77

Open
godreborn opened this issue Nov 25, 2022 · 24 comments
Open

PS2 Version #77

godreborn opened this issue Nov 25, 2022 · 24 comments

Comments

@godreborn
Copy link

is there any way to compile sm64 for use on ps2 hardware? I'm able to compile the game, but it only works on an emulator. I know you've had this question asked before, but I'm not sure if it's been rectified or not. if not, do you know which sdk is needed or toolchain?

@sounddrill31
Copy link

Same issue, this seems to provide a bit of insight. #72 (comment)

@godreborn
Copy link
Author

I tried compiling the game with that sdk version, but there's a problem. for some reason, it won't even compile. I have no problems compiling on the latest version, but then, as you know, it works on an emulator but not hardware.

@metchebe
Copy link

@godreborn Yes you can build for PS2 hardware but currently the only option (apparently) is using an older SDK and using old sm64 code or using updated code but undoing the changes for the new SDK.

See the following comments for somewhat detailed instructions:
#72 (comment)
#72 (comment)

@godreborn
Copy link
Author

thanks. is the 8/4/21 August 4th or April 8th? and, is that from the ps2sdk or the sm64 version?

@metchebe
Copy link

@godreborn If I remember correctly it should be sm64-port at commit 2a579ed.

@godreborn
Copy link
Author

thanks. I have a successful build that works on hardware.

20221129_091102

@sounddrill31
Copy link

thanks. I have a successful build that works on hardware.

20221129_091102

Still trying, will you help me out if I get stuck?

@godreborn
Copy link
Author

yes

@sounddrill31
Copy link

yes

thx

@sounddrill31
Copy link

yes

Do you have a fork with the relevant changes? I am tired of wrestling with github to undo/add changes to my fork.

If not, can you give me a general idea of how you did this? No matter what I do docker errors out.

@godreborn
Copy link
Author

all I did was use that old version of sm64 (the one from 08-03-21 using a git checkout. recursive somehow screwed up though, so I had to download the audio portion of the repository manually. it will error at compiling if it's missing. anyway, that's pretty much all I did. I didn't need to use docker either.

@sounddrill31
Copy link

sounddrill31 commented Dec 2, 2022

all I did was use that old version of sm64 (the one from 08-03-21 using a git checkout. recursive somehow screwed up though, so I had to download the audio portion of the repository manually. it will error at compiling if it's missing. anyway, that's pretty much all I did. I didn't need to use docker either.

I see. I use github codespaces since I run windows and didn't want to tinker with VMs or WSL(tried b4, you'll see an issue request in my name) Will try what you did, thanks a lot!

@sounddrill31
Copy link

all I did was use that old version of sm64 (the one from 08-03-21 using a git checkout. recursive somehow screwed up though, so I had to download the audio portion of the repository manually. it will error at compiling if it's missing. anyway, that's pretty much all I did. I didn't need to use docker either.

The sound folder? Getting an audsrv error 2 personally.

-D_EE -G0 -Ips2/ps2-audsrv/ee/rpc/audsrv/include -I/workspaces/sm64-port/ps2dev/ps2sdk/ee/include -I/workspaces/sm64-port/ps2dev/ps2sdk/common/include -I/workspaces/sm64-port/ps2dev/gsKit/include -DNO_SEGMENTED_MEMORY -DWIDESCREEN -DF3DEX_GBI_2E -o build/us_ps2/src/pc/gfx/gfx_ps2_wapi.o src/pc/gfx/gfx_ps2_wapi.c
ee-gcc -std=gnu99 -c -O3 -fno-rename-registers -I include -I build/us_ps2 -I build/us_ps2/include -I src -I . -D_LANGUAGE_C -DVERSION_US -DNON_MATCHING -DAVOID_UB -DTARGET_PS2 -D_EE -G0 -Ips2/ps2-audsrv/ee/rpc/audsrv/include -I/workspaces/sm64-port/ps2dev/ps2sdk/ee/include -I/workspaces/sm64-port/ps2dev/ps2sdk/common/include -I/workspaces/sm64-port/ps2dev/gsKit/include -DNO_SEGMENTED_MEMORY -DWIDESCREEN -DF3DEX_GBI_2E -o build/us_ps2/src/pc/gfx/gfx_opengl.o src/pc/gfx/gfx_opengl.c
make -C ps2/ps2-audsrv
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/workspaces/sm64-port/ps2/ps2-audsrv'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory '/workspaces/sm64-port/ps2/ps2-audsrv'
make: *** [Makefile:619: audsrv] Error 2
make: *** Waiting for unfinished jobs....

@godreborn
Copy link
Author

all I did was use that old version of sm64 (the one from 08-03-21 using a git checkout. recursive somehow screwed up though, so I had to download the audio portion of the repository manually. it will error at compiling if it's missing. anyway, that's pretty much all I did. I didn't need to use docker either.

The sound folder? Getting an audsrv error 2 personally.

-D_EE -G0 -Ips2/ps2-audsrv/ee/rpc/audsrv/include -I/workspaces/sm64-port/ps2dev/ps2sdk/ee/include -I/workspaces/sm64-port/ps2dev/ps2sdk/common/include -I/workspaces/sm64-port/ps2dev/gsKit/include -DNO_SEGMENTED_MEMORY -DWIDESCREEN -DF3DEX_GBI_2E -o build/us_ps2/src/pc/gfx/gfx_ps2_wapi.o src/pc/gfx/gfx_ps2_wapi.c
ee-gcc -std=gnu99 -c -O3 -fno-rename-registers -I include -I build/us_ps2 -I build/us_ps2/include -I src -I . -D_LANGUAGE_C -DVERSION_US -DNON_MATCHING -DAVOID_UB -DTARGET_PS2 -D_EE -G0 -Ips2/ps2-audsrv/ee/rpc/audsrv/include -I/workspaces/sm64-port/ps2dev/ps2sdk/ee/include -I/workspaces/sm64-port/ps2dev/ps2sdk/common/include -I/workspaces/sm64-port/ps2dev/gsKit/include -DNO_SEGMENTED_MEMORY -DWIDESCREEN -DF3DEX_GBI_2E -o build/us_ps2/src/pc/gfx/gfx_opengl.o src/pc/gfx/gfx_opengl.c
make -C ps2/ps2-audsrv
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/workspaces/sm64-port/ps2/ps2-audsrv'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory '/workspaces/sm64-port/ps2/ps2-audsrv'
make: *** [Makefile:619: audsrv] Error 2
make: *** Waiting for unfinished jobs....

you're missing the ps2-audsrv. you need to use --recursive , but when I did that, the files disappeared after doing a git checkout command. put the audsrv repo in the location specified above. if you go there on github, there will be a link in that location.

@sounddrill31
Copy link

sounddrill31 commented Dec 2, 2022

all I did was use that old version of sm64 (the one from 08-03-21 using a git checkout. recursive somehow screwed up though, so I had to download the audio portion of the repository manually. it will error at compiling if it's missing. anyway, that's pretty much all I did. I didn't need to use docker either.

The sound folder? Getting an audsrv error 2 personally.

-D_EE -G0 -Ips2/ps2-audsrv/ee/rpc/audsrv/include -I/workspaces/sm64-port/ps2dev/ps2sdk/ee/include -I/workspaces/sm64-port/ps2dev/ps2sdk/common/include -I/workspaces/sm64-port/ps2dev/gsKit/include -DNO_SEGMENTED_MEMORY -DWIDESCREEN -DF3DEX_GBI_2E -o build/us_ps2/src/pc/gfx/gfx_ps2_wapi.o src/pc/gfx/gfx_ps2_wapi.c
ee-gcc -std=gnu99 -c -O3 -fno-rename-registers -I include -I build/us_ps2 -I build/us_ps2/include -I src -I . -D_LANGUAGE_C -DVERSION_US -DNON_MATCHING -DAVOID_UB -DTARGET_PS2 -D_EE -G0 -Ips2/ps2-audsrv/ee/rpc/audsrv/include -I/workspaces/sm64-port/ps2dev/ps2sdk/ee/include -I/workspaces/sm64-port/ps2dev/ps2sdk/common/include -I/workspaces/sm64-port/ps2dev/gsKit/include -DNO_SEGMENTED_MEMORY -DWIDESCREEN -DF3DEX_GBI_2E -o build/us_ps2/src/pc/gfx/gfx_opengl.o src/pc/gfx/gfx_opengl.c
make -C ps2/ps2-audsrv
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/workspaces/sm64-port/ps2/ps2-audsrv'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory '/workspaces/sm64-port/ps2/ps2-audsrv'
make: *** [Makefile:619: audsrv] Error 2
make: *** Waiting for unfinished jobs....

you're missing the ps2-audsrv. you need to use --recursive , but when I did that, the files disappeared after doing a git checkout command. put the audsrv repo in the location specified above. if you go there on github, there will be a link in that location.

Figured that out, thanks a lot, building now!

ran the following commands,

cd ps2

rm-rf ps2-audrsv

git clone https://github.com/fgsfdsfgs/ps2-audsrv.git

Hoping for the best

IT IS BUILT! Thanks a lot @godreborn

@sounddrill31
Copy link

sounddrill31 commented Dec 2, 2022

Feeling the audio stutter even in emulator but it works!

My fork: https://github.com/sounddrill31/sm64-port

Fixed the audsrv errors by deleting linked folder and instead manually using a zip from the same version. Suffice to say, even docker is working 100% so far.

@godreborn
Copy link
Author

nice. I'll check it out at some point. I've now built every single version of sm64 that I know of. the only problematic one was the dreamcast one, because I cannot build it without docker. I can build all the rest without it. not sure what's going on there. :P some systems work better than others as I think a lot of these sm64s on random systems, like dos for example, are proof on concept. I've also built every version of sonic mania except for the ps3. no idea what's going on there. it builds, but it doesn't work.

@sounddrill31
Copy link

nice. I'll check it out at some point. I've now built every single version of sm64 that I know of. the only problematic one was the dreamcast one, because I cannot build it without docker. I can build all the rest without it. not sure what's going on there. :P some systems work better than others as I think a lot of these sm64s on random systems, like dos for example, are proof on concept. I've also built every version of sonic mania except for the ps3. no idea what's going on there. it builds, but it doesn't work.

That's amazing! I would love to try it on the ps2 if it is available.

@fgsfdsfgs
Copy link
Owner

Might be fixed now courtesy of fjtrujy.

@sounddrill31
Copy link

sounddrill31 commented Jan 17, 2023

Might be fixed now courtesy of fjtrujy.

Thanks a lot, @fjtrujy, and @fgsfdsfgs, am now archiving my repo and separating rudimentary iso builder into new repo.

@godreborn
Copy link
Author

so it works? compile it normally with latest toolchain and sdk? I need to recompile that, correct? it might be a while before I can test it. I was able to compile it using a version of the sdk mentioned somewhere, which was one from a year ago, as well as the sm64 from a year ago iirc. not sure what changed. anyway, my laptop's fan failed, and replacing it didn't work, so I'm going to have to have someone diagnose it. hopefully, it's not too costly. right now, I'm using a laptop cooler to cool the system, but I don't want to do anything too intensive like compiling for the time being.

@sounddrill31
Copy link

so it works? compile it normally with latest toolchain and sdk? I need to recompile that, correct? it might be a while before I can test it. I was able to compile it using a version of the sdk mentioned somewhere, which was one from a year ago, as well as the sm64 from a year ago iirc. not sure what changed. anyway, my laptop's fan failed, and replacing it didn't work, so I'm going to have to have someone diagnose it. hopefully, it's not too costly. right now, I'm using a laptop cooler to cool the system, but I don't want to do anything too intensive like compiling for the time being.

Use github codespaces

btw back up your save b4 trying. Mine got wiped and another person claimed to have saving issues on real hardware.

@godreborn
Copy link
Author

I'm having an issue compiling the new sdk, sorry. I'm trying to compile gsKit, and this happens:

gsToolkit.c:22:10: fatal error: jpeglib.h: No such file or directory
22 | #include <jpeglib.h>

I'm assuming it's related to a symlink, because I have jpeglib.h in here:

/usr/include/jpeglib.h

@godreborn
Copy link
Author

nm, I got it.

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

4 participants