Commit Graph

128 Commits

Author SHA1 Message Date
Wouter Wijsman
17b2541028 Do not optimize by default 2023-05-29 13:36:53 +02:00
pyroesp
0987b3602b add image_display sample to pspsdk
fix for PR

renamed logo folder to image_display, renamed logo to image in source, changed image used, removed FW version from makefile, added header to source, added image_display to all samples makefile
2023-05-28 05:05:32 +02:00
Wouter Wijsman
fbfb0692d3 Merge pull request #130 from MotoLegacy/uint-type
ATRAC3: Fix mysterious "uint" type reference in pspatrac3.h
2023-05-11 19:25:37 +02:00
Steam Deck User
cbdbba845e ATRAC3: Fix mysterious "uint" type reference in pspatrac3.h
Not sure where this originated. Possibly a leftover from old SDK
versions since the uint type appears in some archaic homebrew as well.
This was the only reference of `uint` in the entire SDK. Went ahead and
changed this appropriately to `u32`.
2023-05-11 13:20:42 -04:00
Steam Deck User
216a8c463f netdialog sample: Fix typo with 2023-04-24 23:36:35 -04:00
Steam Deck User
78a1f9ac72 Guard _PSP_FW_VERSION macro to mitigate warnings with -Wundef
Fixes #123. Guards `_PSP_FW_VERSION` references with `#if defined()` to avoid the SDK headers returning warnings when compiling modules with the `-Wundef` cflag.
2023-04-24 23:28:33 -04:00
Wouter Wijsman
4493616d8e Merge pull request #125 from MotoLegacy/sfo-changes
build.mak: Improve and streamline .SFO creation
2023-04-18 18:11:23 +02:00
Ian
f7da81f22b build.mak: Fix oversight with PSP_LARGE_MEMORY condition tree, clean changes
`MEMSIZE` would not be set as expected if `PSP_FW_VERSION` was set to `1` above firmware 3.90 and the warning was sent to the console. This is addressed.

I've also made the `MEMSIZE` field a make var (`EXPAND_MEMORY`) that gets set on/off in the tree and just gets used by `SFO` flags at the end of it, instead of setting them in multiple spaces.
2023-04-18 11:16:53 -04:00
Wouter Wijsman
3855502a07 Merge pull request #126 from MotoLegacy/adhocctl-parms
SceNetAdhocctlParams: Swap order of BSSID and Nickname
2023-04-18 11:41:30 +02:00
Wouter Wijsman
d3cc172331 Merge pull request #49 from yoanlcq/fix-get-callstack
Fix pspDebugGetStackTrace() by using _etext as upper bound for ra
2023-04-18 11:40:07 +02:00
Steam Deck User
5660b2b35a SceNetAdhocctlParams: Swap order of BSSID and Nickname
Prompted by #46, I have taken the time looking at `pspnet_adhocctl.prx`
in older firmware versions via Ghidra (thanks @sajattack) and some
early Adhoc-capable titles like Ridge Racer and Hot Shot's Golf, I
have concluded that the order of elements in the `SceNetAdhocctlParams`
struct to have always been `nickname`, followed by `bssid`. Not changed
in any later firmware revision. This commit resolves this discrepancy.
2023-04-17 18:46:21 -04:00
Steam Deck User
e87d3fa804 build.mak: Improve and streamline .SFO creation
The current state of building .SFO binaries is rather primitive --
as it stood, build.mak forced its own flags to be used, always.
If you were building without PSP_LARGE_MEMORY, build.mak would use
a deprecated tool for generation as well, one that cobbles together
undocumented flags in an array of bytes and shoves it into a file.

The first change this commit makes is by enabling use of the "new"
mkfsoex, which creates a smaller but still bootable SFO without
any arguments given. Developers are now able to provide custom
SFO flags now using this, added via `SFOFLAGS` in their Makefile.

This means that developers can now (at their own discretion) provide
custom region information, parental control level, minimum firmware
boot level, etc. with:

```make
SFOFLAGS = -d REGION=16394 -d PARENTAL_LEVEL=4 -s PSP_SYSTEM_VER=4.01
```

As a side-effect, this also makes the SDK more adapted to new
custom firmware releases that may add new SFO flags.

