Skip to content

Fix compilation on latest PSL1GHT#2

Open
Fancy2209 wants to merge 10 commits into
emukidid:masterfrom
Fancy2209:master
Open

Fix compilation on latest PSL1GHT#2
Fancy2209 wants to merge 10 commits into
emukidid:masterfrom
Fancy2209:master

Conversation

@Fancy2209
Copy link
Copy Markdown

@Fancy2209 Fancy2209 commented Jul 29, 2025

Unfortunately seems to crash because of an invalid texture format (at least on RPCS3, I do own a PS3, just haven't loaded the elf in it yet), but it compiles

The video to videoOut changes are because I'm using the ScummVM fork of PSL1GHT, can revert them if it's desired to target normal PSL1GHT

I'm investigating on getting this to actually work again as I wanted to fix the menu issues mentioned, will submit a separate PR to fix the menu and crash on boot when I figure it out (or simply mark this as a draft until I fix running the app if desired)

@Fancy2209
Copy link
Copy Markdown
Author

I tried a lot but I cannot for the life of me figure out why it won't display
Apparently there's something very wrong but I can't figure out what

@emukidid
Copy link
Copy Markdown
Owner

Thanks for your attempts, the toolchain was painful to use in my experience in such a way where I could modify it easily to see what had broken things. If you've managed to get a setup going where you can easily compile and test changes to PSL1GHT I'd be keen to hear what you did :)

@Fancy2209
Copy link
Copy Markdown
Author

Fancy2209 commented Sep 22, 2025

Thanks for your attempts, the toolchain was painful to use in my experience in such a way where I could modify it easily to see what had broken things. If you've managed to get a setup going where you can easily compile and test changes to PSL1GHT I'd be keen to hear what you did :)

I was using the ScummVM Docker Container)
This was the most reliable way to get a working Toolchain, and has the plus of using the ScummVM fork of PSL1GHT with Newlib 4.4 (instead of Upstream with Newlib 1.20)
After that it's pretty easy to just clone https://GitHub.com/ps3aqua/PSL1GHT and make install-ctrl && make && make install successfully to test changes while inside bash on the container

@Fancy2209
Copy link
Copy Markdown
Author

I forgot to mention, cgcomp broke with the shaders Wii64 uses, these rules seemed to work to by pass it

#---------------------------------------------------------------------------------
%.fpo    :    %.fcg
#---------------------------------------------------------------------------------
    @echo $(BUILD)
    cgc -profile fp40 ../$(SHADERS)/$(notdir $<) -o $(notdir $<).asm
    cgcomp -f -a $(notdir $<).asm $@

#---------------------------------------------------------------------------------
%.vpo    :    %.vcg
#---------------------------------------------------------------------------------
    @echo $(BUILD)
    cgc -profile vp40 ../$(SHADERS)/$(notdir $<) -o $(notdir $<).asm
    cgcomp -v -a $(notdir $<).asm $@

@Fancy2209
Copy link
Copy Markdown
Author

I forgot to mention, cgcomp broke with the shaders Wii64 uses, these rules seemed to work to by pass it

#---------------------------------------------------------------------------------
%.fpo    :    %.fcg
#---------------------------------------------------------------------------------
    @echo $(BUILD)
    cgc -profile fp40 ../$(SHADERS)/$(notdir $<) -o $(notdir $<).asm
    cgcomp -f -a $(notdir $<).asm $@

#---------------------------------------------------------------------------------
%.vpo    :    %.vcg
#---------------------------------------------------------------------------------
    @echo $(BUILD)
    cgc -profile vp40 ../$(SHADERS)/$(notdir $<) -o $(notdir $<).asm
    cgcomp -v -a $(notdir $<).asm $@

Got back to this and nope
You need to revert this commit for cgcomp to work
ps3dev/PSL1GHT@3f25541

@solstice0
Copy link
Copy Markdown

I have a bugfix PR for the cgcomp issue

