Git Product home page Git Product logo

psl1ght's People

Contributors

aerialx avatar andoma avatar bgk avatar bigboss-ps3dev avatar bucanero avatar bvernoux avatar cebash avatar crashserious avatar crystalct avatar drizzt avatar estwald avatar hcorion avatar kakaroto avatar kazzmir avatar lephilousophe avatar lousyphreak avatar miigotu avatar mrwicked avatar nzhawk avatar osirizx avatar parlane avatar phire avatar sergiou87 avatar shagkur avatar tmandersson avatar toomanysugar avatar trap15 avatar wargio avatar zeldin avatar zerkman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

psl1ght's Issues

add access()

I would like to use the access() function, can it be added?

NAME
access - check real user's permissions for a file

SYNOPSIS
#include <unistd.h>

   int access(const char *pathname, int mode);

rsxInit() change brings issue with SDL libraries

Just noted that recent changes in rsxInit() from d0eea6e , brings some issues when building the SDL_PSL1GHT library from ps3libraries (013-sdl_psl1ght.sh)

e.g., you'll get a too few arguments to function 'rsxInit' error in SDL_PSL1GHTvideo.c

maybe other libs or samples are affected.

Outputted binaries don't work in RPCS3

Currently, for some reason, binaries generated by the default workflow used by psl1ght just segfault in RPCS3 when trying to call sysSpinlockInitialize
Specifically it gives this error:
F {PPU[0x1000000] Thread (main_thread) [0x7c0802a4]} VM: Access violation executing location 0x7c0802a4 (unmapped memory)
This function is called in the sbrk_init function.
Thanks to kd-11 on the RPCS3 discord server I've found this work around which currently works, however, I have a feeling that this may be caused by an issue in fself or make_self. The workaround is to use scetool to decrypt the fake self before encrypting it again using make_fself. Both these tools aren't in the psl1ght repository.
This issue makes code far harder to debug since I can't find a way to use Kammy's ethdebug since that appears to rely on psl1ght v1. Currently I've been trying to create an onscreen logger, however it doesn't work, and I can't debug it with RPCS3 :/

Hopefully this information is useful!

commits from 5/15 fail to build working pkg files

This is a problem that has occurred since the 'ld bug workaround/solution' was put into place. 3 repositories were changed simultaneously, so issues are being opened on all three; psl1ght, ps3toolchain, and binutils-2.20.1-PS3.

Essentially SELF files compile and load properly with ps3load, however, the pkg files that are created (both regular and geohot) do not work after installed. They do install fine, however.

Without a jailbreak payload loaded an error is give with both pkg types(80010017) and with a payload loaded the system locks up at a black screen. This is occurring on at least on FW 3.41 with PL3 .

idea: using GitHub Discussions

GitHub has recently enabled a new feature called Discussions, it's like a forum where you could post messages and discuss topics, but outside the Issues tab.

I think it would be nice to enable it for this project, as a place to chat and discuss general PS3 development stuff, like the PSL1GHT v3 RFC, while keeping issues clean from off-topics.

cannot build pkgi - SYS_MUTEX_ATTR_PSHARED not defined

@shagkur You took out SYS_MUTEX_ATTR_PSHARED from mutex.h in your recent libspumars commit which is making https://github.com/bucanero/pkgi-ps3 fail to build :

/home/mohasi/pkgi-ps3/source/pkgi_ps3.c: In function 'pkgi_start':
/home/mohasi/pkgi-ps3/source/pkgi_ps3.c:699:31: error: 'SYS_MUTEX_ATTR_PSHARED' undeclared (first use in this function); did you mean 'SYS_MUTEX_ATTR_NOT_PSHARED'?
     mutex_attr.attr_pshared = SYS_MUTEX_ATTR_PSHARED;
                               ^~~~~~~~~~~~~~~~~~~~~~
                               SYS_MUTEX_ATTR_NOT_PSHARED

Will it be put back?

missing rewinddir()

Right now you can call rewinddir() in your code but it does nothing.
from what I saw, we are missing the rewinddir() implementation. PSL1GHT provides opendir(), readdir() and closedir() based on SCE openDir(), ReadDir() and CloseDir().

