Commit graph

286 commits

Author SHA1 Message Date
Megamouse 65f10ff840 package_reader: fix some warnings 2023-01-11 19:26:13 +01:00
Elad Ashkenazi 7c2d6f8a23
PKG: Pack multiple PKGs into fast+efficient install (#13147) 2023-01-03 15:31:39 +03:00
Elad Ashkenazi 3250c16cdc
Restrict package installation to 1 thread
It is possible that a package contains the same file multiple times.
This leads to possible corruption or installation failure when they are extracted on different threads.
(easy to reproduce with DeS)
2022-12-30 21:10:23 +01:00
Eladash 02f35383bd PKG: Implement Multi-threaded installation 2022-12-30 17:48:14 +03:00
Eladash 1d5fef4930 PKG: Create directories first 2022-12-30 17:48:14 +03:00
Eladash dddea008e9 unedat.cpp: Remove outdated lock 2022-12-30 17:48:14 +03:00
Elad Ashkenazi dd8ec8f09e PKG install hotfix 2022-12-30 17:48:14 +03:00
Nekotekina 2f9cac8d18 fs: implement file::read_at
Reads from the given offset; does not seek; thread-safe.
2022-12-29 16:19:54 +03:00
Eladash 0d126afb1f PKG: Ask to user if he wants to install game shortcut on PKG installation 2022-12-09 12:20:57 +03:00
Megamouse 5dbadccd7f Log PSF path on error 2022-11-27 22:07:15 +01:00
Elad Ashkenazi fcd297ffb2
Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
Megamouse 8e667e69f6 initial cellGameThemeInstall and cellGameThemeInstallFromBuffer 2022-06-07 07:37:30 +02:00
RipleyTom 8b6f68abcf fix: parsing bug in read_metadata 2022-05-29 22:36:30 +02:00
Megamouse 5ae9de4e3b CLI: add decrypt option 2022-05-11 21:13:20 +02:00
NicknineTheEagle 1df47352cc Implemented sceNpDrmGetTimelimit 2022-05-10 23:24:00 +02:00
NicknineTheEagle e4225cbab8 Fixed duplicate prefix in SELF log 2022-05-10 23:24:00 +02:00
NicknineTheEagle 83ca7654b1 Return NPD header in verify_npdrm_self_headers and VerifyEDATHeaderWithKLicense 2022-05-10 23:24:00 +02:00
NicknineTheEagle 8065dbc2e7 Unified NPD header in unedat.h 2022-05-10 23:24:00 +02:00
Nekotekina 580bd2b25e Initial Linux Aarch64 support
* Update asmjit dependency (aarch64 branch)
* Disable USE_DISCORD_RPC by default
* Dump some JIT objects in rpcs3 cache dir
* Add SIGILL handler for all platforms
* Fix resetting zeroing denormals in thread pool
* Refactor most v128:: utils into global gv_** functions
* Refactor PPU interpreter (incomplete), remove "precise"
* - Instruction specializations with multiple accuracy flags
* - Adjust calling convention for speed
* - Removed precise/fast setting, replaced with static
* - Started refactoring interpreters for building at runtime JIT
*   (I got tired of poor compiler optimizations)
* - Expose some accuracy settings (SAT, NJ, VNAN, FPCC)
* - Add exec_bytes PPU thread variable (akin to cycle count)
* PPU LLVM: fix VCTUXS+VCTSXS instruction NaN results
* SPU interpreter: remove "precise" for now (extremely non-portable)
* - As with PPU, settings changed to static/dynamic for interpreters.
* - Precise options will be implemented later
* Fix termination after fatal error dialog
2022-01-15 06:48:04 +03:00
Eladash ef0bee9228 aes.cpp: Use secured memory resetting 2022-01-12 03:37:39 +03:00
clienthax 6f9adbd162 Debug SPRX check 2021-12-10 14:23:26 +01:00
Eladash cfe08de951
Account empty EDAT (#11146)
* Improve sys_fs_open logging
2021-11-14 02:15:27 +03:00
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 63f16d7a46 GUI Utilities: Implement PS3 SDAT/EDAT decryption 2021-10-02 11:29:01 +02:00
Eladash 65e9388f00 Update unpkg.cpp 2021-09-30 21:33:28 +03:00
Eladash 056d43eca7 PKG: Simplify files management 2021-09-30 20:48:47 +03:00
Eladash 4237039d53 sys_fs: Fix SDATA/EDATA file-stat 2021-09-22 14:57:16 +03:00
AniLeo 1f8f428a59 unpkg: Don't append title ID to license packages 2021-09-18 18:20:55 +01:00
Eladash 3e84a2acc0 PKG: Implement SDATA decryption 2021-09-17 22:15:48 +02:00
Eladash 77c252a4c0 PKG: Debugging messages 2021-09-17 22:15:48 +02:00
Megamouse 8dc98bbc1b Add support for sc vtrm crypto
For VSH for @Clienthax
2021-09-11 21:13:46 +02:00
Emmanuel Gil Peyrot 8af694da2e Crypto/ec: Make internal functions static
This reduces the size of the stripped .o by 3 KiB, and the non-stripped
one by 21 KiB, when not doing LTO.
2021-08-01 12:21:17 +03:00
Eladash 5940247200 Make little use of formatting byte arrays 2021-07-17 20:02:21 +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
David Carlier 1f93fc902b crypto light refactoring.
using volatile f/p guaranting assembly will generate call* instruction on memset for secure buffer zeroing. usage in sha1 api as well.
2021-05-21 16:34:38 +03:00
Megamouse 1dc00ccedd edat: Remove redundant logging 2021-05-19 21:09:18 +02:00
HerrHulaHoop c3bf9bd4a0 Correct mismatched licenses in Crypto
5 files in Crypto were licensed under GPL-3.0-only which is
incompatible with our project's GPL-2.0-only license. They have now
been corrected to use GPL-2.0-or-later.
2021-05-02 13:39:50 +03:00
Megamouse 1caf81811a Move unspecific Emulator code out of System.cpp 2021-04-24 11:21:22 +03:00
Megamouse a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
Megamouse 03b76b4606 Emu: some cleanup 2021-04-09 21:03:49 +02:00
Megamouse d10584ac6c DRM: Search all user directories for rap files 2021-04-09 08:47:59 +02:00
Nekotekina 963d150e93 Fix some -Weffc++ warnings (part 2) 2021-04-03 21:54:15 +03:00
Megamouse 554ba9d6a6 Qt: Allow package installation through cli
Adds --installpkg cli option
2021-03-21 18:44:11 +01:00
Eladash aff63028d4 SCE Decryption: Detect illegal RAP files 2021-03-13 11:51:40 +01:00
Nekotekina 87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
Nekotekina 4bee8dc37f Crypto: modernize key_vault.h
Use constexpr, remove warning guards
2021-01-14 15:23:52 +03:00
Nekotekina 8b01d05146 Crypto: modernize ec.h
Add const, use u8
2021-01-14 15:17:07 +03:00
Nekotekina 376e564cff Crypto: make global vars in ec.cpp thread_local 2021-01-14 12:01:41 +03:00
Nekotekina caf02d1841 Crypto: don't modify EDAT_IV (all zeros)
I didn't notice where it gets restored to zeros.
2021-01-13 21:57:38 +03:00
Nekotekina 6cf73fad13 Crypto: workaround -Wunused-variable
Ignore for key vault for now.
2021-01-13 19:02:14 +03:00
Megamouse 7c7af2e102 fix rebase conflicts 2021-01-12 14:13:15 +01:00
Megamouse fbe91fb245 fix linux compilation 2021-01-12 14:13:15 +01:00
Megamouse 56488a4ac9 Use boolean values in unedat 2021-01-12 14:13:15 +01:00
Megamouse 4a75f44d47 Minor include cleanup in utlis.h 2021-01-12 14:13:15 +01:00
Megamouse 4d50d9daa4 unpkg: add missing break and some cleanup 2021-01-12 14:13:15 +01:00
Megamouse ccec6e53c0 Rename package_reader member variables 2021-01-12 14:13:15 +01:00
Megamouse 68d411918d Read patchsets from compat db 2021-01-12 14:13:15 +01:00
Nekotekina db8e6fe7a7 Enable -Wunused-variable 2021-01-12 14:34:14 +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
Nekotekina eec11bfba9 Move align helpers to util/asm.hpp
Also add some files:
GLTextureCache.cpp
VKTextureCache.cpp
2020-12-18 18:07:42 +03:00
Nekotekina fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +03:00
Nekotekina e321765c54 Split BEType.h to util/v128.hpp and util/to_endian.hpp 2020-12-13 16:34:45 +03:00
Nekotekina b59f142d4e Move types.h to util/types.hpp 2020-12-12 15:12:01 +03:00
Nekotekina 36c8654fb8 Remove HERE macro
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
Nekotekina 5d934c8759 Improve narrow() and size32() with src_loc detection 2020-12-09 16:26:20 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Nekotekina e0635cf65c Remove unneeded non-ASCII character (unedat.cpp) 2020-11-29 16:18:22 +03:00
Bevan Weiss 2c8b3f05ac FIX: MAX_PATH is used within Windows headers, we should use a different define internally
Replace MAX_PATH usage with EMU_MAX_PATH, this prevents the redefine warning, and ensures that we don't mess up other usages (which will likely want MAX_PATH as 260, like Windows defines, not 4096 like we do).
The replacement has been done based on what MSVC was telling me the define values were at each point (i.e. whether we wanted it or not, these usages were using our 4906 value, not the 260 value from Windows)
2020-10-10 23:09:05 +03:00
Eladash 3b11f22062 MSVC bug workaround 2020-09-25 13:26:08 +03:00
Megamouse 6540393df5 Look for rap file for network license
A network license should be the same as a local license, with the difference that a local license is only checked online once, while a network license is checked online on each boot.
Since we don't check online anyway, the two should theoretically be identical for our purposes.
2020-09-17 00:39:41 +02:00
Eladash 8e2b07ba9e sceNpDrm: Relax file extension checks 2020-09-04 22:35:18 +02:00
Eladash edc09e22b4
PSF: Avoid redundent string copies in psf::array/string/get_string (#8707) 2020-08-21 23:55:17 +01:00
Eladash a7a5034958
remove redundent include in Crypto/unedat.cpp (#8527) 2020-06-29 18:03:38 +01:00
Megamouse fa81146b79 Use proper install paths depending on pkg content 2020-06-29 10:36:24 +02:00
Eladash 2483cc6f8d Fix race in Crypto/unedat.cpp, Make NPDRM keys usage atomic 2020-06-28 23:26:10 +01:00
Megamouse b923eb058a Crypto: read sfo in memory instead of tmp file 2020-04-25 15:17:17 +02:00
Megamouse 773448a8f6 Crypto/Qt: check target app version for packages 2020-04-25 15:17:17 +02:00
Megamouse 2094e52d7d Crypto: add another file type for PSVita 2020-04-18 19:11:53 +02:00
Megamouse 5657363642 Crypto: move PSVita keys to key vault 2020-04-18 19:11:53 +02:00
Megamouse d35a29bbe4 Crypto: PSVita metadata and missing entry type 2020-04-18 19:11:53 +02:00
Megamouse 22d01e4d05 Crypto: interpret metadata versions 2020-04-18 19:11:53 +02:00
Megamouse 1762324702 Crypto: fix metadata variable names
header_size was just wrong, on PS3 games it just happens to match the meta offset, which is half of data_offset
PS3: meta_offset + meta_size = data_offset
PSP: meta_offset + meta_size = metadata_header_hmac_offset
PSP: metadata_header_hmac_offset + ext_data_size = data_offset
2020-04-18 19:11:53 +02:00
Megamouse e4b6de409a Crypto: fix magical type 2020-04-18 19:11:53 +02:00
Megamouse 3a6bda4d93 Crypto: read and log PSP and PSVita headers 2020-04-18 19:11:53 +02:00
Megamouse 3b9dc29781 Crypto: add log verbosity to pkg installations
also enables installation with one more filetype
2020-04-18 19:11:53 +02:00
Eladash a178374052 sys_fs: Limit NPDRM FDs to 16
Co-Authored-By: Silent <cookieplmonster@users.noreply.github.com>
2020-04-04 19:36:16 +01:00
Megamouse d6b8213c9f set key_vault log spam to trace 2020-03-31 18:06:37 +02:00
Ani e8177906e7
System/Load: Handle PSP Remaster (#7857)
This just makes RPCS3 execute PSP Remaster games through 
psp_emulator.self
pspemu does not work yet, so the boot will fail, but at the least it 
starts loading
2020-03-26 20:03:00 +03:00
Nekotekina e4a81b1d13 Move Log.h to util/logs.hpp 2020-03-07 12:29:23 +03:00
Nekotekina a166d3680e Don't throw on invalid whence (return fs::error::einval) 2020-03-07 11:52:54 +03:00
Eladash 39eafc1f3b Fix Crypto/utils.cpp: extract_file_name 2020-03-05 00:31:43 +03:00
Nekotekina Aux1 250736ece5 Fix warnings in emucore 2020-03-04 21:23:34 +03:00
clienthax 7e590eaa2f Change key_vault to use version ranges. 2020-02-29 21:24:15 +03:00
gamerforEA 93552a5958 Apply some Clang-Tidy fixes 2020-02-27 00:38:55 +03:00
Nekotekina fa0bf6a92c Fix "unknown pragma" on zlib clang workarounds 2020-02-23 10:42:35 +03:00
Nekotekina 972e0ab31d Remove -Wno-reorder and make it an error 2020-02-21 15:20:34 +03:00
Nekotekina 92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 2020-02-19 22:54:58 +03:00
Nekotekina 771eff273b First part of fixing sign-compare warning (inside be_t). 2020-02-19 22:54:58 +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