The second change made is turning `PSP_LARGE_MEMORY` into an opt-out
/enabled by default flag if developers are targeting a firmware
version newer than 3.90. Custom firmware versions starting from
4.01 M33 guard against expanding the user memory partition to 52mB
if the unit detected is PSP-1000. Therefore having this check in
place becomes redundant, potentially complicating Makefiles. A
warning is printed out allowing developers to be aware of this fact
and removing the flag from their Makefile.
2023-04-14 10:55:00 -04:00
Steam Deck User
063e6f8a4e Fix missing includes and disable interrupts for pspSdkTotalFreeUserMemSize 2023-04-13 21:36:52 -04:00
Steam Deck User
0fa2a6ed12 Add support for retrieving the amount of free RAM in user partitions.
pspSdkTotalFreeUserMemSize(), similar to sceKernelTotalMemSize().
2023-04-07 22:41:49 -04:00
Damian Parrino
031074c42c add basename() 2023-03-21 09:15:03 -03:00
Gleb Mazovetskiy
18354f23b3 pspdev.cmake: Fix pkg-config support
`PKG_CONFIG_EXECUTABLE` must be a cache variable, otherwise only the first call to `find_program(PkgConfig)` succeeds.
2023-03-11 15:20:30 +00:00
JoseAaronLopezGarcia
6d00b425f9 Update psputilsforkernel.h
Updated fourth argument of decompression routines.
When not NULL, the routines will store a pointer to the next unprocessed compressed byte (src + n_compressed_bytes_processed).
This can be useful to implement stream-based decompression, calculating number of processed compressed bytes, etc.
2023-02-08 17:32:48 +01:00
OrigamiK
1dd3e57e83 fix missing types 2023-01-02 15:47:08 +05:30
OrigamiK
21bcd65dda fix missing types 2023-01-02 14:51:49 +05:30
OrigamiK
4d72d92023 fix error: ‘fd_set’ has not been declared 2023-01-02 02:39:10 +05:30
diamant3
7ac03aeccb fix restrict warning 2022-10-16 23:58:42 +08:00
diamant3
3b6e10e82d fix indentation 2022-10-15 16:42:21 +08:00
diamant3
332dd434f1 fix restrict warning 2022-10-14 22:17:02 +08:00
Diamond Rivero
055740b142 fix format specifier 2022-10-03 14:57:09 +08:00
Wouter Wijsman
4b6471f071 Merge pull request #103 from diamant3/master
Fix __timezone_update() compiler warning
2022-10-02 17:47:25 +02:00
Diamond Rivero
cfb2678023 increase tz buffer size 2022-10-02 19:12:48 +08:00
OrigamiK
7d305c7cd0 Merge branch 'pspdev:master' into patch-1 2022-10-02 03:30:18 +05:30
OrigamiK
0c7a3f1e5a fix parameter warning 2022-10-02 03:29:49 +05:30
Joel16
8c8b1ccbc5 power: Include some known function names and prototypes 2022-05-18 23:59:28 -04:00
Wally4000
8d1401caa5 Add missing include sys/time.h 2022-04-19 09:15:53 +10:00
Wally4000
20642f0ced Add sceGeEdramSetSize 2022-04-14 21:27:47 +10:00
Francisco Javier Trujillo Mata
03b3fee815 Remove custom types 2022-04-04 19:57:20 +02:00
Francisco Javier Trujillo Mata
a47efa52fa Merge pull request #91 from rofl0r/clock_t
psputils.h: fix header inclusion for clock_t
2022-04-04 19:51:04 +02:00
Francisco Javier Trujillo Mata
22c7db527c Adding clock_getres, clock_gettime, clock_settime 2022-03-31 00:54:01 +02:00
rofl0r
f35827f130 psputils.h: fix header inclusion for clock_t
clock_t is defined in <time.h>, but not <sys/time.h> in newlib 4.1.0.

this fixes a compile error in files including this header:

In file included from psp-elf/bin/../psp/sdk/include/pspuser.h:25:0,
                 from psp-elf/bin/../psp/sdk/include/pspkernel.h:17,
                 from ./include/driver/me.h:5,
                 from src/me.c:1:
psp-elf/bin/../psp/sdk/include/psputils.h:51:1: error: unknown type name 'clock_t'
make[1]: *** [src/me.o] Error 1

encountered while trying to compile MElib.
2022-03-28 00:28:35 +00:00
Francisco Javier Trujillo Mata
4cbabb73ae Macro for disabling usage of pthread 2022-03-26 14:31:53 +01:00
Francisco Javier Trujillo Mata
8a0ab6b14e Adding pthreadglue support 2022-03-26 14:31:53 +01:00
David Guillen Fandos
fd8c305142 Use gcc-ar and gcc-ranlib wrappers
These wrappers use the --plugin flags to properly support LTO, other
than that it's a transparent change.
2022-03-22 21:49:43 +01:00
Wouter Wijsman
a51d8066da Clean up setting pkg-config executable
I found out the cache part wasn't needed.
2022-03-15 16:13:37 +01:00
Wouter Wijsman
560d558e30 Use psp-pkg-config for FindPkgConfig in CMake
This make it so that when using the following code:

```
include(FindPkgConfig)
pkg_search_module(SDL2 REQUIRED sdl2)
```

The variables ``${SDL2_INCLUDE_DIRS}`` and ``${SDL2_LIBRARIES}`` are set to the expected values within CMake.
2022-03-15 16:09:04 +01:00
Francisco Javier Trujillo Mata
4a16677d8d Improve getpgwan and getpwuid
Return dummy passwd struct
2022-01-13 20:44:25 +01:00
Francisco Javier Trujillo Mata
d2796b684a Revert "Improve getpgwan and getpwuid" 2022-01-13 20:38:25 +01:00
Francisco Javier Trujillo Mata
550722d9fc Merge pull request #79 from fjtrujy/passwd
Improve getpgwan and getpwuid
2022-01-13 20:37:30 +01:00
Wouter Wijsman
745d5483a0 Allow setting ENC_PRX as argument
This make it a bit easier to deal, since encrypting a PRX makes it no longer work in psplink, but you might want to use it in an automated release.
2022-01-12 13:46:35 +01:00
Francisco Javier Trujillo Mata
d066a725d0 Improve getpgwan and getpwuid
Return dummy passwd struct
2022-01-05 19:47:06 +01:00
Francisco Javier Trujillo Mata
9bd8355094 Adding fsync function to libc glue functions 2022-01-03 22:43:15 +01:00
Wouter Wijsman
34fb512ae2 Add comment to install prefix 2021-12-24 20:44:40 +01:00
Wouter Wijsman
1db6cd197e Fix inconsistant behaviour with install prefix
Somehow it was still sometimes not working. I have no idea why that was, but setting is to cache and path fixed it for me.
2021-12-24 20:42:43 +01:00
Wouter Wijsman
321cff4ee4 Set CMAKE_INSTALL_PREFIX correctly
CMAKE_TARGET_INSTALL_PREFIX isn't actually documented anywhere on the cmake website, so I guess that was a mistake. This change does not seem to cause warnings while building applications.
2021-12-23 20:35:34 +01:00
Wouter Wijsman
8911f4ea72 Add BUILD_PRX option to cmake 2021-12-15 23:37:18 +01:00