PS3 Compiling open-source PS3 toolchain nowadays (in 2020)

indeed, is not working. :(
I was doing a few tests, and for some reason the lv2 syscall 816 (sys_fs_access) crashes badly. When looking at the code, everything matches the PS dev wiki , but I guess there's something that causes such "kernel panic" behavior.

As access() is not a critical function, I think that your solution with a standard C implementation is a good alternative. Many times access is just used to check if a file exists.

btw, I fixed it on my fork, using the code from your update as base:
https://github.com/bucanero/PSL1GHT/blob/master/ppu/librt/access.c
It's interesting to know if acces made on top of syscall rather than lv2 syscal had the same problems....
 
It's interesting to know if acces made on top of syscall rather than lv2 syscal had the same problems....

I tried both, and they crash in the same panic way.

I was going to try digging into the official documentation and look for any additional details.

btw, since you were able to build the ps3 toolchain on Windows with cygwin, I think it would be useful if you shared any notes or short tutorial in case any other windows user wants to build the latest gcc 7.2 toolchain

edit 2: regarding utime(), I almost forgot to mention, have you checked if sysFSUtimbuf and the other struct type are the same?

For example in fstat.c, they are converting one struct to the other:
Code:
static void convertLv2Stat(struct stat *dst,sysFSStat *src)
 
Last edited:
I tried both, and they crash in the same panic way.

I was going to try digging into the official documentation and look for any additional details.

btw, since you were able to build the ps3 toolchain on Windows with cygwin, I think it would be useful if you shared any notes or short tutorial in case any other windows user wants to build the latest gcc 7.2 toolchain

edit 2: regarding utime(), I almost forgot to mention, have you checked if sysFSUtimbuf and the other struct type are the same?

For example in fstat.c, they are converting one struct to the other:
Code:
static void convertLv2Stat(struct stat *dst,sysFSStat *src)

utimbuf struct and sysFSUtimbuf struct are the same, just name changed.
I changed utime.c to add all errno correct. If there is an error, return code is -1 and errno is raised as standard utime function.
About access, reading libfs-Reference DOC from Sony, there isn't a cellFsAccess function.... maybe it wasn't written.

You preferred stat to sysLv2FsFStat, but at the end it's the same.

Edit:
PSL1GHT/ppu/crt/crt1.c:90:12: error: 'struct __syscalls_t' has no member named 'access_r'
make[1]: *** [crt1.o] Error 1
 
Last edited:
utimbuf struct and sysFSUtimbuf struct are the same, just name changed.

great, I wasn't sure if they were the same or not. :encouragement:

Edit:
PSL1GHT/ppu/crt/crt1.c:90:12: error: 'struct __syscalls_t' has no member named 'access_r'
make[1]: *** [crt1.o] Error 1

there's a patch to newlib I submitted yesterday regarding the access() function. I think that's probably the issue there:
https://github.com/ps3dev/ps3toolchain/blob/master/patches/newlib-1.20.0-PS3.patch

the easiest way is to patch and rebuild the ppu-gcc part, but of course it might take some time. After that you shouldn't get the "no member named..." error.

(and that reminds me I have to submit the access() implementation without the syscall, based on your code)
 
have complete packs to compile on arch linux?
You need those packages:
autoconf automake bison flex texinfo libncurses-devel gcc-g++ make libelf0-devel python python2-devel zlib-devel libtool libgmp-devel openssl-devel pkg-config git subversion mercurial patch bzip2 mc mpfr

Just find out the right names for you linux distrb

Or if you like work with dockers:
https://hub.docker.com/r/psl1ght/psl1ght
Ready to go.
 
They need access() present and working, so we have to wait.

Alright. :encouragement: I've submitted 2 PRs, one to PSL1GHT (removing lv2 access syscall), and one to the ps3toolchain repo with a newlib patch adding the 'emulated' access() method
psl1ght PR was merged, now we need to wait for the ps3toolchain PR feedback

I've tested everything locally and works fine, so let's wait and see.
 
the changes/patches on ps3toolchain and PSL1GHT have been merged, so now access() -emulated- should be available to any homebrew. I have also added some other functions like truncate, fsync, link, unlink,etc so it should be easier to port stuff now.
 
I'
the changes/patches on ps3toolchain and PSL1GHT have been merged, so now access() -emulated- should be available to any homebrew. I have also added some other functions like truncate, fsync, link, unlink,etc so it should be easier to port stuff now.

I'm starting a complete ps3toolchain installation from scratch...
 
Hi, I've recently built the toolchain on Ubuntu (under WSL) and I found that compiling SMW works, but the game only runs on an emulator, if I run the game on the PS3 itself it hangs with a glitchy main menu. As you said the new toolchain works with a new GCC version, is there any way to change it for the older version present in the Windows Pre-compiled SDK?

I found that the new toolchain has a working libvorbis library, which means working sound, but only on the emulator. I don't know if moving my compiled library to the windows SDK would work, as it was compiled with the new toolchain.

Thanks in advance!
 
Hi, I've recently built the toolchain on Ubuntu (under WSL) and I found that compiling SMW works, but the game only runs on an emulator, if I run the game on the PS3 itself it hangs with a glitchy main menu. As you said the new toolchain works with a new GCC version, is there any way to change it for the older version present in the Windows Pre-compiled SDK?

I found that the new toolchain has a working libvorbis library, which means working sound, but only on the emulator. I don't know if moving my compiled library to the windows SDK would work, as it was compiled with the new toolchain.

Thanks in advance!

Probably you are using compiled tiny3d, before our update to work with toolchain gcc 7.2.0, update made few days ago.
Check wargio/tiny3d at github and compile that.

If you want test psl1ght with gcc 4.7, try: https://hub.docker.com/r/psl1ght/psl1ght/
 
Hi, I've recently built the toolchain on Ubuntu (under WSL) and I found that compiling SMW works, but the game only runs on an emulator, if I run the game on the PS3 itself it hangs with a glitchy main menu. As you said the new toolchain works with a new GCC version, is there any way to change it for the older version present in the Windows Pre-compiled SDK?

if you're using Linux, you can also try the pre-compiled Ubuntu build that has the latest changes:
https://github.com/bucanero/ps3toolchain/releases/tag/ubuntu-latest-c493848d

I found that the new toolchain has a working libvorbis library, which means working sound, but only on the emulator. I don't know if moving my compiled library to the windows SDK would work, as it was compiled with the new toolchain.

Thanks in advance!

another option could be to compile libvorbis with your current Windows toolchain (gcc4). If the library needs some stuff that isn't available with the old toolchain, then you might have an issue there.
 
if you're using Linux, you can also try the pre-compiled Ubuntu build that has the latest changes:
https://github.com/bucanero/ps3toolchain/releases/tag/ubuntu-latest-c493848d
Thanks, if my build still isn't working I'll try yours.


bucanero said:
another option could be to compile libvorbis with your current Windows toolchain (gcc4). If the library needs some stuff that isn't available with the old toolchain, then you might have an issue there.

I've already tried that without any success, the MinGW software crashes when I try to install some addons that are needed to download and compile the libvorbis source.

I think I'll try your binaries, if that doesn't work I'll try the docer image with the old gcc.

What is most weird to me is that the game runs well on RPCS3, but in the console it crashes, I know an emulator isn't an exact copy of the console and stuff that runs on the emulator isn't guaranteed to run on the console, but it being a kind of big problem related to the newer compiled I would have expected to see it crash in the emulator too.
 

Similar threads

Back
Top