Is there a way to provide rewinddir() under PSL1GHT even if we don't have a PS3 syscall for it? I'm thinking about some emulated version but I'm not sure if it's actually possible.

Add netGetSockInfo function

Recently Estwald ported Iris Manager to PSL1GHT v2, offering the changes he made to PSL1GHT. (https://github.com/Estwald/PSDK3v2)

This patch is one of the changes, it is very simple and it does not seems to be problematic. It add the function netGetSockInfo() and the associated struct netSocketInfo.

There is also a #define, to be able to use netInitializeNetwork as netInitialize.

    add netGetSockInfo to ppu/include/net/net.h

diff --git a/ppu/include/net/net.h b/ppu/include/net/net.h
index 63f6f2e..a745447 100644
--- a/ppu/include/net/net.h
+++ b/ppu/include/net/net.h
@@ -4,6 +4,7 @@
 #include <net/socket.h>
 #include <net/select.h>
 #include <net/poll.h>
+#include <netinet/in.h>

 #define    NET_EPERM           1
 #define    NET_ENOENT          2
@@ -139,6 +140,19 @@ typedef struct _net_init_param
    s32 flags;
 } netInitParam;

+typedef struct
+{
+   s32 s;
+   s32 proto;
+   s32 recv_queue_len;
+   s32 send_queue_len;
+   struct in_addr local_adr;
+   s32 local_port;
+   struct in_addr remote_adr;
+   s32 remote_port;
+   s32 state;
+} netSocketInfo;
+
 s32 netInitialize();
 s32 netDeinitialize();

@@ -147,6 +161,8 @@ s32* netHErrnoLoc();

 s32 netInitializeNetworkEx(netInitParam* param);
 s32 netFinalizeNetwork();
+#define netInitializeNetwork netInitialize
+s32 netGetSockInfo(s32 socket, netSocketInfo* p, s32 n);
 s32 netShowIfConfig();
 s32 netShowNameServer();
 s32 netShowRoute();

rsx: commands.c

s32 __attribute__((noinline)) rsxContextCallback(gcmContextData *context,u32 count)
{
	register s32 result asm("3");
	asm volatile (
		"stdu	1,-128(1)\n"
		"mr		31,2\n"
		"lwz	0,0(%0)\n"
		"lwz	2,4(%0)\n"
		"mtctr	0\n"
		"bctrl\n"
		"mr		2,31\n"
		"addi	1,1,128\n"
		: : "b"(context->callback)
		: "r31", "r0", "lr"
	);
	return result;
}

It seems no work on real PS3 hardware, gcc 7.2.0 compile it but when ps3 use it, there is a crash.
rsxtest and rsxtest_spu samples don't work, maybe there is a correlation.

internal narrowing conversion error in ppu/include/vectormath/cpp/quat_aos.h

Potential issue with PSL1GHT:

Reproduction code: make -f Makefile.ps3 from https://github.com/emukidid/wii64-ps3 current master (commit 85b23eeaf0c3ef224cdde6074bcda99339b6274f for future reference)

Error:

