Commit graph

85 commits

Author SHA1 Message Date
Eladash c49ebba648 Fixes of PS3 filesystem EDAT/SDAT handling
* Return EFSSPEIFIC if encountered corrupted EDAT or an unmatched key in sys_fs_open and sys_fs_read.
* Fix validate_dev_klic() for license-free EDAT.
* Fix EDATADecrypter::ReadData() for when size + pos > file_size but pos < file_size.
* Try to save up to 16 decryption keys. Educated guess based on NPDRM file descriptors count llimit.
* Return LICENCE_NOT_FOUND if needed RAP file is not found in sceNpDrmIsAvailable.
* Check additional sys_fs_open errors for sceNpDrmOpen. (EISDIR, ENOTMOUNTED)
2021-11-04 21:32:15 +03:00
Eladash 9c2d94ca1a sys_prx: Improve sys_prx_get_module_info error checking 2021-09-16 19:09:18 +03:00
Eladash ae4f837f57 sys_prx: Implement sys_prx_get_module_id_by_address 2021-09-16 19:09:18 +03:00
Eladash 8b48fd95fe Fix sys_prx_start/stop_module for older firmware
The old structure is only 32 bytes long, not containing prologue/epilogue functions.
2021-09-15 18:08:58 +03:00
Megamouse dc0a086400 sys_prx_unload_module: fix log message 2021-08-03 08:39:57 +02:00
Eladash be9be6e5c9 Make sys_prx_unload_module use success type logging 2021-07-24 14:23:47 +03:00
clienthax 9c5c4457b6 Stub libfs_utility_init to bypass FSCK checks by vsh. 2021-07-17 18:56:07 +02:00
Ani a49446c9e9
Replace gsl::span for std::span (c++20) (#7531)
* Replace gsl::span for std::span (c++20)
* Replace gsl::byte with std::byte

Co-authored-by: Bevan Weiss <bevan.weiss@gmail.com>
2021-05-30 17:10:46 +03:00
Eladash f103004aa0
sys_prx/overlay: Fix disambiguator of module names opened by FD (#10340)
Don't append zero offset.
2021-05-26 23:38:17 +03:00
Megamouse 8fd3b26308 sys: more constants 2021-04-23 22:46:15 +02:00
Nekotekina ccb46df905 Minor fixups (removed unnecessary code) 2021-04-11 16:36:02 +03:00
Megamouse a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
Eladash 32116086b3 Implement _sys_prx_register_module loading imports/exports functionality 2021-04-03 17:23:40 +03:00
Eladash 1213708b72
Replace some log errors (#9980) 2021-03-17 17:19:35 +03:00
Eladash d7b4753007 Make gamedata installation atomic as real PS3 2021-03-16 19:31:52 +03:00
Nekotekina 87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
Eladash a5d74c5e96 GUI: Improve missing firmware handling
* Install PS3UPDAT.PUP at the spot when booting games whenever firmware is missing. The option to boot games without firmware is still supported when all firmware SPRX are HLEd in firmware settings.
* Pop-up a confirmation dialog in firmware installation if firmware is already installed.
2021-03-06 10:34:49 +01:00
Nekotekina ea5e837bd6 fixed_typemap.hpp: return reference 2021-03-02 16:08:14 +03:00
Eladash 423cc1685c PPU LLVM: Reduce PRX/OVL compilation memory usage a little 2021-02-13 13:05:41 +03:00
Eladash e3b3b0cda7
PPU LLVM: Precompile all executable (PRX, MSELF, overlay) code at startup (#9680)
* Precompile LLVM cache at startup of games, like the GUI "Create PPU Cache" option.
* Allow OVL (overlay) precompilation as well (used by certain games).

Co-authored-by: Megamouse <studienricky89@googlemail.com>
Co-authored-by: Nekotekina <nekotekina@gmail.com>
2021-01-30 16:08:22 +03:00
Nekotekina 53267e283b PPU LLVM: implement ppu_finalize
Properly free certain compiled PRX/OVL modules (except dev_flash)
2021-01-27 18:03:49 +03:00
Nekotekina bd269bccaf types.hpp: remove intrinsic includes
Replace v128 with u128 in some places.
Removed some unused files.
2020-12-21 21:11:25 +03:00
Eladash 7eb16e13bb PRX loader: Fix libfs_155.sprx loading
Fix relocations' segments referencing when there are "empty" (memsize=0) LOAD segments.
2020-12-15 11:16:45 +03:00
Eladash e5603fec1e Firmware libraries settings overhaul 2020-12-13 21:52:24 +03:00
Nekotekina 36c8654fb8 Remove HERE macro
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
Nekotekina e055d16b2c Replace verify() with ensure() with auto src location.
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
Eladash 2602be426f
Allow emulation to work without firmware (#9367)
* Allow emulation to work without firmware
* Fix HLE prx path detection.
* Fix manual list loading bugs.
* Fix HLE gcm
* GUI: Fix fonts search
* GUI: Hardcode sprx list
Do not depend on /dev_flash/sys/external/ contents.
2020-12-07 20:10:34 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Nekotekina d022e7cd27 sys_prx: add cpu_flag::wait 2020-11-04 14:59:26 +03:00
Eladash b8fa6fb4c4 Win32 FS: Rewrite (fix) vfs::host::rename 2020-09-24 18:06:51 +03:00
Eladash 2483cc6f8d Fix race in Crypto/unedat.cpp, Make NPDRM keys usage atomic 2020-06-28 23:26:10 +01:00
Eladash ccc7cb7994 Log IDs of loaded prx modules 2020-03-26 15:22:45 +03:00
Eladash 150d1bcdd5 sys_prx_unload_module: Implement CELL_PRX_ERROR_NOT_REMOVABLE 2020-03-25 16:22:47 +03:00
Eladash e1f2f3f081 sys_prx: Improve sys_prx_start/stop_module
* Add missing error codes, "internal" errors are ones which are not reachable from liblv2.sprx functions

* Implement SYS_PRX_NO_RESIDENT (unloading module) for _sys_prx_start_module.
2020-03-25 16:22:47 +03:00
Eladash 717dd1625c sys_prx: Implement sys_prx_get_module_list 2020-03-25 16:22:47 +03:00
Eladash deb6bd3e25 Atomic sys_prx_load_module_list error checks 2020-03-07 22:03:38 +03:00
Eladash 1669e95870 Implement lv2_file::open()
Return accurate error codes in prx_load_module, sys_spu_image_open and overlay_load_module.
2020-03-06 21:16:46 +03:00
Eladash f6cf36f6a7 Fix _sys_prx_get_module_info p0pt->filename writing with 0 size 2020-03-05 18:28:56 +03:00
Nekotekina Aux1 250736ece5 Fix warnings in emucore 2020-03-04 21:23:34 +03:00
Nekotekina f08c778d2c Use more starts_with/ends_with.
Remove ends_with global func.
2020-02-18 14:53:23 +03:00
Megamouse fe75311be2 move config structs to own files and clean up some headers 2020-02-17 15:08:17 +03:00
Eladash fd433779bb sys_prx: Tiny improvement 2019-11-25 09:04:56 +00:00
Nekotekina 54952f6ad6 Use g_fxo for LoadedNpdrmKeys_t
Rename to loaded_npdrm_keys
2019-08-22 02:13:39 +03:00
Nekotekina d45c743877 Remove lib_loading_type::automatic
This is former default and is now obsolete.
2019-08-14 20:28:34 +03:00
Nekotekina cf16ee5eb5 Implement lib_loading_type::liblv2list 2019-08-14 20:28:34 +03:00
Nekotekina ae46333e99 Implement lib_loading_type::liblv2both 2019-08-14 20:28:34 +03:00
Eladash 997e3046e3 vm/sys_overlay Improvements
- Implement sys_overlay_load_module_by_fd.
- Implement special segment allocation when ppc_seg flag is specified.
2019-07-28 14:23:58 +03:00
msuih d57124d075 Explicitly cast size_t to integer types 2019-07-01 04:33:23 +03:00
Lassi Hämäläinen c963c51a60 Remove unnecessary header includes
- Manually removed lot of unneeded #includes to clean code and reduce
  compilation time
- Reordered some of the #includes to be in more logical order
2019-06-25 17:11:10 +03:00
eladash d555eeb0f4 Check start status in sys_prx_start/stop_module 2019-04-11 17:47:52 +03:00