Commit graph

1364 commits

Author SHA1 Message Date
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
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
Nekotekina 24e4e329ed atomic.hpp: add atomic_t<bool> specialization
May be required in future, plus adds/hides some methods.
2020-12-07 17:13:12 +03:00
Nekotekina eb66302907 atomic.hpp: replace std::atomic with atomic_t
Dual dependency is nothing good.
2020-12-07 17:13:12 +03:00
Nekotekina b16cc618b5 atomic.hpp: add some features and optimizations
Add atomic_t<>::observe() (relaxed load)
Add atomic_fence_XXX() (barrier functions)
Get rid of MFENCE instruction, replace with no-op LOCK OR on stack.
Remove <atomic> dependence from stdafx.h and relevant headers.
2020-12-07 17:13:12 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Nekotekina d1e7837422 atomic_t: cleanup type requirements
Add C++17 requirements.
Remove alignment requirements (auto-align type).
What's missing is to detect padding and forbid it.
2020-12-04 19:11:36 +03:00
Nekotekina 8efc22bd45 atomic.hpp: simplify and unify bit test instructions
Also make them available on all platform.
Rename some rare methods.
2020-12-04 14:33:38 +03:00
Nekotekina cad3a6c547 sceNp.cpp: fix some UTF-8 string mismatch 2020-11-30 03:21:34 +03:00
Eladash 992a372fc7 cellGame fixes 2020-11-17 09:04:35 +01:00
Nekotekina ea5f5aea5f vm: memory locking rewritten
Added vm::lock_sudo method (wrapper for utils::memory_lock).
Put locking outside of vm::g_mutex scope.
Prelock sudo memory for RSX, vm::stack, vm::main.
Prelock sudo memory for shared memory objects.
Don't check for TSX path.
2020-11-16 12:46:15 +03:00
RipleyTom e6f2f8ad0d Add some error checking in sceNp2.cpp 2020-11-13 05:28:00 +03:00
RipleyTom a83df01bfd
rpcn 0.3.5 (#9227) 2020-11-10 08:55:49 +00:00
Morgan Creekmore a28ab0a408
Set AccountAge to 18 to fix age restriction checks, fix incorrect logged function name (#9218) 2020-11-07 09:47:44 +00:00
Megamouse a3eb5c2d63 More Header cleanup 2020-11-06 22:14:05 +01:00
Nekotekina 34fa010601 Improve cond_var notifiers
But nobody uses it anyway, so clean up includes.
2020-11-06 00:10:16 +03:00
Nekotekina d022e7cd27 sys_prx: add cpu_flag::wait 2020-11-04 14:59:26 +03:00
Nekotekina 86fc842c89 TSX: new fallback method (time-based)
Basically, using timestamp counter.
Rewritten vm::reservation_op with the same principle.
Rewritten another transaction helper.
Add two new settings for configuring fallbacks.
Two limits are specified in nanoseconds (first and second).
Fix PUTLLC reload logic (prevent reusing garbage).
2020-10-31 15:34:14 +03:00
Nekotekina ba26e16411 Rename vm::reservation_light_op -> light_op
Rename vm::reservation_peek_op -> peek_op
Also remove overkill assertion for cpu_flag::temp.
2020-10-31 15:08:49 +03:00
Megamouse 2cee26c3e7 Cleanup some includes 2020-10-31 11:53:46 +01:00
Megamouse 5d55e509ec
cellSubDisplay: Add some constants (#9178) 2020-10-31 01:40:38 +00:00
Megamouse 4984e87776 implement interception for cellKb and cellMouse
this needs to be tested
2020-10-31 02:11:27 +03:00
Megamouse c65b7d0aea HLE: Add some constants 2020-10-31 02:11:27 +03:00
Megamouse 54fd224fd8 Add License Area Setting 2020-10-31 02:10:30 +03:00
Nekotekina 58adb6a1aa sys_ppu_thread: add cpu_flag::wait 2020-10-30 18:27:15 +03:00
Nekotekina 13c564f2af sys_memory: add cpu_flag::wait 2020-10-30 18:09:30 +03:00
Nekotekina 95aeebe4b5 sys_rsx: add cpu_flag::wait 2020-10-30 18:00:25 +03:00
Nekotekina 605d57c541 sys_event: cleanup (replace vm::temporary_unlock)
Also made minor changes in sys_rsx.cpp.
Removed unused exception std headers.
2020-10-30 17:49:07 +03:00
RipleyTom 6f5bbf550a Revert part of CellHddGameCheck 2020-10-28 20:44:38 +03:00
Nekotekina 13de773486 Remove some vm::reservation_lock instances 2020-10-27 17:56:19 +03:00
Eladash 0fcf767ee9 SPURS: Implement spursJobchainPopUrgentCommand 2020-10-25 16:43:38 +03:00
Eladash 1e7bf218e0 CellSpurs: Minor fixes 2020-10-25 16:43:38 +03:00
Megamouse 27643cb715 HLE: improve cellHddGameCheck 2020-10-24 00:26:41 +03:00
Eladash 701f7f39d6
Improve SPURS debugger (#9090) 2020-10-18 11:07:01 +03:00
RipleyTom 9e14d240a8 Implement ethernet address determination 2020-10-16 22:53:48 +03:00
RipleyTom 344c813eb1 Avoid double locking with start_sig 2020-10-16 22:53:48 +03:00
RipleyTom abaa8f855f sceNpManagerGetAccountRegion impl 2020-10-16 22:53:48 +03:00
Eladash 5185ddb8b5
CellSpurs: JobChain functions and some more (#9080) 2020-10-16 18:35:20 +01:00
Nekotekina 346a1d4433 vm: rewrite reservation bits
Implement classic unique/shared locking concept.
Implement vm::reservation_light_op.
2020-10-10 13:58:48 +03:00
Nekotekina 89f1248140 Implement vm::reservation_op
Implement vm::reservation_peek (memory load)
Implement vm::unsafe_ptr_cast helper
Example use in cellSpurs.cpp
Fix dma_lockb value and description
2020-10-07 20:11:59 +03:00
Eladash c628147521 cellSpurs: Implement more HLE functions (part 1) 2020-10-07 01:12:21 +03:00
Eladash a5cff8b186 kernel-explorer: Initial SPURS debugger 2020-10-06 14:20:23 +03:00
Eladash 2a258dc21e
Fix GCC compilation (#9035) 2020-10-05 06:39:56 +01:00
Eladash ec1244bb82 Minor cellSpurs fixup 2020-10-04 19:54:56 +03:00
Eladash a0b387e0a9 cellSpurs: Fix HLE workload signalling, taskset fixes 2020-10-03 22:35:59 +03:00
Eladash 7fdf3dd760 cellSpurs: Add CellSpursJobOpcode definitions 2020-10-01 18:16:13 +03:00
Eladash 1f28bee86a cellSpurs: Add error codes formatting (unused) 2020-10-01 18:16:13 +03:00
Eladash aed560b630 Implemnt various HLE CellSpurs functions 2020-10-01 18:16:13 +03:00
Megamouse 531eb04fd7 cellGameSetParamString: fix string sizes 2020-09-29 08:44:25 +02:00
Eladash 83d71519e0 Implement HLE sys_config stack allocation 2020-09-26 21:48:12 +03:00
Eladash b79d236bfa
cellSearch: use std::hash (#8981) 2020-09-26 17:28:19 +01:00
Eladash 6164b3d2e2 Compilation fix 2020-09-24 21:00:23 +03:00
Eladash c806da51f8
Implement cellGameDeleteGameData (#8962) 2020-09-24 20:13:19 +03:00
Eladash 183aa31319 cellSysCache: Global hdd1 lock
Take advantage of recursive locking.
2020-09-24 18:06:51 +03:00
Eladash b8fa6fb4c4 Win32 FS: Rewrite (fix) vfs::host::rename 2020-09-24 18:06:51 +03:00
Eladash 3372409590
cellGameContentPermit: Fix missing PARAM.SFO writeback (#8934) 2020-09-23 20:35:06 +03:00
Eladash 5a049322ed HLE: Always return empty paths if game content does not exist in cellGameContentPermit 2020-09-23 20:24:21 +03:00
Eladash 418968d974 sceNpTrophy: Add logging of commSign 2020-09-22 19:46:52 +03:00
Eladash 89905bc1c4 sceNpTrophyRegisterContext: Implement SCE_NP_TROPHY_STATUS_NOT_INSTALLED 2020-09-22 19:46:52 +03:00
Eladash cf61198fe3
HLE: Implement ERROR_BROKEN in cellGameDataCheck (#8945) 2020-09-22 10:30:31 +02:00
Megamouse 0b42cf06f8 sceNpTrophyCreateContext: improve commId logging 2020-09-21 15:32:02 +02:00
Megamouse 4c4be331f5 HLE: Fix sceNpTrophyCreateContext
fixes #7431 Soldner-X
Assuming that a SceNpCommunicationId should have a format like "TEST12345", then there is no need to delete termination characters after we already created a truncated string with 9 characters + null terminator.
The current behaviour does not work at all, because in case that we actually have a non-null termination character, deleteTerminateChar will step over the last x chars in the already truncated ID until it forcefully finds a character of its liking. eg. term='2': "TEST12345" => "TEST1" => "TEST1_00"
2020-09-21 15:32:02 +02:00
Eladash 75c3fdcb6f Fix cellGameBootCheck PARAM.SFO reads 2020-09-21 06:36:34 +03:00
Eladash 5ac6f090fc
Fix cellGamePatchCheck (#8933) 2020-09-19 19:38:22 +01:00
Eladash 0d183a24be cellFs: Rewrite cellFsGetFreeSize 2020-09-19 13:53:04 +01:00
Eladash 2620a51cc9 cellSaveData: Minor fix 2020-09-19 13:53:04 +01:00
Eladash f1e8739608 Always reset size in cellGameGetSizeKB
Reversed.
2020-09-19 13:53:04 +01:00
Eladash ed032dc985 cellGame: Improvements 2020-09-19 13:53:04 +01:00
Megamouse a2da187615 HLE: localize most - if not all - exposed strings 2020-09-14 18:24:18 +02:00
Eladash 5db1427923 cellGame: Implement cellHddGameCheck2 2020-09-12 11:00:24 +02:00
Eladash 81eceb1728 cellSysUtil: Implement CELL_SYSUTIL_SYSTEMPARAM_ID_LICENSE_AREA 2020-09-12 11:00:24 +02:00
Megamouse 639650c65a Add more defines to cellSysutil 2020-09-12 09:56:51 +02:00
RipleyTom d9d354c981 Makes DNS processing more consistent 2020-09-09 23:56:25 +02:00
Ani 22dc2947b3
hle: Implement ID_CURRENT_USER_HAS_NP_ACCOUNT (#8864) 2020-09-08 15:12:47 +01:00
Megamouse fee96ec92d fix some warnings 2020-09-08 12:05:51 +02:00
RipleyTom 10820fa135
Implement sceNpSignaling & signaling improvements (#8836) 2020-09-07 22:50:17 +01:00
Eladash 019d2d5dcf Implement HLE cellSpursAddUrgentCommand 2020-08-27 23:52:37 +01:00
RipleyTom 190822c2b2
RPCN Client (#8663) 2020-08-27 20:47:04 +01:00
Eladash edc09e22b4
PSF: Avoid redundent string copies in psf::array/string/get_string (#8707) 2020-08-21 23:55:17 +01:00
Eladash 0c85d4c0d0
cellSaveData: Fix loss of "BLIST" and files' information in PARAM.SFO (#8706) 2020-08-08 23:40:47 +01:00
Eladash 17f965c171 lv2: Minor fix of "unspecific ppu" path of _sys_lwcond_signal 2020-08-03 02:57:20 +03:00
Bevan Weiss 609182b131 Update cellAudio to use float constants instead of doubles
Another simple Clang recommendation
2020-07-26 17:23:02 +03:00
Megamouse bb3ac62126 cellMic: use s32 consistently 2020-07-24 14:47:10 +02:00
Megamouse 6e25fea16a use not_an_error in sys_spinlock_trylock 2020-07-24 14:47:10 +02:00
Megamouse 5e7c6853c2 fix truncation warnings 2020-07-24 14:47:10 +02:00
Megamouse f76a011ba0 fix sceNpCommerce2CreateCtx log message 2020-07-24 14:47:10 +02:00
Megamouse d854a39500 add a gazillion more error_code 2020-07-24 14:47:10 +02:00
Megamouse a00ebacef3 cellFont: add error_code 2020-07-24 14:47:10 +02:00
Megamouse c2f4244c4d cellMic: error_code, random cleanup and stubbing 2020-07-24 14:47:10 +02:00
Megamouse 7437c324c6 cellMusic: add error_code 2020-07-24 14:47:10 +02:00
Eladash 54b87b6dbb cellSaveData: Increase sleep time 2020-07-23 13:45:58 +03:00
Eladash c37bc3c55c SPU: Make spu_thread::offset private 2020-07-19 17:58:49 +03:00
Megamouse 53b95fea19 audio: rename audio channels to audio downmix
The setting does not actually define the channels themselves, only the downmix option that the PS3 provides.
Channels might be changed seperately in the future.
2020-07-08 21:11:23 +02:00
Megamouse e2fd4e46f7 Only reboot audio if a relevant setting changed 2020-07-08 21:11:23 +02:00
Megamouse 20d6664dc1 Try to make most audio configs dynamic 2020-07-08 21:11:23 +02:00
Megamouse bb0aaea92d cellAudio: implement downmix to 5.1 2020-07-08 21:11:23 +02:00
Megamouse 5fae1b3637 HLE: fix sceNpDrmGetTimelimit invalid param error 2020-07-07 09:43:32 +02:00
Megamouse 5269b69bc5 cellAudio: use downmix formula based on documentation 2020-06-29 09:06:36 +02:00
Eladash 2483cc6f8d Fix race in Crypto/unedat.cpp, Make NPDRM keys usage atomic 2020-06-28 23:26:10 +01:00
Eladash 97717defa5 Remove devKlic/rifKey reset 2020-06-28 23:26:10 +01:00
Eladash 9cb4402c16 Make error_code::value member private 2020-06-27 09:02:55 +01:00
Megamouse 76faaf43f7 Input: Use global variables for pad modifications 2020-06-26 04:42:52 +02:00
Eladash ab9cdc70ad cellSaveData: Emulate PPU processing of auto/list post-fixed callback 2020-06-25 19:50:33 +03:00
Eladash 88a0e0fe2d cellAudio: Minor fixup 2020-06-14 18:45:46 +01:00
Eladash ff04cd6d69 cellAudio: Fix event queue attachment 2020-06-14 02:31:23 +03:00
Eladash f0d526411c IDM: Implement idm::clear<typename> 2020-06-12 22:12:36 +03:00
Megamouse 1cb4fb9c50 stub cellPngEnc 2020-06-04 23:13:40 +03:00
Megamouse 413f87b737 Add error_code to cellPngDec 2020-06-04 23:13:40 +03:00
Megamouse 8a8edb1b62 stub sceNpCommerce2 2020-06-04 23:13:40 +03:00
Megamouse caa1324457 stub sceNpTus 2020-06-04 23:13:40 +03:00
Megamouse 41eb6d4461 cellAudio improvements
- use CELL_AUDIO_BLOCK_32 where possible
- use CELL_AUDIO_BLOCK_SAMPLES where possible
- remove redundant logging
- return CELL_AUDIO_ERROR_AUDIOSYSTEM in cellAudioGetPortConfig (probably unreachable code anyway)
- return CELL_AUDIO_ERROR_PORT_OPEN in cellAudioPortOpen
- stub cellAudioSetPersonalDevice cellAudioUnsetPersonalDevice and cellAudioMiscSetAccessoryVolume
2020-06-04 23:09:47 +03:00
Megamouse 99895471ae cellAudio: make master volume dynamic 2020-05-31 07:37:59 +02:00
Mrlinkwii 68bee397eb Update cellSpurs.h 2020-05-22 22:19:04 +03:00
sampletext32 1a8fb61373 Fix some misspells
Note: in main.cpp there are many dirs similar to Program Files, so tip should be appropriate.
2020-05-20 22:53:24 +03:00
Megamouse eb5ec211c2 Input: remember registered ldd controllers
- Don't reset ldd pads when saving a pad config
- Prevent configuration of registered ldd pads in the gui while ingame
2020-05-13 11:17:58 +02:00
Nekotekina e1042bc631 Get rid of "module" keyword
Workaround some intellisense problems.
2020-05-06 18:20:11 +03:00
Nekotekina 907adc817e Fix some warnings (GCC) 2020-05-05 21:55:22 +03:00
Eladash edde748519 sys_event_queue: Fix forced event queue destruction
Add missing last existence check at sys_spu_thread_(try)receive_event and lv2_event_queue::send.
2020-05-04 01:10:19 +03:00
Eladash 37110098c7 cellAudioOut Improvements 2020-04-30 15:45:20 +03:00
Megamouse e4cb9ef7cd cellpad: add pclass_profile flags 2020-04-25 10:17:48 +02:00
Megamouse 4e6d95c5b8 Qt/input/cellpad: enable product choice 2020-04-25 10:17:48 +02:00
Eladash 06d4505992 sceNp: Override k_licensee for PE game category
Co-Authored-By: AniLeo <ani-leo@outlook.com>
2020-04-17 11:41:50 +01:00
Eladash 8cb1f4fe26
liblv2 HLE: Fix spu_elf_info loader for SCE SPU images (#8045) 2020-04-15 21:19:46 +01:00
scribam f37adc4188 Add fallthrough attribute 2020-04-14 17:06:58 +03:00
Nekotekina f72af2973d Replace utils::popcnt32 with std::popcount
Cleanup includes.
2020-04-14 16:05:58 +03:00
Nekotekina 032e7c0491 Replace utils::cntlz{32,64} with std::countl_zero 2020-04-14 16:05:58 +03:00
JohnHolmesII a8a83c9724 cellRtc: Extend before shift, per decompiled output 2020-04-13 14:37:11 +03:00
JohnHolmesII f0b1c8302a Fix order of operations warning 2020-04-13 14:37:11 +03:00
Eladash 504ba8d824 rsx: Fix grammer issue (binded -> bound) 2020-04-11 21:21:15 +03:00
clienthax 765b14a8ba
Implement cellRtc HLE (#7933) 2020-04-09 15:54:41 +03:00
Eladash c948c9305c sys_ppu_thread_create: read function descriptor immediately and save it 2020-04-08 19:23:13 +03:00
Víctor "IlDucci a38d2461c9
Linguistic changes (#7917) 2020-04-07 17:10:04 +02:00
Eladash 8f3ad8b81a
Fix cellGameDataCheckCreate2 error broken check (#7976) 2020-04-07 14:03:03 +03:00
Megamouse b1fdbc7fcc Move some format functions 2020-04-06 20:59:58 +02:00
Silent fd09dde911 cellSearch: Change search state before invoking callbacks 2020-04-05 16:35:56 +03:00
Eladash 0b24b09a06 sys_fs: Lock dev_hdd1 mount point at cellSysCacheClear 2020-04-04 19:36:16 +01:00
Eladash 55baaea8e7 liblv2 HLE: Fix sys_lwcond_signal mode 3 2020-04-03 19:42:25 +03:00
AniLeo c00ee7ed5b hle: cellSysutilNpEula
Add missing function names and stub all functions

Co-Authored-By: Eladash <elad3356p@gmail.com>

Co-Authored-By: Eladash <elad3356p@gmail.com>
2020-03-27 15:26:28 +03:00
Eladash 36d8553f9c liblv2 HLE: Fix entryx of start/stop prx functions 2020-03-26 17:52:45 +03:00
Eladash 2aff36647a Make sceNpDrmProcessExitSpawn(2) execute sys_game calls correctly 2020-03-23 23:18:21 +03:00
Eladash 52360b3f98 liblv2 HLE: Fix sys_lwmutex_lock assertation 2020-03-23 21:37:37 +03:00
Megamouse 1537f505a5 cellGem: fix move_handler::mouse left click 2020-03-23 15:10:01 +03:00
Eladash dc839e1784 lv2: Do not lose r3 data on syscalls
Allows to get the ID of the lv2 sync objects in the debugger by looking at r3's content.
2020-03-22 12:41:02 +03:00
Eladash 01cafc042d cellSaveData: Ensure savedata_context members are 16-byte aligned
I saw stvx v128{0} (aligned 16-bytes store) usage on the first 16-bytes of CellSaveDataCBResult before funcStat in fw.
Also I saw 4 stw of u32{0} on it as well before funcFile, funcFixed and funcList.
So just add the resets for result before all callbacks, and make all
members of savedata_ontext 16 -byte aligned in case there are more
members guaranteed to be aligned.
2020-03-21 19:05:20 +03:00
Eladash ceaee0ec68 cellSaveData: Clear traces of setList setup from setBuf->buf, add missing memset
* Always memset 0 setBuf->buf (to bufSize) before funcStat if the direcory is not new.
* Always memset 0 setBuf->buf (to bufSize) if listGet->dirNum became non-zero (listGet->dirListNum can be zero yet memset still occurs) .
* Clear traces of setList setup before funcStat (after funcFixed/List, only if listGet->dirNum != 0, callback can hack this value and prevent the memset).
2020-03-21 19:05:20 +03:00
Eladash b6a288d383 cellSaveData: Skip directory items in savedata_get_list_item 2020-03-21 19:05:20 +03:00
Eladash ae14eb0747 Minor fix of cellUserInfoGetStat
stat == nullptr is allowed, fix invalid id error code.
2020-03-21 19:05:20 +03:00
Eladash be0e586671 cellSaveData: Add error checks for cellSaveData(User)GetListItem 2020-03-21 19:05:20 +03:00
Eladash 66916df4ae cellSaveData: Set listSet->focusPosition to LISTHEAD by default 2020-03-21 19:05:20 +03:00
Eladash fae46bf194 cellSaveData: Add CELL_SAVEDATA_ERROR_NOUSER 2020-03-21 19:05:20 +03:00
Megamouse f1127f1894 overlays: implement osk panels 2020-03-19 21:10:08 +01:00
Eladash 7be35315da Fix lv2 sys_lwcond/sys_lwmutex kernel explorer names 2020-03-19 06:45:14 +03:00
Eladash 03a6d67c6c Log sys_lwmutex/sys_lwcond names as strings
Use std::string_view instead of creating a temporary NTS string when reading object name.
2020-03-17 18:22:13 +03:00
Eladash 7e224c5585 cellVdecClose: Followup fix to #7663
Avoid executing sys_interrupt_thread_disestablish on different ppu thread with the same ID.
2020-03-16 21:06:33 +03:00
Eladash c16124f0d9 idm: Fix minor race in cellVdecClose, sys_raw_spu_destroy...
Because of racing removal of IDs vs the shared pointer owned object
2020-03-14 18:30:14 +02:00
Eladash c3d36940c7 cellSaveData: do not allow to read/write/delete system files in funcFile
Return param error 70 as realhw in this case.
2020-03-14 16:12:18 +03:00
Eladash db71d4852a cellSaveData: Fix adding file entries to PARAM.SFO on error 2020-03-14 16:12:18 +03:00
Eladash 88ee198d78 cellSaveData: return ERROR_FAILURE on funcFile deletion failures 2020-03-14 16:12:18 +03:00
Eladash 5d78d81c00 cellSaveData: Filter directory lists to allowed savedata directories
Filters "." and "..", as well as possible wrong directories added by the user.
2020-03-13 22:43:27 +03:00
Eladash b21b4faca8 cellSaveData: Fixed savedata lock after fmt::throw_exception 2020-03-13 22:43:27 +03:00
Eladash d58f52ff31 cellSaveData: Add some listSet error checks
* Check listSet->fixedListNum.
* Check listSet->fixedList for nullptr and its directory items names.
* Check listSet->focusDirName for nullptr and directory name.
* Check listSet->newData->iconPosition.
* Check listSet->newData->dirName for nullptr and directory string.
* Check statSet->setParam->parental_level for old sdk.
* Return an error if listSet->focusPosition is NEWDATA and listSet->newData is nullptr.
* Simplify savedata directory list selection.
2020-03-13 22:43:27 +03:00
Eladash 54af8ec544 cellSaveData: funcFile fixes
* Allow '_' at filenames start and extension.
* Check if reading offset is valid, fix error code to CELL_SAVEDATA_ERROR_FAILURE.
* Don't create empty file on error of write ops.
* Don't allow "." and ".." filenames on funcFile, return CELL_SAVEDATA_ERROR_BROKEN.
2020-03-13 22:43:27 +03:00
Eladash fdf47f43d8 cellSaveData: refactor param error 70 checks
Also extend the check to check empty name.
2020-03-13 22:43:27 +03:00
Nekotekina 04dedb17eb Disable exception handling.
Use -fno-exceptions in cmake.
On MSVC, enable _HAS_EXCEPTION=0.
Cleanup throw/catch from the source.
Create yaml.cpp enclave because it needs exception to work.
Disable thread_local optimizations in logs.cpp (TODO).
Implement cpu_counter for cpu_threads (moved globals).
2020-03-12 16:03:08 +03:00
Megamouse 3ea94c286b input/overlays: fix premature pad interception removal
shader compilation and trophy notifications shouldn't cancel the pad interception during proper dialogs
2020-03-10 19:04:32 +01:00
Eladash 5692c3de04 Fix sceNpUtilCmpNpId 2020-03-08 12:49:34 +03:00
Eladash 892f74d762
rsx: Improve frame-limiter (#7723)
* rsx: Improve frame-limiter accuracy

* lv2: Improve lv2_obj::wait_timeout response time for aborting threads

* rsx: Make stretch to display area setting dynamic

* rsx: Redefine 'auto' frame limiter to obey vblank rate

* rsx: Make frame limiter setting dynamic

* rsx: Make frame-limiter compatible with dynamic changes
2020-03-08 01:11:35 +03:00
kd-11 6e3406b3f5 video: Allow selection of 3D stereo resolutions 2020-03-07 16:58:35 +03:00
Nekotekina Aux1 250736ece5 Fix warnings in emucore 2020-03-04 21:23:34 +03:00
RipleyTom f1f5c91386
Fake PSN (#7516) 2020-03-04 13:55:35 +00:00
Eladash 5c3d417b35 Fix cellGameDataCheck's game data creation with PARAM.SFO set/get 2020-03-03 18:31:43 +03:00
Eladash de1774d8f2
cellSaveData: fix doneGet->sizeKB (#7674)
* cellSaveData: fix doneGet->sizeKB

* [⚠️] Warning: beware of typos [⚠️]
2020-03-03 11:24:49 +03:00
kd-11 582c98359e videoOut: Resolve 'auto' aspect ratio
- 'Auto' is not an actual aspect ratio, just a dont-care flag to set the
  display to the best fit aspect ratio.
  Decay this option into a proper ratio for cellVideoOutGetState to
return legal values.
2020-03-01 20:10:11 +03:00
Eladash 7dfd50d5cc cellSaveData: followup to #7652 2020-03-01 20:09:46 +03:00
Eladash ffd5a9e91c cellSaveData: Add some error checks for fixedSet, fileSet params 2020-03-01 10:56:41 +02:00
kd-11 14aebeac58 video-out: Allow applications to successfully change display resolution
- Avoids a situation where a game configures output correctly but gets back bogus information later when querying.
- Should fix games being broken at some resolutions but not others.
2020-03-01 00:16:52 +03:00
Eladash 655f7ce8a2 cellSaveData: Add null funcStat check
it's ordered specially for some functions
2020-03-01 00:14:45 +03:00
Eladash 34a0c3f488 cellSaveData: Add error param 72, 73 checks for file write ops 2020-02-29 13:06:14 +03:00
Eladash 8762f2a588 Use more starts_with 2020-02-29 13:06:14 +03:00
Eladash 05bb6e1545 Improve sceNpDrmVerifyUpgradeLicense(2), sceNpDrmIsAvailable(2)
* sceNpDrmVerifyUpgradeLicense(2): copied string from content_id is 47 chars in length at max, is no null term was found it forces string termiation.
* sceNpDrmIsAvailable(2): Same with drm path just that it's 256 chars at max.
2020-02-28 19:10:39 +03:00
Eladash 30f7c81cc5 cellSaveData: Implement/Fix param error 22 for funcFile, funcDone, funcFixed and funcList 2020-02-28 16:47:51 +01:00
Eladash 0eabfdcadd cellSavedata: reset padding of g_savedata_context 2020-02-27 22:31:31 +03:00
Eladash d86241bbcd cellSaveData: reset fileSet and fileGet->reserved everytime 2020-02-27 22:31:31 +03:00
Eladash 42a0512c66 cellSaveData: Avoid passing vm pointer to native API 2020-02-27 22:31:31 +03:00
Eladash 556aba46b5 cellSaveData: do not fail on empty directory 2020-02-27 22:31:31 +03:00
Megamouse ee46ad1ca9 move overlays code to headers 2020-02-26 23:43:18 +01:00
gamerforEA 762c106e19 sys_prx_.cpp: Fix RAII locks usage (without local variables they destroyed immediately after construction) 2020-02-27 00:38:55 +03:00
gamerforEA 93552a5958 Apply some Clang-Tidy fixes 2020-02-27 00:38:55 +03:00
Eladash 0d4f8ca234 fs: Make fs::get_dir_size able to report an error 2020-02-26 18:17:13 +00:00
Megamouse 2341749485 overlays: add overlay_osk.h 2020-02-25 21:57:49 +03:00
Megamouse f7666f44da Untangle GUI and input includes 2020-02-24 16:31:01 +01:00
Nekotekina 1dc2eb1cc8 Avoid deprecated av_register_all with version check. 2020-02-23 20:58:02 +03:00
Emmanuel Gil Peyrot 1a702de9e4 cellVdec: replace deprecated ffmpeg function
avcodec_decode_video2() is deprecated, now replaced with
avcodec_send_packet() and avcodec_receive_frame().
2020-02-23 20:21:59 +03:00
Nekotekina f1241c572c Fix some deprecation warnings (plunder cellAdec btw) 2020-02-23 20:21:59 +03:00
JohnHolmesII 9b7d28b5dd cellSaveData.cpp: Use ref instead of copy 2020-02-23 09:38:04 +03:00
AniLeo fa3fde7a29 hle: Fix cellAvconfExt function registrations
Co-authored-by: Clienthax <clienthax@gmail.com>
2020-02-22 17:27:58 +03:00
AniLeo 3aa293a7a3 hle: cellAuthDialog
Basic RE of cellAuthDialog, stubs functions
2020-02-22 16:03:14 +03:00
Nekotekina 96be40bf30 Implement cellMsgDialog closing thread
Fixing deprecation warning.
2020-02-22 15:17:02 +03:00
Eladash 24d3e2b2b8 cellGameDataCheckCreate(2): More improvements
* IsNewData is false only if PARAM.SFO exists.
* Don't create directory on error (setParam == nullptr && isNewData).
* Return CELL_GAMEDATA_ERROR_BROKEN if PARAM.SFO exists on target directory yet is not from GD category.
2020-02-21 21:15:55 +03:00
Nekotekina 972e0ab31d Remove -Wno-reorder and make it an error 2020-02-21 15:20:34 +03:00
Eladash 54f2c27ba0 cellGameDataCheckCreate(2): Set nullptr in setParam
* setParam is nullptr by default.
* if setParam is null and it's new data, return error code.
2020-02-21 14:49:45 +03:00
Eladash 0ba1f8f4ef Fix cellDiscGameGetBootDiscInfo on error
* Always set first dword to 0, other bytes are untouched,
2020-02-21 14:49:45 +03:00
Eladash 4d7e53d7a0 cellGameDataCheckCreate(2): Check dirName 2020-02-21 14:49:45 +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
Eladash 6de91a1691 HLE cellGcmSys: Make IOTable accurate
Affects cellGcmAddressToOffset when using addresses above 0xC0000000
2020-02-19 18:11:30 +00:00
Eladash 1aa11440e0 HLE cellGcmSys: Make cellGcmUnmapEaIoAddress accurate 2020-02-19 18:11:30 +00:00
Eladash 727d783959 RawSPU: protect NPC from writes/reads in running state 2020-02-18 18:09:10 +00:00
Nekotekina 8a176de6a1 Restore -Wenum-compare and fix some [=] warnings 2020-02-18 17:37:30 +03:00
Nekotekina ee6494c14b Use strcpy_trync in cellAvConfExt.cpp (silence warnings) 2020-02-18 14:53:23 +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 c1bdaccd8c sceNpTrophyRegisterContext: Fix off by one progress callbacks count 2020-02-15 23:32:29 +01:00
Eladash 4421831c8b sceNpTrophyRegisterContext: Fix values passed to first callback 2020-02-15 23:32:29 +01:00
Eladash d03804b523 Fix sceNpTrophyGetTrophyInfo
* Only writeback data on success.
* Fix a typo on error code of invalid trophy ID.
2020-02-15 23:32:29 +01:00
Eladash 299af768e8 HLE cellGcmSys: Make cellGcmAddressToOffset accurate 2020-02-15 14:07:52 +03:00
Eladash 04e0bf2eff Whitespace fix after #7087
Was this close to enter programmers' hell.
2020-02-15 11:37:13 +03:00
Eladash cdda19c79f Fix recursive locking in sceNpTrophyUnlockTrophy 2020-02-15 10:41:15 +03:00
Eladash fa9330d0e0 Log returned reqspace in sceNpTrophyGetRequiredDiskSpace 2020-02-15 10:41:15 +03:00
Eladash ddeb39d8de HLE cellGcmSys: Fix unmapping 2020-02-14 17:11:26 +03:00
Eladash 78c49e7331 cellSearch: another memory access fix 2020-02-12 20:02:18 +03:00
Eladash 9760053c8c
cellSearch: Fix id memory access (#7476) 2020-02-12 18:17:45 +03:00
Silent 3006b003c4 Implement links as a cellSearch specific concept
Linking in VFS is done only from cellSearchPrepareFile and works
by mounting virtual files to host FS files
2020-02-12 12:49:02 +03:00
Silent e30637351e Move SearchState to a fxo object so it resets with emulation 2020-02-12 12:49:02 +03:00
Silent d2b83c69bb cellSearch updates from Brolijah
Co-authored-by: Brolijah <brolijahrh@gmail.com>
2020-02-12 12:49:02 +03:00
Eladash bdab26ec09 rsx: rewrite io mappings
Along with some with fixes to cellGcmSys HLE.
2020-02-10 21:39:39 +00:00
Eladash 80eff58950 cellAudio: Implement cellAudioSet/RemoveNotifyEventQueueEx 2020-02-09 12:31:55 +00:00
Eladash 1915fe75a4 VSH: Stubs 2020-02-08 23:07:03 +03:00
Eladash 9d1bb60ad7 cellGcm HLE: fix cellGcmMapMainMemory
Fix arguments order, softcode RsxReports::report offset.
2020-02-08 22:18:56 +03:00
Eladash 629eddfb9f sceNpTrophy: Implement SCE_NP_TROPHY_ERROR_CONTEXT_NOT_REGISTERED 2020-02-08 11:11:59 +00:00
Eladash 1f94c8f272 sceNpTrophyGetGameProgress Fix 2020-02-08 11:11:59 +00:00
Nekotekina c0f80cfe7a Use attributes for LIKELY/UNLIKELY
Remove LIKELY/UNLIKELY macro.
2020-02-05 10:42:34 +03:00
Eladash 49e11b7cfd cellVdecQueryAttrEx: Add some error checks for MPEG2 2020-02-05 05:01:07 +00:00
Eladash 6a32ceaab5 cellVdecQueryAttrEx: Add workaround for codec specific info 2020-02-05 05:01:07 +00:00
Eladash acc7320cae Fix cellVdecGetPicItem
Fix potential overflow, race condition and correctness fixes for picInfo_addr
2020-02-05 05:01:07 +00:00
Eladash e9e8f0c5b7 cellGame: report not found sfo params 2020-02-04 18:29:52 +03:00
Eladash cb52ee0a4d cellGame: report fs::remove_all failure 2020-02-04 18:29:52 +03:00
Eladash 4488312e81 Avoid out of memory with cellGameGetParamString 2020-02-04 18:29:52 +03:00
Eladash e57c01907e cellVdec: Improve cellVdecQuery and cellVdecOpen 2020-02-02 09:01:32 +03:00
Nekotekina 6dfd97f0b6 Modernize SPU logging (spu_log variable) and remove log legacy
Remove legacy macro (LOG_ERROR, etc)
2020-02-01 11:52:52 +03:00
Nekotekina 327bb2d8f0 Modernize PPU logging (ppu_log variable) 2020-02-01 11:52:24 +03:00
Nekotekina 21f7b0ff0f Remove HLE log channel 2020-02-01 11:52:24 +03:00
Nekotekina 007a7a5859 Fixup for LOG system.
Register all channels at program initialization and allow duplicates.
2020-01-31 12:09:52 +03:00
RipleyTom 610a6a1404 Increases number of buffers when buffering 2020-01-27 02:13:30 +00:00
Eladash d481c3c7fd cellGameGet/SetParamString: Implement CELL_GAME_ERROR_NOTSUPPORTED 2020-01-26 20:32:10 +00:00
Eladash e4ba096190 VSH: sys_mmapper
* Implement syscalls sys_mmapper_allocate_shared_memory_ext, sys_mmapper_allocate_shared_memory_from_container_ext.
* Implement multi-process shared memory allocations.
2020-01-24 20:08:30 +00:00
Eladash 95ed2ef62e cellGcm HLE: Add error_code 2020-01-24 19:25:52 +00:00
Megamouse 3f076d63e3 HLE: add error checks to cellAudioInGetDeviceInfo 2020-01-23 10:50:55 +01:00
Megamouse 3e8a5c6395 HLE: add some more constants 2020-01-23 10:50:55 +01:00
Megamouse 18f167ddd0 HLE: Fix error checks in cellAudioInRegisterDevice 2020-01-23 10:50:55 +01:00
Maksim Derbasov 1abdee242a small improvement (#7288)
* small improvement

* comments addressed

Co-authored-by: kd-11 <15904127+kd-11@users.noreply.github.com>
2020-01-22 12:28:48 +00:00
Eladash 949cfa7fdb Fix cellVdecSetFrameRate error check 2020-01-21 16:45:41 +03:00
Megamouse 5ef3465f65 cellVdec: (experimental) allow AV_PIX_FMT_YUVJ420P 2020-01-20 00:33:25 +01:00
Megamouse 9a27cc9442 cellVdec: improve error checks 2020-01-20 00:33:25 +01:00
Megamouse 4dbad6cce6 fix some random warnings 2020-01-19 16:38:17 +01:00
Eladash 9084209cfc Update cellVdecSetFrameRate error checking 2020-01-15 23:29:32 +01:00
Eladash 1ccb3c4492 rsx: Verify local memory offset 2020-01-15 13:23:56 +03:00
Eladash 01035d35bd sys_process: Fix sys_process_get_id, add error_code (#7246) 2020-01-14 21:32:41 +03:00
Megamouse be2d225d96 sceNpTrophy: deny unlocking of platinum trophies 2020-01-13 22:50:05 +01:00
kd-11 ad845861be video: Remove pointless aspect ratio option
- The auto option is used when requesting the system is works like a
"dont care" specifier to tell the system to use what settings have been
passed in by HDMI EDID or the user TV type setting. Since this option
simulates the "TV type setting", auto makes no sense and is also not
something you can select on a PS3.
- Also adds a few missing checks.
2020-01-07 15:56:54 +03:00
Megamouse 632cc79c54 cellGame: add more checks 2020-01-06 10:47:13 +01:00
Megamouse e7845357e2 sceNpTrophy: unlock platinum trophies 2020-01-05 19:47:31 +01:00
Megamouse b3ad89cc8b cellSaveData: remove duplicate yield 2020-01-03 14:22:40 +01:00
Megamouse c9aee27d48 VK: remove unused init function declaration 2020-01-03 14:22:40 +01:00
Megamouse 7af2ebb6f4 cellSaveData: use errDialog to skip error dialogs 2020-01-02 05:49:03 +01:00
Eladash 7cc6881a57 Implement sceNpTrophyTerm resources deallocation
- Implement sceNpTrophyAbortHandle, if handle is aborted an error code will be returned on its usage.
- Free context & handles in sceNpTrophyTerm.
- Return SCE_NP_TROPHY_ERROR_INVALID_ARGUMENT on invalid context & handles ids.
- Implement id resource shortage error checking.
- Check negative sceNpTrophyGetTrophyInfo trophy id.
- Minor error checking fix for sceNpTrophySetSoundLevel
2019-12-31 22:32:23 +03:00
Eladash 71c4a2a15f Silence some log messages 2019-12-31 22:27:27 +03:00
Eladash 9690854e58 Some cleanup
* Prefer default initializer over std::memset 0 when possible and more readable.
* Use std::format in trophy files name obtaining.
* Use vm::ptr<>::operator bool() instead of comparing vm::ptr to vm::null or using addr().
* Add a few std::memset calls in hle where it matters (or in some places just to document an actual firmware memcpy call).
2019-12-31 22:27:27 +03:00
Eladash b30be0fbc1 Update cellVoiceCreatePort syntax 2019-12-31 19:05:06 +03:00
Megamouse 93a6e9e4e4
Improve cellImeJp (#7014)
* HLE: add error_code and definitions for cellImeJp

* HLE: add function parameters to cellImeJp

* HLE: improve cellImeJp

* HLE: further improve cellImeJp

* HLE: simplify cellImeJp
2019-12-31 16:02:10 +01:00
Megamouse a5c5927468 cellSaveData: only show dialogs in fixed functions 2019-12-31 14:15:43 +01:00
Megamouse 45dc5d9b02 cellSaveData: improve ppu schedule during dialogs 2019-12-29 14:22:58 +01:00
Megamouse c4b4ce46b8 cellSaveData: don't pause apps during dialogs 2019-12-29 14:22:58 +01:00
Megamouse 0b78404337 cellSaveData: get confirmation if not CELL_SAVEDATA_OPTION_NOCONFIRM 2019-12-29 01:19:04 +01:00
Megamouse ff0089bc6f cellSaveData: add more constants 2019-12-29 01:19:04 +01:00
Megamouse bb7848f6e5 cellSaveData: add error dialog to callback result errors 2019-12-29 01:19:04 +01:00
Megamouse 47da907366 cellSaveData: add confirmation dialog for save data interactions 2019-12-29 01:19:04 +01:00
Megamouse ef6f565dbd silence some annoying warnings 2019-12-28 15:40:57 +01:00
Megamouse e83dfedff9 stub cellRemotePlay and cellResc and cellStorage 2019-12-24 11:54:32 +01:00
linkmauve e9c5c6e6bf Move input to its own directory (#7126) 2019-12-22 17:39:42 +01:00
Eladash db4041e079 Implement rounded_div
Round-to-nearest integral based division, optimized for unsigned integral.
Used in sceNpTrophyGetGameProgress.
Do not allow signed values for aligned_div(), align().
2019-12-20 14:47:04 +03:00
Eladash 6dd4003154 Fix cellNetCtlNetStartDialogUnloadAsync 2019-12-20 10:20:32 +01:00
Megamouse 7fcef227af sceNpTrophy: minor optimizations 2019-12-19 18:15:22 +01:00
Eladash 8d955cfb8c Hotfix sceNpTrophyGetTrophyUnlockState 2019-12-18 13:07:55 +01:00
Eladash e380a8c279 Fix sceNpTrophyGetGameProgress (#7103)
* Fix sceNpTrophyGetGameProgress

Was missing multiplication by 100.

* apply requested changes

* Enforce round-to-nearest rounding mode
2019-12-17 22:43:00 +00:00
Jayveer 364ba95d26 Updated sys_net to use WSAPoll on win32 as this fixes connection issues
in Metal Gear Online. Also aligns with implementations on non win32
platforms
2019-12-13 21:52:29 +03:00
Nekotekina 321f7e7197 Fix missing-braces warnings 2019-12-13 03:21:43 +03:00
Nekotekina 69e81da57b Fix some warnings 2019-12-13 02:08:52 +03:00
Megamouse 038694ae28 cellGem: add some explanatory comments 2019-12-10 23:20:13 +01:00
Megamouse 691c7cde67 cellGem: cleanup some spacings 2019-12-10 23:20:13 +01:00
Zangetsu38 af8ebc76e2 Modules/cellGem: Implement pos, quat and handle_pos in Gemstate for mouse.
Modules/cellGem: Fix name for gem_image_state.
Modules/cellGem: Implement projectiion(x/y) in gem_image_State for mouse.
Modules/cellGem: Add cross, triangle, circle and start with use middle click for mouse.
Modules/cellGem: Refactor global code.
Modules/cellGem: fix some warning with initializing value.
2019-12-10 23:20:13 +01:00
VelocityRa ac2b0c9752 PSMove: Rudimentary mouse emulation. 2019-12-10 23:20:13 +01:00
Eladash 6a4ba9d562 Fix warning about truncation 2019-12-07 10:22:11 +01:00
Eladash a5b3b0df40 sceNpBasicAddBlockListEntry: Add connection check 2019-12-07 10:22:11 +01:00
Eladash 963d5fb981 sceNpBasicAddPlayersHistory(Async) fixes
* Check if count == 0.
* u64 typos fixed.
* description won't be checked if null.
* Check each npid provided, not only the first.
2019-12-07 10:22:11 +01:00
Eladash e050dcbc52 Move size write in cellGamePatchCheck 2019-12-05 23:31:46 +03:00
Eladash 401813f962 Revert part of #7044
oops.
2019-12-05 23:31:46 +03:00
Nekotekina 835892aa51 C-style cast cleanup VII 2019-12-05 02:10:15 +03:00
Nekotekina 185c067d5b C-style cast cleanup V 2019-12-03 17:23:00 +03:00
Megamouse 46ca39ec4d Add Emu.HasGui() to properly hide Qt dialogs in no-gui mode 2019-12-03 09:12:51 +01:00
Megamouse d73f04da13 cellSaveData: avoid nullptr if there is no dialog 2019-12-03 07:59:10 +01:00
Nekotekina bf11a28fb5 C-style cast cleanup IV 2019-12-01 22:12:33 +03:00
Eladash d45fbc331c Fix error checking of cellGameContentPermit 2019-12-01 21:11:43 +03:00
Eladash 1a6e8e20dc cellGameBootCheck Improvements
* size->sysSizeKB returns 4kb. (hw tested, unknown if in different situations this value changes)
* Return CELL_GAME_ERROR_BROKEN on failure to init. (hw tested)
* Write to dirName only when type is HDD game. (REd)
* Don't write to *size on errors, make it happen after *attributes and *type writes. (REd)
2019-12-01 21:11:43 +03:00
Eladash 37c220af72 Fix sceNpTrophyRegisterContext hack 2019-12-01 21:11:43 +03:00
Eladash 038c6bb234 Avoid calling lv2_obj::sleep sequantially in sceNpTrophyRegisterContext
Also fix a correctness issue with queued.
2019-11-27 21:41:40 +01:00
Eladash 3b06214f88 Decrease memory stats in cellGemInit if needed
Also:
* fix state reset of cellGem
* Check max_connect == 0 in cellGemInit
2019-11-27 21:41:40 +01:00
Eladash b5f6b27f86 cellSysutilGetSystemParamString improvements
- Check bufsize, must match to max string length
- Add missing cases for ParamId 0x1008, 0x1011, 0x1012, 0x1024
- Set actual current username in buffer on id == ID_CURRENT_USERNAME
2019-11-26 20:21:33 +00:00
Eladash 70ace4bb83 Fix cellAudioCreateNotifyEventQueue queue depth
TODO: global sdk value used is set in cellAudioInit, which means sdk var value is 0 before it's initialization, currently safely set queue size to 8 in this case.
2019-11-25 09:04:56 +00:00
Eladash 17ae70b935 Implement cellAudioCreateNotifyEventQueueEx 2019-11-25 09:04:56 +00:00
Eladash 40db205f5d Fix cellVoiceCreatePort 2019-11-25 09:04:56 +00:00
Eladash 1233c48d92 cellAudio: Implement event source 2019-11-25 09:04:56 +00:00
Eladash f4ac8a2e0c cellVoice: Fix NOT_INIT checks, implement 0 event source handling 2019-11-25 09:04:56 +00:00
Eladash c9066e7236 cellVoice Update
* Use shared lock wherever possible.
* Fix cellVoiceSetVolume.
* Fix error logging of cellVoiceCreateNotifyEventQueue, cellAudioCreateNotifyEventQueue
2019-11-25 09:04:56 +00:00
Eladash 8d5ef2c7b9 Clamp volume in cellAudioAdd/2c/6c/Data
Same as firmware, NaN and Inf are flushed to zero.
2019-11-20 21:58:43 +03:00
Megamouse 2152a77005 HLE: stub cellCrossController some more 2019-11-18 23:42:49 +01:00
Megamouse 41505117a7 HLE: stub cellCelpEnc and cellCelp8Enc 2019-11-18 23:42:49 +01:00
Megamouse ca59ab59e9 HLE: add even more error_code 2019-11-18 23:42:49 +01:00
Megamouse 0b28f0fa14 HLE: add more error_code 2019-11-16 10:38:56 +01:00
Eladash 0f2adab05f Disallow NaN in cellVideoOutSetGamma 2019-11-16 11:21:10 +03:00
Eladash 610463a425 cellSysutilGetSystemParamInt(ID_PAD_RUMBLE) changed to return ON status 2019-11-15 20:17:51 +01:00
Eladash da12969898 cellSysUtil: Add a few CELL_SYSUTIL_ERROR_VALUE checks 2019-11-15 20:17:51 +01:00
Eladash 894658f14c cellSysutil: Log error code 2019-11-15 20:17:51 +01:00
Eladash 25382a7dae Restore cellPadSetActDirect's reserved error check 2019-11-15 20:17:51 +01:00
Eladash 3f3ce53c67 Fix string length check in cellGameThemeInstall
vm::ptr::size() returns sizeof type instead.
2019-11-10 14:32:15 +03:00
Eladash 1986944c61 Implement sysutil_check_name_string
* Fully implement 3, 4, 16 and 17 error checks of cellSaveData.
* cellSysCacheMount restrict characters in ID.
* cellHddGameCheck restricts characters in dirName.
2019-11-10 14:32:15 +03:00
Nekotekina 0d629743ca cellSysCache: poison opened cache files on cache clear
Make opened files return CELL_EIO after cache clear.
2019-11-09 14:50:41 +03:00
Nekotekina 73ee6abb0f cellSysCache: return /dev_hdd1 root
It simplifies internal logic a little.
2019-11-09 14:43:19 +03:00
Nekotekina e0bc276205 cellSysCache: keep mounted /dev_hdd1 after exitspawn 2019-11-09 14:43:19 +03:00
Nekotekina ccac9d4777 Remove throwing and catching cpu_flag::stop
Since there is spu_runtime::g_escape function now.
2019-11-08 19:27:11 +03:00
Nekotekina 03b9ee27c5 Virtualize cellSysCache
Allows caches from multiple games to coexist.
Also change the way of handling cache IDs (file-less).
2019-11-06 14:12:43 +03:00
eladash 33fe0fdd6b Add missng check for key in cellAudioSetNotifyEventQueue
key is checked once according to hw test.
2019-11-03 14:59:47 +03:00
Hula Hoop 200ec5c4b3 Super-important PR (#6900)
* Fix capitalisation errors and typos

* Oops
2019-10-28 17:44:44 +03:00
Eladash 65e47490c4 cellSysCacheClear/Mount() improved
Clear() error checking simplified a bit
Mount() now clears cache if ID was changed from last or NULL specified.

Implemented vfs::host::remove_all():
Clear() now uses vfs::host::remove_all() to match behaviour on Windows with ps3
2019-10-27 15:56:16 +03:00
MSuih f3ed26e9db Small warnings cleanup (#6671)
* Ignore more warnings

These are intentional

* Signed/unsigned mismatch when comparing

* Explictly cast values

* Intentionally discard a nodiscard value

* Change ppu_tid to u32

* Do not use POSIX function name on Windows

* Qt: Use horizontalAdvance instead of width

* Change progress variables to u32
2019-10-25 13:32:21 +03:00
arabek 63a0b97dd1 Normalize audio when downmixing to avoid clipping (#6867)
* Normalize audio when downmixing to avoid clipping

Idea came from this topic:
https://hydrogenaud.io/index.php?topic=104214.msg855199#msg855199

Fixes very loud audio in Motorstorm (and probably other games
when playing over headphones/stereo speakers with
Downmix to Stereo option enabled)
2019-10-25 12:56:47 +03:00
JohnHolmesII 0842724f94 Update cellVoice.cpp
Caused warnings. Not sure what the actual intention was, this may need to be inverted.
This commit assumes that erase() returning 0 is a sign that deletion
failed, or that there was corruption. There should be a port there.
2019-10-24 14:19:52 +03:00
Eladash 586fe11e22 Fix cellGcm HLE regression
Also correct flags.
2019-10-22 13:45:09 +03:00
eladash 730e9cde84 sys_rsx: Improve allocations and error checks
* allow sys_rsx_device_map to be called twice: in this case the DEVICE address retrived from the previous call returned
* Add ENOMEM checks for sys_rsx_memory_allocate and sys_rsx_context_allocate
* add EINVAL check for sys_rsx_context_allocate if memory handle is not found
* Separate sys_rsx_device_map allocation from sys_rsx_context_allocate's
* Implement sys_rsx_memory_free; used by cellGcmInit upon failure
* Added context_id checks
* Throw if sys_rsx_context_allocate was called twice.
2019-10-21 15:31:45 +03:00
Eladash 6c2307fb96 cellVoice: Initial Implementation
Implement system service events, error checking and some functions.
2019-10-20 15:16:53 +01:00
Eladash fa73175754 sceNpBasicGetEvent error checks improved 2019-10-20 14:56:44 +01:00
Eladash d9a97d8674 sceNpUtil Improvements 2019-10-20 14:56:44 +01:00
Megamouse 0ef7ad129d cellNetCtl: improve param checks 2019-10-19 19:20:18 +02:00
Megamouse e6aeb7ecb9 stub cellKey2Char 2019-10-19 19:13:33 +02:00
Megamouse 0bad56da67 cellScreenshot: initial implementation 2019-10-17 21:24:25 +02:00
Megamouse 60f3ed7607 stub cellSsl 2019-10-17 20:32:33 +02:00
Eladash 6dd96d3db9 Fixes for cellUserInfoGetList
- Don't allow all args to be nullptr at once.
- Fill listBuf with zeroes for unwritten entries
- Fix userId set in listBuf

Similarly to what the firmware does
2019-10-16 21:11:29 +03:00
Eladash 4ed2c7b594 error checking bugfix for sceNpTrophyCreateContext
options = 1 is allowed.
2019-10-16 00:50:58 +03:00