/usr/local/ps3dev/ppu/include/vectormath/cpp/quat_aos.h:502:100: error: narrowing conversion of '2147483648' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
     return Quat( vec_xor( quat.get128(), ((vec_float4)(vec_int4){0x80000000,0x80000000,0x80000000,0}) ) );```

poll.h and netdb.h

... should IMHO be moved out of net/ so they reside directly in the include path as they are on all other unix-like systems

Now showtime needs to have stuff like this:

#ifdef PS3
#include <net/poll.h>
#else
#include <poll.h>
#endif

which is rather ugly.

Thanks

Unable to build with ps3toolchain script: Linker error

Hey. I am trying to run the ps3toolchain script, and at the point where it is supposed to link psl1ght, i get:

ld: library not found for -lcrt1.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [make_self] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2
../scripts/008-psl1ght.sh: Failed.
ERROR: Could not run the toolchain script.

How, and where, do I remove -lcrt1.o? Its not a library after all, its an object O.o...

Kind regards, Ingwie.

semaphore max value

In SDL/src/thread/psl1ght/SDL_syssem.c:SDL_CreateSemaphore a call is made to sysSemCreate where the 4th parameter is the initial value. The 4th parameter controls the maximum value the semaphore can have.

sysSemCreate( &sem->id, &attr, initial_value, initial_value);

The initial value should not be the limit of semaphores since SDL itself sometimes creates semaphores with an initial value of 0.
SDL/src/thread/SDL_thread.c:250 in SDL_CreateThread

args->wait = SDL_CreateSemaphore(0);

The solution is to use some large value for the maximum value. I used 99 but maybe there is some better default value.

 sysSemCreate( &sem->id, &attr, initial_value, 99);

Note that without this fix the following error occurs frequently:
sysSem[Try]Wait() failed

You can see this by using a very simple test case

int test(void * arg){
  return 0;
}

int main(){
  SDL_Init();
  SDL_CreateThread(test, NULL);
}

Samples are broken

Hey there!
I installed ps3dev/ps3toolchain, and after I built everything (no problems there), I tried to compile the samples. Several times, I got the error that spu_bin.h is missing, as well as many things in the cairo example.

Are those known problems? Or am I missing something here?

Framebuffer init fails on all samples on real hardware

On real hardware all of the graphics samples fail to initialize the framebuffer, and I cannot hit the PS button to exit as the XMB does not show. Pressing the power button causes the PS3 to triple beep.

Im on a 4.90 evilnat CFW running webMAN-mod. This happens both using ps3load and installing the package file. Everything seems to work fine on RPCS3, but not on real hardware.

My host is arch linux, and i used the ps3toolchain scripts to setup my environment.

After installing PSL1GHT need to install the Cg Toolkit?

After installing PSL1GHT, you probably need to install the Cg Toolkit?
At the end of compilation, the following is written in the console:

alt tag

You should download and install the Cg Toolkit with the following command from the Ubuntu repository:

sudo apt install nvidia-cg-toolkit

or

sudo apt-get install nvidia-cg-toolkit

no video folder in samples

the makefile in samples has a video in it to build, but there is not one.

i have looked at the HACKERCHANNEL/PSL1GHT and there is a video folder with a few samples in it.

needless to say if you dont remove video from the makefile it errors out. and i was wondering why the video folder was gone

Missing RSX functions

Hello Guys, i'm tiring to understand if is possible for me to write a sort of wrapper for RSX like PSGL is for GCM.
I noticed the missing of some RSX functions:
SetPolygonOffsetLineEnable
SetRestartIndexEnable
SetZMinMaxControl
SetDepthBoundsTestEnable

Is there any reason for that absence?

How to compile the examples from the network/ folder? (ppu.mk is missing)

I was trying to compile some examples and when I'm going to compile the examples from the network/ folder, the Makefile includes a file called ppu.mk that comes from the $(PSL1GHT)/host folder, but it's not there, I've already recompiled the toolchain from zero twice and the SDK too, but this folder is never created

This line includes the file I'm talking about

How to solve this?

struct sockaddr_storage definition missing in net/socket.h, causing "incomplete type is not allowed"

Hello,

Trying to port over a lib for a project I picked up and I'm running into an issue where psl1ght doesn't have an implementation for sockaddr_storage in any of the socket.h.

Looking at this doc on sys/socket.h
https://pubs.opengroup.org/onlinepubs/009696799/basedefs/sys/socket.h.html

Looks like

The <sys/socket.h> header shall define the sockaddr_storage structure. This structure shall be:

Large enough to accommodate all supported protocol-specific address structures

Aligned at an appropriate boundary so that pointers to it can be cast as pointers to protocol-specific address structures and used to access the fields of those structures without alignment problems

The sockaddr_storage structure shall contain at least the following members:

sa_family_t   ss_family

Just wondering why it doesn't exist? Is it because the PS3 doesn't handle IPV6?

I'm not familiar with networking code so I figured I'd ask more knowledgable people before I just hack my own definition into my fork of psl1ght and truck on.

Thanks!

Issues building on mac os x catalina

Hi I have issues building on mac os x catalina.
The xcrun --show-sdk-platform-path command does not work.

I have created two separate patches that fixes the problem:

The first patch fixes the issue and sets the OSX_MIN variable to the default 10.4.
This creates linker warnings:
ld: warning: dylib (/usr/local/lib/libgmp.dylib) was built for newer macOS version (10.15) than being linked (10.4) which I don't know how severe they are.
Additionally tools/cgcomp won't build due to the lack of the libstdc++ to link against with such an old OSX_MIN (10.4).
I fixed this by setting the default OSX_MIN to 10.15 (Catalina).
This has been verified to build against both xcode and command line tools SDK.

patch_1_Fixup_OSX_MIN_variable.patch.txt

The second patch replaces the broken xcrun --show-sdk-platform-path with xcrun --show-sdk-version.
Thus OSX_MIN will be set to the version of mac os x that it is building on. (10.15.7 in this case)
Cavesat is that the xcrun --show-sdk-version does not work when building against the xcode version of the sdk.

patch_2_Replace_show-sdk-platform-path_with_show-sdk-version.patch.txt

I don't know which version that is preferred.

cannot build PSL1GHT via toolchain.sh

ps3dev-PSL1GHT-e573ba2 is not compiling.

it's a new install on completely new machine (vm) using debian 10.

'base_rules' -> '/home/user/ps3dev/base_rules'
'ppu_rules' -> '/home/user/ps3dev/ppu_rules'
'spu_rules' -> '/home/user/ps3dev/spu_rules'
'data_rules' -> '/home/user/ps3dev/data_rules'
absi4.c
acosf4.c
asinf4.c
atan2f4.c
atanf4.c
cbrtf4.c
ceilf4.c
copysignf4.c
cosf4.c
divf4.c
divi4.c
exp2f4.c
expf4.c
expm1f4.c
fabsf4.c
fdimf4.c
floorf4.c
fmaf4.c
fmaxf4.c
fminf4.c
fmodf4.c
frexpf4.c
hypotf4.c
ilogbf4.c
ldexpf4.c
logf4.c
log1pf4.c
log2f4.c
log10f4.c
logbf4.c
modff4.c
negatef4.c
negatei4.c
powf4.c
recipf4.c
rsqrtf4.c
sincosf4.c
sinf4.c
sqrtf4.c
tanf4.c
truncf4.c
libsimdmath.a
absi4.c
acosf4.c
asinf4.c
atan2f4.c
atanf4.c
cbrtf4.c
ceilf4.c
copysignf4.c
cosf4.c
divf4.c
divi4.c
exp2f4.c
expf4.c
expm1f4.c
fabsd2.c
fabsf4.c
fdimf4.c
floorf4.c
fmaf4.c
fmaxf4.c
fminf4.c
fmodf4.c
frexpf4.c
hypotf4.c
ilogbf4.c
isnanf4.c
isnand2.c
isinff4.c
isinfd2.c
is0denormf4.c
is0denormd2.c
ldexpf4.c
log1pf4.c
log2f4.c
log10f4.c
recipd2.c
divd2.c
tand2.c
logbf4.c
modff4.c
negatef4.c
negatei4.c
powf4.c
recipf4.c
rsqrtf4.c
sincosf4.c
sinf4.c
sqrtf4.c
tanf4.c
truncf4.c
sqrtd2.c
isgreaterd2.c
sind2.c
sincosd2.c
signbitf4.c
signbitd2.c
rsqrtd2.c
remainderf4.c
copysignd2.c
negated2.c
frexpd2.c
cosd2.c
hypotd2.c
logf4.c
ilogbd2.c
logbd2.c
llroundd2.c
llroundf4.c
llrintf4.c
isequalf4.c
isequald2.c
islessgreaterf4.c
islessgreaterd2.c
islessf4.c
islessd2.c
isgreaterf4.c
islessequalf4.c
islessequald2.c
isgreaterequalf4.c
isgreaterequald2.c
isfinitef4.c
isfinited2.c
isnormalf4.c
isnormald2.c
isunorderedf4.c
isunorderedd2.c
llrintd2.c
roundf4.c
rintf4.c
irintf4.c
iroundf4.c
fmad2.c
fmaxd2.c
fmind2.c
fdimd2.c
nextafterd2.c
fpclassifyf4.c
fpclassifyd2.c
nearbyintd2.c
nextafterf4.c
nearbyintf4.c
llabsi2.c
truncd2.c
roundd2.c
rintd2.c
negatell2.c
divu4.c
modfd2.c
lldivu2.c
ceild2.c
floord2.c
ldexpd2.c
scalbnf4.c
scalbllnd2.c
lldivi2.c
remquof4.c
remquod2.c
fmodd2.c
remainderd2.c
libsimdmath.a
make[2]: *** No targets specified and no makefile found.  Stop.
make[1]: *** [Makefile:9: all] Error 2

Segmentation Fault CGCOMP on Msys2/Mingw

I compiled CGCOMP on Mingw64 in Msys2 and everytime i try to run cgcomp with a command such as -f it gives Segmentation Fault, this didnt happen on the older builds (before June 2020).
Annotation 2020-10-17 205933

Also compiled on cygwin and didn't have this issue

[RFC] psl1ght "v3"

In order to modernize ps3toolchain and psl1ght, and thanks to the lessons learnt in https://github.com/vitasdk, I propose the following changes to psl1ght:

  • The latest versions of newlib include all the necessary C headers (socket.h, etc) so we should remove them from psl1ght (they generate conflicts...), and the implementation of those functions should go to newlib.

  • Add a NID database (like this one) and use it to generate the *_stub.a with a tool/script

  • Make the function prototypes/enums/structs consistent: if the header is for an import named cell*, all the symbols in such header should begin with cell for functions, Cell for structs / enums, and CELL_ for constants (e.g., netCtlInit should be named cellNetCtlInitand the struct net_ctl_nat_infoshould be typedef struct CellNetCtlNatInfo { ... } CellNetCtlNatInfo;.

  • All the syscalls should be in lowercase snake_case with the sys_ prefix.

As a PoC, I've already written a python script (I can port it to C if necessary) that generates an assembly file that gets compiled into the *_stub.a given a yml database. For example, given this input, it generates this output, which is easily compilable with ppu-as -mregnames -c cellCamera.s -o libcellCamera_stub.o.

This script can be useful to dump NIDs and libraries/modules information from an ELF file.

Add function unlink() to librt

Recently Estwald ported Iris Manager to PSL1GHT v2, offering the changes he made to PSL1GHT. (https://github.com/Estwald/PSDK3v2)

This patch is another change. It add the function unlink() to the runtime library.

    Add unlink to runtime

diff --git a/ppu/crt/crt1.c b/ppu/crt/crt1.c
index 67178ea..fc4d416 100644
--- a/ppu/crt/crt1.c
+++ b/ppu/crt/crt1.c
@@ -21,6 +21,7 @@ extern _off64_t __librt_lseek64_r(struct _reent *r,int fd,_off64_t pos,int dir);
 extern caddr_t __librt_sbrk_r(struct _reent *ptr,ptrdiff_t incr);
 extern int __librt_chmod_r(struct _reent *r,const char *path,mode_t mode);
 extern int __librt_isatty_r(struct _reent *r,int fd);
+extern int __librt_unlink_r(struct _reent *r,const char *path);

 extern int __librt_mkdir_r(struct _reent *r,const char *path,mode_t mode);
 extern DIR* __librt_opendir_r(struct _reent *r,const char *path);
@@ -64,6 +65,7 @@ static void __syscalls_init(void)
    __syscalls.stat64_r = __librt_stat64_r;
    __syscalls.chmod_r = __librt_chmod_r;
    __syscalls.isatty_r = __librt_isatty_r;
+   __syscalls.unlink_r = __librt_unlink_r;

    __syscalls.mkdir_r = __librt_mkdir_r;
    __syscalls.opendir_r = __librt_opendir_r;
diff --git a/ppu/librt/Makefile b/ppu/librt/Makefile
index 650fee1..900c1bf 100644
--- a/ppu/librt/Makefile
+++ b/ppu/librt/Makefile
@@ -45,7 +45,7 @@ VPATH :=  $(BASEDIR)
 OBJS       := \
            sbrk.o exit.o close.o lseek.o read.o open.o sleep.o write.o fstat.o \
            socket.o lock.o dirent.o mkdir.o times.o umask.o lv2errno.o heap.o \
-           chmod.o rmdir.o isatty.o gettod.o settod.o
+           chmod.o rmdir.o isatty.o gettod.o settod.o unlink.o

 all: ppu

diff --git a/ppu/librt/unlink.c b/ppu/librt/unlink.c
new file mode 100644
index 0000000..c07d6ad
--- /dev/null
+++ b/ppu/librt/unlink.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <fcntl.h>
+#include <_ansi.h>
+#include <_syslist.h>
+#include <sys/reent.h>
+#include <sys/errno.h>
+#include <sys/types.h>
+#include <sys/lv2errno.h>
+
+#include <sys/file.h>
+
+int
+_DEFUN(__librt_unlink_r,(r,path),
+      struct _reent *r _AND
+      const char *path)
+{
+   return lv2errno_r(r,sysLv2FsUnlink(path));
+}

rsxSetTransferImage incorrect behavior

Hi,
I don't know much (==nothing) about how the rsx nvidia command pipeline thingy stuff works, but I know there's a bug in rsxSetTransferImage. The issue is simple, if you want to copy a rect from the middle of one buffer to another using rsxSetTransferImage, it will always copy the buffer from its top-left corner rather than the rect that you specified.
Looking at the function in ppu/librsx/commands.c, you can clearly see that the srcX and srcY arguments to the function are completely ignored.
Please fix, thanks :)

executables aren't working anymore

I have modified PSL1GHT videoTest example for SDK v2, and it isn't working anymore - program just drops silently to XMB after run.
(everything were fine in v1, really I don't understand all these "v2" renaming changes, like mass renaming without significant reason, uncapitalized naming conventions for structs - names are now similar to function names, which is bad, however this is another story)

The problem isn't actually only with videoTest, another my little utilities back from v1 aren't working anymore, I even compiled openps3ftp server, as jjolano ported it to v2 recently - his compiled pkg version were working, but my compiled version weren't, so I suppose this was working earlier in v2, until something was changed.

I am using 7ed5f81332c8776143178dc4519937d31be779b8 commit of ps3toolchain, and 3.55KMEAW firmware.

I have unloaded full project directory archive here:
http://www.superg.org.ua/files/ps3/videoTest.tar.bz2

Please let me know, maybe I am missing something here? [additional function calls, etc.](just can't continue work on my project until this would be fixed)

pkg build problem

Hi,

I was trying to build some project pkg's, builds fine, but after execution there is error 80010017.
From what I saw on the net, it's "Can't start Blu-Ray Game".
After I overridden pkg build rule with my custom one, error disappeared:
PKGDIR := pkg
%.pkg: %.self
$(SELF_NPDRM) $(basename $(notdir $&lt;)).elf $(PKGDIR)/USRDIR/EBOOT.BIN $(CONTENTID)
$(SFO) --title "$(TITLE)" --appid "$(APPID)" -f $(SFOXML) $(PKGDIR)/PARAM.SFO
$(PKG) --contentid $(CONTENTID) $(PKGDIR)/
rm $(PKGDIR)/USRDIR/EBOOT.BIN
rm $(PKGDIR)/PARAM.SFO
(I've simplified my custom rule not to recopy all of data files to another directory, as for my application, there is a lot of data files - so there should be ICON0.PNG and empty USRDIR directory inside pkg)

So I think, problem is somewhere inside default pkg build rule, or related utilities.

osk.h 64bit issues

The structs have 64bit pointers in them, and the osk functions have no wrappers.

Example: oskInputFieldInfo

/usr/include/x86_64-linux-gnu/sys/types.h:25:10: fatal error: features.h: No such file or directory

When running make I get this error.

➜  PSL1GHT git:(master) make
crt1.c
In file included from /home/tylerjaacks/PSL1GHT/ppu/crt/../include/ppu-types.h:7:0,
                 from /home/tylerjaacks/PSL1GHT/ppu/crt/crt1.c:2:
/usr/include/x86_64-linux-gnu/sys/types.h:25:10: fatal error: features.h: No such file or directory
 #include <features.h>
          ^~~~~~~~~~~~
compilation terminated.
make[3]: *** [/usr/local/ps3dev/base_rules:69: crt1.o] Error 1
make[2]: *** [Makefile:58: ppu] Error 2
make[1]: *** [Makefile:8: all] Error 2
make: *** [Makefile:14: all] Error 2

psl1ght docs

Hello,

Not a real issue, but I wanted to discuss if you'd like to add the doxygen-generated PSL1GHT docs to the repo.

I've added them in my fork (https://github.com/bucanero/PSL1GHT/tree/master/docs), and even if they might be outdated, I still think it's good to share them with any user of the sdk.

So if you want, I can submit a PR with the /docs folder to be added.

cheers

ftello() issue with big files

When using ftello() with a big file (over 2GB), the returned value is invalid (.e.g 0xffffffff88776655) as if it suffered overflow from a 32-bit limit.

I'd expect such behavior from ftell(), but since ftello() return a off_t type (64 bits) I'd have expected a valid value.

Btw, using stat() on the same file and getting the size attribute returns the expected file size value.

Example:

    FILE *f = fopen("/dev_hdd0/tmp/bigfile.bin", "rb");
    fseeko(f, 0, SEEK_END);
    off_t TotalSize = ftello(f);
    fclose(f);
    printf("File size: %016llX", TotalSize);

issue with http definitions

Some time ago I was trying to download a file using the PS3 internal HTTP methods, but I was getting an error after calling httpCreateTransaction():

Error : httpCreateTransaction() failed (80710010)

After talking with other PS3 devs, I figured out that it was due to a problem in the httpClientId definition (0x80710010 = "Not a proper client ID"):
<http/http.h>

struct httpClient;
struct httpTransaction;

typedef struct httpClient* httpClientId;
typedef struct httpTransaction* httpTransId;

Checking Estwald's PSDK3v2 fork, I found he changed the typedefs to s32, for example: typedef s32 httpClientId; (he also changed size_t references to s32)
Estwald/PSDK3v2@c920bc3

Using his version of http.h, everything worked fine for me and I was able to fetch http stuff with the ps3.

So, my question: should we merge these changes into PSL1GHT? is there any reason for these differences?

emu? which emulator can I use on a text only system

Which emulator do you use to run the SPU samples?

I have no display device

If it has breakpoints is a huge plus

And optional window

DISPLAY is unset and it's no device connected

PS if there was a qemu-cell-static or system would be cool

Request: cellSysutilEnableBgmPlayback option support.

Would it be possible to add an option to enable XMB in-game background music for homebrew?

I heard that this feature is missing in this SDK. I am not a programmer but this could be a nice addition to allow
music playback in homebrew.

sysLv2FsOpen uses u32 mode.

I noticed on the http://www.ps3devwiki.com/ps3/LV2_Functions_and_Syscalls website, it lists syscall 801 (sysLv2FsOpen) as this:
CellFsErrno sys_fs_open(const char *path, int flags, int *fd, uint64_t mode, const void *arg, uint64_t size);

However, in ppu/include/sys/file.h, I noticed it as this:
LV2_SYSCALL sysLv2FsOpen(const char *path,s32 oflags,s32 *fd,u32 mode,const void *arg,u64 argsize)

The thing I'm questioning is the u32 mode. According to the wiki, shouldn't it be u64 mode? Is the wiki wrong or am I missing something?

netdb.h location and compilation issues with ansi/pedantic flags

I was trying to compile http_fetcher library (since there are no docs for the http API in psl1ght) and I noticed these issues :
1 - netdb.h is not installed correctly, it's in psl1ght/ppu/include/net/netdb.h but the standard is to include <netdb.h> and not <net/netdb.h>. So this either forces me to add -I$(PSL1GHT)/ppu/include/net to the CFLAGS or to copy netdb.h into ppu/include directly. Is this normal? is it expected that I add the -I flag? Shouldn't those standard header files (I'm thinking socket.h too)
2 - by default http_fetcher uses the "-ansi -pedantic" flags (which I can disable with --disable-strict so all is good), and it shows a few issues with the code in ppu-types.h and socket.h... the most annoying one is that you should never use '//' for comments, and always use /* instead */ (annoying because it will be boring to fix)... Anyways, here are the errors I got :

/usr/local/ps3dev/psl1ght/ppu/include/ppu-types.h:107:1: error: expected identifier or '(' before '/' token
  In file included from /usr/local/ps3dev/psl1ght/ppu/include/netdb.h:4:0,
                 from http_fetcher.c:26:
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:13:7: warning: ISO C90 does not support flexible array members
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:25:2: error: expected specifier-qualifier-list before 'socklen_t'
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:35:2: error: expected specifier-qualifier-list before 'socklen_t'
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:33:8: warning: struct has no members
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:98:50: error: expected declaration specifiers or '...' before 'socklen_t'
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:99:54: error: expected declaration specifiers or '...' before 'socklen_t'
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:100:57: error: expected declaration specifiers or '...' before 'socklen_t'
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:101:55: error: expected declaration specifiers or '...' before 'socklen_t'
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:102:55: error: expected declaration specifiers or '...' before 'socklen_t'
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:103:75: error: expected declaration specifiers or '...' before 'socklen_t'
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:106:92: error: expected declaration specifiers or '...' before 'socklen_t'
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:109:108: error: expected declaration specifiers or '...' before 'socklen_t'
In file included from /usr/local/ps3dev/psl1ght/ppu/include/netdb.h:4:0,
                 from http_fetcher.c:26:
/usr/local/ps3dev/psl1ght/ppu/include/net/socket.h:111:81: error: expected declaration specifiers or '...' before 'socklen_t'
In file included from http_fetcher.c:26:0:
/usr/local/ps3dev/psl1ght/ppu/include/netdb.h:30:48: error: expected declaration specifiers or '...' before 'socklen_t'
In file included from /usr/local/ps3dev/psl1ght/ppu/include/netinet/in.h:35:0,
                 from http_fetcher.c:28:
/usr/local/ps3dev/psl1ght/ppu/include/arpa/inet.h:23:59: error: expected declaration specifiers or '...' before 'socklen_t'
In file included from http_fetcher.c:30:0:
/usr/local/ps3dev/psl1ght/ppu/include/sys/socket.h:15:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 's32'
/usr/local/ps3dev/psl1ght/ppu/include/sys/socket.h:21:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 's32'
/usr/local/ps3dev/psl1ght/ppu/include/sys/socket.h:27:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 's32'
/usr/local/ps3dev/psl1ght/ppu/include/sys/socket.h:33:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 's32'
/usr/local/ps3dev/psl1ght/ppu/include/sys/socket.h:39:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 's32'
/usr/local/ps3dev/psl1ght/ppu/include/sys/socket.h:45:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 's32'
/usr/local/ps3dev/psl1ght/ppu/include/sys/socket.h:51:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 's32'
/usr/local/ps3dev/psl1ght/ppu/include/sys/socket.h:57:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 's32'
/usr/local/ps3dev/psl1ght/ppu/include/sys/socket.h:63:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 's32'

[sysutil_wrapper.o] Error 1 ?

not sure if this is the right place but everytime try to build on linux get

/dev/ps3/PSL1GHT/ppu/sprx/libsysutil/./sysutil_wrapper.c:203:7: error: too many arguments to function 'sysSaveAutoSave2Ex'
/dev/ps3/PSL1GHT/ppu/sprx/libsysutil/./sysutil_wrapper.c:42:12: note: declared here
make[4]: *** [sysutil_wrapper.o] Error 1
make[3]: *** [ppu] Error 2
make[2]: *** [all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
am I doing something wrong?

Not able to use std math

Hello, I'm trying to use C++ math functions like std::round.
But it's not working , I'm getting error: 'std::round' has not been declared. I checked the math.h and I saw _GLIBCXX_USE_C99_MATH_TR1 and _GLIBCXX_USE_C99_MATH. So I tried to add those flags and now I'm getting new error like:
/usr/local/ps3dev/ppu/powerpc64-ps3-elf/include/c++/7.2.0/cmath:1164:11: error: '::log2l' has not been declared

How can I fix this? Thanks!

raise limit of ps3load

psl1ght/tools/ps3load/source/main.c has a hard coded limit of 20mb for a maximum file size to send. My debug binary is 64mb. Raising this limit to 500mb seems reasonable or possibly just get rid of the limit altogether. No changes are needed for the ps3 side.

Line 305

if (fsize < 512 || fsize > 500 * 1024 * 1024) {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.