ps3aqua/PSL1GHT#2
ps3dev/PSL1GHT#156

Thank you for this PR @Fancy2209 Ive also looking at getting this compiling and thank you @emukidid for the original work!!

@Fancy2209
Copy link
Copy Markdown
Author

Fancy2209 commented Nov 18, 2025

Nice to hear @solstice0 !
I've been working on updating PSL1GHT to GCC 15.2.0 for the PPU, unfortunately that exposes a lot of errors in the Wii64-PS3 code (mostly implicit function declarations), so I haven't been able to work much on this
Hope you have better luck than me

@emukidid
Copy link
Copy Markdown
Owner

Nice work, I'll merge this once you're happy and the PSL1GHT PR has been merged.

@Fancy2209
Copy link
Copy Markdown
Author

Nice work, I'll merge this once you're happy and the PSL1GHT PR has been merged.

For this PR I don't think I'll do much
It still doesn't render last time I tried though, but at least it's a start

@Fancy2209
Copy link
Copy Markdown
Author

@emukidid I just talked with solstice, it works if you use an old cgcomp version before the shaders broke
So I think this should be merged!
I'll try fixing shaders and making a new PR, though not sure how ideal it is to keep sending PRs here if all this work still needs to be ported over to the current Cube64/Wii64 tree

@solstice0
Copy link
Copy Markdown

@emukidid I just talked with solstice, it works if you use an old cgcomp version before the shaders broke So I think this should be merged! I'll try fixing shaders and making a new PR, though not sure how ideal it is to keep sending PRs here if all this work still needs to be ported over to the current Cube64/Wii64 tree

the cgcomp thing was a red herring, I thought newer versions were making invalid shaders that made wii64-ps3 crash. but turns out shaders work fine in with my fixed cgcomp. its a texture issue in this PR, theres a few small fixes I have then it should be good to merge

but yeah it is booting in rpcs3 now, going to validate on my real ps3, get everything cleaned up and make a PR to your fork this weekend, then I think we are good to merge

image

yes cube64 is glitched lol I'll try to get that figured out

@Fancy2209
Copy link
Copy Markdown
Author

With soltice's cgcomp fix and my last commit it seems to work now!
image

Comment thread glN64_GX/OpenGL.h
Comment thread mupen64_soft_gfx/vi.cpp
Comment thread main/main_gc-menu2.cpp
Comment thread libgui/GuiTypes.h
@solstice0
Copy link
Copy Markdown

solstice0 commented Nov 21, 2025

Awesome @Fancy2209 !

I do think the ps3aqua fork of psl1ght is the way to go here, ps3dev psl1ght is outdated and hasnt been maintained in over a year.

btw I was thinking of making a docker image based on the ps3squa one with the cgcomp fix, and maybe a few other enhancements like lua.h etc, and the work you did on PSGL etc

edit: cause yeah I think the toolchain is a major pain point for many would be ps3 homebrew devs, having a nice tidy docker image with everything you need already compiled is much easier than building from source. ps3 aqua docker image you linked already covers this except the Cg fix

@Fancy2209
Copy link
Copy Markdown
Author

Awesome @Fancy2209 !

I do think the ps3aqua fork of psl1ght is the way to go here, ps3dev psl1ght is outdated and hasnt been maintained in over a year.

btw I was thinking of making a docker image based on the ps3squa one with the cgcomp fix, and maybe a few other enhancements like lua.h etc, and the work you did on PSGL etc

I added what I thought was relevant from PSGL into the tree, which is just the flipping changes
Rest I think is fine

@Fancy2209
Copy link
Copy Markdown
Author

It seems this is only a partial fix
I got sidetracked with other stuff and didn't realize that the menu still takes WAYYY longer than it should to refresh
Only the MainFrame does this, other views and games do not have this weird flipping issue
It's something the MainFrame does that causes the weird flipping issues

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

Successfully merging this pull request may close these issues.

3 participants