Compare commits

..

214 Commits

Author SHA1 Message Date
Ani a86a3d2fee rpcs3_version: Bump to 0.0.12 (#8815) 2020-08-31 23:38:51 +01:00
kd-11 a917f55ef8 vk/sdk: Sync with vulkan SDK v148 (#8814)
- Sync with vulkan SDK 148
- glslang library was split into several smaller libraries
- HLSL is no longer needed
2020-09-01 00:57:38 +03:00
Ani 21b535b5c5 gui/themes: Convert kot-bg to jpg (95%) (#8809)
No perceived loss of image quality, reduces size from 8.1 MB to 2.0 MB
2020-08-31 05:35:42 +01:00
kd-11 af9e217fa4 vk: Improve D16F handling
- Adds upload and download routines. Mostly untested, which is why the error message exists
2020-08-30 09:26:37 +03:00
Bevan Weiss 9a51f22265 Remove call to start m_mousehide_timer in gs_frame constructor 2020-08-29 16:14:11 +02:00
Bevan Weiss 144b185802 Woops... premature commit/push.
Fixed up the usage of connect
2020-08-29 16:14:11 +02:00
Bevan Weiss 3c0f6a2919 Used new Qt connect syntax
Fixed indenting
Renamed click callback argument from 'val'->'checked'
Converted m_gui re-usage to just reference ui
Removed implicit capture from spinbox lambda
Corrected millisecond acronym from mS->ms
Removed superfluous QTimer include in gs_frame.cpp
2020-08-29 16:14:11 +02:00
Bevan Weiss 22c33d4fb4 Added settings and logic for auto-hide of mouse cursor.
In line with the Show Cursor in Fullscreen settings, these settings are only updated when the render window is first launched, and not during the game.
This could be revised (along with the Fullscreen Cursor) if it's more desired.
2020-08-29 16:14:11 +02:00
kd-11 e9cdb248a0 glsl: Properly implement shadow filtering when running emulated shadow compare
- Previous code was completely borked
2020-08-29 02:03:09 +01:00
kd-11 e8274d5a59 vk: Fix depth format mismatch detection in copy_image 2020-08-29 02:03:09 +01:00
Eladash 6952be5ce4 Debugger: Replace SPU register perefix '$' with 'r' 2020-08-28 20:44:13 +02:00
RipleyTom 4317291827 tcp_timeout_monitor deadlock fix (#8783) 2020-08-28 01:06:01 +01:00
Nekotekina bd40430d2b Fix some warnng in lv2.cpp 2020-08-28 01:54:39 +03:00
Nekotekina ebc4a0188a Restore some code 2020-08-28 01:54:39 +03:00
Nekotekina bfa4fcf584 Use g_fxo for progress_dialog_server 2020-08-28 01:54:39 +03:00
Eladash 48f70fbf10 Fix UB in Emulator::Load 2020-08-27 23:52:37 +01:00
Eladash 019d2d5dcf Implement HLE cellSpursAddUrgentCommand 2020-08-27 23:52:37 +01:00
Eladash 17f7f329a8 Log PRX segment end for usage with kernel explorer 2020-08-27 23:52:37 +01:00
Eladash 933737e8f0 PPU: log LR in HLE functions 2020-08-27 23:52:37 +01:00
Eladash 47b545282e SPU: Fix events ACK, minor optimizations (#8771) 2020-08-27 21:36:54 +01:00
RipleyTom 190822c2b2 RPCN Client (#8663) 2020-08-27 20:47:04 +01:00
kd-11 d000d648b0 vk: Fix some minor spec violation
- Stencil clear pass does not consume an image, do not bind one.
- Add push_barrier to allow push-pop semantics for texture barrier insert.
2020-08-27 12:52:28 +03:00
kd-11 d257ba5156 vk: Add some more diagnostic messages for unoptimized image transfer setups 2020-08-27 12:52:28 +03:00
kd-11 9828d6146b rsx: Fix format matching when aggregating textures
- When copying depth-depth, prefer own format over depth int format
2020-08-27 12:52:28 +03:00
kd-11 9e4bec8cec vk: Fix some missing render target declarations 2020-08-27 12:52:28 +03:00
kd-11 65ead08880 rsx: Refactor and improve image memory manipulation routines 2020-08-27 12:52:28 +03:00
kd-11 f6c6c04648 vk: Implement transport for D24S8_FLOAT data 2020-08-27 12:52:28 +03:00
kd-11 794378d5e9 rsx: Do not create depth textures as blit engine targets. 2020-08-27 12:52:28 +03:00
kd-11 a5ac5a9861 rsx: Separate uint depth formats from float depth formats 2020-08-27 12:52:28 +03:00
kd-11 faaf28b41d rsx: Basic support for creating depth float formats 2020-08-27 12:52:28 +03:00
GooseWing 700c540434 Add Nekotekina skin (#8776)
* adding kots

* More sharper neko on background

Co-authored-by: Megamouse <studienricky89@googlemail.com>
2020-08-27 07:15:24 +02:00
RipleyTom c177bf7480 Forces MSVC Toolkit to 14.25.28610 in Azure Pipelines 2020-08-27 06:39:46 +02:00
Eladash bccfb1cda7 Fix empty input in Registers Editor 2020-08-26 08:20:16 +02:00
Eladash c099bb817f Debugger: Disable PPU address redirection
It causes more confusion than it helps.
2020-08-25 17:43:07 +02:00
Eladash 7fe98d8d66 Debugger: Add missing PPU stack register checks 2020-08-25 17:43:07 +02:00
Eladash d356e0d1e7 Debugger: Register Editor Improvements 2020-08-25 17:43:07 +02:00
Eladash 3ce7fd7894 Debugger: Fix instructions editor 2020-08-25 17:43:07 +02:00
Eladash 6f42297b58 Debugger: Fix scrolling using PageUp, PageDown, KeyUp, KeyDown 2020-08-25 17:43:07 +02:00
Eladash c5aebe4564 Debugger: Implement PPU SLWI, SRWI, SLDI mnemonics 2020-08-24 02:10:51 +03:00
Eladash 841b8fad38 SPU: Fix timer events 2020-08-24 01:57:32 +03:00
Bevan Weiss ab0df0a0f5 Support for Namco GCon3 gun (#8757)
This gun now works (passes calibration) in Time Crisis 4.
2020-08-22 15:41:08 +02:00
Eladash 27e3317449 [HOTFIX] Fix UB in Emu/System.cpp 2020-08-22 11:55:08 +02:00
Eladash edc09e22b4 PSF: Avoid redundent string copies in psf::array/string/get_string (#8707) 2020-08-21 23:55:17 +01:00
Megamouse b487c09d34 Revert "Qt: speed up list refresh"
This reverts commit 715f4f0669.
2020-08-21 09:51:36 +02:00
Eladash 4a40ef6a19 Debugger: Use Signed Hexadecimal formatting (#8751) 2020-08-20 22:07:31 +01:00
Eladash bcddbc15f0 Debugger: Fix PPU stepping on non-TSX 2020-08-19 19:48:35 +01:00
Eladash 2a19d0a579 kernel-explorer: Add RSX handlers events info 2020-08-19 09:09:24 +02:00
Megamouse 9af66e22da evdev: log axis information in pad settings 2020-08-18 18:29:35 +02:00
Megamouse 715f4f0669 Qt: speed up list refresh 2020-08-18 11:00:04 +02:00
Megamouse e6e753f37f Qt/Linux: fix QT_AUTO_SCREEN_SCALE_FACTOR typo 2020-08-18 10:04:31 +02:00
Megamouse e958c3cc6a Qt: fix YoRHa QTreeWidget item style for CheckBoxes 2020-08-18 10:04:31 +02:00
Eladash 19500ac9ad Fix truncation warning in sys_cond.cpp 2020-08-17 17:36:27 +01:00
Eladash 25dee4a78e Fix bitops test 2020-08-17 17:36:27 +01:00
Eladash ee953f7953 Fix vm::reservation_update 2020-08-16 22:58:49 +03:00
Zion Nimchuk acee590733 Ensure pushing builds to Github is only done on master branch 2020-08-16 17:35:19 +01:00
Zion Nimchuk cd94d9849d Windows GitHub release hotfix
Improve id variable parsing and print release.json to catch error
2020-08-16 17:35:19 +01:00
Zion c3709fa744 Manually upload Windows Github Release using curl. Actually fixes #7938 (#8715)
For some reason Azure would evaluate the GitHub release instantly and
complain about missing/invalid GitHub Release deployment and fail to
even start the build, this fixes the issue by just manually uploading it
via the GitHub API and curl.
2020-08-15 20:46:53 +01:00
Eladash 853e2b90a3 rsx: Minor rsx::ceil_log2 bugfix 2020-08-15 20:39:21 +03:00
Eladash 995cb8125e SPU LLVM: Improve approx FCGT (#8728) 2020-08-14 19:33:35 +01:00
Bevan Weiss 01d3585bf3 Bring back the non-compliant define, but version limited
As noted, we've done something we shouldn't have with MSVC compiler specific defines.  But to avoid breaking the MSVC build environment, leave this define in there until the MSVC version when it is actually exposed by the compiler itself (v16.8).
2020-08-14 18:34:34 +01:00
Bevan Weiss a11afe05bf MSVC changes
Add support for compilation on x64 toolchain (x86 cl.exe was running out of heap space in vm.cpp)

Also took the opportunity to change compile optimisation from /Ox to /O2, as /O2 provides better optimisation than does /Ox

Also, we shouldn't be explicitely setting compiler tool defines (__cpp_lib_bitops), so remove that from types.h
2020-08-14 18:34:34 +01:00
Whatcookie 9e4f43f4d1 SPU LLVM: Add icelake optimized paths for SHUFB (#8712) 2020-08-13 15:00:56 +01:00
Eladash 8cdfe5952a SPU/PPU LLVM: Improve 0 addend FMA detection (#8709) 2020-08-13 04:13:08 +03:00
Eladash 0f8ca1f7c5 SPU: Implement RSX accurate reservations on TSX (#8721) 2020-08-13 00:00:37 +01:00
kd-11 fd2607ad52 rsx: Fix XBGR vs XRGB screenshots 2020-08-12 20:19:19 +03:00
kd-11 7e1b24224d rsx: Support XBGR flip image load from Cell memory 2020-08-12 20:19:19 +03:00
kd-11 56c63170b9 vk: Warn if GPU does not support RGBA8 natively 2020-08-12 20:19:19 +03:00
kd-11 b41349546c rsx: Proper support for typeless transform of ABGR framebuffers using the RGBA8 format 2020-08-12 20:19:19 +03:00
kd-11 6850533b50 rsx: Unify composite texture creation and management
- Some texture accesses require image compositing steps to assemble the requested image from existing subresources.
  Handle all the common routines in a unified manner to avoid having one broken path (e.g mipmap gather not supporting bitcast operations)
2020-08-10 13:31:22 +03:00
Whatcookie 4ce2ad54a8 PPU LLVM: Use VPERM2B to emulate VPERM (#8704)
- The VPERM2B instructions are a match of VPERM's behavior, besides operating in reverse byte order
2020-08-09 01:50:26 +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 57471f8c94 SPU LLVM: Fix signed zeroes handling on Accurate xfloat 2020-08-08 22:21:22 +01:00
Eladash 7e11855330 SPU/PPU LLVM: Fix FMA signed zeroes handling 2020-08-08 22:21:22 +01:00
Malcolm Jestadt f188589685 Utils: Add detection for Icelake-client tier AVX-512
- Implies support for everything that Skylake-X supports as well as AVX512IFMA, AVX512VBMI, AVX512VBMI2, AVX512VPOPCNTDQ, AVX512BITALG, AVX512VNNI, AVX512VPCLMULQDQ, AVX512GFNI, AVX512VAES
2020-08-08 00:33:22 +02:00
Megamouse 96428a7555 Log username 2020-08-07 21:57:08 +02:00
illusion d3585e1f80 move accurate rsx reservation to advanced 2020-08-07 09:34:27 +02:00
illusion c0c86521a2 add missing settings to configure 2020-08-07 09:34:27 +02:00
kd-11 22f5e7a9be vk: Generate valid image+image_view combinations for placeholder texture descriptors 2020-08-06 20:34:49 +03:00
Megamouse 06c42bba5d Qt: fixup for PKG installation 2020-08-06 17:32:29 +02:00
Bevan Weiss ada6db2df4 Replace ppu_module_manager Function Static with Class Static variable (static module map) (#8669)
* Replace ppu_module_manager Function Static with Class Static

Makes for a slightly 'cleaner' interface in my opinion, may also assist with adding thread read/write concurrency support in future if ever required (have left that out of this commit to match existing function).

Very slight performance improvements were seen in representative testing.
https://quick-bench.com/q/GMbgeNc-mZc21aqOKCofnbzPZvg

I didn't investigate whether static initialisation of the static_modules might actually be possible here, perhaps there's a way to do a constexpr / consteval of this.

* Fix up for old style cast syntax..

* Fixups from PR comments

Plus remove spurious type_traits include (from me) not picked up in previous PR

* Remove old code

* Update rpcs3/Emu/Cell/PPUModule.h

Co-authored-by: Eladash <elad3356p@gmail.com>

* Fix naming of static variable

Co-authored-by: Eladash <elad3356p@gmail.com>
2020-08-06 12:34:08 +02:00
Bevan Weiss eee5e812f7 Fix for incorrect assignment of ghlguitar
found_ghltar was potentially being overwritten if multiple USB devices were present
2020-08-06 12:01:21 +02:00
Bevan Weiss eb5ae94c24 sys_usbd tidy ups
Tidy up fake transfer iterator handling. erase invalidates all iterators including the current iterator (i.e. 'it'), given precedence ordering this was UB prior to C++17.  Splitting out to use return iterator from erase seems cleaner.
Also added some additional info to usb debug message to potentially help with #8666, and used the atomic (dev_counter) less often
2020-08-06 12:01:21 +02:00
kd-11 7109fe9889 rsx: Improve swizzled layout detection
- Reset swizzle flag to false automatically on section reset.
- Detect render target payload and extract swizzle information from it.
2020-08-05 23:23:38 +03:00
Megamouse 17557df9f4 Qt: unify package installation logic 2020-08-05 08:10:22 +02:00
Megamouse fab1f7d939 Qt: add rap files to pkg install file dialog 2020-08-05 08:10:22 +02:00
Megamouse 815d6f4223 Qt: fix input lag in pad settings
Looks like repainting stuff inside a resizeable layout is slow AF
2020-08-04 16:15:13 +02:00
Megamouse 25d73f5a70 Try to fix ugly GUIs 2020-08-03 22:03:15 +02:00
Megamouse d633a266c1 Add config override as cli arg: --config <path>
And add some more logging
2020-08-03 21:31:53 +02:00
dio-gh 938bf8624c make some cfg logs error instead of fatal
- in case there's a default value to fall back to, log with error
  instead of with a fatal
2020-08-03 20:59:47 +02:00
Megamouse 2cdb46b167 Qt: do not use on_<obj>_<action> syntax for slots
Qt tries to auto connect those
2020-08-03 20:17:35 +02:00
Megamouse 8799eebfe1 Qt: move some more settings to persistent_settings 2020-08-03 20:17:35 +02:00
Eladash 70fb5712e5 PPU interpreters: Fix VMAXFP NaN and signed zeroes handling 2020-08-03 15:43:00 +01:00
Eladash 6a51c27fde PPU LLVM: Fix VMAXFP, VMINFP NaN handling 2020-08-03 15:43:00 +01:00
Eladash 17f965c171 lv2: Minor fix of "unspecific ppu" path of _sys_lwcond_signal 2020-08-03 02:57:20 +03:00
kd-11 bd21930d1a rsx: Decode swizzled GPU data on CPU readback
- Currently this conversion is being done on the CPU to reuse as much code as possible.
  The expectation is that this almost never happens, so there is not point in increasing maintenance burden by adding compute paths
2020-08-02 16:14:11 +03:00
kd-11 4df933275b rsx: Propagate raster type of fbo sourced data throughout the pipeline.
- Tracks which kind of raster was done (Z-ordered vs linear) throughout the application.
- This allows to identify if data is in the expected format or not.
2020-08-02 16:14:11 +03:00
Megamouse 107129f95a Fix missing GPU in game window title 2020-07-31 01:13:00 +02:00
JohnHolmesII e11734f971 CI: Avoid trying to publish builds on forks 2020-07-30 23:36:10 +02:00
Megamouse 3bba9708d9 Gracefully abort headless mode with unsupported video renderers
Also fix no_return bug
2020-07-30 20:03:51 +02:00
Eladash dd497625a5 PPU LLVM: Fix constant folding of BitCast 2020-07-30 17:06:24 +01:00
Eladash f6764767f6 SPU/PPU LLVM: Fix cpu_translator::get_const_vector<v128>() 2020-07-30 17:06:24 +01:00
Eladash e52dd9dc6f SPU: Implement SYS_SPU_THREAD_OPTION_DEC_SYNC_TB_ENABLE (#8657) 2020-07-30 14:01:25 +01:00
Megamouse 03ae1481fb Don't open an error dialog in headless mode 2020-07-30 12:17:35 +02:00
Eladash 82068cf802 SPU: Fix spu_thread::cpu_stop() missed executions (#8656) 2020-07-30 10:07:18 +01:00
Megamouse ebf832214e cheat_manager: notify if no game is running 2020-07-29 13:18:33 +02:00
Megamouse 4315363f4b cheat_manager: make sure that the patches path exists 2020-07-29 13:18:33 +02:00
Megamouse f073ff8fe8 overlays: fix minor warning 2020-07-29 13:18:33 +02:00
Megamouse 47040be3ad cheat_manager: improve parser errors 2020-07-29 13:18:33 +02:00
Megamouse d0bb9d2b62 cheat_manager: move cheats.yml to patches folder 2020-07-29 13:18:33 +02:00
Megamouse cb6e536fbd cheat_manager: use enum values for columns 2020-07-29 13:18:33 +02:00
Megamouse f820a7a205 cheat_manager: disable search buttons if nothing was entered in the search field 2020-07-29 13:18:33 +02:00
Megamouse 16212854b4 cheat_manager: fix long search result lists 2020-07-29 13:18:33 +02:00
Megamouse 1c6003acd5 Improve error handling of config nodes
These conditions are most likely only gonna be met during development
2020-07-29 11:28:16 +02:00
Megamouse ef3e8d26ce Improve error handling during config loading 2020-07-29 11:28:16 +02:00
Eladash 21a1072117 SPU LLVM: Minor cleanup after #8559 2020-07-29 03:32:21 +03:00
MSuih 2ce49e3674 Improve error messages in firmware install 2020-07-28 20:55:33 +02:00
Megamouse e58e1ebfd9 Qt: fix download menu visibility 2020-07-28 20:07:21 +02: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
Bevan Weiss 7898ae6fe6 VK_REMAP enum is signed.. but later case comparison is unsigned
another clang directed fix up... might be involved with swizzle..
2020-07-26 15:27:51 +03:00
Malcolm Jestadt a9d0ffcac1 SPU LLVM: Avoid additional endian swapping
- Avoid additional endian swapping with the ROTQBY and ROTQBYBI instructions
- ROTQBYI is left out intentionally, since it caused worse codegen
2020-07-26 11:36:50 +01:00
Malcolm Jestadt 824be77bba SPU LLVM: Avoid redundant endian swapping
- PSHUFB operates in reverse byte order from SHUFB, so we can take advantage of that to swap endianness without additional transformations in some situations
2020-07-26 11:36:50 +01:00
Ani 74c8a44d84 rsx: Fix cache skipping shaders on load+compile (#8633)
When on single worker mode (OpenGL or an hypothetical scenario of a 
single core PC with Vulkan), load and compile would skip 10% of the 
shaders on queue each stage.

Co-authored-by: kd-11 <karokidii@gmail.com>
2020-07-26 08:47:50 +01:00
Whatcookie 9f829b375a SPU/PPU LLVM: Optimize VSEL/SELB with constant mask (#8559) 2020-07-25 17:59:35 +01:00
Eladash da44d5f10d PPU: Fix DIVW, DIVWU, MULHW, MULLW, MULHWU when op.rc is set (#8630) 2020-07-25 17:13:58 +01:00
kd-11 be4b71b805 vk: Fixup for PR #8590
- This change was lost during rebase
2020-07-25 14:48:11 +03:00
kd-11 b0c7ca6d1f vk: Improve video memory manager to attempt recovery in out of memory situations 2020-07-25 14:48:11 +03:00
kd-11 4d8de282f9 vk: Improve typeless texture succession
- Ensure incoming texture is large enough that the original one fits inside it to avoid back-and-forth succession.
- Make use of the resource manager to remove the obsolete textures to avoid holding on to the them which "leaks" VRAM.
  The memory isn't leaking, it's just wasting space in temporary pool until renderer is closed.
2020-07-25 14:48:11 +03:00
Bevan Weiss c5d39ace2b Update types.h to fix static_cast test (#8627)
Trivial fix up to resolve invalid is_constructible test (To,To) to match desired (To,From)
2020-07-25 09:46:47 +01:00
Megamouse de80a4b6c7 overlays: try to fix unexpected font crop 2020-07-25 10:21:52 +03:00
Eladash 917069e31a PPU Precise/LLVM: Support NJ modes (#8617) 2020-07-25 07:41:41 +01:00
Eladash 3354c800d7 SPU/PPU LLVM: Improve expressions matching (#8620) 2020-07-24 16:53:48 +01: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 a029a94c73 SPU: Use waitable atomics for SPU channels interface 2020-07-23 13:45:58 +03:00
illusion 3157a10428 move executable hash log level to success 2020-07-22 10:51:19 +02:00
Eladash f8d2d8ca11 SPU/Windows: Fix LS memory mirrors
This is a workaround but this is because of how utils::shm works on Windows path.
2020-07-19 17:58:49 +03:00
Eladash 0d8152cd4e SPU/Linux: Ensure aligned 64k allocations in utils::memory_reserve 2020-07-19 17:58:49 +03:00
Eladash c37bc3c55c SPU: Make spu_thread::offset private 2020-07-19 17:58:49 +03:00
Malcolm Jestadt 6cc0fe4221 SPU LLVM: Avoid negative clamping when the input is known to be positive 2020-07-19 17:56:59 +03:00
Eladash af1ceb1151 SPU LLVM: LS Memory Mirrors (Optimize loads/stores) 2020-07-18 02:01:33 +03:00
Eladash c1a80b8146 Minor fixup after #8501 2020-07-16 21:52:08 +03:00
Eladash 268bcd1c7b rsx: Fix false desync events 2020-07-16 19:26:10 +02:00
kd-11 42a9ac9e6c rsx: Brute-force removal of superseded surfaces 2020-07-16 19:11:26 +03:00
kd-11 182b20c33d rsx: Fix draw count append when draw ranges are out of order
- It is common for draw counts to truncate at 256 even when it makes no sense to do so.
- e.g 256 is not a multiple of 3 so triangles will glitch out
2020-07-14 16:04:44 +03:00
Eladash 58e2465369 Make std::bit_cast hack-implementation constexpr in simple cases 2020-07-14 12:14:44 +03:00
Eladash 07a44d0ff9 Implement constexpr byteswapping 2020-07-14 12:14:44 +03:00
Jan Beich d00f882c23 Qt/input: unbreak with Qt 5.15 after 881e8e4723
rpcs3/rpcs3qt/pad_settings_dialog.cpp:674:16: error: variable has incomplete type 'QPainterPath'
                QPainterPath path;
                             ^
/usr/local/include/qt5/QtGui/qmatrix.h:54:7: note: forward declaration of 'QPainterPath'
class QPainterPath;
      ^
2020-07-14 08:33:56 +02:00
Megamouse e70e534bfa Qt: Fix YoRHa background for some widgets 2020-07-14 02:08:15 +02:00
Megamouse d345916241 Qt: Fix Skyline's QSpinBox and QDoubleSpinBox buttons 2020-07-14 02:08:15 +02:00
Megamouse fe8bcac270 Qt/input: add tooltips to pad settings 2020-07-14 00:06:43 +02:00
illusion 60f05fdbf3 move applied patch log level to success 2020-07-13 22:33:03 +02:00
Megamouse ad0f12c742 Qt/input: add checkbox for emulated stick values 2020-07-13 21:23:48 +02:00
Megamouse 2f2a03b37b Qt/input: fix stick preview for disconnected pads 2020-07-13 21:23:48 +02:00
Megamouse 881e8e4723 Qt/input: show emulated sticks in pad settings 2020-07-13 21:23:48 +02:00
Megamouse e1af6dc4af Qt/input: add squircle to pad settings dialog 2020-07-13 21:23:48 +02:00
Megamouse 4d9533ea54 input: use left and right squircle values 2020-07-13 21:23:48 +02:00
Eladash d6623e0f22 RSX debugger: fix command count on non-method commands (#8578)
* RSX debugger: fix command count on non-method commands

* fixup

* constants and variables
2020-07-12 12:40:47 +02:00
kd-11 ab3d36f0f3 rsx: Fix depth bounds test
- Allow depth bounds test to access the Z buffer even when depth test is disabled.
2020-07-10 15:59:15 +03:00
kd-11 632af8d723 rsx: Support partial texture descriptors
- It is safe to declare w > pitch and it works as long as sampling inside the legal 2D area is obeyed.
2020-07-10 15:26:07 +03:00
Eladash 282b00674a SPU LLVM: Optimize non-constant Tag Update requests 2020-07-10 02:52:02 +03:00
Eladash 235d12aa6b SPU MFC: Never clear tag status in WrTagUpdate 2020-07-10 02:52:02 +03:00
Eladash 5d1fc546a8 SPU MFC: Fix MFC_WrTagUpdate channel count
Always report available, in realhw this is just a hint if the previous tag update hasnt been checked yet by the MFC, avoiding blocking writes and allowing the SPU to execute some code while it processes the previous update request.
Except for MFC_TAG_UPDATE_IMMEDIATE, where it also waits for MFC to process it.
2020-07-10 02:52:02 +03:00
Eladash eb993781ef RawSPU: Log MMIO access 2020-07-09 23:24:47 +03:00
Megamouse 0756fd9c7e Qt: fix pad settings resize when switching tabs 2020-07-09 08:20:37 +02:00
Megamouse a3e79fc105 Qt: fix scrollArea focus during pad button choice
Assigning arrow keys was broken because of this
2020-07-09 08:20:37 +02:00
Eladash 84470c34db SPU: Disable PUTLLC NOP transfers detection on TSX path 2020-07-09 03:17:35 +01:00
Eladash f8dbfa1d1e SPU: Implement GETLLAR polling detection 2020-07-09 03:17:35 +01:00
Eladash d9750e8f9f SPU/PPU reservations: Optimizations for reservation locks and check_state() (non-TSX) 2020-07-09 03:17:35 +01:00
Megamouse e09c4b72c8 Qt: fix update menu for linux 2020-07-08 22:21:27 +02: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 8ee953ef8e XAudio2: Call CoInitializeEx to prevent errors
I could not properly reset the audio backend and call CreateMasteringVoice without getting errors
2020-07-08 21:11:23 +02:00
Megamouse 5b7ee43352 XAudio2: print readable errors 2020-07-08 21:11:23 +02:00
Megamouse 8add57f8e9 VS: show linux audio backends in solution explorer 2020-07-08 21:11:23 +02:00
Megamouse bb0aaea92d cellAudio: implement downmix to 5.1 2020-07-08 21:11:23 +02:00
kd-11 987ede2e6c vk: Inject memory barrier upon conclusion of a framebuffer feedback loop
- Do not write to the texture until previous draw call is completed using it.
- This is usually not much of a problem until blending operations come into play.
2020-07-08 19:23:29 +03:00
Megamouse 5fae1b3637 HLE: fix sceNpDrmGetTimelimit invalid param error 2020-07-07 09:43:32 +02:00
Derrik Touve cb08c53f2f sys_net: Use np_handler dns if possible for sys_net_infoctl (#8557)
Without this, cellHttpSendRequest will use the hardcoded dns 192.168.1.1, which won't work if you're not on that network.
2020-07-07 08:25:29 +02:00
Megamouse 171e4fafed Emu: simplify Emu::Stop some more 2020-07-06 21:14:16 +02:00
Megamouse 8d2ce2815c Emu: Make prevent_display_sleep dynamic 2020-07-06 21:14:16 +02:00
Megamouse d91551c277 Emu: always use Emu.Quit() to quit RPCS3
This creates a single possible point of failure for calling quit()
2020-07-06 21:14:16 +02:00
Megamouse 332f9cae77 Qt: Remove obsolete main window close()
The gui settings aren't part of the main window anymore
2020-07-06 21:14:16 +02:00
Eladash dc25a3fa2a PPU debugger: Show stack address of each function 2020-07-06 18:58:16 +02:00
Eladash c98ec4d014 PPU debugger: Fix functions stack bounds check 2020-07-06 18:58:16 +02:00
kd-11 05dc6ad610 gl: Silence warnings 2020-07-05 16:58:44 +03:00
kd-11 3fe8499956 rsx: Improve ZCULL queued requests finalization
- Unifies the code
- Allows conditionals to be evaluated with a forwarder present
2020-07-05 16:58:44 +03:00
Megamouse f1b1c9053c Input/Qt: Check if gui callbacks are nullptr 2020-07-04 14:28:19 +02:00
Megamouse ea4cc0b395 Qt: use button box for most buttons 2020-07-04 14:28:19 +02:00
Megamouse be8980fc23 Qt: add scrollarea to pad settings dialog 2020-07-04 14:28:19 +02:00
Megamouse e4a9c177e6 Qt: Random unimportant stuff 2020-07-04 14:28:19 +02:00
Megamouse 99be645fcc Qt: Add stick multipliers to the pad dialog 2020-07-04 14:28:19 +02:00
Megamouse f8920edb2e patch_manager: save "owned games only" state 2020-07-03 18:09:06 +02:00
kd-11 acf51f0ead rsx: Fix transfer descriptors for partially overlapping slices in head
- Height must be corrected to skip the piece that exists before the current slice
2020-07-03 14:29:54 +03:00
Megamouse ddd202b5ff Qt: fix signal_update_available
m_update_message has to be non empty
2020-07-03 00:21:58 +02:00
Megamouse 78eb7e73bc Qt: remove automatic param from update logic
At that point we already had user interaction, so there is no point in hiding the error dialogs
2020-07-03 00:21:58 +02:00
Eladash 72337f2678 SPU LLVM: Fix barrier commands enqueuing 2020-07-02 22:46:02 +03:00
Megamouse 14200c1a1f Qt: refactor curl stuff into a downloader
And add 'Background' updater
2020-07-02 20:22:58 +02:00
Megamouse c495ef10b0 Qt: fix random QWinTaskbarProgress crashes 2020-07-02 20:22:58 +02:00
Megamouse 3bdce6050b Qt: random cleanups 2020-07-02 20:22:58 +02:00
kd-11 c9c0d7361d rsx: Implement fast ZCULL barrier when query object is already known 2020-07-02 20:11:57 +03:00
kd-11 d7ffc8b4ac rsx: Fix leaking ZCULL queries after a barrier
- Multiple queries can be queued up, process them all before completing the barrier
2020-07-02 20:11:57 +03:00
Megamouse b5f01372ee Windows: distinguish left and right modifiers
This is just some workaround until we either use a different input api for keyboards or until we refactor the keyboard_pad_handler to use Qt with native scan codes
2020-07-02 12:55:27 +02:00
Megamouse bec6bde919 Qt/Input: update keyboard_pad_handler shortcuts
This is just some patchwork before the shortcuts get refactored eventually
2020-07-02 12:55:27 +02:00
Megamouse 1f25924384 Qt/Input: remove unused function: GetModifierCode 2020-07-02 12:55:27 +02:00
Jacques Yakoub 36cf5dca82 localized.h: follow Sony Naming Conventions (#8539)
* localized.h: follow Sony Naming Conventions

See this : https://github.com/RPCS3/rpcs3/issues/4259 (Main Window -> (Localized) Replace the category names with either something more gramatically correct or something used in Sony Naming Conventions)
2020-07-02 09:39:10 +02:00
Bird Egop eea12bad07 Implement Caret upwards and downwards move in overlay_edit_text (#8342)
* Implement caret upwards and downwards move in overlay_edit_text

* Optimize caret up and down movement

Co-authored-by: Megamouse <studienricky89@googlemail.com>
2020-07-02 09:06:37 +02:00
339 changed files with 21238 additions and 8273 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/bin/sh -ex
ARTIFACT_DIR="$BUILD_ARTIFACTSTAGINGDIRECTORY"
generate_post_data()
{
body=$(cat GitHubReleaseMessage.txt)
cat <<EOF
{
"tag_name": "build-${BUILD_SOURCEVERSION}",
"target_commitish": "7d09e3be30805911226241afbb14f8cdc2eb054e",
"name": "${AVVER}",
"body": "$body",
"draft": false,
"prerelease": false
}
EOF
}
repo_full_name="RPCS3/rpcs3-binaries-win"
curl -s \
-H "Authorization: token ${RPCS3_TOKEN}" \
-H "Accept: application/vnd.github.v3+json" \
--data "$(generate_post_data)" "https://api.github.com/repos/$repo_full_name/releases" >> release.json
cat release.json
id=$(grep '"id"' release.json | cut -d ':' -f2 | head -n1 | awk '{$1=$1;print}')
id=${id%?}
echo ${id:?}
upload_file()
{
curl -s \
-H "Authorization: token ${RPCS3_TOKEN}" \
-H "Accept: application/vnd.github.v3+json" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$2"/"$3" \
"https://uploads.github.com/repos/$repo_full_name/releases/$1/assets?name=$3"
}
for file in "$ARTIFACT_DIR"/*; do
name=$(basename "$file")
upload_file "$id" "$ARTIFACT_DIR" "$name"
done
+5 -3
View File
@@ -17,8 +17,9 @@ QT_WINE_URL="${QT_HOST}${QT_PREFIX}qtwinextras${QT_SUFFIX}"
QT_DECL_URL="${QT_HOST}${QT_PREFIX}qtdeclarative${QT_SUFFIX}"
QT_TOOL_URL="${QT_HOST}${QT_PREFIX}qttools${QT_SUFFIX}"
LLVMLIBS_URL='https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win/llvmlibs_mt.7z'
GLSLANG_URL='https://github.com/RPCS3/glslang/releases/download/custom-build-win/glslanglibs_mt.7z'
VULKAN_SDK_URL="https://www.dropbox.com/s/4xppf4rz8v2gd8x/VulkanSDK-${VULKAN_VER}-Installer.exe"
#GLSLANG_URL='https://github.com/RPCS3/glslang/releases/download/custom-build-win/glslanglibs_mt.7z' <- Temporarily disabled auto-builds
GLSLANG_URL='https://www.dropbox.com/s/cg48qr4zmnn066v/glslanglibs_mt.7z'
VULKAN_SDK_URL="https://www.dropbox.com/s/adanclixregbp2x/VulkanSDK-${VULKAN_VER}-Installer.exe"
DEP_URLS=" \
$QT_BASE_URL \
@@ -75,7 +76,8 @@ for url in $DEP_URLS; do
case "$url" in
*qt*) checksum=$(curl -L "${url}.sha1"); algo="sha1"; outDir='C:\Qt\' ;;
*llvm*) checksum=$(curl -L "${url}.sha256"); algo="sha256"; outDir="." ;;
*glslang*) checksum=$(curl -L "${url}.sha256"); algo="sha256"; outDir="./lib/Release - LLVM-x64" ;;
#*glslang*) checksum=$(curl -L "${url}.sha256"); algo="sha256"; outDir="./lib/Release - LLVM-x64" ;; <- Temporarily disabled auto-build
*glslang*) checksum=$(curl -L 'https://www.dropbox.com/s/hwnatk68n70jap0/glslanglibs_mt.7z.sha256'); algo="sha256"; outDir="./lib/Release - LLVM-x64" ;;
*Vulkan*)
# Vulkan setup needs to be run in batch environment
# Need to subshell this or else it doesn't wait
+4 -1
View File
@@ -71,4 +71,7 @@
path = 3rdparty/wolfssl
url = https://github.com/RipleyTom/wolfssl.git
ignore = dirty
[submodule "3rdparty/flatbuffers"]
path = 3rdparty/flatbuffers
url = https://github.com/google/flatbuffers.git
ignore = dirty
+4 -4
View File
@@ -10,8 +10,8 @@ jobs:
services: docker
cache: ccache
compiler: gcc
install: "docker pull rpcs3/rpcs3-travis-xenial:1.4"
script: 'travis_wait docker run -v $(pwd):/rpcs3 -v "$HOME/.ccache":/root/.ccache --env-file .ci/travis.env rpcs3/rpcs3-travis-xenial:1.4 /rpcs3/.ci/build-linux.sh'
install: "docker pull rpcs3/rpcs3-travis-xenial:1.5"
script: 'travis_wait docker run -v $(pwd):/rpcs3 -v "$HOME/.ccache":/root/.ccache --env-file .ci/travis.env rpcs3/rpcs3-travis-xenial:1.5 /rpcs3/.ci/build-linux.sh'
- os: linux
dist: xenial
env:
@@ -20,8 +20,8 @@ jobs:
services: docker
cache: ccache
compiler: clang
install: "docker pull rpcs3/rpcs3-travis-xenial:1.4"
script: 'travis_wait docker run -v $(pwd):/rpcs3 -v "$HOME/.ccache":/root/.ccache --env-file .ci/travis.env rpcs3/rpcs3-travis-xenial:1.4 /rpcs3/.ci/build-linux.sh'
install: "docker pull rpcs3/rpcs3-travis-xenial:1.5"
script: 'travis_wait docker run -v $(pwd):/rpcs3 -v "$HOME/.ccache":/root/.ccache --env-file .ci/travis.env rpcs3/rpcs3-travis-xenial:1.5 /rpcs3/.ci/build-linux.sh'
# - os: freebsd
# compiler: clang
# cache: ccache
+3
View File
@@ -111,6 +111,9 @@
</PropertyGroup>
<Import Project="..\common_default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<Import Project="..\common_default_macros.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
+7 -2
View File
@@ -74,6 +74,9 @@ else()
add_library(3rdparty_7z INTERFACE)
endif()
add_library(3rdparty_flatbuffers INTERFACE)
target_include_directories(3rdparty_flatbuffers INTERFACE flatbuffers/include)
# libPNG
# Select the version of libpng to use, default is builtin
if (NOT USE_SYSTEM_LIBPNG)
@@ -413,16 +416,17 @@ endif()
# LLVM
include(llvm.cmake)
# WOLFSSL
add_subdirectory(wolfssl EXCLUDE_FROM_ALL)
# CURL
if(USE_SYSTEM_CURL)
message("-- RPCS3: using shared libcurl")
find_package(CURL REQUIRED)
add_library(wolfssl-3-static INTERFACE)
add_library(libcurl INTERFACE)
target_link_libraries(libcurl INTERFACE CURL::libcurl)
else()
message("-- RPCS3: building libcurl + wolfssl submodules")
add_subdirectory(wolfssl EXCLUDE_FROM_ALL)
add_subdirectory(curl EXCLUDE_FROM_ALL)
endif()
@@ -430,6 +434,7 @@ endif()
add_library(3rdparty::libusb ALIAS usb-1.0-static)
add_library(3rdparty::zlib ALIAS 3rdparty_zlib)
add_library(3rdparty::7z ALIAS 3rdparty_7z)
add_library(3rdparty::flatbuffers ALIAS 3rdparty_flatbuffers)
add_library(3rdparty::pugixml ALIAS pugixml)
add_library(3rdparty::yaml-cpp ALIAS yaml-cpp)
add_library(3rdparty::xxhash ALIAS xxhash)
Vendored Submodule
+1
Submodule 3rdparty/flatbuffers added at 9e7e8cbe9f
+3
View File
@@ -27,6 +27,9 @@
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+3
View File
@@ -31,6 +31,9 @@
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
+4 -1
View File
@@ -28,6 +28,9 @@
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Library|x64'" Label="PropertySheets">
@@ -97,7 +100,7 @@
<DisableSpecificWarnings>$(DisableSpecificWarnings)</DisableSpecificWarnings>
<AdditionalIncludeDirectories>$(ZLibSrcDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWarningAsError>$(TreatWarningAsError)</TreatWarningAsError>
<Optimization>Full</Optimization>
<Optimization>MaxSpeed</Optimization>
<WholeProgramOptimization>true</WholeProgramOptimization>
</ClCompile>
<Link>
+3
View File
@@ -24,6 +24,9 @@
<WholeProgramOptimization Condition="'$(Configuration)'=='Release'">true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
+3
View File
@@ -21,6 +21,9 @@
</PropertyGroup>
<Import Project="$(SolutionDir)\3rdparty\zlib.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+3
View File
@@ -28,6 +28,9 @@
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+7 -1
View File
@@ -27,6 +27,9 @@
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
@@ -41,7 +44,10 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="xxHash/xxhash.c" />
+4
View File
@@ -22,6 +22,9 @@
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
@@ -40,6 +43,7 @@
<ItemDefinitionGroup>
<ClCompile>
<ExceptionHandling>Sync</ExceptionHandling>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
+4 -1
View File
@@ -31,6 +31,9 @@
<Import Project="$(SolutionDir)\3rdparty\zlib.props" />
<Import Project="..\common_default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<Import Project="..\common_default_macros.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
@@ -79,7 +82,7 @@
<ClCompile>
<WarningLevel>$(WarningLevel)</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Full</Optimization>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<WholeProgramOptimization>true</WholeProgramOptimization>
<BufferSecurityCheck>false</BufferSecurityCheck>
+1 -1
View File
@@ -384,7 +384,7 @@ namespace cfg
using uint64 = uint<0, UINT64_MAX>;
// Simple string entry with mutex
class string final : public _base
class string : public _base
{
const std::string m_name;
+2 -1
View File
@@ -1417,7 +1417,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) no
{
const auto& spu = static_cast<spu_thread&>(*cpu);
const u64 type = spu.offset < RAW_SPU_BASE_ADDR ?
const u64 type = spu.get_type() == spu_type::threaded ?
SYS_MEMORY_PAGE_FAULT_TYPE_SPU_THREAD :
SYS_MEMORY_PAGE_FAULT_TYPE_RAW_SPU;
@@ -1892,6 +1892,7 @@ void thread_base::initialize(void (*error_cb)(), bool(*wait_cb)(const void*))
void thread_base::notify_abort() noexcept
{
m_signal.try_inc();
atomic_storage_futex::raw_notify(+m_state_notifier);
}
+6
View File
@@ -210,6 +210,12 @@ public:
static_cast<thread_base&>(thread).notify();
}
template <typename T>
static void raw_notify(named_thread<T>& thread)
{
static_cast<thread_base&>(thread).notify_abort();
}
// Read current state
static inline thread_state state()
{
+25
View File
@@ -63,6 +63,17 @@ namespace utils
#ifdef _WIN32
return ::VirtualAlloc(use_addr, size, MEM_RESERVE, PAGE_NOACCESS);
#else
if (use_addr && reinterpret_cast<uptr>(use_addr) % 0x10000)
{
return nullptr;
}
if (!use_addr)
{
// Hack: Ensure aligned 64k allocations
size += 0x10000;
}
auto ptr = ::mmap(use_addr, size, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
if (ptr == reinterpret_cast<void*>(-1))
@@ -76,6 +87,20 @@ namespace utils
return nullptr;
}
if (!use_addr && ptr)
{
// Continuation of the hack above
const auto misalign = reinterpret_cast<uptr>(ptr) % 0x10000;
::munmap(ptr, 0x10000 - misalign);
if (misalign)
{
::munmap(static_cast<u8*>(ptr) + size - misalign, misalign);
}
ptr = static_cast<u8*>(ptr) + (0x10000 - misalign);
}
return ptr;
#endif
}
+6 -6
View File
@@ -57,7 +57,7 @@ void fmt_class_string<patch_type>::format(std::string& out, u64 arg)
patch_engine::patch_engine()
{
const std::string patches_path = fs::get_config_dir() + "patches/";
const std::string patches_path = get_patches_path();
if (!fs::create_path(patches_path))
{
@@ -89,7 +89,7 @@ std::string patch_engine::get_patches_path()
std::string patch_engine::get_imported_patch_path()
{
return fs::get_config_dir() + "patches/imported_patch.yml";
return get_patches_path() + "imported_patch.yml";
}
static void append_log_message(std::stringstream* log_messages, const std::string& message)
@@ -554,7 +554,7 @@ void patch_engine::append_global_patches()
load(m_map, fs::get_config_dir() + "patch.yml");
// New patch.yml
load(m_map, fs::get_config_dir() + "patches/patch.yml");
load(m_map, get_patches_path() + "patch.yml");
// Imported patch.yml
load(m_map, get_imported_patch_path());
@@ -571,7 +571,7 @@ void patch_engine::append_title_patches(const std::string& title_id)
load(m_map, fs::get_config_dir() + "data/" + title_id + "/patch.yml");
// New patch.yml
load(m_map, fs::get_config_dir() + "patches/" + title_id + "_patch.yml");
load(m_map, get_patches_path() + title_id + "_patch.yml");
}
std::size_t patch_engine::apply(const std::string& name, u8* dst)
@@ -801,11 +801,11 @@ std::size_t patch_engine::apply_patch(const std::string& name, u8* dst, u32 file
if (patch.is_legacy)
{
patch_log.notice("Applied legacy patch (hash='%s')(<- %d)", patch.hash, applied);
patch_log.success("Applied legacy patch (hash='%s')(<- %d)", patch.hash, applied);
}
else
{
patch_log.notice("Applied patch (hash='%s', description='%s', author='%s', patch_version='%s', file_version='%s') (<- %d)", patch.hash, patch.description, patch.author, patch.patch_version, patch.version, applied);
patch_log.success("Applied patch (hash='%s', description='%s', author='%s', patch_version='%s', file_version='%s') (<- %d)", patch.hash, patch.description, patch.author, patch.patch_version, patch.version, applied);
}
}
+32
View File
@@ -0,0 +1,32 @@
#include "stdafx.h"
#include "cheat_info.h"
#include "Config.h"
#include "StrUtil.h"
LOG_CHANNEL(log_cheat, "Cheat");
bool cheat_info::from_str(const std::string& cheat_line)
{
auto cheat_vec = fmt::split(cheat_line, {"@@@"}, false);
s64 val64 = 0;
if (cheat_vec.size() != 5 || !cfg::try_to_int64(&val64, cheat_vec[2], 0, cheat_type_max - 1))
{
log_cheat.fatal("Failed to parse cheat line");
return false;
}
game = cheat_vec[0];
description = cheat_vec[1];
type = cheat_type{::narrow<u8>(val64)};
offset = std::stoul(cheat_vec[3]);
red_script = cheat_vec[4];
return true;
}
std::string cheat_info::to_str() const
{
std::string cheat_str = game + "@@@" + description + "@@@" + std::to_string(static_cast<u8>(type)) + "@@@" + std::to_string(offset) + "@@@" + red_script + "@@@";
return cheat_str;
}
+30
View File
@@ -0,0 +1,30 @@
#pragma once
#include "stdafx.h"
enum class cheat_type : u8
{
unsigned_8_cheat,
unsigned_16_cheat,
unsigned_32_cheat,
unsigned_64_cheat,
signed_8_cheat,
signed_16_cheat,
signed_32_cheat,
signed_64_cheat,
max
};
constexpr u8 cheat_type_max = static_cast<u8>(cheat_type::max);
struct cheat_info
{
std::string game;
std::string description;
cheat_type type = cheat_type::max;
u32 offset{};
std::string red_script;
bool from_str(const std::string& cheat_line);
std::string to_str() const;
};
+16 -5
View File
@@ -64,6 +64,13 @@ bool utils::has_avx512()
return g_value;
}
bool utils::has_avx512_icl()
{
// Check AVX512IFMA, AVX512VBMI, AVX512VBMI2, AVX512VPOPCNTDQ, AVX512BITALG, AVX512VNNI, AVX512VPCLMULQDQ, AVX512GFNI, AVX512VAES (Icelake-client level support)
static const bool g_value = has_avx512() && (get_cpuid(7, 0)[1] & 0x00200000) == 0x00200000 && (get_cpuid(7, 0)[2] & 0x00005f42) == 0x00005f42;
return g_value;
}
bool utils::has_xop()
{
static const bool g_value = has_avx() && get_cpuid(0x80000001, 0)[2] & 0x800;
@@ -145,12 +152,16 @@ std::string utils::get_system_info()
{
result += " | AVX";
if (has_avx2())
{
result += '+';
}
if (has_avx512())
{
result += "-512";
if (has_avx512_icl())
{
result += '+';
}
}
else if (has_avx2())
{
result += '+';
}
+2
View File
@@ -43,6 +43,8 @@ namespace utils
bool has_avx512();
bool has_avx512_icl();
bool has_xop();
bool has_clwb();
+7 -2
View File
@@ -18,7 +18,7 @@
#include <array>
#ifdef _MSC_VER
#ifndef __cpp_lib_bitops
#if !defined(__cpp_lib_bitops) && _MSC_VER < 1928
#define __cpp_lib_bitops
#endif
#endif
@@ -94,6 +94,11 @@ namespace std
{
static_assert(sizeof(To) == sizeof(From), "std::bit_cast<>: incompatible type size");
if constexpr ((std::is_same_v<std::remove_const_t<To>, std::remove_const_t<From>> && std::is_constructible_v<To, From>) || (std::is_integral_v<From> && std::is_integral_v<To>))
{
return static_cast<To>(from);
}
To result{};
std::memcpy(&result, &from, sizeof(From));
return result;
@@ -1052,4 +1057,4 @@ inline constexpr uintmax_t ceil2(T value)
return i + std::min<uintmax_t>(ispow2, 1);
}
}
}
}
+4
View File
@@ -96,6 +96,9 @@
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
@@ -125,6 +128,7 @@
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>ASMJIT_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">MaxSpeed</Optimization>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+9 -16
View File
@@ -31,13 +31,13 @@ jobs:
displayName: ccache
- bash: |
docker pull --quiet rpcs3/rpcs3-travis-xenial:1.4
docker pull --quiet rpcs3/rpcs3-travis-xenial:1.5
docker run \
-v $(pwd):/rpcs3 \
--env-file .ci/travis.env \
-v $CCACHE_DIR:/root/.ccache \
-v $BUILD_ARTIFACTSTAGINGDIRECTORY:/root/artifacts \
rpcs3/rpcs3-travis-xenial:1.4 \
rpcs3/rpcs3-travis-xenial:1.5 \
/rpcs3/.ci/build-linux.sh
displayName: Docker setup and build
@@ -51,8 +51,8 @@ jobs:
QT_VER: '5.14.2'
QT_DATE: '202003291224'
QTDIR: C:\Qt\$(QT_VER)\msvc2017_64
VULKAN_VER: '1.2.135.0'
VULKAN_SDK_SHA: '181b3353612c8b0fc5e1857b652d62140191ae42b98f2f0d532cf349cebfd8c6'
VULKAN_VER: '1.2.148.1'
VULKAN_SDK_SHA: '5dbeafbc75c334811720fb50bd6ed7c9afd42afd31cad6be0b84cd8383aa9472'
VULKAN_SDK: C:\VulkanSDK\$(VULKAN_VER)
CACHE_DIR: ./cache
@@ -91,6 +91,7 @@ jobs:
maximumCpuCount: true
platform: x64
configuration: 'Release - LLVM'
msbuildArgs: '/p:VCToolsVersion=14.25.28610'
displayName: Compile RPCS3
- bash: .ci/deploy-windows.sh
@@ -100,16 +101,8 @@ jobs:
condition: succeeded()
artifact: RPCS3 for Windows
- task: GitHubRelease@1
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
inputs:
gitHubConnection: 'RPCS3-Token'
repositoryName: 'RPCS3/rpcs3-binaries-win'
releaseNotesFilePath: 'GitHubReleaseMessage.txt'
action: 'create'
target: '7d09e3be30805911226241afbb14f8cdc2eb054e'
tagSource: 'userSpecifiedTag'
tag: 'build-$(Build.SourceVersion)'
title: $(AVVER)
addChangeLog: false
- bash: .ci/github-upload-windows.sh
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: Push build to GitHub
env:
RPCS3_TOKEN: $(RPCS3-Token)
+465
View File
@@ -0,0 +1,465 @@
/*
Nekotekina Theme for RPCS3 by GooseWing
v1.0
Based on YoRHa Theme for RPCS3
by Ani @ https://github.com/AniLeo
r1 (2018.02.27)
sorry for stealing
*/
/*
Color Scheme
- Kot Programs
8c806a
bd9d86
c1b398
eadfb1
ebe4d2
- Light
ffd785
bfa163
- Dark
705722
5c471c
4d4940
*/
/* Every widget */
QWidget {
font-family: SCE-PS3 Rodin LATIN;
font-size: 9.00pt;
color: #ffd785;
background: transparent;
alternate-background-color: transparent;
}
/* Debugger: Sets font-family to default (any invalid value could be provided) */
#debugger QListWidget, #debugger QTextEdit {
font-family: none;
}
/* Log+TTY: Use flat dark color background with default font for better readability */
#log_frame, #tty_frame {
background: rgba(52, 49, 40, 0.9);
font-size: 8.50pt;
font-family: none;
}
/* Debugger: Restore original font size */
#debugger QListWidget, #debugger QTextEdit {
font-size: 9.50pt;
}
/* LLE: Style QListWidget checkboxes (QListWidget) */
#lleList::indicator {
border: 0.05em solid #4d4940;
}
#lleList::indicator::unchecked {
background-color: #b3ac98;
}
#lleList::indicator::checked {
background-color: #4d4940;
}
#lleList::indicator::disabled {
background-color: #828790;
}
#lleList::item::selected {
color: #4d4940;
}
/* Mouse Tooltips */
QToolTip {
background-color: #705722;
color: #ffd785;
border: 0.10em solid #705722;
}
/* CG Disasm and Trophy Manager: background-image doesn't work, use static color */
QWidget#cg_disasm, QWidget#trophy_manager {
background: #6e695c;
}
/* Main Window and Dialogs */
QDialog, QMainWindow#main_window {
border-image: url("GuiConfigs/kot-bg.jpg");
}
/* Table headers */
QHeaderView::section {
text-transform: uppercase;
background: #bfa163;
color: #4d4940;
padding-left: 0.15em;
padding-top: 0.15em;
padding-bottom: 0.10em;
text-transform: uppercase;
border: none;
}
/* All other Tabs */
QTabBar {
text-transform: uppercase;
}
QTabBar::tab {
background: transparent;
padding-left: 0.50em;
padding-right: 0.50em;
padding-top: 0.25em;
padding-bottom: 0.25em;
margin-right: 0.25em;
}
QTabBar::tab::selected {
background: #705722;
color: #ffd785;
border-bottom-style: solid;
}
/* Settings Dialog: Tabs */
QTabBar#tab_bar_settings {
border-bottom: 0.05em solid #705722;
text-transform: uppercase;
}
QTabBar::tab#tab_bar_settings {
background: transparent;
width: 5.20em;
padding-left: 0.50em;
padding-right: 0.50em;
padding-top: 0.65em;
padding-bottom: 0.65em;
margin-right: 0.25em;
font-size: 10.5pt;
font-weight: 550;
}
QTabBar::tab:last#tab_bar_settings {
margin-right: 0em;
}
QTabBar::tab:!selected:hover#tab_bar_settings {
background: transparent;
color: #705722;
}
QTabBar::tab::selected#tab_bar_settings {
background: #bfa163;
color: #705722;
border-bottom-style: solid;
margin-top: 0.15em;
}
/* Checkboxes */
QCheckBox::indicator {
border-radius: 0.1em;
border: 0.05em solid #5c471c;
margin-top: 0.05em;
width: 0.8em;
height: 0.8em;
}
QCheckBox::indicator:checked {
background-color: #ffd785; /* Light */
}
QCheckBox::indicator:unchecked {
background-color: #705722; /* Dark */
}
QCheckBox::indicator::disabled {
background-color: #828790; /* Gray */
}
/* Radio Buttons */
QRadioButton::indicator {
border-radius: 0.4em;
border: 0.05em solid #5c471c;
width: 0.8em;
height: 0.8em;
}
QRadioButton::indicator:checked {
background-color: #ffd785; /* Light */
}
QRadioButton::indicator:unchecked {
background-color: #705722; /* Dark */
}
QRadioButton::indicator::disabled {
background-color: #828790; /* Gray */
}
/* Combo Boxes */
QComboBox {
background: transparent;
color: #ffd785;
border: 0.05em solid #ffd785;
border-radius: 0.15em;
padding-bottom: 0.2em;
padding-left: 0.4em;
}
QComboBox QAbstractItemView {
background: #bfa163;
color: #4d4940;
}
QComboBox::disabled {
background: #828790;
color: #4d4940;
}
/* Group Boxes (Settings Dialog) */
QGroupBox {
margin-top: 1em;
border: 0.05em solid #ffd785;
text-transform: uppercase;
font-size: 9.25pt;
background-color: rgba(41,41,41,120);
}
QGroupBox::title {
subcontrol-origin: margin;
subcontrol-position: top;
padding: 0.3em 0.5em 0.3em 0.5em;
color: #ffd785;
}
/* Buttons */
QPushButton {
background: #b89754;
color: #292929;
}
QPushButton::disabled {
background: #828790;
color: #ffffff;
}
/* QSpinBox (Settings -> Emulator -> width/height) */
/* QDoubleSpinBox (Pads -> Mouse Acceleration -> x/y) */
QSpinBox, QDoubleSpinBox {
background: transparent;
/*background-color: #bfa163;*/
border: 0.05em solid #4d4940;
border-radius: 0.10em;
color: #ffd785;
}
/* Styles Sliders */
QSlider::groove:horizontal {
border: 0.10em solid #ffd785;
border-radius: 0.10em;
}
QSlider::handle:horizontal {
background: #ffd785;
width: 0.50em;
}
QSlider#sizeSlider::groove:horizontal {
border: 0.10em solid #ffd785;
border-radius: 0.10em;
height: 1.5em;
}
/* Log and Debugger borders */
QTextEdit {
border: 0.05em solid #4d4940;
}
/* For dock buttons to be visible */
QDockWidget {
background: transparent;
text-transform: uppercase;
color: #4d4940;
font-weight: 500;
}
[floating="true"] {
border-image: url("GuiConfigs/kot-bg.jpg");
}
QDockWidget::title {
background: #bfa163;
padding-top: 0.2em;
}
QDockWidget::close-button, QDockWidget::float-button {
background-color: #bfa163;
}
/* Disable ugly borders */
QTabWidget::pane {
border: 0em solid #4d4940;
}
/* Top menu bar */
QMenuBar {
height:1.50em;
text-transform: uppercase;
}
QMenuBar::item {
margin-right: 0.20em;
margin-left: 0.20em;
padding-left: 1.20em;
padding-right: 1.20em;
}
QMenuBar::item:selected {
background: #4d4940;
color: #aea993;
}
QMenu {
background: #bfa163;
color: #4d4940;
text-transform: uppercase;
}
QMenu::item {
padding-left: 1.5em;
padding-right: 0.75em;
padding-top: 0.25em;
padding-bottom: 0.25em;
}
QMenu::item:selected {
background: #4d4940;
color: #aea993;
border: 0.05em solid #4d4940;
}
QMenu::item:disabled {
background-color: #828790;
color: #4d4940;
}
/* Pad Settings: Controller Image */
QLabel#l_controller {
color: #ffd785;
}
/* Game Grid Font */
QTableWidget#game_grid {
font-weight: 600;
color: #4d4940;
text-transform: uppercase;
selection-color: #aea993;
}
QTableWidget#game_grid::item:selected:active {
selection-background-color: #4d4940;
}
QTableWidget#game_grid::item:selected:!active {
selection-background-color: #615c51;
}
/* Debug UI Settings buttons */
QLabel#color_button {
background: transparent;
}
/* Search bar on main Toolbar */
QLineEdit#mw_searchbar {
margin-left: 0.7em;
color: #4d4940;
font-size: 10.25pt;
}
/* Uniform colors in Toolbar */
QToolButton {
background: transparent;
text-transform: uppercase;
}
QToolButton::hover {
background-color: #b3ac98;
}
/* Set Theme UI colors */
QLabel#gamelist_icon_background_color {
color: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #4d4940;
}
QLabel#log_level_always {
color: #00ffff; /* Cyan */
}
QLabel#log_level_fatal {
color: #ff00ff; /* Fuchsia */
}
QLabel#log_level_error {
color: #ff0000; /* Red */
}
QLabel#log_level_todo {
color: #ff6000; /* Orange */
}
QLabel#log_level_success {
color: #00ff00; /* Green */
}
QLabel#log_level_warning {
color: #ffff00; /* Yellow */
}
QLabel#log_level_notice {
color: #ffffff; /* White */
}
QLabel#log_level_trace {
color: #808080; /* Gray */
}
QLabel#log_stack {
color: #b3ac98; /* Light */
}
/* Set TTY colors */
#tty_frame {
color: #b3ac98; /* Light */
}
/* Memory Viewer */
QLabel#memory_viewer_address_panel {
color: #0000ff; /* Font Color: Blue */
}
QLabel#memory_viewer_hex_panel {
color: #4d4940; /* Font Color: Grey */
}
QLabel#memory_viewer_ascii_panel {
color: #4d4940; /* Font Color: Grey */
}
/* Debugger colors */
QLabel#debugger_frame_breakpoint {
color: #000000; /* Font Color: Black */
background-color: #ffff00; /* Yellow */
}
QLabel#debugger_frame_pc {
color: #000000; /* Font Color: Black */
background-color: #00ff00; /* Green */
}
/* Trophy Notification Popup */
QWidget#trophy_notification_frame {
background-color: #b3ac98;
color: #4d4940;
}
-4
View File
@@ -460,10 +460,6 @@ QSpinBox:hover, QDoubleSpinBox:hover {
color: #FFFFFF;
}
QSpinBox::up-button, QSpinBox::down-button, QDoubleSpinBox::up-button, QDoubleSpinBox::down-button {
background: transparent;
}
QSpinBox:disabled, QDoubleSpinBox:disabled {
color: #455971;
background: #26293b;
-4
View File
@@ -482,10 +482,6 @@ QSpinBox:hover, QDoubleSpinBox:hover {
color: #455971;
}
QSpinBox::up-button, QSpinBox::down-button, QDoubleSpinBox::up-button, QDoubleSpinBox::down-button {
background: transparent;
}
QSpinBox:disabled, QDoubleSpinBox:disabled {
background-color: #b3b3b3;
color: #455971;
+18 -8
View File
@@ -71,6 +71,22 @@ QWidget {
color: #4d4940;
}
/* Style QTreeWidget checkboxes */
QTreeWidget::indicator {
border: 0.05em solid #4d4940;
}
QTreeWidget::indicator::unchecked {
background-color: #b3ac98;
}
QTreeWidget::indicator::checked {
background-color: #4d4940;
}
QTreeWidget::indicator::disabled {
background-color: #828790;
}
QTreeWidget::item::selected {
color: #4d4940;
}
/* Mouse Tooltips */
QToolTip {
@@ -80,14 +96,8 @@ QToolTip {
}
/* CG Disasm and Trophy Manager: background-image doesn't work, use static color */
QWidget#cg_disasm, QWidget#trophy_manager {
background: #b3ac98;
}
/* Main Window and Dialogs */
QDialog, QMainWindow#main_window {
/* Main Window, Dialogs and some Dialogs that are actually widgets */
QDialog, QWidget#trophy_manager, QWidget#cg_disasm, QMainWindow#main_window {
border-image: url("GuiConfigs/YoRHa-background.jpg");
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

+3
View File
@@ -26,6 +26,9 @@
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+1 -1
View File
@@ -83,7 +83,7 @@ set_target_properties(rpcs3
AUTOUIC ON)
target_link_libraries(rpcs3 rpcs3_emu rpcs3_ui)
target_link_libraries(rpcs3 3rdparty::discord-rpc 3rdparty::qt5 3rdparty::hidapi 3rdparty::libusb)
target_link_libraries(rpcs3 3rdparty::discord-rpc 3rdparty::qt5 3rdparty::hidapi 3rdparty::libusb 3rdparty::wolfssl)
target_link_libraries(rpcs3 ${ADDITIONAL_LIBS})
# Win resource file
+8 -8
View File
@@ -535,7 +535,7 @@ package_error package_reader::check_target_app_version()
const auto category = psf::get_string(psf, "CATEGORY", "");
const auto title_id = psf::get_string(psf, "TITLE_ID", "");
const auto app_ver = psf::get_string(psf, "APP_VER", "");
auto target_app_ver = psf::get_string(psf, "TARGET_APP_VER", "");
const auto target_app_ver = psf::get_string(psf, "TARGET_APP_VER", "");
if (category != "GD")
{
@@ -561,7 +561,7 @@ package_error package_reader::check_target_app_version()
return package_error::no_error;
}
const fs::file installed_sfo_file(Emu.GetHddDir() + "game/" + title_id + "/PARAM.SFO");
const fs::file installed_sfo_file(Emu.GetHddDir() + "game/" + std::string(title_id) + "/PARAM.SFO");
if (!installed_sfo_file)
{
if (!target_app_ver.empty())
@@ -587,9 +587,9 @@ package_error package_reader::check_target_app_version()
}
std::add_pointer_t<char> ev0, ev1;
const double old_version = std::strtod(installed_app_ver.c_str(), &ev0);
const double old_version = std::strtod(installed_app_ver.data(), &ev0);
if (installed_app_ver.c_str() + installed_app_ver.size() != ev0)
if (installed_app_ver.data() + installed_app_ver.size() != ev0)
{
pkg_log.error("Failed to convert the installed app version to double (%s)", installed_app_ver);
return package_error::other;
@@ -599,9 +599,9 @@ package_error package_reader::check_target_app_version()
{
// This is most likely the first patch. Let's make sure its version is high enough for the installed game.
const double new_version = std::strtod(app_ver.c_str(), &ev1);
const double new_version = std::strtod(app_ver.data(), &ev1);
if (app_ver.c_str() + app_ver.size() != ev1)
if (app_ver.data() + app_ver.size() != ev1)
{
pkg_log.error("Failed to convert the package's app version to double (%s)", app_ver);
return package_error::other;
@@ -619,9 +619,9 @@ package_error package_reader::check_target_app_version()
// Check if the installed app version matches the target app version
const double target_version = std::strtod(target_app_ver.c_str(), &ev1);
const double target_version = std::strtod(target_app_ver.data(), &ev1);
if (target_app_ver.c_str() + target_app_ver.size() != ev1)
if (target_app_ver.data() + target_app_ver.size() != ev1)
{
pkg_log.error("Failed to convert the package's target app version to double (%s)", target_app_ver);
return package_error::other;
+9 -6
View File
@@ -12,8 +12,7 @@ LOG_CHANNEL(OpenAL);
#define checkForAlcError(sit) do { ALCenum g_last_alc_error = alcGetError(m_device); if(g_last_alc_error != ALC_NO_ERROR) { OpenAL.error("%s: OpenALC error 0x%04x", sit, g_last_alc_error); return; }} while(0)
OpenALBackend::OpenALBackend()
: m_sampling_rate(get_sampling_rate())
, m_sample_size(get_sample_size())
: AudioBackend()
{
ALCdevice* m_device = alcOpenDevice(nullptr);
checkForAlcError("alcOpenDevice");
@@ -24,13 +23,17 @@ OpenALBackend::OpenALBackend()
alcMakeContextCurrent(m_context);
checkForAlcError("alcMakeContextCurrent");
if (get_channels() == 2)
switch (m_channels)
{
case 2:
m_format = (m_sample_size == 2) ? AL_FORMAT_STEREO16 : AL_FORMAT_STEREO_FLOAT32;
}
else
{
break;
case 6:
m_format = (m_sample_size == 2) ? AL_FORMAT_51CHN16 : AL_FORMAT_51CHN32;
break;
default:
m_format = (m_sample_size == 2) ? AL_FORMAT_71CHN16 : AL_FORMAT_71CHN32;
break;
}
}
-3
View File
@@ -15,9 +15,6 @@ private:
u32 m_next_buffer = 0;
u32 m_num_unqueued = 0;
const u32 m_sampling_rate;
const u32 m_sample_size;
void unqueue_processed();
public:
+7 -6
View File
@@ -1,4 +1,4 @@
#ifndef HAVE_ALSA
#ifndef HAVE_ALSA
#error "ALSA support disabled but still being built."
#endif
@@ -26,6 +26,7 @@ static bool check(int err, const char* reason)
}
ALSABackend::ALSABackend()
: AudioBackend()
{
}
@@ -51,14 +52,14 @@ void ALSABackend::Open(u32 num_buffers)
if (!check(snd_pcm_hw_params_set_access(tls_handle, tls_hw_params, SND_PCM_ACCESS_RW_INTERLEAVED), "snd_pcm_hw_params_set_access"))
return;
if (!check(snd_pcm_hw_params_set_format(tls_handle, tls_hw_params, g_cfg.audio.convert_to_u16 ? SND_PCM_FORMAT_S16_LE : SND_PCM_FORMAT_FLOAT_LE), "snd_pcm_hw_params_set_format"))
if (!check(snd_pcm_hw_params_set_format(tls_handle, tls_hw_params, m_convert_to_u16 ? SND_PCM_FORMAT_S16_LE : SND_PCM_FORMAT_FLOAT_LE), "snd_pcm_hw_params_set_format"))
return;
uint rate = get_sampling_rate();
uint rate = m_sampling_rate;
if (!check(snd_pcm_hw_params_set_rate_near(tls_handle, tls_hw_params, &rate, nullptr), "snd_pcm_hw_params_set_rate_near"))
return;
if (!check(snd_pcm_hw_params_set_channels(tls_handle, tls_hw_params, get_channels()), "snd_pcm_hw_params_set_channels"))
if (!check(snd_pcm_hw_params_set_channels(tls_handle, tls_hw_params, m_channels), "snd_pcm_hw_params_set_channels"))
return;
//uint period = 5333;
@@ -92,7 +93,7 @@ void ALSABackend::Open(u32 num_buffers)
if (!check(snd_pcm_sw_params_current(tls_handle, tls_sw_params), "snd_pcm_sw_params_current"))
return;
period_frames *= g_cfg.audio.startt;
period_frames *= m_start_threshold;
if (!check(snd_pcm_sw_params_set_start_threshold(tls_handle, tls_sw_params, period_frames + 1), "snd_pcm_sw_params_set_start_threshold"))
return;
@@ -132,7 +133,7 @@ void ALSABackend::Close()
bool ALSABackend::AddData(const void* src, u32 num_samples)
{
u32 num_frames = num_samples / get_channels();
u32 num_frames = num_samples / m_channels;
int res = snd_pcm_writei(tls_handle, src, num_frames);
+50 -12
View File
@@ -2,29 +2,67 @@
#include "AudioBackend.h"
#include "Emu/system_config.h"
/*
* Helper methods
*/
u32 AudioBackend::get_sampling_rate()
AudioBackend::AudioBackend()
{
m_convert_to_u16 = static_cast<bool>(g_cfg.audio.convert_to_u16);
m_sample_size = m_convert_to_u16 ? sizeof(u16) : sizeof(float);
m_start_threshold = g_cfg.audio.start_threshold;
const u32 sampling_period_multiplier_u32 = g_cfg.audio.sampling_period_multiplier;
if (sampling_period_multiplier_u32 == 100)
return DEFAULT_AUDIO_SAMPLING_RATE;
{
m_sampling_rate = DEFAULT_AUDIO_SAMPLING_RATE;
}
else
{
const f32 sampling_period_multiplier = sampling_period_multiplier_u32 / 100.0f;
const f32 sampling_rate_multiplier = 1.0f / sampling_period_multiplier;
m_sampling_rate = static_cast<u32>(f32{ DEFAULT_AUDIO_SAMPLING_RATE } *sampling_rate_multiplier);
}
const f32 sampling_period_multiplier = sampling_period_multiplier_u32 / 100.0f;
const f32 sampling_rate_multiplier = 1.0f / sampling_period_multiplier;
return static_cast<u32>(f32{DEFAULT_AUDIO_SAMPLING_RATE} * sampling_rate_multiplier);
const audio_downmix downmix = g_cfg.audio.audio_channel_downmix.get();
switch (downmix)
{
case audio_downmix::no_downmix:
m_channels = 8;
break;
case audio_downmix::downmix_to_stereo:
m_channels = 2;
break;
case audio_downmix::downmix_to_5_1:
m_channels = 6;
break;
case audio_downmix::use_application_settings:
m_channels = 2; // TODO
break;
default:
fmt::throw_exception("Unknown audio channel mode %s (%d)", downmix, static_cast<int>(downmix));
}
}
u32 AudioBackend::get_sample_size()
/*
* Helper methods
*/
u32 AudioBackend::get_sampling_rate() const
{
return g_cfg.audio.convert_to_u16 ? sizeof(u16) : sizeof(float);
return m_sampling_rate;
}
u32 AudioBackend::get_channels()
u32 AudioBackend::get_sample_size() const
{
return g_cfg.audio.downmix_to_2ch ? 2 : 8;
return m_sample_size;
}
u32 AudioBackend::get_channels() const
{
return m_channels;
}
bool AudioBackend::get_convert_to_u16() const
{
return m_convert_to_u16;
}
bool AudioBackend::has_capability(u32 cap) const
+14 -3
View File
@@ -20,6 +20,8 @@ public:
SET_FREQUENCY_RATIO = 0x8, // Implements SetFrequencyRatio
};
AudioBackend();
virtual ~AudioBackend() = default;
/*
@@ -94,13 +96,22 @@ public:
/*
* Helper methods
*/
static u32 get_sampling_rate();
u32 get_sampling_rate() const;
static u32 get_sample_size();
u32 get_sample_size() const;
static u32 get_channels();
u32 get_channels() const;
bool get_convert_to_u16() const;
bool has_capability(u32 cap) const;
void dump_capabilities(std::string& out) const;
protected:
bool m_convert_to_u16 = false;
u32 m_sample_size = sizeof(float);
u32 m_sampling_rate = DEFAULT_AUDIO_SAMPLING_RATE;
u32 m_channels = 0;
u32 m_start_threshold = 1;
};
+10 -13
View File
@@ -1,4 +1,4 @@
#ifndef HAVE_FAUDIO
#ifndef HAVE_FAUDIO
#error "FAudio support disabled but still being built."
#endif
@@ -10,6 +10,7 @@
LOG_CHANNEL(FAudio_, "FAudio");
FAudioBackend::FAudioBackend()
: AudioBackend()
{
u32 res;
@@ -20,7 +21,7 @@ FAudioBackend::FAudioBackend()
return;
}
res = FAudio_CreateMasteringVoice(m_instance, &m_master_voice, g_cfg.audio.downmix_to_2ch ? 2 : 8, 48000, 0, 0, nullptr);
res = FAudio_CreateMasteringVoice(m_instance, &m_master_voice, m_channels, 48000, 0, 0, nullptr);
if (res)
{
FAudio_.fatal("FAudio_CreateMasteringVoice() failed(0x%08x)", res);
@@ -102,17 +103,13 @@ void FAudioBackend::Close()
void FAudioBackend::Open(u32 /* num_buffers */)
{
const u32 sample_size = AudioBackend::get_sample_size();
const u32 channels = AudioBackend::get_channels();
const u32 sampling_rate = AudioBackend::get_sampling_rate();
FAudioWaveFormatEx waveformatex;
waveformatex.wFormatTag = g_cfg.audio.convert_to_u16 ? FAUDIO_FORMAT_PCM : FAUDIO_FORMAT_IEEE_FLOAT;
waveformatex.nChannels = channels;
waveformatex.nSamplesPerSec = sampling_rate;
waveformatex.nAvgBytesPerSec = static_cast<u32>(sampling_rate * channels * sample_size);
waveformatex.nBlockAlign = channels * sample_size;
waveformatex.wBitsPerSample = sample_size * 8;
waveformatex.wFormatTag = m_convert_to_u16 ? FAUDIO_FORMAT_PCM : FAUDIO_FORMAT_IEEE_FLOAT;
waveformatex.nChannels = m_channels;
waveformatex.nSamplesPerSec = m_sampling_rate;
waveformatex.nAvgBytesPerSec = static_cast<u32>(m_sampling_rate * m_channels * m_sample_size);
waveformatex.nBlockAlign = m_channels * m_sample_size;
waveformatex.wBitsPerSample = m_sample_size * 8;
waveformatex.cbSize = 0;
u32 res = FAudio_CreateSourceVoice(m_instance, &m_source_voice, &waveformatex, 0, FAUDIO_DEFAULT_FREQ_RATIO, nullptr, nullptr, nullptr);
@@ -140,7 +137,7 @@ bool FAudioBackend::AddData(const void* src, u32 num_samples)
}
FAudioBuffer buffer;
buffer.AudioBytes = num_samples * AudioBackend::get_sample_size();
buffer.AudioBytes = num_samples * m_sample_size;
buffer.Flags = 0;
buffer.LoopBegin = FAUDIO_NO_LOOP_REGION;
buffer.LoopCount = 0;
+24 -10
View File
@@ -1,4 +1,4 @@
#ifndef HAVE_PULSE
#ifndef HAVE_PULSE
#error "PulseAudio support disabled but still being built."
#endif
@@ -9,6 +9,7 @@
#include <pulse/error.h>
PulseBackend::PulseBackend()
: AudioBackend()
{
}
@@ -19,7 +20,8 @@ PulseBackend::~PulseBackend()
void PulseBackend::Close()
{
if(this->connection) {
if (this->connection)
{
pa_simple_free(this->connection);
this->connection = nullptr;
}
@@ -28,20 +30,30 @@ void PulseBackend::Close()
void PulseBackend::Open(u32 /* num_buffers */)
{
pa_sample_spec ss;
ss.format = (get_sample_size() == 2) ? PA_SAMPLE_S16LE : PA_SAMPLE_FLOAT32LE;
ss.rate = get_sampling_rate();
ss.format = (m_sample_size == 2) ? PA_SAMPLE_S16LE : PA_SAMPLE_FLOAT32LE;
ss.rate = m_sampling_rate;
pa_channel_map channel_map;
if (get_channels() == 2)
if (m_channels == 2)
{
channel_map.channels = 2;
channel_map.channels = 2;
channel_map.map[0] = PA_CHANNEL_POSITION_FRONT_LEFT;
channel_map.map[1] = PA_CHANNEL_POSITION_FRONT_RIGHT;
}
else if (m_channels == 6)
{
channel_map.channels = 6;
channel_map.map[0] = PA_CHANNEL_POSITION_FRONT_LEFT;
channel_map.map[1] = PA_CHANNEL_POSITION_FRONT_RIGHT;
channel_map.map[2] = PA_CHANNEL_POSITION_FRONT_CENTER;
channel_map.map[3] = PA_CHANNEL_POSITION_LFE;
channel_map.map[4] = PA_CHANNEL_POSITION_REAR_LEFT;
channel_map.map[5] = PA_CHANNEL_POSITION_REAR_RIGHT;
}
else
{
channel_map.channels = 8;
channel_map.channels = 8;
channel_map.map[0] = PA_CHANNEL_POSITION_FRONT_LEFT;
channel_map.map[1] = PA_CHANNEL_POSITION_FRONT_RIGHT;
channel_map.map[2] = PA_CHANNEL_POSITION_FRONT_CENTER;
@@ -55,7 +67,8 @@ void PulseBackend::Open(u32 /* num_buffers */)
int err;
this->connection = pa_simple_new(NULL, "RPCS3", PA_STREAM_PLAYBACK, NULL, "Game", &ss, &channel_map, NULL, &err);
if(!this->connection) {
if (!this->connection)
{
fprintf(stderr, "PulseAudio: Failed to initialize audio: %s\n", pa_strerror(err));
}
}
@@ -65,10 +78,11 @@ bool PulseBackend::AddData(const void* src, u32 num_samples)
AUDIT(this->connection);
int err;
if(pa_simple_write(this->connection, src, num_samples * get_sample_size(), &err) < 0) {
if (pa_simple_write(this->connection, src, num_samples * m_sample_size, &err) < 0)
{
fprintf(stderr, "PulseAudio: Failed to write audio stream: %s\n", pa_strerror(err));
return false;
}
return true;
}
+22 -20
View File
@@ -9,26 +9,32 @@
#include "XAudio2Backend.h"
#include <Windows.h>
#include <system_error>
#pragma comment(lib, "xaudio2_9redist.lib")
LOG_CHANNEL(XAudio);
XAudio2Backend::XAudio2Backend()
: AudioBackend()
{
Microsoft::WRL::ComPtr<IXAudio2> instance;
// In order to prevent errors on CreateMasteringVoice, apparently we need CoInitializeEx according to:
// https://docs.microsoft.com/en-us/windows/win32/api/xaudio2fx/nf-xaudio2fx-xaudio2createvolumemeter
CoInitializeEx(NULL, COINIT_MULTITHREADED);
HRESULT hr = XAudio2Create(instance.GetAddressOf(), 0, XAUDIO2_DEFAULT_PROCESSOR);
if (FAILED(hr))
{
XAudio.error("XAudio2Create() failed(0x%08x)", (u32)hr);
XAudio.error("XAudio2Create() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
return;
}
hr = instance->CreateMasteringVoice(&m_master_voice, g_cfg.audio.downmix_to_2ch ? 2 : 8, 48000);
hr = instance->CreateMasteringVoice(&m_master_voice, m_channels, 48000);
if (FAILED(hr))
{
XAudio.error("CreateMasteringVoice() failed(0x%08x)", (u32)hr);
XAudio.error("CreateMasteringVoice() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
return;
}
@@ -62,7 +68,7 @@ void XAudio2Backend::Play()
HRESULT hr = m_source_voice->Start();
if (FAILED(hr))
{
XAudio.error("Start() failed(0x%08x)", (u32)hr);
XAudio.error("Start() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
Emu.Pause();
}
}
@@ -80,7 +86,7 @@ void XAudio2Backend::Pause()
HRESULT hr = m_source_voice->Stop();
if (FAILED(hr))
{
XAudio.error("Stop() failed(0x%08x)", (u32)hr);
XAudio.error("Stop() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
Emu.Pause();
}
}
@@ -89,23 +95,19 @@ void XAudio2Backend::Open(u32 /* num_buffers */)
{
HRESULT hr;
const u32 sample_size = AudioBackend::get_sample_size();
const u32 channels = AudioBackend::get_channels();
const u32 sampling_rate = AudioBackend::get_sampling_rate();
WAVEFORMATEX waveformatex;
waveformatex.wFormatTag = g_cfg.audio.convert_to_u16 ? WAVE_FORMAT_PCM : WAVE_FORMAT_IEEE_FLOAT;
waveformatex.nChannels = channels;
waveformatex.nSamplesPerSec = sampling_rate;
waveformatex.nAvgBytesPerSec = static_cast<DWORD>(sampling_rate * channels * sample_size);
waveformatex.nBlockAlign = channels * sample_size;
waveformatex.wBitsPerSample = sample_size * 8;
waveformatex.wFormatTag = m_convert_to_u16 ? WAVE_FORMAT_PCM : WAVE_FORMAT_IEEE_FLOAT;
waveformatex.nChannels = m_channels;
waveformatex.nSamplesPerSec = m_sampling_rate;
waveformatex.nAvgBytesPerSec = static_cast<DWORD>(m_sampling_rate * m_channels * m_sample_size);
waveformatex.nBlockAlign = m_channels * m_sample_size;
waveformatex.wBitsPerSample = m_sample_size * 8;
waveformatex.cbSize = 0;
hr = m_xaudio2_instance->CreateSourceVoice(&m_source_voice, &waveformatex, 0, XAUDIO2_DEFAULT_FREQ_RATIO);
if (FAILED(hr))
{
XAudio.error("CreateSourceVoice() failed(0x%08x)", (u32)hr);
XAudio.error("CreateSourceVoice() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
Emu.Pause();
return;
}
@@ -139,7 +141,7 @@ bool XAudio2Backend::AddData(const void* src, u32 num_samples)
XAUDIO2_BUFFER buffer;
buffer.AudioBytes = num_samples * AudioBackend::get_sample_size();
buffer.AudioBytes = num_samples * m_sample_size;
buffer.Flags = 0;
buffer.LoopBegin = XAUDIO2_NO_LOOP_REGION;
buffer.LoopCount = 0;
@@ -152,7 +154,7 @@ bool XAudio2Backend::AddData(const void* src, u32 num_samples)
HRESULT hr = m_source_voice->SubmitSourceBuffer(&buffer);
if (FAILED(hr))
{
XAudio.error("AddData() failed(0x%08x)", (u32)hr);
XAudio.error("AddData() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
Emu.Pause();
return false;
}
@@ -167,7 +169,7 @@ void XAudio2Backend::Flush()
HRESULT hr = m_source_voice->FlushSourceBuffers();
if (FAILED(hr))
{
XAudio.error("FlushSourceBuffers() failed(0x%08x)", (u32)hr);
XAudio.error("FlushSourceBuffers() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
Emu.Pause();
}
}
@@ -190,7 +192,7 @@ f32 XAudio2Backend::SetFrequencyRatio(f32 new_ratio)
HRESULT hr = m_source_voice->SetFrequencyRatio(new_ratio);
if (FAILED(hr))
{
XAudio.error("SetFrequencyRatio() failed(0x%08x)", (u32)hr);
XAudio.error("SetFrequencyRatio() failed: %s (0x%08x)", std::system_category().message(hr), static_cast<u32>(hr));
Emu.Pause();
return 1.0f;
}
+7 -2
View File
@@ -12,7 +12,7 @@ target_link_libraries(rpcs3_emu
PRIVATE
3rdparty::zlib 3rdparty::yaml-cpp
PUBLIC
3rdparty::libevdev)
3rdparty::libevdev 3rdparty::flatbuffers)
find_package(Threads REQUIRED)
@@ -35,6 +35,7 @@ target_sources(rpcs3_emu PRIVATE
../util/yaml.cpp
../util/cereal.cpp
../../Utilities/bin_patch.cpp
../../Utilities/cheat_info.cpp
../../Utilities/cond.cpp
../../Utilities/Config.cpp
../../Utilities/dynamic_library.cpp
@@ -361,7 +362,11 @@ target_sources(rpcs3_emu PRIVATE
# Np
target_sources(rpcs3_emu PRIVATE
NP/fb_helpers.cpp
NP/np_handler.cpp
NP/np_structs_extra.cpp
NP/rpcn_client.cpp
NP/rpcn_config.cpp
)
# Memory
@@ -451,7 +456,7 @@ target_link_libraries(rpcs3_emu
3rdparty::ffmpeg 3rdparty::cereal
3rdparty::opengl 3rdparty::stblib
3rdparty::vulkan 3rdparty::glew
3rdparty::libusb
3rdparty::libusb 3rdparty::wolfssl
PRIVATE
3rdparty::span 3rdparty::xxhash
)
+17 -1
View File
@@ -56,7 +56,23 @@ protected:
virtual u32 DisAsmBranchTarget(const s32 imm) = 0;
std::string FixOp(std::string op)
// TODO: Add builtin fmt helpper for best performance
template <typename T, std::enable_if_t<std::is_integral_v<T>, int> = 0>
static std::string SignedHex(T value)
{
const auto v = static_cast<std::make_signed_t<T>>(value);
const auto av = std::abs(v);
if (av < 10)
{
// Does not need hex
return fmt::format("%d", v);
}
return fmt::format("%s%s", v < 0 ? "-" : "", av);
}
static std::string FixOp(std::string op)
{
op.resize(std::max<std::size_t>(op.length(), 10), ' ');
return op;
+32 -28
View File
@@ -433,11 +433,21 @@ void cpu_thread::operator()()
if (!(state & cpu_flag::stop))
{
cpu_task();
state -= cpu_flag::ret;
if (state & cpu_flag::ret && state.test_and_reset(cpu_flag::ret))
{
cpu_return();
}
continue;
}
thread_ctrl::wait();
if (state & cpu_flag::ret && state.test_and_reset(cpu_flag::ret))
{
cpu_return();
}
}
// Complete cleanup gracefully
@@ -464,14 +474,8 @@ bool cpu_thread::check_state() noexcept
}
bool cpu_sleep_called = false;
bool cpu_flag_memory = false;
bool escape, retval;
if (!(state & cpu_flag::wait))
{
state += cpu_flag::wait;
}
while (true)
{
// Process all flags in a single atomic op
@@ -490,20 +494,20 @@ bool cpu_thread::check_state() noexcept
if (!(flags & (cpu_flag::exit + cpu_flag::dbg_global_stop + cpu_flag::ret + cpu_flag::stop)))
{
// Check pause flags which hold thread inside check_state
if (flags & (cpu_flag::pause + cpu_flag::suspend + cpu_flag::dbg_global_pause + cpu_flag::dbg_pause))
if (flags & (cpu_flag::pause + cpu_flag::suspend + cpu_flag::dbg_global_pause + cpu_flag::dbg_pause + cpu_flag::memory))
{
if (!(flags & cpu_flag::wait))
{
flags += cpu_flag::wait;
store = true;
}
escape = false;
return store;
}
if (flags & cpu_flag::memory)
if (flags & cpu_flag::wait)
{
// wait flag will be cleared later (optimization)
cpu_flag_memory = true;
}
else
{
AUDIT(!cpu_flag_memory);
flags -= cpu_flag::wait;
store = true;
}
@@ -512,7 +516,12 @@ bool cpu_thread::check_state() noexcept
}
else
{
cpu_flag_memory = false;
if (!(flags & cpu_flag::wait))
{
flags += cpu_flag::wait;
store = true;
}
retval = true;
}
@@ -529,17 +538,6 @@ bool cpu_thread::check_state() noexcept
if (escape)
{
if (cpu_flag_memory)
{
cpu_mem();
if (state & (cpu_flag::pause + cpu_flag::memory)) [[unlikely]]
{
state += cpu_flag::wait;
continue;
}
}
return retval;
}
else if (!cpu_sleep_called && state0 & cpu_flag::suspend)
@@ -555,6 +553,12 @@ bool cpu_thread::check_state() noexcept
}
else
{
if (state0 & cpu_flag::memory)
{
vm::passive_lock(*this);
continue;
}
// If only cpu_flag::pause was set, notification won't arrive
g_fxo->get<cpu_counter>()->cpu_suspend_lock.lock_unlock();
}
@@ -627,7 +631,7 @@ std::string cpu_thread::dump_callstack() const
return {};
}
std::vector<u32> cpu_thread::dump_callstack_list() const
std::vector<std::pair<u32, u32>> cpu_thread::dump_callstack_list() const
{
return {};
}
+4 -1
View File
@@ -103,7 +103,7 @@ public:
virtual std::string dump_callstack() const;
// Get CPU call stack list
virtual std::vector<u32> dump_callstack_list() const;
virtual std::vector<std::pair<u32, u32>> dump_callstack_list() const;
// Get CPU dump of misc information
virtual std::string dump_misc() const;
@@ -120,6 +120,9 @@ public:
// Callback for vm::temporary_unlock
virtual void cpu_unmem() {}
// Callback for cpu_flag::ret
virtual void cpu_return() {}
// Thread locker
class suspend_all
{
+41 -4
View File
@@ -57,6 +57,15 @@ void cpu_translator::initialize(llvm::LLVMContext& context, llvm::ExecutionEngin
{
m_use_fma = true;
}
// Test AVX-512_icelake features (TODO)
if (cpu == "icelake" ||
cpu == "icelake-client" ||
cpu == "icelake-server" ||
cpu == "tigerlake")
{
m_use_avx512_icl = true;
}
}
llvm::Value* cpu_translator::bitcast(llvm::Value* val, llvm::Type* type)
@@ -83,12 +92,31 @@ llvm::Value* cpu_translator::bitcast(llvm::Value* val, llvm::Type* type)
}
template <>
v128 cpu_translator::get_const_vector<v128>(llvm::Constant* c, u32 a, u32 b)
std::pair<bool, v128> cpu_translator::get_const_vector<v128>(llvm::Value* c, u32 a, u32 b)
{
v128 result{};
if (!llvm::isa<llvm::Constant>(c))
{
return {false, result};
}
const auto t = c->getType();
if (!t->isVectorTy())
{
if (const auto ci = llvm::dyn_cast<llvm::ConstantInt>(c); ci && ci->getBitWidth() == 128)
{
auto cv = ci->getValue();
for (int i = 0; i < 128; i++)
{
result._bit[i] = cv[i];
}
return {true, result};
}
fmt::throw_exception("[0x%x, %u] Not a vector" HERE, a, b);
}
@@ -106,13 +134,17 @@ v128 cpu_translator::get_const_vector<v128>(llvm::Constant* c, u32 a, u32 b)
return {};
}
if (llvm::isa<llvm::ConstantExpr>(c))
{
// Sorry, if we cannot evaluate it we cannot use it
fmt::throw_exception("[0x%x, %u] Constant Expression!" HERE, a, b);
}
fmt::throw_exception("[0x%x, %u] Unexpected constant type" HERE, a, b);
}
const auto sct = t->getScalarType();
v128 result;
if (sct->isIntegerTy(8))
{
for (u32 i = 0; i < 16; i++)
@@ -160,12 +192,17 @@ v128 cpu_translator::get_const_vector<v128>(llvm::Constant* c, u32 a, u32 b)
fmt::throw_exception("[0x%x, %u] Unexpected vector element type" HERE, a, b);
}
return result;
return {true, result};
}
template <>
llvm::Constant* cpu_translator::make_const_vector<v128>(v128 v, llvm::Type* t)
{
if (const auto ct = llvm::dyn_cast<llvm::IntegerType>(t); ct && ct->getBitWidth() == 128)
{
return llvm::ConstantInt::get(t, llvm::APInt(128, llvm::makeArrayRef(reinterpret_cast<const u64*>(v._bytes), 2)));
}
verify(HERE), t->isVectorTy() && llvm::cast<llvm::VectorType>(t)->getBitWidth() == 128;
const auto sct = t->getScalarType();
+72 -5
View File
@@ -2423,6 +2423,9 @@ protected:
// Allow FMA
bool m_use_fma = false;
// Allow Icelake tier AVX-512
bool m_use_avx512_icl = false;
// IR builder
llvm::IRBuilder<>* m_ir;
@@ -2744,22 +2747,86 @@ public:
}
// TODO: Support doubles
auto fre(value_t<f32[4]> a)
template <typename T, typename = std::enable_if_t<llvm_value_t<typename T::type>::esize == 32u && llvm_value_t<typename T::type>::is_float>>
auto fre(T a)
{
decltype(a) result;
value_t<typename T::type> result;
const auto av = a.eval(m_ir);
result.value = m_ir->CreateCall(m_module->getOrInsertFunction("llvm.x86.sse.rcp.ps", av->getType(), av->getType()).getCallee(), {av});
return result;
}
auto frsqe(value_t<f32[4]> a)
template <typename T, typename = std::enable_if_t<llvm_value_t<typename T::type>::esize == 32u && llvm_value_t<typename T::type>::is_float>>
auto frsqe(T a)
{
decltype(a) result;
value_t<typename T::type> result;
const auto av = a.eval(m_ir);
result.value = m_ir->CreateCall(m_module->getOrInsertFunction("llvm.x86.sse.rsqrt.ps", av->getType(), av->getType()).getCallee(), {av});
return result;
}
template <typename T, typename U, typename = std::enable_if_t<std::is_same_v<typename T::type, typename U::type> && llvm_value_t<typename T::type>::esize == 32u && llvm_value_t<typename T::type>::is_float>>
auto fmax(T a, U b)
{
value_t<typename T::type> result;
const auto av = a.eval(m_ir);
const auto bv = b.eval(m_ir);
result.value = m_ir->CreateCall(m_module->getOrInsertFunction("llvm.x86.sse.max.ps", av->getType(), av->getType(), av->getType()).getCallee(), {av, bv});
return result;
}
template <typename T, typename U, typename = std::enable_if_t<std::is_same_v<typename T::type, typename U::type> && llvm_value_t<typename T::type>::esize == 32u && llvm_value_t<typename T::type>::is_float>>
auto fmin(T a, U b)
{
value_t<typename T::type> result;
const auto av = a.eval(m_ir);
const auto bv = b.eval(m_ir);
result.value = m_ir->CreateCall(m_module->getOrInsertFunction("llvm.x86.sse.min.ps", av->getType(), av->getType(), av->getType()).getCallee(), {av, bv});
return result;
}
template <typename T1, typename T2>
value_t<u8[16]> gf2p8affineqb(T1 a, T2 b, u8 c)
{
value_t<u8[16]> result;
const auto data0 = a.eval(m_ir);
const auto data1 = b.eval(m_ir);
const auto immediate = (llvm_const_int<u8>{c});
const auto imm8 = immediate.eval(m_ir);
result.value = m_ir->CreateCall(get_intrinsic(llvm::Intrinsic::x86_vgf2p8affineqb_128), {data0, data1, imm8});
return result;
}
template <typename T1, typename T2, typename T3>
value_t<u8[16]> vperm2b(T1 a, T2 b, T3 c)
{
value_t<u8[16]> result;
const auto data0 = a.eval(m_ir);
const auto data1 = b.eval(m_ir);
const auto index = c.eval(m_ir);
const auto zeros = llvm::ConstantAggregateZero::get(get_type<u8[16]>());
if (auto c = llvm::dyn_cast<llvm::Constant>(index))
{
// Convert VPERM2B index back to LLVM vector shuffle mask
const auto cv = llvm::dyn_cast<llvm::ConstantDataVector>(c);
if (cv || llvm::isa<llvm::ConstantAggregateZero>(c))
{
result.value = m_ir->CreateZExt(cv, get_type<u32[16]>());
result.value = m_ir->CreateShuffleVector(data0, data1, result.value);
return result;
}
}
result.value = m_ir->CreateCall(get_intrinsic(llvm::Intrinsic::x86_avx512_vpermi2var_qi_128), {data0, index, data1});
return result;
}
template <typename T1, typename T2>
value_t<u8[16]> pshufb(T1 a, T2 b)
{
@@ -2837,7 +2904,7 @@ public:
}
template <typename R = v128>
R get_const_vector(llvm::Constant*, u32 a, u32 b);
std::pair<bool, R> get_const_vector(llvm::Value*, u32 a, u32 b);
template <typename T = v128>
llvm::Constant* make_const_vector(T, llvm::Type*);
+152 -29
View File
@@ -44,8 +44,43 @@ void fmt_class_string<CellAudioError>::format(std::string& out, u64 arg)
cell_audio_config::cell_audio_config()
{
raw = audio::get_raw_config();
reset();
}
void cell_audio_config::reset()
{
backend.reset();
backend = Emu.GetCallbacks().get_audio();
audio_channels = backend->get_channels();
audio_sampling_rate = backend->get_sampling_rate();
audio_block_period = AUDIO_BUFFER_SAMPLES * 1000000 / audio_sampling_rate;
audio_buffer_length = AUDIO_BUFFER_SAMPLES * audio_channels;
audio_buffer_size = audio_buffer_length * backend->get_sample_size();
desired_buffer_duration = raw.desired_buffer_duration * 1000llu;
buffering_enabled = raw.buffering_enabled && backend->has_capability(AudioBackend::PLAY_PAUSE_FLUSH | AudioBackend::IS_PLAYING);;
minimum_block_period = audio_block_period / 2;
maximum_block_period = (6 * audio_block_period) / 5;
desired_full_buffers = buffering_enabled ? static_cast<u32>(desired_buffer_duration / audio_block_period) + 3 : 2;
num_allocated_buffers = desired_full_buffers + EXTRA_AUDIO_BUFFERS;
fully_untouched_timeout = static_cast<u64>(audio_block_period) * 2;
partially_untouched_timeout = static_cast<u64>(audio_block_period) * 4;
const bool raw_time_stretching_enabled = buffering_enabled && raw.enable_time_stretching && (raw.time_stretching_threshold > 0);
time_stretching_enabled = raw_time_stretching_enabled && backend->has_capability(AudioBackend::SET_FREQUENCY_RATIO);
time_stretching_threshold = raw.time_stretching_threshold / 100.0f;
// Warn if audio backend does not support all requested features
if (raw_buffering_enabled && !buffering_enabled)
if (raw.buffering_enabled && !buffering_enabled)
{
cellAudio.error("Audio backend %s does not support buffering, this option will be ignored.", backend->GetName());
}
@@ -142,7 +177,7 @@ void audio_ringbuffer::enqueue(const float* in_buffer)
}
// Enqueue audio
bool success = backend->AddData(buf, AUDIO_BUFFER_SAMPLES * cfg.audio_channels);
const bool success = backend->AddData(buf, AUDIO_BUFFER_SAMPLES * cfg.audio_channels);
if (!success)
{
cellAudio.error("Could not enqueue buffer onto audio backend. Attempting to recover...");
@@ -311,8 +346,8 @@ void audio_port::tag(s32 offset)
// We use -0.0f in case games check if the buffer is empty. -0.0f == 0.0f evaluates to true, but std::signbit can be used to distinguish them
const f32 tag = -0.0f;
const u32 tag_first_pos = num_channels == 2 ? PORT_BUFFER_TAG_FIRST_2CH : PORT_BUFFER_TAG_FIRST_8CH;
const u32 tag_delta = num_channels == 2 ? PORT_BUFFER_TAG_DELTA_2CH : PORT_BUFFER_TAG_DELTA_8CH;
const u32 tag_first_pos = num_channels == 2 ? PORT_BUFFER_TAG_FIRST_2CH : num_channels == 6 ? PORT_BUFFER_TAG_FIRST_6CH : PORT_BUFFER_TAG_FIRST_8CH;
const u32 tag_delta = num_channels == 2 ? PORT_BUFFER_TAG_DELTA_2CH : num_channels == 6 ? PORT_BUFFER_TAG_DELTA_6CH : PORT_BUFFER_TAG_DELTA_8CH;
for (u32 tag_pos = tag_first_pos, tag_nr = 0; tag_nr < PORT_BUFFER_TAG_COUNT; tag_pos += tag_delta, tag_nr++)
{
@@ -341,8 +376,8 @@ std::tuple<u32, u32, u32, u32> cell_audio_thread::count_port_buffer_tags()
u32 port_pos = port.position();
// Find the last tag that has been touched
const u32 tag_first_pos = port.num_channels == 2 ? PORT_BUFFER_TAG_FIRST_2CH : PORT_BUFFER_TAG_FIRST_8CH;
const u32 tag_delta = port.num_channels == 2 ? PORT_BUFFER_TAG_DELTA_2CH : PORT_BUFFER_TAG_DELTA_8CH;
const u32 tag_first_pos = port.num_channels == 2 ? PORT_BUFFER_TAG_FIRST_2CH : port.num_channels == 6 ? PORT_BUFFER_TAG_FIRST_6CH : PORT_BUFFER_TAG_FIRST_8CH;
const u32 tag_delta = port.num_channels == 2 ? PORT_BUFFER_TAG_DELTA_2CH : port.num_channels == 6 ? PORT_BUFFER_TAG_DELTA_6CH : PORT_BUFFER_TAG_DELTA_8CH;
u32 last_touched_tag_nr = port.prev_touched_tag_nr;
bool retouched = false;
@@ -500,6 +535,63 @@ void cell_audio_thread::advance(u64 timestamp, bool reset)
}
}
namespace audio
{
cell_audio_config::raw_config get_raw_config()
{
return
{
.buffering_enabled = static_cast<bool>(g_cfg.audio.enable_buffering),
.desired_buffer_duration = g_cfg.audio.desired_buffer_duration,
.enable_time_stretching = static_cast<bool>(g_cfg.audio.enable_time_stretching),
.time_stretching_threshold = g_cfg.audio.time_stretching_threshold,
.convert_to_u16 = static_cast<bool>(g_cfg.audio.convert_to_u16),
.start_threshold = static_cast<u32>(g_cfg.audio.start_threshold),
.sampling_period_multiplier = static_cast<u32>(g_cfg.audio.sampling_period_multiplier),
.downmix = g_cfg.audio.audio_channel_downmix,
.renderer = g_cfg.audio.renderer
};
}
void configure_audio()
{
if (const auto g_audio = g_fxo->get<cell_audio>())
{
// Only reboot the audio renderer if a relevant setting changed
const auto new_raw = get_raw_config();
if (const auto raw = g_audio->cfg.raw;
raw.desired_buffer_duration != new_raw.desired_buffer_duration ||
raw.buffering_enabled != new_raw.buffering_enabled ||
raw.time_stretching_threshold != new_raw.time_stretching_threshold ||
raw.enable_time_stretching != new_raw.enable_time_stretching ||
raw.convert_to_u16 != new_raw.convert_to_u16 ||
raw.start_threshold != new_raw.start_threshold ||
raw.sampling_period_multiplier != new_raw.sampling_period_multiplier ||
raw.downmix != new_raw.downmix ||
raw.renderer != new_raw.renderer)
{
g_audio->cfg.raw = new_raw;
g_audio->m_update_configuration = true;
}
}
}
}
void cell_audio_thread::update_config()
{
std::lock_guard lock(mutex);
// Clear ringbuffer
ringbuffer.reset();
// Reload config
cfg.reset();
// Allocate ringbuffer
ringbuffer.reset(new audio_ringbuffer(cfg));
}
void cell_audio_thread::operator()()
{
thread_ctrl::set_native_priority(1);
@@ -519,6 +611,12 @@ void cell_audio_thread::operator()()
// Main cellAudio loop
while (thread_ctrl::state() != thread_state::aborting)
{
if (m_update_configuration)
{
update_config();
m_update_configuration = false;
}
const u64 timestamp = ringbuffer->update();
if (Emu.IsPaused())
@@ -742,16 +840,19 @@ void cell_audio_thread::operator()()
// Mix
float *buf = ringbuffer->get_current_buffer();
if (cfg.audio_channels == 2)
{
mix<true>(buf);
}
else if (cfg.audio_channels == 8)
{
mix<false>(buf);
}
else
switch (cfg.audio_channels)
{
case 2:
mix<audio_downmix::downmix_to_stereo>(buf);
break;
case 6:
mix<audio_downmix::downmix_to_5_1>(buf);
break;
case 8:
mix<audio_downmix::no_downmix>(buf);
break;
default:
fmt::throw_exception("Unsupported number of audio channels: %u", cfg.audio_channels);
}
@@ -766,12 +867,12 @@ void cell_audio_thread::operator()()
ringbuffer.reset();
}
template <bool DownmixToStereo>
template <audio_downmix downmix>
void cell_audio_thread::mix(float *out_buffer, s32 offset)
{
AUDIT(out_buffer != nullptr);
constexpr u32 channels = DownmixToStereo ? 2 : 8;
constexpr u32 channels = downmix == audio_downmix::no_downmix ? 8 : downmix == audio_downmix::downmix_to_5_1 ? 6 : 2;
constexpr u32 out_buffer_sz = channels * AUDIO_BUFFER_SAMPLES;
bool first_mix = true;
@@ -823,14 +924,18 @@ void cell_audio_thread::mix(float *out_buffer, s32 offset)
out_buffer[out + 0] = left;
out_buffer[out + 1] = right;
if constexpr (!DownmixToStereo)
if constexpr (downmix != audio_downmix::downmix_to_stereo)
{
out_buffer[out + 2] = 0.0f;
out_buffer[out + 3] = 0.0f;
out_buffer[out + 4] = 0.0f;
out_buffer[out + 5] = 0.0f;
out_buffer[out + 6] = 0.0f;
out_buffer[out + 7] = 0.0f;
if constexpr (downmix != audio_downmix::downmix_to_5_1)
{
out_buffer[out + 6] = 0.0f;
out_buffer[out + 7] = 0.0f;
}
}
}
first_mix = false;
@@ -866,12 +971,21 @@ void cell_audio_thread::mix(float *out_buffer, s32 offset)
const float side_left = buf[in + 6] * m;
const float side_right = buf[in + 7] * m;
if constexpr (DownmixToStereo)
if constexpr (downmix == audio_downmix::downmix_to_stereo)
{
// Don't mix in the lfe as per dolby specification and based on documentation
const float mid = center * 0.5;
out_buffer[out + 0] = left * minus_3db + mid + side_left * 0.5 + rear_left * 0.5;
out_buffer[out + 1] = right * minus_3db + mid + side_right * 0.5 + rear_right * 0.5;
const float mid = center * 0.5f;
out_buffer[out + 0] = left * minus_3db + mid + side_left * 0.5f + rear_left * 0.5f;
out_buffer[out + 1] = right * minus_3db + mid + side_right * 0.5f + rear_right * 0.5f;
}
else if constexpr (downmix == audio_downmix::downmix_to_5_1)
{
out_buffer[out + 0] = left;
out_buffer[out + 1] = right;
out_buffer[out + 2] = center;
out_buffer[out + 3] = low_freq;
out_buffer[out + 4] = side_left + rear_left;
out_buffer[out + 5] = side_right + rear_right;
}
else
{
@@ -902,12 +1016,21 @@ void cell_audio_thread::mix(float *out_buffer, s32 offset)
const float side_left = buf[in + 6] * m;
const float side_right = buf[in + 7] * m;
if constexpr (DownmixToStereo)
if constexpr (downmix == audio_downmix::downmix_to_stereo)
{
// Don't mix in the lfe as per dolby specification and based on documentation
const float mid = center * 0.5;
out_buffer[out + 0] += left * minus_3db + mid + side_left * 0.5 + rear_left * 0.5;
out_buffer[out + 1] += right * minus_3db + mid + side_right * 0.5 + rear_right * 0.5;
const float mid = center * 0.5f;
out_buffer[out + 0] += left * minus_3db + mid + side_left * 0.5f + rear_left * 0.5f;
out_buffer[out + 1] += right * minus_3db + mid + side_right * 0.5f + rear_right * 0.5f;
}
else if constexpr (downmix == audio_downmix::downmix_to_5_1)
{
out_buffer[out + 0] += left;
out_buffer[out + 1] += right;
out_buffer[out + 2] += center;
out_buffer[out + 3] += low_freq;
out_buffer[out + 4] += side_left + rear_left;
out_buffer[out + 5] += side_right + rear_right;
}
else
{
@@ -934,7 +1057,7 @@ void cell_audio_thread::mix(float *out_buffer, s32 offset)
{
std::memset(out_buffer, 0, out_buffer_sz * sizeof(float));
}
else if (g_cfg.audio.convert_to_u16)
else if (cfg.backend->get_convert_to_u16())
{
// convert the data from float to u16 with clipping:
// 2x MULPS
+55 -25
View File
@@ -100,6 +100,7 @@ enum : u32
MAX_AUDIO_EVENT_QUEUES = 64,
AUDIO_BLOCK_SIZE_2CH = 2 * AUDIO_BUFFER_SAMPLES,
AUDIO_BLOCK_SIZE_6CH = 6 * AUDIO_BUFFER_SAMPLES,
AUDIO_BLOCK_SIZE_8CH = 8 * AUDIO_BUFFER_SAMPLES,
PORT_BUFFER_TAG_COUNT = 6,
@@ -108,6 +109,10 @@ enum : u32
PORT_BUFFER_TAG_DELTA_2CH = PORT_BUFFER_TAG_LAST_2CH / (PORT_BUFFER_TAG_COUNT - 1),
PORT_BUFFER_TAG_FIRST_2CH = PORT_BUFFER_TAG_LAST_2CH % (PORT_BUFFER_TAG_COUNT - 1),
PORT_BUFFER_TAG_LAST_6CH = AUDIO_BLOCK_SIZE_6CH - 1,
PORT_BUFFER_TAG_DELTA_6CH = PORT_BUFFER_TAG_LAST_6CH / (PORT_BUFFER_TAG_COUNT - 1),
PORT_BUFFER_TAG_FIRST_6CH = PORT_BUFFER_TAG_LAST_6CH % (PORT_BUFFER_TAG_COUNT - 1),
PORT_BUFFER_TAG_LAST_8CH = AUDIO_BLOCK_SIZE_8CH - 1,
PORT_BUFFER_TAG_DELTA_8CH = PORT_BUFFER_TAG_LAST_8CH / (PORT_BUFFER_TAG_COUNT - 1),
PORT_BUFFER_TAG_FIRST_8CH = PORT_BUFFER_TAG_LAST_8CH % (PORT_BUFFER_TAG_COUNT - 1),
@@ -182,49 +187,59 @@ struct audio_port
struct cell_audio_config
{
const std::shared_ptr<AudioBackend> backend = Emu.GetCallbacks().get_audio();
struct raw_config
{
bool buffering_enabled = false;
s64 desired_buffer_duration = 0;
bool enable_time_stretching = false;
s64 time_stretching_threshold = 0;
bool convert_to_u16 = false;
u32 start_threshold = 0;
u32 sampling_period_multiplier = 0;
audio_downmix downmix = audio_downmix::downmix_to_stereo;
audio_renderer renderer = audio_renderer::null;
} raw;
const u32 audio_channels = AudioBackend::get_channels();
const u32 audio_sampling_rate = AudioBackend::get_sampling_rate();
const u32 audio_block_period = AUDIO_BUFFER_SAMPLES * 1000000 / audio_sampling_rate;
std::shared_ptr<AudioBackend> backend = nullptr;
const u32 audio_buffer_length = AUDIO_BUFFER_SAMPLES * audio_channels;
const u32 audio_buffer_size = audio_buffer_length * AudioBackend::get_sample_size();
u32 audio_channels = 0;
u32 audio_sampling_rate = 0;
u32 audio_block_period = 0;
u32 audio_buffer_length = 0;
u32 audio_buffer_size = 0;
/*
* Buffering
*/
const u64 desired_buffer_duration = g_cfg.audio.desired_buffer_duration * 1000llu;
private:
const bool raw_buffering_enabled = static_cast<bool>(g_cfg.audio.enable_buffering);
public:
u64 desired_buffer_duration = 0;
// We need a non-blocking backend (implementing play/pause/flush) to be able to do buffering correctly
// We also need to be able to query the current playing state
const bool buffering_enabled = raw_buffering_enabled && backend->has_capability(AudioBackend::PLAY_PAUSE_FLUSH | AudioBackend::IS_PLAYING);
bool buffering_enabled = false;
const u64 minimum_block_period = audio_block_period / 2; // the block period will not be dynamically lowered below this value (usecs)
const u64 maximum_block_period = (6 * audio_block_period) / 5; // the block period will not be dynamically increased above this value (usecs)
u64 minimum_block_period = 0; // the block period will not be dynamically lowered below this value (usecs)
u64 maximum_block_period = 0; // the block period will not be dynamically increased above this value (usecs)
const u32 desired_full_buffers = buffering_enabled ? static_cast<u32>(desired_buffer_duration / audio_block_period) + 3 : 2;
const u32 num_allocated_buffers = desired_full_buffers + EXTRA_AUDIO_BUFFERS; // number of ringbuffer buffers
u32 desired_full_buffers = 0;
u32 num_allocated_buffers = 0; // number of ringbuffer buffers
const f32 period_average_alpha = 0.02f; // alpha factor for the m_average_period rolling average
const s64 period_comparison_margin = 250; // when comparing the current period time with the desired period, if it is below this number of usecs we do not wait any longer
const u64 fully_untouched_timeout = 2 * audio_block_period; // timeout if the game has not touched any audio buffer yet
const u64 partially_untouched_timeout = 4 * audio_block_period; // timeout if the game has not touched all audio buffers yet
u64 fully_untouched_timeout = 0; // timeout if the game has not touched any audio buffer yet
u64 partially_untouched_timeout = 0; // timeout if the game has not touched all audio buffers yet
/*
* Time Stretching
*/
private:
const bool raw_time_stretching_enabled = buffering_enabled && g_cfg.audio.enable_time_stretching && (g_cfg.audio.time_stretching_threshold > 0);
public:
// We need to be able to set a dynamic frequency ratio to be able to do time stretching
const bool time_stretching_enabled = raw_time_stretching_enabled && backend->has_capability(AudioBackend::SET_FREQUENCY_RATIO);
const f32 time_stretching_threshold = g_cfg.audio.time_stretching_threshold / 100.0f; // we only apply time stretching below this buffer fill rate (adjusted for average period)
// We need to be able to set a dynamic frequency ratio to be able to do time stretching
bool time_stretching_enabled = false;
f32 time_stretching_threshold = 0.0f; // we only apply time stretching below this buffer fill rate (adjusted for average period)
const f32 time_stretching_step = 0.1f; // will only reduce/increase the frequency ratio in steps of at least this value
const f32 time_stretching_scale = 0.9f;
@@ -232,6 +247,11 @@ public:
* Constructor
*/
cell_audio_config();
/*
* Config changes
*/
void reset();
};
class audio_ringbuffer
@@ -332,12 +352,13 @@ public:
class cell_audio_thread
{
private:
std::unique_ptr<audio_ringbuffer> ringbuffer;
void reset_ports(s32 offset = 0);
void advance(u64 timestamp, bool reset = true);
std::tuple<u32, u32, u32, u32> count_port_buffer_tags();
template <bool DownmixToStereo>
template <audio_downmix downmix>
void mix(float *out_buffer, s32 offset = 0);
void finish_port_volume_stepping();
@@ -346,8 +367,11 @@ class cell_audio_thread
return (time_left > 350) ? time_left - 250 : 100;
}
void update_config();
public:
cell_audio_config cfg;
atomic_t<bool> m_update_configuration = false;
shared_mutex mutex;
atomic_t<u32> init = 0;
@@ -370,7 +394,7 @@ public:
u64 m_counter = 0;
u64 m_start_time = 0;
u64 m_dynamic_period = 0;
f32 m_average_playtime;
f32 m_average_playtime = 0.0f;
void operator()();
@@ -400,3 +424,9 @@ public:
};
using cell_audio = named_thread<cell_audio_thread>;
namespace audio
{
cell_audio_config::raw_config get_raw_config();
void configure_audio();
}
+39 -18
View File
@@ -1,22 +1,43 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "cellDaisy.h"
LOG_CHANNEL(cellDaisy);
template <>
void fmt_class_string<CellDaisyError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](CellDaisyError value)
{
switch (value)
{
STR_CASE(CELL_DAISY_ERROR_NO_BEGIN);
STR_CASE(CELL_DAISY_ERROR_INVALID_PORT_ATTACH);
STR_CASE(CELL_DAISY_ERROR_NOT_IMPLEMENTED);
STR_CASE(CELL_DAISY_ERROR_AGAIN);
STR_CASE(CELL_DAISY_ERROR_INVAL);
STR_CASE(CELL_DAISY_ERROR_PERM);
STR_CASE(CELL_DAISY_ERROR_BUSY);
STR_CASE(CELL_DAISY_ERROR_STAT);
}
return unknown;
});
}
using LFQueue2 = struct CellDaisyLFQueue2;
using Lock = struct CellDaisyLock;
using ScatterGatherInterlock = struct CellDaisyScatterGatherInterlock;
using AtomicInterlock = volatile struct CellDaisyAtomicInterlock;
s32 cellDaisyLFQueue2GetPopPointer(vm::ptr<LFQueue2> queue, vm::ptr<s32> pPointer, u32 isBlocking)
error_code cellDaisyLFQueue2GetPopPointer(vm::ptr<LFQueue2> queue, vm::ptr<s32> pPointer, u32 isBlocking)
{
cellDaisy.todo("cellDaisyLFQueue2GetPopPointer()");
return CELL_OK;
}
s32 cellDaisyLFQueue2CompletePopPointer(vm::ptr<LFQueue2> queue, s32 pointer, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal, u32 isQueueFull)
error_code cellDaisyLFQueue2CompletePopPointer(vm::ptr<LFQueue2> queue, s32 pointer, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal, u32 isQueueFull)
{
cellDaisy.todo("cellDaisyLFQueue2CompletePopPointer()");
return CELL_OK;
@@ -27,7 +48,7 @@ void cellDaisyLFQueue2PushOpen(vm::ptr<LFQueue2> queue)
cellDaisy.todo("cellDaisyLFQueue2PushOpen()");
}
s32 cellDaisyLFQueue2PushClose(vm::ptr<LFQueue2> queue, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal)
error_code cellDaisyLFQueue2PushClose(vm::ptr<LFQueue2> queue, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal)
{
cellDaisy.todo("cellDaisyLFQueue2PushClose()");
return CELL_OK;
@@ -38,73 +59,73 @@ void cellDaisyLFQueue2PopOpen(vm::ptr<LFQueue2> queue)
cellDaisy.todo("cellDaisyLFQueue2PopOpen()");
}
s32 cellDaisyLFQueue2PopClose(vm::ptr<LFQueue2> queue, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal)
error_code cellDaisyLFQueue2PopClose(vm::ptr<LFQueue2> queue, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal)
{
cellDaisy.todo("cellDaisyLFQueue2PopClose()");
return CELL_OK;
}
s32 cellDaisyLFQueue2HasUnfinishedConsumer(vm::ptr<LFQueue2> queue, u32 isCancelled)
error_code cellDaisyLFQueue2HasUnfinishedConsumer(vm::ptr<LFQueue2> queue, u32 isCancelled)
{
cellDaisy.todo("cellDaisyLFQueue2HasUnfinishedConsumer()");
return CELL_OK;
}
s32 cellDaisy_snprintf(vm::ptr<char> buffer, u32 count, vm::cptr<char> fmt, ppu_va_args_t fmt_args)
error_code cellDaisy_snprintf(vm::ptr<char> buffer, u32 count, vm::cptr<char> fmt, ppu_va_args_t fmt_args)
{
cellDaisy.todo("cellDaisy_snprintf()");
return CELL_OK;
}
s32 cellDaisyLock_initialize(vm::ptr<Lock> _this, u32 depth)
error_code cellDaisyLock_initialize(vm::ptr<Lock> _this, u32 depth)
{
cellDaisy.todo("cellDaisyLock_initialize()");
return CELL_OK;
}
s32 cellDaisyLock_getNextHeadPointer(vm::ptr<Lock> _this)
error_code cellDaisyLock_getNextHeadPointer(vm::ptr<Lock> _this)
{
cellDaisy.todo("cellDaisyLock_getNextHeadPointer()");
return CELL_OK;
}
s32 cellDaisyLock_getNextTailPointer(vm::ptr<Lock> _this)
error_code cellDaisyLock_getNextTailPointer(vm::ptr<Lock> _this)
{
cellDaisy.todo("cellDaisyLock_getNextTailPointer()");
return CELL_OK;
}
s32 cellDaisyLock_completeConsume(vm::ptr<Lock> _this, u32 pointer)
error_code cellDaisyLock_completeConsume(vm::ptr<Lock> _this, u32 pointer)
{
cellDaisy.todo("cellDaisyLock_completeConsume()");
return CELL_OK;
}
s32 cellDaisyLock_completeProduce(vm::ptr<Lock> _this, u32 pointer)
error_code cellDaisyLock_completeProduce(vm::ptr<Lock> _this, u32 pointer)
{
cellDaisy.todo("cellDaisyLock_completeProduce()");
return CELL_OK;
}
s32 cellDaisyLock_pushOpen(vm::ptr<Lock> _this)
error_code cellDaisyLock_pushOpen(vm::ptr<Lock> _this)
{
cellDaisy.todo("cellDaisyLock_pushOpen()");
return CELL_OK;
}
s32 cellDaisyLock_pushClose(vm::ptr<Lock> _this)
error_code cellDaisyLock_pushClose(vm::ptr<Lock> _this)
{
cellDaisy.todo("cellDaisyLock_pushClose()");
return CELL_OK;
}
s32 cellDaisyLock_popOpen(vm::ptr<Lock> _this)
error_code cellDaisyLock_popOpen(vm::ptr<Lock> _this)
{
cellDaisy.todo("cellDaisyLock_popOpen()");
return CELL_OK;
}
s32 cellDaisyLock_popClose(vm::ptr<Lock> _this)
error_code cellDaisyLock_popClose(vm::ptr<Lock> _this)
{
cellDaisy.todo("cellDaisyLock_popClose()");
return CELL_OK;
@@ -125,13 +146,13 @@ void cellDaisyScatterGatherInterlock_9tor(vm::ptr<ScatterGatherInterlock> _this)
cellDaisy.todo("cellDaisyScatterGatherInterlock_9tor()");
}
s32 cellDaisyScatterGatherInterlock_probe(vm::ptr<ScatterGatherInterlock> _this, u32 isBlocking)
error_code cellDaisyScatterGatherInterlock_probe(vm::ptr<ScatterGatherInterlock> _this, u32 isBlocking)
{
cellDaisy.todo("cellDaisyScatterGatherInterlock_probe()");
return CELL_OK;
}
s32 cellDaisyScatterGatherInterlock_release(vm::ptr<ScatterGatherInterlock> _this)
error_code cellDaisyScatterGatherInterlock_release(vm::ptr<ScatterGatherInterlock> _this)
{
cellDaisy.todo("cellDaisyScatterGatherInterlock_release()");
return CELL_OK;
+2 -2
View File
@@ -1,11 +1,11 @@
#pragma once
#pragma once
// libDaisy = 0x80410501 - 0x804105ff
// Error codes
enum
enum CellDaisyError : u32
{
CELL_DAISY_ERROR_NO_BEGIN = 0x80410501,
CELL_DAISY_ERROR_INVALID_PORT_ATTACH = 0x80410502,
+39 -21
View File
@@ -10,6 +10,24 @@
LOG_CHANNEL(cellDmux);
template <>
void fmt_class_string<CellDmuxError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](CellDmuxError value)
{
switch (value)
{
STR_CASE(CELL_DMUX_ERROR_ARG);
STR_CASE(CELL_DMUX_ERROR_SEQ);
STR_CASE(CELL_DMUX_ERROR_BUSY);
STR_CASE(CELL_DMUX_ERROR_EMPTY);
STR_CASE(CELL_DMUX_ERROR_FATAL);
}
return unknown;
});
}
/* Demuxer Thread Classes */
enum
@@ -940,7 +958,7 @@ void dmuxQueryEsAttr(u32 info /* may be 0 */, vm::cptr<CellCodecEsFilterId> esFi
cellDmux.warning("*** filter(0x%x, 0x%x, 0x%x, 0x%x)", esFilterId->filterIdMajor, esFilterId->filterIdMinor, esFilterId->supplementalInfo1, esFilterId->supplementalInfo2);
}
s32 cellDmuxQueryAttr(vm::cptr<CellDmuxType> type, vm::ptr<CellDmuxAttr> attr)
error_code cellDmuxQueryAttr(vm::cptr<CellDmuxType> type, vm::ptr<CellDmuxAttr> attr)
{
cellDmux.warning("cellDmuxQueryAttr(type=*0x%x, attr=*0x%x)", type, attr);
@@ -953,7 +971,7 @@ s32 cellDmuxQueryAttr(vm::cptr<CellDmuxType> type, vm::ptr<CellDmuxAttr> attr)
return CELL_OK;
}
s32 cellDmuxQueryAttr2(vm::cptr<CellDmuxType2> type2, vm::ptr<CellDmuxAttr> attr)
error_code cellDmuxQueryAttr2(vm::cptr<CellDmuxType2> type2, vm::ptr<CellDmuxAttr> attr)
{
cellDmux.warning("cellDmuxQueryAttr2(demuxerType2=*0x%x, demuxerAttr=*0x%x)", type2, attr);
@@ -966,7 +984,7 @@ s32 cellDmuxQueryAttr2(vm::cptr<CellDmuxType2> type2, vm::ptr<CellDmuxAttr> attr
return CELL_OK;
}
s32 cellDmuxOpen(vm::cptr<CellDmuxType> type, vm::cptr<CellDmuxResource> res, vm::cptr<CellDmuxCb> cb, vm::ptr<u32> handle)
error_code cellDmuxOpen(vm::cptr<CellDmuxType> type, vm::cptr<CellDmuxResource> res, vm::cptr<CellDmuxCb> cb, vm::ptr<u32> handle)
{
cellDmux.warning("cellDmuxOpen(type=*0x%x, res=*0x%x, cb=*0x%x, handle=*0x%x)", type, res, cb, handle);
@@ -979,7 +997,7 @@ s32 cellDmuxOpen(vm::cptr<CellDmuxType> type, vm::cptr<CellDmuxResource> res, vm
fmt::throw_exception("cellDmux disabled, use LLE.");
}
s32 cellDmuxOpenEx(vm::cptr<CellDmuxType> type, vm::cptr<CellDmuxResourceEx> resEx, vm::cptr<CellDmuxCb> cb, vm::ptr<u32> handle)
error_code cellDmuxOpenEx(vm::cptr<CellDmuxType> type, vm::cptr<CellDmuxResourceEx> resEx, vm::cptr<CellDmuxCb> cb, vm::ptr<u32> handle)
{
cellDmux.warning("cellDmuxOpenEx(type=*0x%x, resEx=*0x%x, cb=*0x%x, handle=*0x%x)", type, resEx, cb, handle);
@@ -992,14 +1010,14 @@ s32 cellDmuxOpenEx(vm::cptr<CellDmuxType> type, vm::cptr<CellDmuxResourceEx> res
fmt::throw_exception("cellDmux disabled, use LLE.");
}
s32 cellDmuxOpenExt(vm::cptr<CellDmuxType> type, vm::cptr<CellDmuxResourceEx> resEx, vm::cptr<CellDmuxCb> cb, vm::ptr<u32> handle)
error_code cellDmuxOpenExt(vm::cptr<CellDmuxType> type, vm::cptr<CellDmuxResourceEx> resEx, vm::cptr<CellDmuxCb> cb, vm::ptr<u32> handle)
{
cellDmux.warning("cellDmuxOpenExt(type=*0x%x, resEx=*0x%x, cb=*0x%x, handle=*0x%x)", type, resEx, cb, handle);
return cellDmuxOpenEx(type, resEx, cb, handle);
}
s32 cellDmuxOpen2(vm::cptr<CellDmuxType2> type2, vm::cptr<CellDmuxResource2> res2, vm::cptr<CellDmuxCb> cb, vm::ptr<u32> handle)
error_code cellDmuxOpen2(vm::cptr<CellDmuxType2> type2, vm::cptr<CellDmuxResource2> res2, vm::cptr<CellDmuxCb> cb, vm::ptr<u32> handle)
{
cellDmux.warning("cellDmuxOpen2(type2=*0x%x, res2=*0x%x, cb=*0x%x, handle=*0x%x)", type2, res2, cb, handle);
@@ -1012,7 +1030,7 @@ s32 cellDmuxOpen2(vm::cptr<CellDmuxType2> type2, vm::cptr<CellDmuxResource2> res
fmt::throw_exception("cellDmux disabled, use LLE.");
}
s32 cellDmuxClose(u32 handle)
error_code cellDmuxClose(u32 handle)
{
cellDmux.warning("cellDmuxClose(handle=0x%x)", handle);
@@ -1041,7 +1059,7 @@ s32 cellDmuxClose(u32 handle)
return CELL_OK;
}
s32 cellDmuxSetStream(u32 handle, u32 streamAddress, u32 streamSize, b8 discontinuity, u64 userData)
error_code cellDmuxSetStream(u32 handle, u32 streamAddress, u32 streamSize, b8 discontinuity, u64 userData)
{
cellDmux.trace("cellDmuxSetStream(handle=0x%x, streamAddress=0x%x, streamSize=%d, discontinuity=%d, userData=0x%llx)", handle, streamAddress, streamSize, discontinuity, userData);
@@ -1069,7 +1087,7 @@ s32 cellDmuxSetStream(u32 handle, u32 streamAddress, u32 streamSize, b8 disconti
return CELL_OK;
}
s32 cellDmuxResetStream(u32 handle)
error_code cellDmuxResetStream(u32 handle)
{
cellDmux.warning("cellDmuxResetStream(handle=0x%x)", handle);
@@ -1084,7 +1102,7 @@ s32 cellDmuxResetStream(u32 handle)
return CELL_OK;
}
s32 cellDmuxResetStreamAndWaitDone(u32 handle)
error_code cellDmuxResetStreamAndWaitDone(u32 handle)
{
cellDmux.warning("cellDmuxResetStreamAndWaitDone(handle=0x%x)", handle);
@@ -1117,7 +1135,7 @@ s32 cellDmuxResetStreamAndWaitDone(u32 handle)
return CELL_OK;
}
s32 cellDmuxQueryEsAttr(vm::cptr<CellDmuxType> type, vm::cptr<CellCodecEsFilterId> esFilterId, u32 esSpecificInfo, vm::ptr<CellDmuxEsAttr> esAttr)
error_code cellDmuxQueryEsAttr(vm::cptr<CellDmuxType> type, vm::cptr<CellCodecEsFilterId> esFilterId, u32 esSpecificInfo, vm::ptr<CellDmuxEsAttr> esAttr)
{
cellDmux.warning("cellDmuxQueryEsAttr(demuxerType=*0x%x, esFilterId=*0x%x, esSpecificInfo=*0x%x, esAttr=*0x%x)", type, esFilterId, esSpecificInfo, esAttr);
@@ -1131,7 +1149,7 @@ s32 cellDmuxQueryEsAttr(vm::cptr<CellDmuxType> type, vm::cptr<CellCodecEsFilterI
return CELL_OK;
}
s32 cellDmuxQueryEsAttr2(vm::cptr<CellDmuxType2> type2, vm::cptr<CellCodecEsFilterId> esFilterId, u32 esSpecificInfo, vm::ptr<CellDmuxEsAttr> esAttr)
error_code cellDmuxQueryEsAttr2(vm::cptr<CellDmuxType2> type2, vm::cptr<CellCodecEsFilterId> esFilterId, u32 esSpecificInfo, vm::ptr<CellDmuxEsAttr> esAttr)
{
cellDmux.warning("cellDmuxQueryEsAttr2(type2=*0x%x, esFilterId=*0x%x, esSpecificInfo=*0x%x, esAttr=*0x%x)", type2, esFilterId, esSpecificInfo, esAttr);
@@ -1145,7 +1163,7 @@ s32 cellDmuxQueryEsAttr2(vm::cptr<CellDmuxType2> type2, vm::cptr<CellCodecEsFilt
return CELL_OK;
}
s32 cellDmuxEnableEs(u32 handle, vm::cptr<CellCodecEsFilterId> esFilterId, vm::cptr<CellDmuxEsResource> esResourceInfo, vm::cptr<CellDmuxEsCb> esCb, u32 esSpecificInfo, vm::ptr<u32> esHandle)
error_code cellDmuxEnableEs(u32 handle, vm::cptr<CellCodecEsFilterId> esFilterId, vm::cptr<CellDmuxEsResource> esResourceInfo, vm::cptr<CellDmuxEsCb> esCb, u32 esSpecificInfo, vm::ptr<u32> esHandle)
{
cellDmux.warning("cellDmuxEnableEs(handle=0x%x, esFilterId=*0x%x, esResourceInfo=*0x%x, esCb=*0x%x, esSpecificInfo=*0x%x, esHandle=*0x%x)", handle, esFilterId, esResourceInfo, esCb, esSpecificInfo, esHandle);
@@ -1175,7 +1193,7 @@ s32 cellDmuxEnableEs(u32 handle, vm::cptr<CellCodecEsFilterId> esFilterId, vm::c
return CELL_OK;
}
s32 cellDmuxDisableEs(u32 esHandle)
error_code cellDmuxDisableEs(u32 esHandle)
{
cellDmux.warning("cellDmuxDisableEs(esHandle=0x%x)", esHandle);
@@ -1194,7 +1212,7 @@ s32 cellDmuxDisableEs(u32 esHandle)
return CELL_OK;
}
s32 cellDmuxResetEs(u32 esHandle)
error_code cellDmuxResetEs(u32 esHandle)
{
cellDmux.trace("cellDmuxResetEs(esHandle=0x%x)", esHandle);
@@ -1213,7 +1231,7 @@ s32 cellDmuxResetEs(u32 esHandle)
return CELL_OK;
}
s32 cellDmuxGetAu(u32 esHandle, vm::ptr<u32> auInfo, vm::ptr<u32> auSpecificInfo)
error_code cellDmuxGetAu(u32 esHandle, vm::ptr<u32> auInfo, vm::ptr<u32> auSpecificInfo)
{
cellDmux.trace("cellDmuxGetAu(esHandle=0x%x, auInfo=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfo, auSpecificInfo);
@@ -1236,7 +1254,7 @@ s32 cellDmuxGetAu(u32 esHandle, vm::ptr<u32> auInfo, vm::ptr<u32> auSpecificInfo
return CELL_OK;
}
s32 cellDmuxPeekAu(u32 esHandle, vm::ptr<u32> auInfo, vm::ptr<u32> auSpecificInfo)
error_code cellDmuxPeekAu(u32 esHandle, vm::ptr<u32> auInfo, vm::ptr<u32> auSpecificInfo)
{
cellDmux.trace("cellDmuxPeekAu(esHandle=0x%x, auInfo=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfo, auSpecificInfo);
@@ -1259,7 +1277,7 @@ s32 cellDmuxPeekAu(u32 esHandle, vm::ptr<u32> auInfo, vm::ptr<u32> auSpecificInf
return CELL_OK;
}
s32 cellDmuxGetAuEx(u32 esHandle, vm::ptr<u32> auInfoEx, vm::ptr<u32> auSpecificInfo)
error_code cellDmuxGetAuEx(u32 esHandle, vm::ptr<u32> auInfoEx, vm::ptr<u32> auSpecificInfo)
{
cellDmux.trace("cellDmuxGetAuEx(esHandle=0x%x, auInfoEx=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfoEx, auSpecificInfo);
@@ -1282,7 +1300,7 @@ s32 cellDmuxGetAuEx(u32 esHandle, vm::ptr<u32> auInfoEx, vm::ptr<u32> auSpecific
return CELL_OK;
}
s32 cellDmuxPeekAuEx(u32 esHandle, vm::ptr<u32> auInfoEx, vm::ptr<u32> auSpecificInfo)
error_code cellDmuxPeekAuEx(u32 esHandle, vm::ptr<u32> auInfoEx, vm::ptr<u32> auSpecificInfo)
{
cellDmux.trace("cellDmuxPeekAuEx(esHandle=0x%x, auInfoEx=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfoEx, auSpecificInfo);
@@ -1305,7 +1323,7 @@ s32 cellDmuxPeekAuEx(u32 esHandle, vm::ptr<u32> auInfoEx, vm::ptr<u32> auSpecifi
return CELL_OK;
}
s32 cellDmuxReleaseAu(u32 esHandle)
error_code cellDmuxReleaseAu(u32 esHandle)
{
cellDmux.trace("cellDmuxReleaseAu(esHandle=0x%x)", esHandle);
@@ -1323,7 +1341,7 @@ s32 cellDmuxReleaseAu(u32 esHandle)
return CELL_OK;
}
s32 cellDmuxFlushEs(u32 esHandle)
error_code cellDmuxFlushEs(u32 esHandle)
{
cellDmux.warning("cellDmuxFlushEs(esHandle=0x%x)", esHandle);
+2 -2
View File
@@ -1,9 +1,9 @@
#pragma once
#pragma once
#include "Emu/Memory/vm_ptr.h"
// Error Codes
enum
enum CellDmuxError :u32
{
CELL_DMUX_ERROR_ARG = 0x80610201,
CELL_DMUX_ERROR_SEQ = 0x80610202,
+14 -14
View File
@@ -1,81 +1,81 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
LOG_CHANNEL(cellDtcpIpUtility);
s32 cellDtcpIpRead()
error_code cellDtcpIpRead()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
}
s32 cellDtcpIpFinalize()
error_code cellDtcpIpFinalize()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
}
s32 cellDtcpIpActivate()
error_code cellDtcpIpActivate()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
}
s32 cellDtcpIpOpen()
error_code cellDtcpIpOpen()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
}
s32 cellDtcpIpCheckActivation()
error_code cellDtcpIpCheckActivation()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
}
s32 cellDtcpIpInitialize()
error_code cellDtcpIpInitialize()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
}
s32 cellDtcpIpGetDecryptedData()
error_code cellDtcpIpGetDecryptedData()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
}
s32 cellDtcpIpStopSequence()
error_code cellDtcpIpStopSequence()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
}
s32 cellDtcpIpSeek()
error_code cellDtcpIpSeek()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
}
s32 cellDtcpIpStartSequence()
error_code cellDtcpIpStartSequence()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
}
s32 cellDtcpIpSetEncryptedData()
error_code cellDtcpIpSetEncryptedData()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
}
s32 cellDtcpIpClose()
error_code cellDtcpIpClose()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
}
s32 cellDtcpIpSuspendActivationForDebug()
error_code cellDtcpIpSuspendActivationForDebug()
{
UNIMPLEMENTED_FUNC(cellDtcpIpUtility);
return CELL_OK;
+123 -86
View File
@@ -8,8 +8,46 @@
LOG_CHANNEL(cellFont);
template <>
void fmt_class_string<CellFontError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_FONT_ERROR_FATAL);
STR_CASE(CELL_FONT_ERROR_INVALID_PARAMETER);
STR_CASE(CELL_FONT_ERROR_UNINITIALIZED);
STR_CASE(CELL_FONT_ERROR_INITIALIZE_FAILED);
STR_CASE(CELL_FONT_ERROR_INVALID_CACHE_BUFFER);
STR_CASE(CELL_FONT_ERROR_ALREADY_INITIALIZED);
STR_CASE(CELL_FONT_ERROR_ALLOCATION_FAILED);
STR_CASE(CELL_FONT_ERROR_NO_SUPPORT_FONTSET);
STR_CASE(CELL_FONT_ERROR_OPEN_FAILED);
STR_CASE(CELL_FONT_ERROR_READ_FAILED);
STR_CASE(CELL_FONT_ERROR_FONT_OPEN_FAILED);
STR_CASE(CELL_FONT_ERROR_FONT_NOT_FOUND);
STR_CASE(CELL_FONT_ERROR_FONT_OPEN_MAX);
STR_CASE(CELL_FONT_ERROR_FONT_CLOSE_FAILED);
STR_CASE(CELL_FONT_ERROR_ALREADY_OPENED);
STR_CASE(CELL_FONT_ERROR_NO_SUPPORT_FUNCTION);
STR_CASE(CELL_FONT_ERROR_NO_SUPPORT_CODE);
STR_CASE(CELL_FONT_ERROR_NO_SUPPORT_GLYPH);
STR_CASE(CELL_FONT_ERROR_BUFFER_SIZE_NOT_ENOUGH);
STR_CASE(CELL_FONT_ERROR_RENDERER_ALREADY_BIND);
STR_CASE(CELL_FONT_ERROR_RENDERER_UNBIND);
STR_CASE(CELL_FONT_ERROR_RENDERER_INVALID);
STR_CASE(CELL_FONT_ERROR_RENDERER_ALLOCATION_FAILED);
STR_CASE(CELL_FONT_ERROR_ENOUGH_RENDERING_BUFFER);
STR_CASE(CELL_FONT_ERROR_NO_SUPPORT_SURFACE);
}
return unknown;
});
}
// Functions
s32 cellFontInitializeWithRevision(u64 revisionFlags, vm::ptr<CellFontConfig> config)
error_code cellFontInitializeWithRevision(u64 revisionFlags, vm::ptr<CellFontConfig> config)
{
cellFont.warning("cellFontInitializeWithRevision(revisionFlags=0x%llx, config=*0x%x)", revisionFlags, config);
@@ -26,26 +64,26 @@ s32 cellFontInitializeWithRevision(u64 revisionFlags, vm::ptr<CellFontConfig> co
return CELL_OK;
}
s32 cellFontGetRevisionFlags(vm::ptr<u64> revisionFlags)
error_code cellFontGetRevisionFlags(vm::ptr<u64> revisionFlags)
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontEnd()
error_code cellFontEnd()
{
cellFont.warning("cellFontEnd()");
return CELL_OK;
}
s32 cellFontSetFontsetOpenMode(u32 openMode)
error_code cellFontSetFontsetOpenMode(u32 openMode)
{
cellFont.todo("cellFontSetFontsetOpenMode(openMode=0x%x)", openMode);
return CELL_OK;
}
s32 cellFontOpenFontMemory(vm::ptr<CellFontLibrary> library, u32 fontAddr, u32 fontSize, u32 subNum, u32 uniqueId, vm::ptr<CellFont> font)
error_code cellFontOpenFontMemory(vm::ptr<CellFontLibrary> library, u32 fontAddr, u32 fontSize, u32 subNum, u32 uniqueId, vm::ptr<CellFont> font)
{
cellFont.warning("cellFontOpenFontMemory(library=*0x%x, fontAddr=0x%x, fontSize=%d, subNum=%d, uniqueId=%d, font=*0x%x)", library, fontAddr, fontSize, subNum, uniqueId, font);
@@ -61,7 +99,7 @@ s32 cellFontOpenFontMemory(vm::ptr<CellFontLibrary> library, u32 fontAddr, u32 f
return CELL_OK;
}
s32 cellFontOpenFontFile(vm::ptr<CellFontLibrary> library, vm::cptr<char> fontPath, u32 subNum, s32 uniqueId, vm::ptr<CellFont> font)
error_code cellFontOpenFontFile(vm::ptr<CellFontLibrary> library, vm::cptr<char> fontPath, u32 subNum, s32 uniqueId, vm::ptr<CellFont> font)
{
cellFont.warning("cellFontOpenFontFile(library=*0x%x, fontPath=%s, subNum=%d, uniqueId=%d, font=*0x%x)", library, fontPath, subNum, uniqueId, font);
@@ -80,7 +118,7 @@ s32 cellFontOpenFontFile(vm::ptr<CellFontLibrary> library, vm::cptr<char> fontPa
return ret;
}
s32 cellFontOpenFontset(ppu_thread& ppu, vm::ptr<CellFontLibrary> library, vm::ptr<CellFontType> fontType, vm::ptr<CellFont> font)
error_code cellFontOpenFontset(ppu_thread& ppu, vm::ptr<CellFontLibrary> library, vm::ptr<CellFontType> fontType, vm::ptr<CellFont> font)
{
cellFont.warning("cellFontOpenFontset(library=*0x%x, fontType=*0x%x, font=*0x%x)", library, fontType, font);
@@ -151,17 +189,16 @@ s32 cellFontOpenFontset(ppu_thread& ppu, vm::ptr<CellFontLibrary> library, vm::p
break;
default:
cellFont.warning("cellFontOpenFontset: fontType->type = %d not supported.", fontType->type);
return CELL_FONT_ERROR_NO_SUPPORT_FONTSET;
return { CELL_FONT_ERROR_NO_SUPPORT_FONTSET, fontType->type };
}
s32 ret = cellFontOpenFontFile(library, vm::make_str(file), 0, 0, font); //TODO: Find the correct values of subNum, uniqueId
error_code ret = cellFontOpenFontFile(library, vm::make_str(file), 0, 0, font); //TODO: Find the correct values of subNum, uniqueId
font->origin = CELL_FONT_OPEN_FONTSET;
return ret;
}
s32 cellFontOpenFontInstance(vm::ptr<CellFont> openedFont, vm::ptr<CellFont> font)
error_code cellFontOpenFontInstance(vm::ptr<CellFont> openedFont, vm::ptr<CellFont> font)
{
cellFont.warning("cellFontOpenFontInstance(openedFont=*0x%x, font=*0x%x)", openedFont, font);
@@ -175,17 +212,17 @@ s32 cellFontOpenFontInstance(vm::ptr<CellFont> openedFont, vm::ptr<CellFont> fon
return CELL_OK;
}
s32 cellFontSetFontOpenMode(u32 openMode)
error_code cellFontSetFontOpenMode(u32 openMode)
{
cellFont.todo("cellFontSetFontOpenMode(openMode=0x%x)", openMode);
return CELL_OK;
}
s32 cellFontCreateRenderer(vm::ptr<CellFontLibrary> library, vm::ptr<CellFontRendererConfig> config, vm::ptr<CellFontRenderer> Renderer)
error_code cellFontCreateRenderer(vm::ptr<CellFontLibrary> library, vm::ptr<CellFontRendererConfig> config, vm::ptr<CellFontRenderer> Renderer)
{
cellFont.todo("cellFontCreateRenderer(library=*0x%x, config=*0x%x, Renderer=*0x%x)", library, config, Renderer);
//Write data in Renderer
// Write data in Renderer
return CELL_OK;
}
@@ -211,7 +248,7 @@ void cellFontRenderSurfaceSetScissor(vm::ptr<CellFontRenderSurface> surface, s32
surface->sc_y1 = h;
}
s32 cellFontSetScalePixel(vm::ptr<CellFont> font, float w, float h)
error_code cellFontSetScalePixel(vm::ptr<CellFont> font, float w, float h)
{
cellFont.trace("cellFontSetScalePixel(font=*0x%x, w=%f, h=%f)", font, w, h);
@@ -221,7 +258,7 @@ s32 cellFontSetScalePixel(vm::ptr<CellFont> font, float w, float h)
return CELL_OK;
}
s32 cellFontGetHorizontalLayout(vm::ptr<CellFont> font, vm::ptr<CellFontHorizontalLayout> layout)
error_code cellFontGetHorizontalLayout(vm::ptr<CellFont> font, vm::ptr<CellFontHorizontalLayout> layout)
{
cellFont.trace("cellFontGetHorizontalLayout(font=*0x%x, layout=*0x%x)", font, layout);
@@ -236,7 +273,7 @@ s32 cellFontGetHorizontalLayout(vm::ptr<CellFont> font, vm::ptr<CellFontHorizont
return CELL_OK;
}
s32 cellFontBindRenderer(vm::ptr<CellFont> font, vm::ptr<CellFontRenderer> renderer)
error_code cellFontBindRenderer(vm::ptr<CellFont> font, vm::ptr<CellFontRenderer> renderer)
{
cellFont.warning("cellFontBindRenderer(font=*0x%x, renderer=*0x%x)", font, renderer);
@@ -250,7 +287,7 @@ s32 cellFontBindRenderer(vm::ptr<CellFont> font, vm::ptr<CellFontRenderer> rende
return CELL_OK;
}
s32 cellFontUnbindRenderer(vm::ptr<CellFont> font)
error_code cellFontUnbindRenderer(vm::ptr<CellFont> font)
{
cellFont.warning("cellFontBindRenderer(font=*0x%x)", font);
@@ -264,13 +301,13 @@ s32 cellFontUnbindRenderer(vm::ptr<CellFont> font)
return CELL_OK;
}
s32 cellFontDestroyRenderer()
error_code cellFontDestroyRenderer()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontSetupRenderScalePixel(vm::ptr<CellFont> font, float w, float h)
error_code cellFontSetupRenderScalePixel(vm::ptr<CellFont> font, float w, float h)
{
cellFont.todo("cellFontSetupRenderScalePixel(font=*0x%x, w=%f, h=%f)", font, w, h);
@@ -283,7 +320,7 @@ s32 cellFontSetupRenderScalePixel(vm::ptr<CellFont> font, float w, float h)
return CELL_OK;
}
s32 cellFontGetRenderCharGlyphMetrics(vm::ptr<CellFont> font, u32 code, vm::ptr<CellFontGlyphMetrics> metrics)
error_code cellFontGetRenderCharGlyphMetrics(vm::ptr<CellFont> font, u32 code, vm::ptr<CellFontGlyphMetrics> metrics)
{
cellFont.todo("cellFontGetRenderCharGlyphMetrics(font=*0x%x, code=0x%x, metrics=*0x%x)", font, code, metrics);
@@ -296,7 +333,7 @@ s32 cellFontGetRenderCharGlyphMetrics(vm::ptr<CellFont> font, u32 code, vm::ptr<
return CELL_OK;
}
s32 cellFontRenderCharGlyphImage(vm::ptr<CellFont> font, u32 code, vm::ptr<CellFontRenderSurface> surface, float x, float y, vm::ptr<CellFontGlyphMetrics> metrics, vm::ptr<CellFontImageTransInfo> transInfo)
error_code cellFontRenderCharGlyphImage(vm::ptr<CellFont> font, u32 code, vm::ptr<CellFontRenderSurface> surface, float x, float y, vm::ptr<CellFontGlyphMetrics> metrics, vm::ptr<CellFontImageTransInfo> transInfo)
{
cellFont.notice("cellFontRenderCharGlyphImage(font=*0x%x, code=0x%x, surface=*0x%x, x=%f, y=%f, metrics=*0x%x, trans=*0x%x)", font, code, surface, x, y, metrics, transInfo);
@@ -341,13 +378,13 @@ s32 cellFontRenderCharGlyphImage(vm::ptr<CellFont> font, u32 code, vm::ptr<CellF
return CELL_OK;
}
s32 cellFontEndLibrary()
error_code cellFontEndLibrary()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontSetEffectSlant(vm::ptr<CellFont> font, float slantParam)
error_code cellFontSetEffectSlant(vm::ptr<CellFont> font, float slantParam)
{
cellFont.trace("cellFontSetEffectSlant(font=*0x%x, slantParam=%f)", font, slantParam);
@@ -361,7 +398,7 @@ s32 cellFontSetEffectSlant(vm::ptr<CellFont> font, float slantParam)
return CELL_OK;
}
s32 cellFontGetEffectSlant(vm::ptr<CellFont> font, vm::ptr<float> slantParam)
error_code cellFontGetEffectSlant(vm::ptr<CellFont> font, vm::ptr<float> slantParam)
{
cellFont.warning("cellFontSetEffectSlant(font=*0x%x, slantParam=*0x%x)", font, slantParam);
@@ -370,7 +407,7 @@ s32 cellFontGetEffectSlant(vm::ptr<CellFont> font, vm::ptr<float> slantParam)
return CELL_OK;
}
s32 cellFontGetFontIdCode(vm::ptr<CellFont> font, u32 code, vm::ptr<u32> fontId, vm::ptr<u32> fontCode)
error_code cellFontGetFontIdCode(vm::ptr<CellFont> font, u32 code, vm::ptr<u32> fontId, vm::ptr<u32> fontCode)
{
cellFont.todo("cellFontGetFontIdCode(font=*0x%x, code=%d, fontId=*0x%x, fontCode=*0x%x)", font, code, fontId, fontCode);
@@ -378,7 +415,7 @@ s32 cellFontGetFontIdCode(vm::ptr<CellFont> font, u32 code, vm::ptr<u32> fontId,
return CELL_OK;
}
s32 cellFontCloseFont(vm::ptr<CellFont> font)
error_code cellFontCloseFont(vm::ptr<CellFont> font)
{
cellFont.warning("cellFontCloseFont(font=*0x%x)", font);
@@ -392,7 +429,7 @@ s32 cellFontCloseFont(vm::ptr<CellFont> font)
return CELL_OK;
}
s32 cellFontGetCharGlyphMetrics(vm::ptr<CellFont> font, u32 code, vm::ptr<CellFontGlyphMetrics> metrics)
error_code cellFontGetCharGlyphMetrics(vm::ptr<CellFont> font, u32 code, vm::ptr<CellFontGlyphMetrics> metrics)
{
cellFont.warning("cellFontGetCharGlyphMetrics(font=*0x%x, code=0x%x, metrics=*0x%x)", font, code, metrics);
@@ -415,13 +452,13 @@ s32 cellFontGetCharGlyphMetrics(vm::ptr<CellFont> font, u32 code, vm::ptr<CellFo
return CELL_OK;
}
s32 cellFontGraphicsSetFontRGBA()
error_code cellFontGraphicsSetFontRGBA()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontOpenFontsetOnMemory(ppu_thread& ppu, vm::ptr<CellFontLibrary> library, vm::ptr<CellFontType> fontType, vm::ptr<CellFont> font)
error_code cellFontOpenFontsetOnMemory(ppu_thread& ppu, vm::ptr<CellFontLibrary> library, vm::ptr<CellFontType> fontType, vm::ptr<CellFont> font)
{
cellFont.todo("cellFontOpenFontsetOnMemory(library=*0x%x, fontType=*0x%x, font=*0x%x)", library, fontType, font);
@@ -433,109 +470,109 @@ s32 cellFontOpenFontsetOnMemory(ppu_thread& ppu, vm::ptr<CellFontLibrary> librar
return CELL_OK;
}
s32 cellFontGraphicsSetScalePixel()
error_code cellFontGraphicsSetScalePixel()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontGraphicsGetScalePixel()
error_code cellFontGraphicsGetScalePixel()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontSetEffectWeight()
error_code cellFontSetEffectWeight()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontGlyphSetupVertexesGlyph()
error_code cellFontGlyphSetupVertexesGlyph()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontGetVerticalLayout()
error_code cellFontGetVerticalLayout()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontGetRenderCharGlyphMetricsVertical()
error_code cellFontGetRenderCharGlyphMetricsVertical()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontSetScalePoint()
error_code cellFontSetScalePoint()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontSetupRenderEffectSlant()
error_code cellFontSetupRenderEffectSlant()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontGraphicsSetLineRGBA()
error_code cellFontGraphicsSetLineRGBA()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontGraphicsSetDrawType()
error_code cellFontGraphicsSetDrawType()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontEndGraphics()
error_code cellFontEndGraphics()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontGraphicsSetupDrawContext()
error_code cellFontGraphicsSetupDrawContext()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontSetupRenderEffectWeight()
error_code cellFontSetupRenderEffectWeight()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontGlyphGetOutlineControlDistance()
error_code cellFontGlyphGetOutlineControlDistance()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontGlyphGetVertexesGlyphSize()
error_code cellFontGlyphGetVertexesGlyphSize()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontGenerateCharGlyph()
error_code cellFontGenerateCharGlyph()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontDeleteGlyph()
error_code cellFontDeleteGlyph()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontExtend(u32 a1, u32 a2, u32 a3)
error_code cellFontExtend(u32 a1, u32 a2, u32 a3)
{
cellFont.todo("cellFontExtend(a1=0x%x, a2=0x%x, a3=0x%x)", a1, a2, a3);
//In a test I did: a1=0xcfe00000, a2=0x0, a3=(pointer to something)
@@ -555,229 +592,229 @@ s32 cellFontExtend(u32 a1, u32 a2, u32 a3)
return CELL_OK;
}
s32 cellFontRenderCharGlyphImageVertical()
error_code cellFontRenderCharGlyphImageVertical()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontSetResolutionDpi()
error_code cellFontSetResolutionDpi()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontGetCharGlyphMetricsVertical()
error_code cellFontGetCharGlyphMetricsVertical()
{
UNIMPLEMENTED_FUNC(cellFont);
return CELL_OK;
}
s32 cellFontGetRenderEffectWeight()
error_code cellFontGetRenderEffectWeight()
{
cellFont.todo("cellFontGetRenderEffectWeight()");
return CELL_OK;
}
s32 cellFontGraphicsGetDrawType()
error_code cellFontGraphicsGetDrawType()
{
cellFont.todo("cellFontGraphicsGetDrawType()");
return CELL_OK;
}
s32 cellFontGetKerning()
error_code cellFontGetKerning()
{
cellFont.todo("cellFontGetKerning()");
return CELL_OK;
}
s32 cellFontGetRenderScaledKerning()
error_code cellFontGetRenderScaledKerning()
{
cellFont.todo("cellFontGetRenderScaledKerning()");
return CELL_OK;
}
s32 cellFontGetRenderScalePixel()
error_code cellFontGetRenderScalePixel()
{
cellFont.todo("cellFontGetRenderScalePixel()");
return CELL_OK;
}
s32 cellFontGlyphGetScalePixel()
error_code cellFontGlyphGetScalePixel()
{
cellFont.todo("cellFontGlyphGetScalePixel()");
return CELL_OK;
}
s32 cellFontGlyphGetHorizontalShift()
error_code cellFontGlyphGetHorizontalShift()
{
cellFont.todo("cellFontGlyphGetHorizontalShift()");
return CELL_OK;
}
s32 cellFontRenderCharGlyphImageHorizontal()
error_code cellFontRenderCharGlyphImageHorizontal()
{
cellFont.todo("cellFontRenderCharGlyphImageHorizontal()");
return CELL_OK;
}
s32 cellFontGetEffectWeight()
error_code cellFontGetEffectWeight()
{
cellFont.todo("cellFontGetEffectWeight()");
return CELL_OK;
}
s32 cellFontGetScalePixel()
error_code cellFontGetScalePixel()
{
cellFont.todo("cellFontGetScalePixel()");
return CELL_OK;
}
s32 cellFontClearFileCache()
error_code cellFontClearFileCache()
{
cellFont.todo("cellFontClearFileCache()");
return CELL_OK;
}
s32 cellFontAdjustFontScaling()
error_code cellFontAdjustFontScaling()
{
cellFont.todo("cellFontAdjustFontScaling()");
return CELL_OK;
}
s32 cellFontSetupRenderScalePoint()
error_code cellFontSetupRenderScalePoint()
{
cellFont.todo("cellFontSetupRenderScalePoint()");
return CELL_OK;
}
s32 cellFontGlyphGetVerticalShift()
error_code cellFontGlyphGetVerticalShift()
{
cellFont.todo("cellFontGlyphGetVerticalShift()");
return CELL_OK;
}
s32 cellFontGetGlyphExpandBufferInfo()
error_code cellFontGetGlyphExpandBufferInfo()
{
cellFont.todo("cellFontGetGlyphExpandBufferInfo()");
return CELL_OK;
}
s32 cellFontGetLibrary()
error_code cellFontGetLibrary()
{
cellFont.todo("cellFontGetLibrary()");
return CELL_OK;
}
s32 cellFontVertexesGlyphRelocate()
error_code cellFontVertexesGlyphRelocate()
{
cellFont.todo("cellFontVertexesGlyphRelocate()");
return CELL_OK;
}
s32 cellFontGetInitializedRevisionFlags()
error_code cellFontGetInitializedRevisionFlags()
{
cellFont.todo("cellFontGetInitializedRevisionFlags()");
return CELL_OK;
}
s32 cellFontGetResolutionDpi()
error_code cellFontGetResolutionDpi()
{
cellFont.todo("cellFontGetResolutionDpi()");
return CELL_OK;
}
s32 cellFontGlyphRenderImageVertical()
error_code cellFontGlyphRenderImageVertical()
{
cellFont.todo("cellFontGlyphRenderImageVertical()");
return CELL_OK;
}
s32 cellFontGlyphRenderImageHorizontal()
error_code cellFontGlyphRenderImageHorizontal()
{
cellFont.todo("cellFontGlyphRenderImageHorizontal()");
return CELL_OK;
}
s32 cellFontAdjustGlyphExpandBuffer()
error_code cellFontAdjustGlyphExpandBuffer()
{
cellFont.todo("cellFontAdjustGlyphExpandBuffer()");
return CELL_OK;
}
s32 cellFontGetRenderScalePoint()
error_code cellFontGetRenderScalePoint()
{
cellFont.todo("cellFontGetRenderScalePoint()");
return CELL_OK;
}
s32 cellFontGraphicsGetFontRGBA()
error_code cellFontGraphicsGetFontRGBA()
{
cellFont.todo("cellFontGraphicsGetFontRGBA()");
return CELL_OK;
}
s32 cellFontGlyphGetOutlineVertexes()
error_code cellFontGlyphGetOutlineVertexes()
{
cellFont.todo("cellFontGlyphGetOutlineVertexes()");
return CELL_OK;
}
s32 cellFontDelete()
error_code cellFontDelete()
{
cellFont.todo("cellFontDelete()");
return CELL_OK;
}
s32 cellFontPatchWorks()
error_code cellFontPatchWorks()
{
cellFont.todo("cellFontPatchWorks()");
return CELL_OK;
}
s32 cellFontGlyphRenderImage()
error_code cellFontGlyphRenderImage()
{
cellFont.todo("cellFontGlyphRenderImage()");
return CELL_OK;
}
s32 cellFontGetBindingRenderer()
error_code cellFontGetBindingRenderer()
{
cellFont.todo("cellFontGetBindingRenderer()");
return CELL_OK;
}
s32 cellFontGenerateCharGlyphVertical()
error_code cellFontGenerateCharGlyphVertical()
{
cellFont.todo("cellFontGenerateCharGlyphVertical()");
return CELL_OK;
}
s32 cellFontGetRenderEffectSlant()
error_code cellFontGetRenderEffectSlant()
{
cellFont.todo("cellFontGetRenderEffectSlant()");
return CELL_OK;
}
s32 cellFontGetScalePoint()
error_code cellFontGetScalePoint()
{
cellFont.todo("cellFontGetScalePoint()");
return CELL_OK;
}
s32 cellFontGraphicsGetLineRGBA()
error_code cellFontGraphicsGetLineRGBA()
{
cellFont.todo("cellFontGraphicsGetLineRGBA()");
return CELL_OK;
}
s32 cellFontControl()
error_code cellFontControl()
{
cellFont.todo("cellFontControl()");
return CELL_OK;
}
s32 cellFontStatic()
error_code cellFontStatic()
{
cellFont.todo("cellFontStatic()");
return CELL_OK;
+2 -2
View File
@@ -1,9 +1,9 @@
#pragma once
#pragma once
#include "Emu/Memory/vm_ptr.h"
// Error codes
enum
enum CellFontError : u32
{
CELL_FONT_ERROR_FATAL = 0x80540001,
CELL_FONT_ERROR_INVALID_PARAMETER = 0x80540002,
+43 -43
View File
@@ -5,13 +5,13 @@
LOG_CHANNEL(cellFontFT);
s32 cellFontInitLibraryFreeType()
error_code cellFontInitLibraryFreeType()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 cellFontInitLibraryFreeTypeWithRevision(u64 revisionFlags, vm::ptr<CellFontLibraryConfigFT> config, vm::pptr<CellFontLibrary> lib)
error_code cellFontInitLibraryFreeTypeWithRevision(u64 revisionFlags, vm::ptr<CellFontLibraryConfigFT> config, vm::pptr<CellFontLibrary> lib)
{
cellFontFT.warning("cellFontInitLibraryFreeTypeWithRevision(revisionFlags=0x%llx, config=*0x%x, lib=**0x%x)", revisionFlags, config, lib);
@@ -20,247 +20,247 @@ s32 cellFontInitLibraryFreeTypeWithRevision(u64 revisionFlags, vm::ptr<CellFontL
return CELL_OK;
}
s32 cellFontFTGetRevisionFlags()
error_code cellFontFTGetRevisionFlags()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 cellFontFTGetInitializedRevisionFlags()
error_code cellFontFTGetInitializedRevisionFlags()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTCacheStream_CacheEnd()
error_code FTCacheStream_CacheEnd()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTCacheStream_CacheInit()
error_code FTCacheStream_CacheInit()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTCacheStream_CalcCacheIndexSize()
error_code FTCacheStream_CalcCacheIndexSize()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTCacheStream_End()
error_code FTCacheStream_End()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTCacheStream_Init()
error_code FTCacheStream_Init()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_Close()
error_code FTFaceH_Close()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_FontFamilyName()
error_code FTFaceH_FontFamilyName()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_FontStyleName()
error_code FTFaceH_FontStyleName()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetAscender()
error_code FTFaceH_GetAscender()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetBoundingBoxHeight()
error_code FTFaceH_GetBoundingBoxHeight()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetBoundingBoxMaxX()
error_code FTFaceH_GetBoundingBoxMaxX()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetBoundingBoxMaxY()
error_code FTFaceH_GetBoundingBoxMaxY()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetBoundingBoxMinX()
error_code FTFaceH_GetBoundingBoxMinX()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetBoundingBoxMinY()
error_code FTFaceH_GetBoundingBoxMinY()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetBoundingBoxWidth()
error_code FTFaceH_GetBoundingBoxWidth()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetCompositeCodes()
error_code FTFaceH_GetCompositeCodes()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetGlyphImage()
error_code FTFaceH_GetGlyphImage()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetGlyphMetrics()
error_code FTFaceH_GetGlyphMetrics()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetKerning()
error_code FTFaceH_GetKerning()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetMaxHorizontalAdvance()
error_code FTFaceH_GetMaxHorizontalAdvance()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetMaxVerticalAdvance()
error_code FTFaceH_GetMaxVerticalAdvance()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetRenderBufferSize()
error_code FTFaceH_GetRenderBufferSize()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetRenderEffectSlant()
error_code FTFaceH_GetRenderEffectSlant()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetRenderEffectWeight()
error_code FTFaceH_GetRenderEffectWeight()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetRenderScale()
error_code FTFaceH_GetRenderScale()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetRenderScalePixel()
error_code FTFaceH_GetRenderScalePixel()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_GetRenderScalePoint()
error_code FTFaceH_GetRenderScalePoint()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_SetCompositeCodes()
error_code FTFaceH_SetCompositeCodes()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_SetRenderEffectSlant()
error_code FTFaceH_SetRenderEffectSlant()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_SetRenderEffectWeight()
error_code FTFaceH_SetRenderEffectWeight()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_SetRenderScalePixel()
error_code FTFaceH_SetRenderScalePixel()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTFaceH_SetRenderScalePoint()
error_code FTFaceH_SetRenderScalePoint()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTManager_CloseFace()
error_code FTManager_CloseFace()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTManager_Done_FreeType()
error_code FTManager_Done_FreeType()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTManager_Init_FreeType()
error_code FTManager_Init_FreeType()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTManager_OpenFileFace()
error_code FTManager_OpenFileFace()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTManager_OpenMemFace()
error_code FTManager_OpenMemFace()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTManager_OpenStreamFace()
error_code FTManager_OpenStreamFace()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
}
s32 FTManager_SetFontOpenMode()
error_code FTManager_SetFontOpenMode()
{
UNIMPLEMENTED_FUNC(cellFontFT);
return CELL_OK;
+1 -1
View File
@@ -876,7 +876,7 @@ error_code cellGameGetParamString(s32 id, vm::ptr<char> buf, u32 bufsize)
return CELL_GAME_ERROR_NOTSUPPORTED;
}
const std::string value = psf::get_string(prm->sfo, std::string(key.name));
const auto value = psf::get_string(prm->sfo, std::string(key.name));
if (value.empty() && !prm->sfo.count(std::string(key.name)))
{
+8 -8
View File
@@ -1,17 +1,17 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "cellGame.h"
LOG_CHANNEL(cellGameExec);
s32 cellGameSetExitParam(u32 execdata)
error_code cellGameSetExitParam(u32 execdata)
{
cellGameExec.todo("cellGameSetExitParam(execdata=0x%x)", execdata);
return CELL_OK;
}
s32 cellGameGetHomeDataExportPath(vm::ptr<char> exportPath)
error_code cellGameGetHomeDataExportPath(vm::ptr<char> exportPath)
{
cellGameExec.warning("cellGameGetHomeDataExportPath(exportPath=*0x%x)", exportPath);
@@ -25,13 +25,13 @@ s32 cellGameGetHomeDataExportPath(vm::ptr<char> exportPath)
return CELL_GAME_ERROR_NOAPP;
}
s32 cellGameGetHomePath()
error_code cellGameGetHomePath()
{
UNIMPLEMENTED_FUNC(cellGameExec);
return CELL_OK;
}
s32 cellGameGetHomeDataImportPath(vm::ptr<char> importPath)
error_code cellGameGetHomeDataImportPath(vm::ptr<char> importPath)
{
cellGameExec.warning("cellGameGetHomeDataImportPath(importPath=*0x%x)", importPath);
@@ -45,7 +45,7 @@ s32 cellGameGetHomeDataImportPath(vm::ptr<char> importPath)
return CELL_GAME_ERROR_NOAPP;
}
s32 cellGameGetHomeLaunchOptionPath(vm::ptr<char> commonPath, vm::ptr<char> personalPath)
error_code cellGameGetHomeLaunchOptionPath(vm::ptr<char> commonPath, vm::ptr<char> personalPath)
{
cellGameExec.todo("cellGameGetHomeLaunchOptionPath(commonPath=%s, personalPath=%s)", commonPath, personalPath);
@@ -58,13 +58,13 @@ s32 cellGameGetHomeLaunchOptionPath(vm::ptr<char> commonPath, vm::ptr<char> pers
return CELL_GAME_ERROR_NOAPP;
}
s32 cellGameExecGame()
error_code cellGameExecGame()
{
UNIMPLEMENTED_FUNC(cellGameExec);
return CELL_OK;
}
s32 cellGameGetBootGameInfo(vm::ptr<u32> type, vm::ptr<char> dirName, vm::ptr<u32> execdata)
error_code cellGameGetBootGameInfo(vm::ptr<u32> type, vm::ptr<char> dirName, vm::ptr<u32> execdata)
{
cellGameExec.todo("cellGameGetBootGameInfo(type=*0x%x, dirName=%s, execdata=*0x%x)", type, dirName, execdata);
+33 -12
View File
@@ -11,6 +11,27 @@
LOG_CHANNEL(cellGifDec);
template <>
void fmt_class_string<CellGifDecError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_GIFDEC_ERROR_OPEN_FILE);
STR_CASE(CELL_GIFDEC_ERROR_STREAM_FORMAT);
STR_CASE(CELL_GIFDEC_ERROR_SEQ);
STR_CASE(CELL_GIFDEC_ERROR_ARG);
STR_CASE(CELL_GIFDEC_ERROR_FATAL);
STR_CASE(CELL_GIFDEC_ERROR_SPU_UNSUPPORT);
STR_CASE(CELL_GIFDEC_ERROR_SPU_ERROR);
STR_CASE(CELL_GIFDEC_ERROR_CB_PARAM);
}
return unknown;
});
}
// cellGifDec aliases (only for cellGifDec.cpp)
using PPMainHandle = vm::pptr<GifDecoder>;
using PMainHandle = vm::ptr<GifDecoder>;
@@ -28,19 +49,19 @@ using POutParam = vm::ptr<CellGifDecOutParam>;
using PDataCtrlParam = vm::cptr<CellGifDecDataCtrlParam>;
using PDataOutInfo = vm::ptr<CellGifDecDataOutInfo>;
s32 cellGifDecCreate(PPMainHandle mainHandle, PThreadInParam threadInParam, PThreadOutParam threadOutParam)
error_code cellGifDecCreate(PPMainHandle mainHandle, PThreadInParam threadInParam, PThreadOutParam threadOutParam)
{
UNIMPLEMENTED_FUNC(cellGifDec);
return CELL_OK;
}
s32 cellGifDecExtCreate(PPMainHandle mainHandle, PThreadInParam threadInParam, PThreadOutParam threadOutParam, PExtThreadInParam extThreadInParam, PExtThreadOutParam extThreadOutParam)
error_code cellGifDecExtCreate(PPMainHandle mainHandle, PThreadInParam threadInParam, PThreadOutParam threadOutParam, PExtThreadInParam extThreadInParam, PExtThreadOutParam extThreadOutParam)
{
UNIMPLEMENTED_FUNC(cellGifDec);
return CELL_OK;
}
s32 cellGifDecOpen(PMainHandle mainHandle, PPSubHandle subHandle, PSrc src, POpenInfo openInfo)
error_code cellGifDecOpen(PMainHandle mainHandle, PPSubHandle subHandle, PSrc src, POpenInfo openInfo)
{
cellGifDec.warning("cellGifDecOpen(mainHandle=*0x%x, subHandle=**0x%x, src=*0x%x, openInfo=*0x%x)", mainHandle, subHandle, src, openInfo);
@@ -73,13 +94,13 @@ s32 cellGifDecOpen(PMainHandle mainHandle, PPSubHandle subHandle, PSrc src, POpe
return CELL_OK;
}
s32 cellGifDecExtOpen()
error_code cellGifDecExtOpen()
{
cellGifDec.todo("cellGifDecExtOpen()");
return CELL_OK;
}
s32 cellGifDecReadHeader(PMainHandle mainHandle, PSubHandle subHandle, PInfo info)
error_code cellGifDecReadHeader(PMainHandle mainHandle, PSubHandle subHandle, PInfo info)
{
cellGifDec.warning("cellGifDecReadHeader(mainHandle=*0x%x, subHandle=*0x%x, info=*0x%x)", mainHandle, subHandle, info);
@@ -126,13 +147,13 @@ s32 cellGifDecReadHeader(PMainHandle mainHandle, PSubHandle subHandle, PInfo inf
return CELL_OK;
}
s32 cellGifDecExtReadHeader()
error_code cellGifDecExtReadHeader()
{
cellGifDec.todo("cellGifDecExtReadHeader()");
return CELL_OK;
}
s32 cellGifDecSetParameter(PMainHandle mainHandle, PSubHandle subHandle, PInParam inParam, POutParam outParam)
error_code cellGifDecSetParameter(PMainHandle mainHandle, PSubHandle subHandle, PInParam inParam, POutParam outParam)
{
cellGifDec.warning("cellGifDecSetParameter(mainHandle=*0x%x, subHandle=*0x%x, inParam=*0x%x, outParam=*0x%x)", mainHandle, subHandle, inParam, outParam);
@@ -157,13 +178,13 @@ s32 cellGifDecSetParameter(PMainHandle mainHandle, PSubHandle subHandle, PInPara
return CELL_OK;
}
s32 cellGifDecExtSetParameter()
error_code cellGifDecExtSetParameter()
{
cellGifDec.todo("cellGifDecExtSetParameter()");
return CELL_OK;
}
s32 cellGifDecDecodeData(PMainHandle mainHandle, PSubHandle subHandle, vm::ptr<u8> data, PDataCtrlParam dataCtrlParam, PDataOutInfo dataOutInfo)
error_code cellGifDecDecodeData(PMainHandle mainHandle, PSubHandle subHandle, vm::ptr<u8> data, PDataCtrlParam dataCtrlParam, PDataOutInfo dataOutInfo)
{
cellGifDec.warning("cellGifDecDecodeData(mainHandle=*0x%x, subHandle=*0x%x, data=*0x%x, dataCtrlParam=*0x%x, dataOutInfo=*0x%x)", mainHandle, subHandle, data, dataCtrlParam, dataOutInfo);
@@ -275,13 +296,13 @@ s32 cellGifDecDecodeData(PMainHandle mainHandle, PSubHandle subHandle, vm::ptr<u
return CELL_OK;
}
s32 cellGifDecExtDecodeData()
error_code cellGifDecExtDecodeData()
{
cellGifDec.todo("cellGifDecExtDecodeData()");
return CELL_OK;
}
s32 cellGifDecClose(PMainHandle mainHandle, PSubHandle subHandle)
error_code cellGifDecClose(PMainHandle mainHandle, PSubHandle subHandle)
{
cellGifDec.warning("cellGifDecClose(mainHandle=*0x%x, subHandle=*0x%x)", mainHandle, subHandle);
@@ -292,7 +313,7 @@ s32 cellGifDecClose(PMainHandle mainHandle, PSubHandle subHandle)
return CELL_OK;
}
s32 cellGifDecDestroy(PMainHandle mainHandle)
error_code cellGifDecDestroy(PMainHandle mainHandle)
{
UNIMPLEMENTED_FUNC(cellGifDec);
return CELL_OK;
+2 -2
View File
@@ -1,9 +1,9 @@
#pragma once
#pragma once
#include "Emu/Memory/vm_ptr.h"
// Return Codes
enum
enum CellGifDecError : u32
{
CELL_GIFDEC_ERROR_OPEN_FILE = 0x80611300,
CELL_GIFDEC_ERROR_STREAM_FORMAT = 0x80611301,
+120 -120
View File
@@ -5,721 +5,721 @@
LOG_CHANNEL(cellHttp);
s32 cellHttpAuthCacheExport()
error_code cellHttpAuthCacheExport()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpAuthCacheFlush()
error_code cellHttpAuthCacheFlush()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpAuthCacheGetEntryMax()
error_code cellHttpAuthCacheGetEntryMax()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpAuthCacheImport()
error_code cellHttpAuthCacheImport()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpAuthCacheSetEntryMax()
error_code cellHttpAuthCacheSetEntryMax()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpInit()
error_code cellHttpInit()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpEnd()
error_code cellHttpEnd()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpsInit()
error_code cellHttpsInit()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpsEnd()
error_code cellHttpsEnd()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpSetProxy()
error_code cellHttpSetProxy()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpGetCookie()
error_code cellHttpGetCookie()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpGetProxy()
error_code cellHttpGetProxy()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpInitCookie()
error_code cellHttpInitCookie()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpEndCookie()
error_code cellHttpEndCookie()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpAddCookieWithClientId()
error_code cellHttpAddCookieWithClientId()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpSessionCookieFlush()
error_code cellHttpSessionCookieFlush()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpCookieExport()
error_code cellHttpCookieExport()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpCookieExportWithClientId()
error_code cellHttpCookieExportWithClientId()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpCookieFlush()
error_code cellHttpCookieFlush()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpCookieImport()
error_code cellHttpCookieImport()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpCookieImportWithClientId()
error_code cellHttpCookieImportWithClientId()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetCookieSendCallback()
error_code cellHttpClientSetCookieSendCallback()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetCookieRecvCallback()
error_code cellHttpClientSetCookieRecvCallback()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpCreateClient()
error_code cellHttpCreateClient()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpDestroyClient()
error_code cellHttpDestroyClient()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetAuthenticationCallback()
error_code cellHttpClientSetAuthenticationCallback()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetTransactionStateCallback()
error_code cellHttpClientSetTransactionStateCallback()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetRedirectCallback()
error_code cellHttpClientSetRedirectCallback()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetProxy()
error_code cellHttpClientSetProxy()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetProxy()
error_code cellHttpClientGetProxy()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetVersion()
error_code cellHttpClientSetVersion()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetVersion()
error_code cellHttpClientGetVersion()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetPipeline()
error_code cellHttpClientSetPipeline()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetPipeline()
error_code cellHttpClientGetPipeline()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetKeepAlive()
error_code cellHttpClientSetKeepAlive()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetKeepAlive()
error_code cellHttpClientGetKeepAlive()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetAutoRedirect()
error_code cellHttpClientSetAutoRedirect()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetAutoRedirect()
error_code cellHttpClientGetAutoRedirect()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetAutoAuthentication()
error_code cellHttpClientSetAutoAuthentication()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetAutoAuthentication()
error_code cellHttpClientGetAutoAuthentication()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetAuthenticationCacheStatus()
error_code cellHttpClientSetAuthenticationCacheStatus()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetAuthenticationCacheStatus()
error_code cellHttpClientGetAuthenticationCacheStatus()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetCookieStatus()
error_code cellHttpClientSetCookieStatus()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetCookieStatus()
error_code cellHttpClientGetCookieStatus()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetUserAgent()
error_code cellHttpClientSetUserAgent()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetUserAgent()
error_code cellHttpClientGetUserAgent()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetResponseBufferMax()
error_code cellHttpClientSetResponseBufferMax()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetResponseBufferMax()
error_code cellHttpClientGetResponseBufferMax()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientCloseAllConnections()
error_code cellHttpClientCloseAllConnections()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientCloseConnections()
error_code cellHttpClientCloseConnections()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientPollConnections()
error_code cellHttpClientPollConnections()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetConnectionStateCallback()
error_code cellHttpClientSetConnectionStateCallback()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetConnectionWaitStatus()
error_code cellHttpClientSetConnectionWaitStatus()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetConnectionWaitStatus()
error_code cellHttpClientGetConnectionWaitStatus()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetConnectionWaitTimeout()
error_code cellHttpClientSetConnectionWaitTimeout()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetConnectionWaitTimeout()
error_code cellHttpClientGetConnectionWaitTimeout()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetRecvTimeout()
error_code cellHttpClientSetRecvTimeout()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetRecvTimeout()
error_code cellHttpClientGetRecvTimeout()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetSendTimeout()
error_code cellHttpClientSetSendTimeout()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetSendTimeout()
error_code cellHttpClientGetSendTimeout()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetConnTimeout()
error_code cellHttpClientSetConnTimeout()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetConnTimeout()
error_code cellHttpClientGetConnTimeout()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetTotalPoolSize()
error_code cellHttpClientSetTotalPoolSize()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetTotalPoolSize()
error_code cellHttpClientGetTotalPoolSize()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetPerHostPoolSize()
error_code cellHttpClientSetPerHostPoolSize()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetPerHostPoolSize()
error_code cellHttpClientGetPerHostPoolSize()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetPerHostKeepAliveMax()
error_code cellHttpClientSetPerHostKeepAliveMax()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetPerHostKeepAliveMax()
error_code cellHttpClientGetPerHostKeepAliveMax()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetPerPipelineMax()
error_code cellHttpClientSetPerPipelineMax()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetPerPipelineMax()
error_code cellHttpClientGetPerPipelineMax()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetRecvBufferSize()
error_code cellHttpClientSetRecvBufferSize()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetRecvBufferSize()
error_code cellHttpClientGetRecvBufferSize()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetSendBufferSize()
error_code cellHttpClientSetSendBufferSize()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetSendBufferSize()
error_code cellHttpClientGetSendBufferSize()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetAllHeaders()
error_code cellHttpClientGetAllHeaders()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetHeader()
error_code cellHttpClientSetHeader()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetHeader()
error_code cellHttpClientGetHeader()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientAddHeader()
error_code cellHttpClientAddHeader()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientDeleteHeader()
error_code cellHttpClientDeleteHeader()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetSslCallback()
error_code cellHttpClientSetSslCallback()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetSslClientCertificate()
error_code cellHttpClientSetSslClientCertificate()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpCreateTransaction()
error_code cellHttpCreateTransaction()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpDestroyTransaction()
error_code cellHttpDestroyTransaction()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpTransactionGetUri()
error_code cellHttpTransactionGetUri()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpTransactionCloseConnection()
error_code cellHttpTransactionCloseConnection()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpTransactionReleaseConnection()
error_code cellHttpTransactionReleaseConnection()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpTransactionAbortConnection()
error_code cellHttpTransactionAbortConnection()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpSendRequest()
error_code cellHttpSendRequest()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpRequestSetContentLength()
error_code cellHttpRequestSetContentLength()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpRequestGetContentLength()
error_code cellHttpRequestGetContentLength()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpRequestSetChunkedTransferStatus()
error_code cellHttpRequestSetChunkedTransferStatus()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpRequestGetChunkedTransferStatus()
error_code cellHttpRequestGetChunkedTransferStatus()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpRequestGetAllHeaders()
error_code cellHttpRequestGetAllHeaders()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpRequestSetHeader()
error_code cellHttpRequestSetHeader()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpRequestGetHeader()
error_code cellHttpRequestGetHeader()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpRequestAddHeader()
error_code cellHttpRequestAddHeader()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpRequestDeleteHeader()
error_code cellHttpRequestDeleteHeader()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpRecvResponse()
error_code cellHttpRecvResponse()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpResponseGetAllHeaders()
error_code cellHttpResponseGetAllHeaders()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpResponseGetHeader()
error_code cellHttpResponseGetHeader()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpResponseGetContentLength()
error_code cellHttpResponseGetContentLength()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpResponseGetStatusCode()
error_code cellHttpResponseGetStatusCode()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpResponseGetStatusLine()
error_code cellHttpResponseGetStatusLine()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpTransactionGetSslCipherName()
error_code cellHttpTransactionGetSslCipherName()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpTransactionGetSslCipherId()
error_code cellHttpTransactionGetSslCipherId()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpTransactionGetSslCipherVersion()
error_code cellHttpTransactionGetSslCipherVersion()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpTransactionGetSslCipherBits()
error_code cellHttpTransactionGetSslCipherBits()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpTransactionGetSslCipherString()
error_code cellHttpTransactionGetSslCipherString()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpTransactionGetSslVersion()
error_code cellHttpTransactionGetSslVersion()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpTransactionGetSslId()
error_code cellHttpTransactionGetSslId()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetMinSslVersion()
error_code cellHttpClientSetMinSslVersion()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetMinSslVersion()
error_code cellHttpClientGetMinSslVersion()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetSslVersion()
error_code cellHttpClientSetSslVersion()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientGetSslVersion()
error_code cellHttpClientGetSslVersion()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpClientSetSslIdDestroyCallback()
error_code cellHttpClientSetSslIdDestroyCallback()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpFlushCache()
error_code cellHttpFlushCache()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpEndCache()
error_code cellHttpEndCache()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpInitCache()
error_code cellHttpInitCache()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpGetCacheInfo()
error_code cellHttpGetCacheInfo()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
}
s32 cellHttpGetMemoryInfo()
error_code cellHttpGetMemoryInfo()
{
UNIMPLEMENTED_FUNC(cellHttp);
return CELL_OK;
+44 -21
View File
@@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "Utilities/LUrlParser.h"
@@ -13,7 +13,30 @@
LOG_CHANNEL(cellHttpUtil);
s32 cellHttpUtilParseUri(vm::ptr<CellHttpUri> uri, vm::cptr<char> str, vm::ptr<void> pool, u32 size, vm::ptr<u32> required)
template <>
void fmt_class_string<CellHttpUtilError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_HTTP_UTIL_ERROR_NO_MEMORY);
STR_CASE(CELL_HTTP_UTIL_ERROR_NO_BUFFER);
STR_CASE(CELL_HTTP_UTIL_ERROR_NO_STRING);
STR_CASE(CELL_HTTP_UTIL_ERROR_INSUFFICIENT);
STR_CASE(CELL_HTTP_UTIL_ERROR_INVALID_URI);
STR_CASE(CELL_HTTP_UTIL_ERROR_INVALID_HEADER);
STR_CASE(CELL_HTTP_UTIL_ERROR_INVALID_REQUEST);
STR_CASE(CELL_HTTP_UTIL_ERROR_INVALID_RESPONSE);
STR_CASE(CELL_HTTP_UTIL_ERROR_INVALID_LENGTH);
STR_CASE(CELL_HTTP_UTIL_ERROR_INVALID_CHARACTER);
}
return unknown;
});
}
error_code cellHttpUtilParseUri(vm::ptr<CellHttpUri> uri, vm::cptr<char> str, vm::ptr<void> pool, u32 size, vm::ptr<u32> required)
{
cellHttpUtil.trace("cellHttpUtilParseUri(uri=*0x%x, str=%s, pool=*0x%x, size=%d, required=*0x%x)", uri, str, pool, size, required);
LUrlParser::clParseURL URL = LUrlParser::clParseURL::ParseURL(str.get_ptr());
@@ -102,31 +125,31 @@ s32 cellHttpUtilParseUri(vm::ptr<CellHttpUri> uri, vm::cptr<char> str, vm::ptr<v
}
}
s32 cellHttpUtilParseUriPath(vm::ptr<CellHttpUriPath> path, vm::cptr<char> str, vm::ptr<void> pool, u32 size, vm::ptr<u32> required)
error_code cellHttpUtilParseUriPath(vm::ptr<CellHttpUriPath> path, vm::cptr<char> str, vm::ptr<void> pool, u32 size, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilParseUriPath(path=*0x%x, str=%s, pool=*0x%x, size=%d, required=*0x%x)", path, str, pool, size, required);
return CELL_OK;
}
s32 cellHttpUtilParseProxy(vm::ptr<CellHttpUri> uri, vm::cptr<char> str, vm::ptr<void> pool, u32 size, vm::ptr<u32> required)
error_code cellHttpUtilParseProxy(vm::ptr<CellHttpUri> uri, vm::cptr<char> str, vm::ptr<void> pool, u32 size, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilParseProxy(uri=*0x%x, str=%s, pool=*0x%x, size=%d, required=*0x%x)", uri, str, pool, size, required);
return CELL_OK;
}
s32 cellHttpUtilParseStatusLine(vm::ptr<CellHttpStatusLine> resp, vm::cptr<char> str, u32 len, vm::ptr<void> pool, u32 size, vm::ptr<u32> required, vm::ptr<u32> parsedLength)
error_code cellHttpUtilParseStatusLine(vm::ptr<CellHttpStatusLine> resp, vm::cptr<char> str, u32 len, vm::ptr<void> pool, u32 size, vm::ptr<u32> required, vm::ptr<u32> parsedLength)
{
cellHttpUtil.todo("cellHttpUtilParseStatusLine(resp=*0x%x, str=%s, len=%d, pool=*0x%x, size=%d, required=*0x%x, parsedLength=*0x%x)", resp, str, len, pool, size, required, parsedLength);
return CELL_OK;
}
s32 cellHttpUtilParseHeader(vm::ptr<CellHttpHeader> header, vm::cptr<char> str, u32 len, vm::ptr<void> pool, u32 size, vm::ptr<u32> required, vm::ptr<u32> parsedLength)
error_code cellHttpUtilParseHeader(vm::ptr<CellHttpHeader> header, vm::cptr<char> str, u32 len, vm::ptr<void> pool, u32 size, vm::ptr<u32> required, vm::ptr<u32> parsedLength)
{
cellHttpUtil.todo("cellHttpUtilParseHeader(header=*0x%x, str=%s, len=%d, pool=*0x%x, size=%d, required=*0x%x, parsedLength=*0x%x)", header, str, len, pool, size, required, parsedLength);
return CELL_OK;
}
s32 cellHttpUtilBuildRequestLine(vm::cptr<CellHttpRequestLine> req, vm::ptr<char> buf, u32 len, vm::ptr<u32> required)
error_code cellHttpUtilBuildRequestLine(vm::cptr<CellHttpRequestLine> req, vm::ptr<char> buf, u32 len, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilBuildRequestLine(req=*0x%x, buf=*0x%x, len=%d, required=*0x%x)", req, buf, len, required);
@@ -142,7 +165,7 @@ s32 cellHttpUtilBuildRequestLine(vm::cptr<CellHttpRequestLine> req, vm::ptr<char
return CELL_OK;
}
s32 cellHttpUtilBuildHeader(vm::cptr<CellHttpHeader> header, vm::ptr<char> buf, u32 len, vm::ptr<u32> required)
error_code cellHttpUtilBuildHeader(vm::cptr<CellHttpHeader> header, vm::ptr<char> buf, u32 len, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilBuildHeader(header=*0x%x, buf=*0x%x, len=%d, required=*0x%x)", header, buf, len, required);
@@ -158,7 +181,7 @@ s32 cellHttpUtilBuildHeader(vm::cptr<CellHttpHeader> header, vm::ptr<char> buf,
return CELL_OK;
}
s32 cellHttpUtilBuildUri(vm::cptr<CellHttpUri> uri, vm::ptr<char> buf, u32 len, vm::ptr<u32> required, s32 flags)
error_code cellHttpUtilBuildUri(vm::cptr<CellHttpUri> uri, vm::ptr<char> buf, u32 len, vm::ptr<u32> required, s32 flags)
{
cellHttpUtil.todo("cellHttpUtilBuildUri(uri=*0x%x, buf=*0x%x, len=%d, required=*0x%x, flags=%d)", uri, buf, len, required, flags);
@@ -170,73 +193,73 @@ s32 cellHttpUtilBuildUri(vm::cptr<CellHttpUri> uri, vm::ptr<char> buf, u32 len,
return CELL_OK;
}
s32 cellHttpUtilCopyUri(vm::ptr<CellHttpUri> dest, vm::cptr<CellHttpUri> src, vm::ptr<void> pool, u32 poolSize, vm::ptr<u32> required)
error_code cellHttpUtilCopyUri(vm::ptr<CellHttpUri> dest, vm::cptr<CellHttpUri> src, vm::ptr<void> pool, u32 poolSize, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilCopyUri(dest=*0x%x, src=*0x%x, pool=*0x%x, poolSize=%d, required=*0x%x)", dest, src, pool, poolSize, required);
return CELL_OK;
}
s32 cellHttpUtilMergeUriPath(vm::ptr<CellHttpUri> uri, vm::cptr<CellHttpUri> src, vm::cptr<char> path, vm::ptr<void> pool, u32 poolSize, vm::ptr<u32> required)
error_code cellHttpUtilMergeUriPath(vm::ptr<CellHttpUri> uri, vm::cptr<CellHttpUri> src, vm::cptr<char> path, vm::ptr<void> pool, u32 poolSize, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilMergeUriPath(uri=*0x%x, src=*0x%x, path=%s, pool=*0x%x, poolSize=%d, required=*0x%x)", uri, src, path, pool, poolSize, required);
return CELL_OK;
}
s32 cellHttpUtilSweepPath(vm::ptr<char> dst, vm::cptr<char> src, u32 srcSize)
error_code cellHttpUtilSweepPath(vm::ptr<char> dst, vm::cptr<char> src, u32 srcSize)
{
cellHttpUtil.todo("cellHttpUtilSweepPath(dst=*0x%x, src=%s, srcSize=%d)", dst, src, srcSize);
return CELL_OK;
}
s32 cellHttpUtilCopyStatusLine(vm::ptr<CellHttpStatusLine> dest, vm::cptr<CellHttpStatusLine> src, vm::ptr<void> pool, u32 poolSize, vm::ptr<u32> required)
error_code cellHttpUtilCopyStatusLine(vm::ptr<CellHttpStatusLine> dest, vm::cptr<CellHttpStatusLine> src, vm::ptr<void> pool, u32 poolSize, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilCopyStatusLine(dest=*0x%x, src=*0x%x, pool=*0x%x, poolSize=%d, required=*0x%x)", dest, src, pool, poolSize, required);
return CELL_OK;
}
s32 cellHttpUtilCopyHeader(vm::ptr<CellHttpHeader> dest, vm::cptr<CellHttpHeader> src, vm::ptr<void> pool, u32 poolSize, vm::ptr<u32> required)
error_code cellHttpUtilCopyHeader(vm::ptr<CellHttpHeader> dest, vm::cptr<CellHttpHeader> src, vm::ptr<void> pool, u32 poolSize, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilCopyHeader(dest=*0x%x, src=*0x%x, pool=*0x%x, poolSize=%d, required=*0x%x)", dest, src, pool, poolSize, required);
return CELL_OK;
}
s32 cellHttpUtilAppendHeaderValue(vm::ptr<CellHttpHeader> dest, vm::cptr<CellHttpHeader> src, vm::cptr<char> value, vm::ptr<void> pool, u32 poolSize, vm::ptr<u32> required)
error_code cellHttpUtilAppendHeaderValue(vm::ptr<CellHttpHeader> dest, vm::cptr<CellHttpHeader> src, vm::cptr<char> value, vm::ptr<void> pool, u32 poolSize, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilAppendHeaderValue(dest=*0x%x, src=*0x%x, value=%s, pool=*0x%x, poolSize=%d, required=*0x%x)", dest, src, value, pool, poolSize, required);
return CELL_OK;
}
s32 cellHttpUtilEscapeUri(vm::ptr<char> out, u32 outSize, vm::cptr<u8> in, u32 inSize, vm::ptr<u32> required)
error_code cellHttpUtilEscapeUri(vm::ptr<char> out, u32 outSize, vm::cptr<u8> in, u32 inSize, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilEscapeUri(out=*0x%x, outSize=%d, in=*0x%x, inSize=%d, required=*0x%x)", out, outSize, in, inSize, required);
return CELL_OK;
}
s32 cellHttpUtilUnescapeUri(vm::ptr<u8> out, u32 size, vm::cptr<char> in, vm::ptr<u32> required)
error_code cellHttpUtilUnescapeUri(vm::ptr<u8> out, u32 size, vm::cptr<char> in, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilUnescapeUri(out=*0x%x, size=%d, in=*0x%x, required=*0x%x)", out, size, in, required);
return CELL_OK;
}
s32 cellHttpUtilFormUrlEncode(vm::ptr<char> out, u32 outSize, vm::cptr<u8> in, u32 inSize, vm::ptr<u32> required)
error_code cellHttpUtilFormUrlEncode(vm::ptr<char> out, u32 outSize, vm::cptr<u8> in, u32 inSize, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilFormUrlEncode(out=*0x%x, outSize=%d, in=*0x%x, inSize=%d, required=*0x%x)", out, outSize, in, inSize, required);
return CELL_OK;
}
s32 cellHttpUtilFormUrlDecode(vm::ptr<u8> out, u32 size, vm::cptr<char> in, vm::ptr<u32> required)
error_code cellHttpUtilFormUrlDecode(vm::ptr<u8> out, u32 size, vm::cptr<char> in, vm::ptr<u32> required)
{
cellHttpUtil.todo("cellHttpUtilFormUrlDecode(out=*0x%x, size=%d, in=%s, required=*0x%x)", out, size, in, required);
return CELL_OK;
}
s32 cellHttpUtilBase64Encoder(vm::ptr<char> out, vm::cptr<void> input, u32 len)
error_code cellHttpUtilBase64Encoder(vm::ptr<char> out, vm::cptr<void> input, u32 len)
{
cellHttpUtil.todo("cellHttpUtilBase64Encoder(out=*0x%x, input=*0x%x, len=%d)", out, input, len);
return CELL_OK;
}
s32 cellHttpUtilBase64Decoder(vm::ptr<char> output, vm::cptr<void> in, u32 len)
error_code cellHttpUtilBase64Decoder(vm::ptr<char> output, vm::cptr<void> in, u32 len)
{
cellHttpUtil.todo("cellHttpUtilBase64Decoder(output=*0x%x, in=*0x%x, len=%d)", output, in, len);
return CELL_OK;
+2 -2
View File
@@ -1,11 +1,11 @@
#pragma once
#pragma once
#include "Emu/Memory/vm_ptr.h"
// libHttp_Util: 0x80711001 - 0x807110ff
// Error Codes
enum
enum CellHttpUtilError : u32
{
CELL_HTTP_UTIL_ERROR_NO_MEMORY = 0x80711001,
CELL_HTTP_UTIL_ERROR_NO_BUFFER = 0x80711002,
+34 -12
View File
@@ -11,25 +11,47 @@
LOG_CHANNEL(cellJpgDec);
s32 cellJpgDecCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam)
template <>
void fmt_class_string<CellJpgDecError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_JPGDEC_ERROR_HEADER);
STR_CASE(CELL_JPGDEC_ERROR_STREAM_FORMAT);
STR_CASE(CELL_JPGDEC_ERROR_ARG);
STR_CASE(CELL_JPGDEC_ERROR_SEQ);
STR_CASE(CELL_JPGDEC_ERROR_BUSY);
STR_CASE(CELL_JPGDEC_ERROR_FATAL);
STR_CASE(CELL_JPGDEC_ERROR_OPEN_FILE);
STR_CASE(CELL_JPGDEC_ERROR_SPU_UNSUPPORT);
STR_CASE(CELL_JPGDEC_ERROR_CB_PARAM);
}
return unknown;
});
}
error_code cellJpgDecCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam)
{
UNIMPLEMENTED_FUNC(cellJpgDec);
return CELL_OK;
}
s32 cellJpgDecExtCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam, u32 extThreadInParam, u32 extThreadOutParam)
error_code cellJpgDecExtCreate(u32 mainHandle, u32 threadInParam, u32 threadOutParam, u32 extThreadInParam, u32 extThreadOutParam)
{
UNIMPLEMENTED_FUNC(cellJpgDec);
return CELL_OK;
}
s32 cellJpgDecDestroy(u32 mainHandle)
error_code cellJpgDecDestroy(u32 mainHandle)
{
UNIMPLEMENTED_FUNC(cellJpgDec);
return CELL_OK;
}
s32 cellJpgDecOpen(u32 mainHandle, vm::ptr<u32> subHandle, vm::ptr<CellJpgDecSrc> src, vm::ptr<CellJpgDecOpnInfo> openInfo)
error_code cellJpgDecOpen(u32 mainHandle, vm::ptr<u32> subHandle, vm::ptr<CellJpgDecSrc> src, vm::ptr<CellJpgDecOpnInfo> openInfo)
{
cellJpgDec.warning("cellJpgDecOpen(mainHandle=0x%x, subHandle=*0x%x, src=*0x%x, openInfo=*0x%x)", mainHandle, subHandle, src, openInfo);
@@ -62,13 +84,13 @@ s32 cellJpgDecOpen(u32 mainHandle, vm::ptr<u32> subHandle, vm::ptr<CellJpgDecSrc
return CELL_OK;
}
s32 cellJpgDecExtOpen()
error_code cellJpgDecExtOpen()
{
cellJpgDec.todo("cellJpgDecExtOpen()");
return CELL_OK;
}
s32 cellJpgDecClose(u32 mainHandle, u32 subHandle)
error_code cellJpgDecClose(u32 mainHandle, u32 subHandle)
{
cellJpgDec.warning("cellJpgDecOpen(mainHandle=0x%x, subHandle=0x%x)", mainHandle, subHandle);
@@ -85,7 +107,7 @@ s32 cellJpgDecClose(u32 mainHandle, u32 subHandle)
return CELL_OK;
}
s32 cellJpgDecReadHeader(u32 mainHandle, u32 subHandle, vm::ptr<CellJpgDecInfo> info)
error_code cellJpgDecReadHeader(u32 mainHandle, u32 subHandle, vm::ptr<CellJpgDecInfo> info)
{
cellJpgDec.trace("cellJpgDecReadHeader(mainHandle=0x%x, subHandle=0x%x, info=*0x%x)", mainHandle, subHandle, info);
@@ -157,13 +179,13 @@ s32 cellJpgDecReadHeader(u32 mainHandle, u32 subHandle, vm::ptr<CellJpgDecInfo>
return CELL_OK;
}
s32 cellJpgDecExtReadHeader()
error_code cellJpgDecExtReadHeader()
{
cellJpgDec.todo("cellJpgDecExtReadHeader()");
return CELL_OK;
}
s32 cellJpgDecDecodeData(u32 mainHandle, u32 subHandle, vm::ptr<u8> data, vm::cptr<CellJpgDecDataCtrlParam> dataCtrlParam, vm::ptr<CellJpgDecDataOutInfo> dataOutInfo)
error_code cellJpgDecDecodeData(u32 mainHandle, u32 subHandle, vm::ptr<u8> data, vm::cptr<CellJpgDecDataCtrlParam> dataCtrlParam, vm::ptr<CellJpgDecDataOutInfo> dataOutInfo)
{
cellJpgDec.trace("cellJpgDecDecodeData(mainHandle=0x%x, subHandle=0x%x, data=*0x%x, dataCtrlParam=*0x%x, dataOutInfo=*0x%x)", mainHandle, subHandle, data, dataCtrlParam, dataOutInfo);
@@ -297,13 +319,13 @@ s32 cellJpgDecDecodeData(u32 mainHandle, u32 subHandle, vm::ptr<u8> data, vm::cp
return CELL_OK;
}
s32 cellJpgDecExtDecodeData()
error_code cellJpgDecExtDecodeData()
{
cellJpgDec.todo("cellJpgDecExtDecodeData()");
return CELL_OK;
}
s32 cellJpgDecSetParameter(u32 mainHandle, u32 subHandle, vm::cptr<CellJpgDecInParam> inParam, vm::ptr<CellJpgDecOutParam> outParam)
error_code cellJpgDecSetParameter(u32 mainHandle, u32 subHandle, vm::cptr<CellJpgDecInParam> inParam, vm::ptr<CellJpgDecOutParam> outParam)
{
cellJpgDec.trace("cellJpgDecSetParameter(mainHandle=0x%x, subHandle=0x%x, inParam=*0x%x, outParam=*0x%x)", mainHandle, subHandle, inParam, outParam);
@@ -348,7 +370,7 @@ s32 cellJpgDecSetParameter(u32 mainHandle, u32 subHandle, vm::cptr<CellJpgDecInP
return CELL_OK;
}
s32 cellJpgDecExtSetParameter()
error_code cellJpgDecExtSetParameter()
{
cellJpgDec.todo("cellJpgDecExtSetParameter()");
return CELL_OK;
+2 -2
View File
@@ -1,9 +1,9 @@
#pragma once
#pragma once
#include "Utilities/BEType.h"
//Return Codes
enum
enum CellJpgDecError : u32
{
CELL_JPGDEC_ERROR_HEADER = 0x80611101,
CELL_JPGDEC_ERROR_STREAM_FORMAT = 0x80611102,
+24 -1
View File
@@ -1,10 +1,33 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "cellJpgEnc.h"
LOG_CHANNEL(cellJpgEnc);
template <>
void fmt_class_string<CellJpgEncError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_JPGENC_ERROR_ARG);
STR_CASE(CELL_JPGENC_ERROR_SEQ);
STR_CASE(CELL_JPGENC_ERROR_BUSY);
STR_CASE(CELL_JPGENC_ERROR_EMPTY);
STR_CASE(CELL_JPGENC_ERROR_RESET);
STR_CASE(CELL_JPGENC_ERROR_FATAL);
STR_CASE(CELL_JPGENC_ERROR_STREAM_ABORT);
STR_CASE(CELL_JPGENC_ERROR_STREAM_SKIP);
STR_CASE(CELL_JPGENC_ERROR_STREAM_OVERFLOW);
STR_CASE(CELL_JPGENC_ERROR_STREAM_FILE_OPEN);
}
return unknown;
});
}
s32 cellJpgEncQueryAttr()
{
+2 -2
View File
@@ -1,9 +1,9 @@
#pragma once
#pragma once
// Error Codes
enum
enum CellJpgEncError : u32
{
CELL_JPGENC_ERROR_ARG = 0x80611191,
CELL_JPGENC_ERROR_SEQ = 0x80611192,
+5 -5
View File
@@ -1,27 +1,27 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
LOG_CHANNEL(cellLibprof);
s32 cellUserTraceInit()
error_code cellUserTraceInit()
{
UNIMPLEMENTED_FUNC(cellLibprof);
return CELL_OK;
}
s32 cellUserTraceRegister()
error_code cellUserTraceRegister()
{
UNIMPLEMENTED_FUNC(cellLibprof);
return CELL_OK;
}
s32 cellUserTraceUnregister()
error_code cellUserTraceUnregister()
{
UNIMPLEMENTED_FUNC(cellLibprof);
return CELL_OK;
}
s32 cellUserTraceTerminate()
error_code cellUserTraceTerminate()
{
UNIMPLEMENTED_FUNC(cellLibprof);
return CELL_OK;
+184 -125
View File
@@ -10,6 +10,64 @@
LOG_CHANNEL(cellMic);
template<>
void fmt_class_string<CellMicInError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_MICIN_ERROR_ALREADY_INIT);
STR_CASE(CELL_MICIN_ERROR_DEVICE);
STR_CASE(CELL_MICIN_ERROR_NOT_INIT);
STR_CASE(CELL_MICIN_ERROR_PARAM);
STR_CASE(CELL_MICIN_ERROR_PORT_FULL);
STR_CASE(CELL_MICIN_ERROR_ALREADY_OPEN);
STR_CASE(CELL_MICIN_ERROR_NOT_OPEN);
STR_CASE(CELL_MICIN_ERROR_NOT_RUN);
STR_CASE(CELL_MICIN_ERROR_TRANS_EVENT);
STR_CASE(CELL_MICIN_ERROR_OPEN);
STR_CASE(CELL_MICIN_ERROR_SHAREDMEMORY);
STR_CASE(CELL_MICIN_ERROR_MUTEX);
STR_CASE(CELL_MICIN_ERROR_EVENT_QUEUE);
STR_CASE(CELL_MICIN_ERROR_DEVICE_NOT_FOUND);
STR_CASE(CELL_MICIN_ERROR_FATAL);
STR_CASE(CELL_MICIN_ERROR_DEVICE_NOT_SUPPORT);
}
return unknown;
});
}
template<>
void fmt_class_string<CellMicInErrorDsp>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_MICIN_ERROR_DSP);
STR_CASE(CELL_MICIN_ERROR_DSP_ASSERT);
STR_CASE(CELL_MICIN_ERROR_DSP_PATH);
STR_CASE(CELL_MICIN_ERROR_DSP_FILE);
STR_CASE(CELL_MICIN_ERROR_DSP_PARAM);
STR_CASE(CELL_MICIN_ERROR_DSP_MEMALLOC);
STR_CASE(CELL_MICIN_ERROR_DSP_POINTER);
STR_CASE(CELL_MICIN_ERROR_DSP_FUNC);
STR_CASE(CELL_MICIN_ERROR_DSP_MEM);
STR_CASE(CELL_MICIN_ERROR_DSP_ALIGN16);
STR_CASE(CELL_MICIN_ERROR_DSP_ALIGN128);
STR_CASE(CELL_MICIN_ERROR_DSP_EAALIGN128);
STR_CASE(CELL_MICIN_ERROR_DSP_LIB_HANDLER);
STR_CASE(CELL_MICIN_ERROR_DSP_LIB_INPARAM);
STR_CASE(CELL_MICIN_ERROR_DSP_LIB_NOSPU);
STR_CASE(CELL_MICIN_ERROR_DSP_LIB_SAMPRATE);
}
return unknown;
});
}
void mic_context::operator()()
{
while (thread_ctrl::state() != thread_state::aborting)
@@ -52,7 +110,7 @@ void mic_context::operator()()
auto& mic = mic_entry.second;
if (mic.has_data())
{
mic_queue->send(0, CELL_MIC_DATA, mic_entry.first, 0);
mic_queue->send(0, CELLMIC_DATA, mic_entry.first, 0);
}
}
}
@@ -75,7 +133,7 @@ void mic_context::load_config_and_init()
{
case microphone_handler::standard:
{
for (u32 index = 0; index < device_list.size(); index++)
for (s32 index = 0; index < static_cast<s32>(device_list.size()); index++)
{
mic_list.emplace(std::piecewise_construct, std::forward_as_tuple(index), std::forward_as_tuple(microphone_handler::standard));
mic_list.at(index).add_device(device_list[index]);
@@ -125,7 +183,7 @@ void microphone_device::add_device(const std::string& name)
device_name.push_back(name);
}
s32 microphone_device::open_microphone(const u8 type, const u32 dsp_r, const u32 raw_r, const u8 channels)
error_code microphone_device::open_microphone(const u8 type, const u32 dsp_r, const u32 raw_r, const u8 channels)
{
signal_types = type;
dsp_samplingrate = dsp_r;
@@ -193,7 +251,7 @@ s32 microphone_device::open_microphone(const u8 type, const u32 dsp_r, const u32
#ifdef _WIN32
cellMic.error("Make sure microphone use is authorized under \"Microphone privacy settings\" in windows configuration");
#endif
return CELL_MIC_ERROR_DEVICE_NOT_SUPPORT;
return CELL_MICIN_ERROR_DEVICE_NOT_SUPPORT;
}
input_devices.push_back(device);
@@ -224,7 +282,7 @@ s32 microphone_device::open_microphone(const u8 type, const u32 dsp_r, const u32
return CELL_OK;
}
s32 microphone_device::close_microphone()
error_code microphone_device::close_microphone()
{
if (mic_started)
{
@@ -247,7 +305,7 @@ s32 microphone_device::close_microphone()
return CELL_OK;
}
s32 microphone_device::start_microphone()
error_code microphone_device::start_microphone()
{
for (const auto& micdevice : input_devices)
{
@@ -256,7 +314,7 @@ s32 microphone_device::start_microphone()
{
cellMic.error("Error starting capture");
stop_microphone();
return CELL_MIC_ERROR_FATAL;
return CELL_MICIN_ERROR_FATAL;
}
}
@@ -265,7 +323,7 @@ s32 microphone_device::start_microphone()
return CELL_OK;
}
s32 microphone_device::stop_microphone()
error_code microphone_device::stop_microphone()
{
for (const auto& micdevice : input_devices)
{
@@ -305,6 +363,8 @@ bool microphone_device::has_data() const
u32 microphone_device::capture_audio()
{
verify(HERE), sample_size > 0;
u32 num_samples = inbuf_size / sample_size;
for (const auto micdevice : input_devices)
@@ -314,7 +374,7 @@ u32 microphone_device::capture_audio()
if (alcGetError(micdevice) != ALC_NO_ERROR)
{
cellMic.error("Error getting number of captured samples");
return CELL_MIC_ERROR_FATAL;
return CELL_MICIN_ERROR_FATAL;
}
num_samples = std::min<u32>(num_samples, samples_in);
}
@@ -439,14 +499,14 @@ void microphone_device::get_dsp(const u32 num_samples)
/// Initialization/Shutdown Functions
s32 cellMicInit()
error_code cellMicInit()
{
cellMic.notice("cellMicInit()");
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (mic_thr->init)
return CELL_MIC_ERROR_ALREADY_INIT;
return CELL_MICIN_ERROR_ALREADY_INIT;
mic_thr->load_config_and_init();
mic_thr->init = 1;
@@ -454,14 +514,14 @@ s32 cellMicInit()
return CELL_OK;
}
s32 cellMicEnd(ppu_thread& ppu)
error_code cellMicEnd(ppu_thread& ppu)
{
cellMic.notice("cellMicEnd()");
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
// TODO
mic_thr->init = 0;
@@ -472,47 +532,47 @@ s32 cellMicEnd(ppu_thread& ppu)
/// Open/Close Microphone Functions
s32 cellMicOpen(u32 dev_num, u32 sampleRate)
error_code cellMicOpen(s32 dev_num, s32 sampleRate)
{
cellMic.trace("cellMicOpen(dev_num=%um sampleRate=%u)", dev_num, sampleRate);
cellMic.trace("cellMicOpen(dev_num=%d sampleRate=%d)", dev_num, sampleRate);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
if (!mic_thr->mic_list.count(dev_num))
return CELL_MIC_ERROR_DEVICE_NOT_FOUND;
return CELL_MICIN_ERROR_DEVICE_NOT_FOUND;
auto& device = mic_thr->mic_list.at(dev_num);
if (device.is_opened())
return CELL_MIC_ERROR_ALREADY_OPEN;
return CELL_MICIN_ERROR_ALREADY_OPEN;
return device.open_microphone(CELLMIC_SIGTYPE_DSP, sampleRate, sampleRate);
}
s32 cellMicOpenRaw(u32 dev_num, u32 sampleRate, u32 maxChannels)
error_code cellMicOpenRaw(s32 dev_num, s32 sampleRate, s32 maxChannels)
{
cellMic.trace("cellMicOpenRaw(dev_num=%d, sampleRate=%d, maxChannels=%d)", dev_num, sampleRate, maxChannels);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
if (!mic_thr->mic_list.count(dev_num))
return CELL_MIC_ERROR_DEVICE_NOT_FOUND;
return CELL_MICIN_ERROR_DEVICE_NOT_FOUND;
auto& device = mic_thr->mic_list.at(dev_num);
if (device.is_opened())
return CELL_MIC_ERROR_ALREADY_OPEN;
return CELL_MICIN_ERROR_ALREADY_OPEN;
return device.open_microphone(CELLMIC_SIGTYPE_DSP | CELLMIC_SIGTYPE_RAW, sampleRate, sampleRate, maxChannels);
}
s32 cellMicOpenEx(u32 dev_num, u32 rawSampleRate, u32 rawChannel, u32 DSPSampleRate, u32 bufferSizeMS, u8 signalType)
error_code cellMicOpenEx(s32 dev_num, s32 rawSampleRate, s32 rawChannel, s32 DSPSampleRate, s32 bufferSizeMS, u8 signalType)
{
cellMic.trace("cellMicOpenEx(dev_num=%d, rawSampleRate=%d, rawChannel=%d, DSPSampleRate=%d, bufferSizeMS=%d, signalType=0x%x)",
dev_num, rawSampleRate, rawChannel, DSPSampleRate, bufferSizeMS, signalType);
@@ -520,22 +580,22 @@ s32 cellMicOpenEx(u32 dev_num, u32 rawSampleRate, u32 rawChannel, u32 DSPSampleR
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
if (!mic_thr->mic_list.count(dev_num))
return CELL_MIC_ERROR_DEVICE_NOT_FOUND;
return CELL_MICIN_ERROR_DEVICE_NOT_FOUND;
auto& device = mic_thr->mic_list.at(dev_num);
if (device.is_opened())
return CELL_MIC_ERROR_ALREADY_OPEN;
return CELL_MICIN_ERROR_ALREADY_OPEN;
// TODO: bufferSizeMS
return device.open_microphone(signalType, DSPSampleRate, rawSampleRate, rawChannel);
}
u8 cellMicIsOpen(u32 dev_num)
u8 cellMicIsOpen(s32 dev_num)
{
cellMic.trace("cellMicIsOpen(dev_num=%d)", dev_num);
@@ -550,99 +610,98 @@ u8 cellMicIsOpen(u32 dev_num)
return mic_thr->mic_list.at(dev_num).is_opened();
}
s32 cellMicIsAttached(u32 dev_num)
s32 cellMicIsAttached(s32 dev_num)
{
cellMic.notice("cellMicIsAttached(dev_num=%d)", dev_num);
return 1;
}
s32 cellMicClose(u32 dev_num)
error_code cellMicClose(s32 dev_num)
{
cellMic.trace("cellMicClose(dev_num=%d)", dev_num);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
if (!mic_thr->mic_list.count(dev_num))
return CELL_MIC_ERROR_DEVICE_NOT_FOUND;
return CELL_MICIN_ERROR_DEVICE_NOT_FOUND;
auto& device = mic_thr->mic_list.at(dev_num);
if (!device.is_opened())
return CELL_MIC_ERROR_NOT_OPEN;
return CELL_MICIN_ERROR_NOT_OPEN;
device.close_microphone();
return CELL_OK;
return device.close_microphone();
}
/// Starting/Stopping Microphone Functions
s32 cellMicStart(u32 dev_num)
error_code cellMicStart(s32 dev_num)
{
cellMic.trace("cellMicStart(dev_num=%d)", dev_num);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
if (!mic_thr->mic_list.count(dev_num))
return CELL_MIC_ERROR_DEVICE_NOT_FOUND;
return CELL_MICIN_ERROR_DEVICE_NOT_FOUND;
auto& device = mic_thr->mic_list.at(dev_num);
if (!device.is_opened())
return CELL_MIC_ERROR_NOT_OPEN;
return CELL_MICIN_ERROR_NOT_OPEN;
return device.start_microphone();
}
s32 cellMicStartEx(u32 dev_num, u32 flags)
error_code cellMicStartEx(s32 dev_num, u32 iflags)
{
cellMic.todo("cellMicStartEx(dev_num=%d, flags=%d)", dev_num, flags);
cellMic.todo("cellMicStartEx(dev_num=%d, iflags=%d)", dev_num, iflags);
// TODO: flags
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
if (!mic_thr->mic_list.count(dev_num))
return CELL_MIC_ERROR_DEVICE_NOT_FOUND;
return CELL_MICIN_ERROR_DEVICE_NOT_FOUND;
auto& device = mic_thr->mic_list.at(dev_num);
if (!device.is_opened())
return CELL_MIC_ERROR_NOT_OPEN;
return CELL_MICIN_ERROR_NOT_OPEN;
cellMic.error("We're getting started mate!");
cellMic.success("We're getting started mate!");
return device.start_microphone();
}
s32 cellMicStop(u32 dev_num)
error_code cellMicStop(s32 dev_num)
{
cellMic.trace("cellMicStop(dev_num=%d)", dev_num);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
if (!mic_thr->mic_list.count(dev_num))
return CELL_MIC_ERROR_DEVICE_NOT_FOUND;
return CELL_MICIN_ERROR_DEVICE_NOT_FOUND;
auto& device = mic_thr->mic_list.at(dev_num);
if (!device.is_opened())
return CELL_MIC_ERROR_NOT_OPEN;
return CELL_MICIN_ERROR_NOT_OPEN;
if (device.is_started())
{
device.stop_microphone();
return device.stop_microphone();
}
return CELL_OK;
@@ -650,20 +709,20 @@ s32 cellMicStop(u32 dev_num)
/// Microphone Attributes/States Functions
s32 cellMicGetDeviceAttr(u32 dev_num, CellMicDeviceAttr deviceAttributes, vm::ptr<u32> arg1, vm::ptr<u32> arg2)
error_code cellMicGetDeviceAttr(s32 dev_num, CellMicDeviceAttr deviceAttributes, vm::ptr<s32> arg1, vm::ptr<s32> arg2)
{
cellMic.trace("cellMicGetDeviceAttr(dev_num=%d, deviceAttribute=%d, arg1=*0x%x, arg2=*0x%x)", dev_num, +deviceAttributes, arg1, arg2);
if (!arg1 || (!arg2 && deviceAttributes == CELLMIC_DEVATTR_CHANVOL))
return CELL_MIC_ERROR_PARAM;
return CELL_MICIN_ERROR_PARAM;
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
if (!mic_thr->mic_list.count(dev_num))
return CELL_MIC_ERROR_DEVICE_NOT_FOUND;
return CELL_MICIN_ERROR_DEVICE_NOT_FOUND;
auto& device = mic_thr->mic_list.at(dev_num);
@@ -675,23 +734,23 @@ s32 cellMicGetDeviceAttr(u32 dev_num, CellMicDeviceAttr deviceAttributes, vm::pt
case CELLMIC_DEVATTR_AGC: *arg1 = device.attr_agc; break;
case CELLMIC_DEVATTR_CHANVOL: *arg1 = device.attr_volume; break;
case CELLMIC_DEVATTR_DSPTYPE: *arg1 = device.attr_dsptype; break;
default: return CELL_MIC_ERROR_PARAM;
default: return CELL_MICIN_ERROR_PARAM;
}
return CELL_OK;
}
s32 cellMicSetDeviceAttr(u32 dev_num, CellMicDeviceAttr deviceAttributes, u32 arg1, u32 arg2)
error_code cellMicSetDeviceAttr(s32 dev_num, CellMicDeviceAttr deviceAttributes, u32 arg1, u32 arg2)
{
cellMic.trace("cellMicSetDeviceAttr(dev_num=%d, deviceAttributes=%d, arg1=%d, arg2=%d)", dev_num, +deviceAttributes, arg1, arg2);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
if (!mic_thr->mic_list.count(dev_num))
return CELL_MIC_ERROR_DEVICE_NOT_FOUND;
return CELL_MICIN_ERROR_DEVICE_NOT_FOUND;
auto& device = mic_thr->mic_list.at(dev_num);
@@ -700,7 +759,7 @@ s32 cellMicSetDeviceAttr(u32 dev_num, CellMicDeviceAttr deviceAttributes, u32 ar
case CELLMIC_DEVATTR_CHANVOL:
// Used by SingStar to set the volume of each mic
if (arg1 > 2)
return CELL_MIC_ERROR_PARAM;
return CELL_MICIN_ERROR_PARAM;
device.attr_chanvol[arg1] = arg2;
break;
case CELLMIC_DEVATTR_LED: device.attr_led = arg1; break;
@@ -708,73 +767,73 @@ s32 cellMicSetDeviceAttr(u32 dev_num, CellMicDeviceAttr deviceAttributes, u32 ar
case CELLMIC_DEVATTR_VOLUME: device.attr_volume = arg1; break;
case CELLMIC_DEVATTR_AGC: device.attr_agc = arg1; break;
case CELLMIC_DEVATTR_DSPTYPE: device.attr_dsptype = arg1; break;
default: return CELL_MIC_ERROR_PARAM;
default: return CELL_MICIN_ERROR_PARAM;
}
return CELL_OK;
}
s32 cellMicGetSignalAttr(u32 dev_num, CellMicSignalAttr sig_attrib, vm::ptr<void> value)
error_code cellMicGetSignalAttr(s32 dev_num, CellMicSignalAttr sig_attrib, vm::ptr<void> value)
{
cellMic.todo("cellMicGetSignalAttr(dev_num=%d, sig_attrib=%d, value=*0x%x)", dev_num, +sig_attrib, value);
return CELL_OK;
}
s32 cellMicSetSignalAttr(u32 dev_num, CellMicSignalAttr sig_attrib, vm::ptr<void> value)
error_code cellMicSetSignalAttr(s32 dev_num, CellMicSignalAttr sig_attrib, vm::ptr<void> value)
{
cellMic.todo("cellMicSetSignalAttr(dev_num=%d, sig_attrib=%d, value=*0x%x)", dev_num, +sig_attrib, value);
return CELL_OK;
}
s32 cellMicGetSignalState(u32 dev_num, CellMicSignalState sig_state, vm::ptr<void> value)
error_code cellMicGetSignalState(s32 dev_num, CellMicSignalState sig_state, vm::ptr<void> value)
{
cellMic.todo("cellMicGetSignalState(dev_num=%d, sig_state=%d, value=*0x%x)", dev_num, +sig_state, value);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
be_t<u32>* ival = vm::_ptr<u32>(value.addr());
be_t<f32>* fval = vm::_ptr<f32>(value.addr());
switch (sig_state)
{
case CELL_MIC_SIGSTATE_LOCTALK:
case CELLMIC_SIGSTATE_LOCTALK:
*ival = 9; // Someone is probably talking
break;
case CELL_MIC_SIGSTATE_FARTALK:
case CELLMIC_SIGSTATE_FARTALK:
// TODO
break;
case CELL_MIC_SIGSTATE_NSR:
case CELLMIC_SIGSTATE_NSR:
// TODO
break;
case CELL_MIC_SIGSTATE_AGC:
case CELLMIC_SIGSTATE_AGC:
// TODO
break;
case CELL_MIC_SIGSTATE_MICENG:
case CELLMIC_SIGSTATE_MICENG:
*fval = 40.0f; // 40 decibels
break;
case CELL_MIC_SIGSTATE_SPKENG:
case CELLMIC_SIGSTATE_SPKENG:
// TODO
break;
default: return CELL_MIC_ERROR_PARAM;
default: return CELL_MICIN_ERROR_PARAM;
}
return CELL_OK;
}
s32 cellMicGetFormatRaw(u32 dev_num, vm::ptr<CellMicInputFormat> format)
error_code cellMicGetFormatRaw(s32 dev_num, vm::ptr<CellMicInputFormatI> format)
{
cellMic.trace("cellMicGetFormatRaw(dev_num=%d, format=0x%x)", dev_num, format);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
if (!mic_thr->mic_list.count(dev_num))
return CELL_MIC_ERROR_DEVICE_NOT_FOUND;
return CELL_MICIN_ERROR_DEVICE_NOT_FOUND;
auto& device = mic_thr->mic_list.at(dev_num);
@@ -787,14 +846,14 @@ s32 cellMicGetFormatRaw(u32 dev_num, vm::ptr<CellMicInputFormat> format)
return CELL_OK;
}
s32 cellMicGetFormatAux(u32 dev_num, vm::ptr<CellMicInputFormat> format)
error_code cellMicGetFormatAux(s32 dev_num, vm::ptr<CellMicInputFormatI> format)
{
cellMic.todo("cellMicGetFormatAux(dev_num=%d, format=0x%x)", dev_num, format);
return cellMicGetFormatRaw(dev_num, format);
}
s32 cellMicGetFormatDsp(u32 dev_num, vm::ptr<CellMicInputFormat> format)
error_code cellMicGetFormatDsp(s32 dev_num, vm::ptr<CellMicInputFormatI> format)
{
cellMic.todo("cellMicGetFormatDsp(dev_num=%d, format=0x%x)", dev_num, format);
@@ -803,59 +862,59 @@ s32 cellMicGetFormatDsp(u32 dev_num, vm::ptr<CellMicInputFormat> format)
/// Event Queue Functions
s32 cellMicSetNotifyEventQueue(u64 key)
error_code cellMicSetNotifyEventQueue(u64 key)
{
cellMic.todo("cellMicSetNotifyEventQueue(key=0x%llx)", key);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
// default mic queue size = 4
auto mic_queue = lv2_event_queue::find(key);
if (!mic_queue)
return CELL_MIC_ERROR_EVENT_QUEUE;
return CELL_MICIN_ERROR_EVENT_QUEUE;
mic_thr->event_queue_key = key;
for (auto& mic_entry : mic_thr->mic_list)
{
mic_queue->send(0, CELL_MIC_ATTACH, mic_entry.first, 0);
mic_queue->send(0, CELLMIC_ATTACH, mic_entry.first, 0);
}
return CELL_OK;
}
s32 cellMicSetNotifyEventQueue2(u64 key, u64 source)
error_code cellMicSetNotifyEventQueue2(u64 key, u64 source, u64 flag)
{
// TODO: Actually do things with the source variable
cellMic.todo("cellMicSetNotifyEventQueue2(key=0x%llx, source=0x%llx", key, source);
cellMic.todo("cellMicSetNotifyEventQueue2(key=0x%llx, source=0x%llx, flag=0x%llx", key, source, flag);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
// default mic queue size = 4
auto mic_queue = lv2_event_queue::find(key);
if (!mic_queue)
return CELL_MIC_ERROR_EVENT_QUEUE;
return CELL_MICIN_ERROR_EVENT_QUEUE;
mic_queue->send(0, CELL_MIC_ATTACH, 0, 0);
mic_queue->send(0, CELLMIC_ATTACH, 0, 0);
mic_thr->event_queue_key = key;
return CELL_OK;
}
s32 cellMicRemoveNotifyEventQueue(u64 key)
error_code cellMicRemoveNotifyEventQueue(u64 key)
{
cellMic.warning("cellMicRemoveNotifyEventQueue(key=0x%llx)", key);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
mic_thr->event_queue_key = 0;
@@ -864,53 +923,53 @@ s32 cellMicRemoveNotifyEventQueue(u64 key)
/// Reading Functions
s32 cellMicReadRaw(u32 dev_num, vm::ptr<void> data, u32 maxBytes)
error_code cellMicReadRaw(s32 dev_num, vm::ptr<void> data, s32 max_bytes)
{
cellMic.trace("cellMicReadRaw(dev_num=%d, data=0x%x, maxBytes=%d)", dev_num, data, maxBytes);
cellMic.trace("cellMicReadRaw(dev_num=%d, data=0x%x, maxBytes=%d)", dev_num, data, max_bytes);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
if (!mic_thr->mic_list.count(dev_num))
return CELL_MIC_ERROR_DEVICE_NOT_FOUND;
return CELL_MICIN_ERROR_DEVICE_NOT_FOUND;
auto& mic = mic_thr->mic_list.at(dev_num);
if (!mic.is_opened() || !(mic.get_signal_types() & CELLMIC_SIGTYPE_RAW))
return CELL_MIC_ERROR_NOT_OPEN;
return CELL_MICIN_ERROR_NOT_OPEN;
return mic.read_raw(vm::_ptr<u8>(data.addr()), maxBytes);
return mic.read_raw(vm::_ptr<u8>(data.addr()), max_bytes);
}
s32 cellMicRead(u32 dev_num, vm::ptr<void> data, u32 maxBytes)
error_code cellMicRead(s32 dev_num, vm::ptr<void> data, u32 max_bytes)
{
cellMic.todo("cellMicRead(dev_num=%d, data=0x%x, maxBytes=0x%x)", dev_num, data, maxBytes);
cellMic.todo("cellMicRead(dev_num=%d, data=0x%x, maxBytes=0x%x)", dev_num, data, max_bytes);
const auto mic_thr = g_fxo->get<mic_thread>();
const std::lock_guard lock(mic_thr->mutex);
if (!mic_thr->init)
return CELL_MIC_ERROR_NOT_INIT;
return CELL_MICIN_ERROR_NOT_INIT;
if (!mic_thr->mic_list.count(dev_num))
return CELL_MIC_ERROR_DEVICE_NOT_FOUND;
return CELL_MICIN_ERROR_DEVICE_NOT_FOUND;
auto& mic = mic_thr->mic_list.at(dev_num);
if (!mic.is_opened() || !(mic.get_signal_types() & CELLMIC_SIGTYPE_DSP))
return CELL_MIC_ERROR_NOT_OPEN;
return CELL_MICIN_ERROR_NOT_OPEN;
return mic.read_dsp(vm::_ptr<u8>(data.addr()), maxBytes);
return mic.read_dsp(vm::_ptr<u8>(data.addr()), max_bytes);
}
s32 cellMicReadAux(u32 dev_num, vm::ptr<void> data, s32 max_bytes)
error_code cellMicReadAux(s32 dev_num, vm::ptr<void> data, s32 max_bytes)
{
cellMic.todo("cellMicReadAux(dev_num=%d, data=0x%x, max_bytes=0x%x)", dev_num, data, max_bytes);
return CELL_OK;
}
s32 cellMicReadDsp(u32 dev_num, vm::ptr<void> data, s32 max_bytes)
error_code cellMicReadDsp(s32 dev_num, vm::ptr<void> data, s32 max_bytes)
{
cellMic.todo("cellMicReadDsp(dev_num=%d, data=0x%x, max_bytes=0x%x)", dev_num, data, max_bytes);
return CELL_OK;
@@ -918,109 +977,109 @@ s32 cellMicReadDsp(u32 dev_num, vm::ptr<void> data, s32 max_bytes)
/// Unimplemented Functions
s32 cellMicReset(u32 dev_num)
error_code cellMicReset(s32 dev_num)
{
cellMic.todo("cellMicReset(dev_num=%d)", dev_num);
return CELL_OK;
}
s32 cellMicGetDeviceGUID(u32 dev_num, vm::ptr<u32> ptr_guid)
error_code cellMicGetDeviceGUID(s32 dev_num, vm::ptr<u32> ptr_guid)
{
cellMic.todo("cellMicGetDeviceGUID(dev_num=%dm ptr_guid=*0x%x)", dev_num, ptr_guid);
cellMic.todo("cellMicGetDeviceGUID(dev_num=%d ptr_guid=*0x%x)", dev_num, ptr_guid);
return CELL_OK;
}
s32 cellMicGetType(u32 dev_num, vm::ptr<s32> ptr_type)
error_code cellMicGetType(s32 dev_num, vm::ptr<s32> ptr_type)
{
cellMic.todo("cellMicGetType(dev_num=%d, ptr_type=*0x%x)", dev_num, ptr_type);
if (!ptr_type)
return CELL_MIC_ERROR_PARAM;
return CELL_MICIN_ERROR_PARAM;
*ptr_type = CELLMIC_TYPE_USBAUDIO;
return CELL_OK;
}
s32 cellMicGetStatus()
error_code cellMicGetStatus(s32 dev_num, vm::ptr<CellMicStatus> status)
{
UNIMPLEMENTED_FUNC(cellMic);
cellMic.todo("cellMicGetStatus(dev_num=%d, status=*0x%x)", dev_num, status);
return CELL_OK;
}
s32 cellMicStopEx()
error_code cellMicStopEx()
{
fmt::throw_exception("Unexpected function" HERE);
}
s32 cellMicSysShareClose()
error_code cellMicSysShareClose()
{
UNIMPLEMENTED_FUNC(cellMic);
return CELL_OK;
}
s32 cellMicGetFormat()
error_code cellMicGetFormat(s32 dev_num, vm::ptr<CellMicInputFormatI> format)
{
cellMic.todo("cellMicGetFormat(dev_num=%d, format=*0x%x)", dev_num, format);
return CELL_OK;
}
error_code cellMicSetMultiMicNotifyEventQueue()
{
UNIMPLEMENTED_FUNC(cellMic);
return CELL_OK;
}
s32 cellMicSetMultiMicNotifyEventQueue()
error_code cellMicGetFormatEx()
{
UNIMPLEMENTED_FUNC(cellMic);
return CELL_OK;
}
s32 cellMicGetFormatEx()
error_code cellMicSysShareStop()
{
UNIMPLEMENTED_FUNC(cellMic);
return CELL_OK;
}
s32 cellMicSysShareStop()
error_code cellMicSysShareOpen()
{
UNIMPLEMENTED_FUNC(cellMic);
return CELL_OK;
}
s32 cellMicSysShareOpen()
error_code cellMicCommand()
{
UNIMPLEMENTED_FUNC(cellMic);
return CELL_OK;
}
s32 cellMicCommand()
error_code cellMicSysShareStart()
{
UNIMPLEMENTED_FUNC(cellMic);
return CELL_OK;
}
s32 cellMicSysShareStart()
error_code cellMicSysShareInit()
{
UNIMPLEMENTED_FUNC(cellMic);
return CELL_OK;
}
s32 cellMicSysShareInit()
error_code cellMicSysShareEnd()
{
UNIMPLEMENTED_FUNC(cellMic);
return CELL_OK;
}
s32 cellMicSysShareEnd()
error_code cellMicGetDeviceIdentifier()
{
UNIMPLEMENTED_FUNC(cellMic);
return CELL_OK;
}
s32 cellMicGetDeviceIdentifier()
DECLARE(ppu_module_manager::cellMic)("cellMic", []()
{
UNIMPLEMENTED_FUNC(cellMic);
return CELL_OK;
}
DECLARE(ppu_module_manager::cellMic)
("cellMic", []() {
REG_FUNC(cellMic, cellMicInit);
REG_FUNC(cellMic, cellMicEnd);
REG_FUNC(cellMic, cellMicOpen);
+137 -44
View File
@@ -6,50 +6,80 @@
#include "3rdparty/OpenAL/include/alext.h"
// Error Codes
enum
enum CellMicInError : u32
{
CELL_MIC_ERROR_ALREADY_INIT = 0x80140101,
CELL_MIC_ERROR_SYSTEM = 0x80140102,
CELL_MIC_ERROR_NOT_INIT = 0x80140103,
CELL_MIC_ERROR_PARAM = 0x80140104,
CELL_MIC_ERROR_PORT_FULL = 0x80140105,
CELL_MIC_ERROR_ALREADY_OPEN = 0x80140106,
CELL_MIC_ERROR_NOT_OPEN = 0x80140107,
CELL_MIC_ERROR_NOT_RUN = 0x80140108,
CELL_MIC_ERROR_TRANS_EVENT = 0x80140109,
CELL_MIC_ERROR_OPEN = 0x8014010a,
CELL_MIC_ERROR_SHAREDMEMORY = 0x8014010b,
CELL_MIC_ERROR_MUTEX = 0x8014010c,
CELL_MIC_ERROR_EVENT_QUEUE = 0x8014010d,
CELL_MIC_ERROR_DEVICE_NOT_FOUND = 0x8014010e,
CELL_MIC_ERROR_SYSTEM_NOT_FOUND = 0x8014010e,
CELL_MIC_ERROR_FATAL = 0x8014010f,
CELL_MIC_ERROR_DEVICE_NOT_SUPPORT = 0x80140110,
CELL_MICIN_ERROR_ALREADY_INIT = 0x80140101,
CELL_MICIN_ERROR_DEVICE = 0x80140102,
CELL_MICIN_ERROR_NOT_INIT = 0x80140103,
CELL_MICIN_ERROR_PARAM = 0x80140104,
CELL_MICIN_ERROR_PORT_FULL = 0x80140105,
CELL_MICIN_ERROR_ALREADY_OPEN = 0x80140106,
CELL_MICIN_ERROR_NOT_OPEN = 0x80140107,
CELL_MICIN_ERROR_NOT_RUN = 0x80140108,
CELL_MICIN_ERROR_TRANS_EVENT = 0x80140109,
CELL_MICIN_ERROR_OPEN = 0x8014010a,
CELL_MICIN_ERROR_SHAREDMEMORY = 0x8014010b,
CELL_MICIN_ERROR_MUTEX = 0x8014010c,
CELL_MICIN_ERROR_EVENT_QUEUE = 0x8014010d,
CELL_MICIN_ERROR_DEVICE_NOT_FOUND = 0x8014010e,
CELL_MICIN_ERROR_FATAL = 0x8014010f,
CELL_MICIN_ERROR_DEVICE_NOT_SUPPORT = 0x80140110,
// CELL_MICIN_ERROR_SYSTEM = CELL_MICIN_ERROR_DEVICE,
// CELL_MICIN_ERROR_SYSTEM_NOT_FOUND = CELL_MICIN_ERROR_DEVICE_NOT_FOUND,
// CELL_MICIN_ERROR_SYSTEM_NOT_SUPPORT = CELL_MICIN_ERROR_DEVICE_NOT_SUPPORT
};
struct CellMicInputFormat
enum CellMicInErrorDsp : u32
{
u8 channelNum;
u8 subframeSize;
u8 bitResolution;
u8 dataType;
be_t<u32> sampleRate;
CELL_MICIN_ERROR_DSP = 0x80140200,
CELL_MICIN_ERROR_DSP_ASSERT = 0x80140201,
CELL_MICIN_ERROR_DSP_PATH = 0x80140202,
CELL_MICIN_ERROR_DSP_FILE = 0x80140203,
CELL_MICIN_ERROR_DSP_PARAM = 0x80140204,
CELL_MICIN_ERROR_DSP_MEMALLOC = 0x80140205,
CELL_MICIN_ERROR_DSP_POINTER = 0x80140206,
CELL_MICIN_ERROR_DSP_FUNC = 0x80140207,
CELL_MICIN_ERROR_DSP_MEM = 0x80140208,
CELL_MICIN_ERROR_DSP_ALIGN16 = 0x80140209,
CELL_MICIN_ERROR_DSP_ALIGN128 = 0x8014020a,
CELL_MICIN_ERROR_DSP_EAALIGN128 = 0x8014020b,
CELL_MICIN_ERROR_DSP_LIB_HANDLER = 0x80140216,
CELL_MICIN_ERROR_DSP_LIB_INPARAM = 0x80140217,
CELL_MICIN_ERROR_DSP_LIB_NOSPU = 0x80140218,
CELL_MICIN_ERROR_DSP_LIB_SAMPRATE = 0x80140219,
};
enum CellMicSignalState : u32
{
CELL_MIC_SIGSTATE_LOCTALK = 0,
CELL_MIC_SIGSTATE_FARTALK = 1,
CELL_MIC_SIGSTATE_NSR = 3,
CELL_MIC_SIGSTATE_AGC = 4,
CELL_MIC_SIGSTATE_MICENG = 5,
CELL_MIC_SIGSTATE_SPKENG = 6,
CELLMIC_SIGSTATE_LOCTALK = 0,
CELLMIC_SIGSTATE_FARTALK = 1,
CELLMIC_SIGSTATE_NSR = 3,
CELLMIC_SIGSTATE_AGC = 4,
CELLMIC_SIGSTATE_MICENG = 5,
CELLMIC_SIGSTATE_SPKENG = 6,
};
enum CellMicCommand
{
CELL_MIC_ATTACH = 2,
CELL_MIC_DATA = 5,
CELLMIC_INIT = 0,
CELLMIC_END,
CELLMIC_ATTACH,
CELLMIC_DETACH,
CELLMIC_SWITCH,
CELLMIC_DATA,
CELLMIC_OPEN,
CELLMIC_CLOSE,
CELLMIC_START,
CELLMIC_STOP,
CELLMIC_QUERY,
CELLMIC_CONFIG,
CELLMIC_CALLBACK,
CELLMIC_RESET,
CELLMIC_STATUS,
CELLMIC_IPC,
CELLMIC_CALLBACK2,
CELLMIC_WEAK,
CELLMIC_INIT2,
};
enum CellMicDeviceAttr : u32
@@ -64,11 +94,11 @@ enum CellMicDeviceAttr : u32
enum CellMicSignalAttr : u32
{
CELLMIC_SIGATTR_BKNGAIN,
CELLMIC_SIGATTR_REVERB,
CELLMIC_SIGATTR_AGCLEVEL,
CELLMIC_SIGATTR_VOLUME,
CELLMIC_SIGATTR_PITCHSHIFT
CELLMIC_SIGATTR_BKNGAIN = 0,
CELLMIC_SIGATTR_REVERB = 9,
CELLMIC_SIGATTR_AGCLEVEL = 26,
CELLMIC_SIGATTR_VOLUME = 301,
CELLMIC_SIGATTR_PITCHSHIFT = 331
};
enum CellMicSignalType : u8
@@ -88,7 +118,70 @@ enum CellMicType : s32
CELLMIC_TYPE_USBAUDIO = 3,
CELLMIC_TYPE_BLUETOOTH = 4,
CELLMIC_TYPE_A2DP = 5,
} CellMicType;
};
enum
{
MaxNumMicInputs = 8,
CELL_MAX_MICS = MaxNumMicInputs,
MAX_MICS_PERMISSABLE = 4,
NullDeviceID = -1,
CELL_MIC_STARTFLAG_LATENCY_4 = 0x00000001,
CELL_MIC_STARTFLAG_LATENCY_2 = 0x00000002,
CELL_MIC_STARTFLAG_LATENCY_1 = 0x00000003,
};
enum : u64
{
SYSMICIN_KEYBASE = 0x8000CA7211071000ULL,
EQUEUE_KEY_MICIN_ACCESSPOINT = 0x8000CA7211072abcULL,
LIBMIC_KEYBASE = 0x8000000000000100ULL,
};
struct CellMicInputFormatI
{
u8 channelNum;
u8 subframeSize;
u8 bitResolution;
u8 dataType;
be_t<u32> sampleRate;
};
struct CellMicInputStream
{
be_t<u32> uiBufferBottom;
be_t<u32> uiBufferSize;
be_t<u32> uiBuffer;
};
struct CellMicInputDefinition
{
// TODO: Data types
volatile uint32_t uiDevId;
CellMicInputStream data;
CellMicInputFormatI aux_format;
CellMicInputFormatI raw_format;
CellMicInputFormatI sig_format;
};
struct CellMicStatus
{
be_t<s32> raw_samprate;
be_t<s32> dsp_samprate;
be_t<s32> dsp_volume;
be_t<s32> isStart;
be_t<s32> isOpen;
be_t<s32> local_voice;
be_t<s32> remote_voice;
be_t<f32> mic_energy;
be_t<f32> spk_energy;
};
// --- End of cell definitions ---
template <std::size_t S>
class simple_ringbuf
@@ -177,11 +270,11 @@ public:
void add_device(const std::string& name);
s32 open_microphone(const u8 type, const u32 dsp_r, const u32 raw_r, const u8 channels = 2);
s32 close_microphone();
error_code open_microphone(const u8 type, const u32 dsp_r, const u32 raw_r, const u8 channels = 2);
error_code close_microphone();
s32 start_microphone();
s32 stop_microphone();
error_code start_microphone();
error_code stop_microphone();
void update_audio();
bool has_data() const;
@@ -243,7 +336,7 @@ private:
u8 signal_types = CELLMIC_SIGTYPE_NULL;
u32 sample_size; // Determined at opening for internal use
u32 sample_size = 0; // Determined at opening for internal use
static constexpr std::size_t inbuf_size = 400000; // Default value unknown
@@ -260,7 +353,7 @@ public:
u64 event_queue_key = 0;
std::unordered_map<u8, microphone_device> mic_list;
std::unordered_map<s32, microphone_device> mic_list;
shared_mutex mutex;
atomic_t<u32> init = 0;
+72 -22
View File
@@ -11,13 +11,63 @@
LOG_CHANNEL(cellMusic);
template<>
void fmt_class_string<CellMusicError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_MUSIC_CANCELED);
STR_CASE(CELL_MUSIC_PLAYBACK_FINISHED);
STR_CASE(CELL_MUSIC_ERROR_PARAM);
STR_CASE(CELL_MUSIC_ERROR_BUSY);
STR_CASE(CELL_MUSIC_ERROR_NO_ACTIVE_CONTENT);
STR_CASE(CELL_MUSIC_ERROR_NO_MATCH_FOUND);
STR_CASE(CELL_MUSIC_ERROR_INVALID_CONTEXT);
STR_CASE(CELL_MUSIC_ERROR_PLAYBACK_FAILURE);
STR_CASE(CELL_MUSIC_ERROR_NO_MORE_CONTENT);
STR_CASE(CELL_MUSIC_DIALOG_OPEN);
STR_CASE(CELL_MUSIC_DIALOG_CLOSE);
STR_CASE(CELL_MUSIC_ERROR_GENERIC);
}
return unknown;
});
}
template<>
void fmt_class_string<CellMusic2Error>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_MUSIC2_CANCELED);
STR_CASE(CELL_MUSIC2_PLAYBACK_FINISHED);
STR_CASE(CELL_MUSIC2_ERROR_PARAM);
STR_CASE(CELL_MUSIC2_ERROR_BUSY);
STR_CASE(CELL_MUSIC2_ERROR_NO_ACTIVE_CONTENT);
STR_CASE(CELL_MUSIC2_ERROR_NO_MATCH_FOUND);
STR_CASE(CELL_MUSIC2_ERROR_INVALID_CONTEXT);
STR_CASE(CELL_MUSIC2_ERROR_PLAYBACK_FAILURE);
STR_CASE(CELL_MUSIC2_ERROR_NO_MORE_CONTENT);
STR_CASE(CELL_MUSIC2_DIALOG_OPEN);
STR_CASE(CELL_MUSIC2_DIALOG_CLOSE);
STR_CASE(CELL_MUSIC2_ERROR_GENERIC);
}
return unknown;
});
}
struct music_state
{
vm::ptr<void(u32 event, vm::ptr<void> param, vm::ptr<void> userData)> func;
vm::ptr<void> userData;
};
s32 cellMusicGetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
error_code cellMusicGetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
{
cellMusic.todo("cellMusicGetSelectionContext(context=*0x%x)", context);
@@ -27,7 +77,7 @@ s32 cellMusicGetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
return CELL_OK;
}
s32 cellMusicSetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
error_code cellMusicSetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
{
cellMusic.todo("cellMusicSetSelectionContext2(context=*0x%x)", context);
@@ -48,7 +98,7 @@ s32 cellMusicSetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
return CELL_OK;
}
s32 cellMusicSetVolume2(f32 level)
error_code cellMusicSetVolume2(f32 level)
{
cellMusic.todo("cellMusicSetVolume2(level=0x%x)", level);
@@ -68,7 +118,7 @@ s32 cellMusicSetVolume2(f32 level)
return CELL_OK;
}
s32 cellMusicGetContentsId(vm::ptr<CellSearchContentId> contents_id)
error_code cellMusicGetContentsId(vm::ptr<CellSearchContentId> contents_id)
{
cellMusic.todo("cellMusicGetContentsId(contents_id=*0x%x)", contents_id);
@@ -78,7 +128,7 @@ s32 cellMusicGetContentsId(vm::ptr<CellSearchContentId> contents_id)
return CELL_OK;
}
s32 cellMusicSetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
error_code cellMusicSetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
{
cellMusic.todo("cellMusicSetSelectionContext(context=*0x%x)", context);
@@ -99,7 +149,7 @@ s32 cellMusicSetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
return CELL_OK;
}
s32 cellMusicInitialize2SystemWorkload(s32 mode, vm::ptr<CellMusic2Callback> func, vm::ptr<void> userData, vm::ptr<CellSpurs> spurs, vm::cptr<u8> priority, vm::cptr<struct CellSpursSystemWorkloadAttribute> attr)
error_code cellMusicInitialize2SystemWorkload(s32 mode, vm::ptr<CellMusic2Callback> func, vm::ptr<void> userData, vm::ptr<CellSpurs> spurs, vm::cptr<u8> priority, vm::cptr<struct CellSpursSystemWorkloadAttribute> attr)
{
cellMusic.todo("cellMusicInitialize2SystemWorkload(mode=0x%x, func=*0x%x, userData=*0x%x, spurs=*0x%x, priority=*0x%x, attr=*0x%x)", mode, func, userData, spurs, priority, attr);
@@ -125,7 +175,7 @@ s32 cellMusicInitialize2SystemWorkload(s32 mode, vm::ptr<CellMusic2Callback> fun
return CELL_OK;
}
s32 cellMusicGetPlaybackStatus2(vm::ptr<s32> status)
error_code cellMusicGetPlaybackStatus2(vm::ptr<s32> status)
{
cellMusic.todo("cellMusicGetPlaybackStatus2(status=*0x%x)", status);
@@ -135,7 +185,7 @@ s32 cellMusicGetPlaybackStatus2(vm::ptr<s32> status)
return CELL_OK;
}
s32 cellMusicGetContentsId2(vm::ptr<CellSearchContentId> contents_id)
error_code cellMusicGetContentsId2(vm::ptr<CellSearchContentId> contents_id)
{
cellMusic.todo("cellMusicGetContentsId2(contents_id=*0x%x)", contents_id);
@@ -145,7 +195,7 @@ s32 cellMusicGetContentsId2(vm::ptr<CellSearchContentId> contents_id)
return CELL_OK;
}
s32 cellMusicFinalize()
error_code cellMusicFinalize()
{
cellMusic.todo("cellMusicFinalize()");
@@ -163,7 +213,7 @@ s32 cellMusicFinalize()
return CELL_OK;
}
s32 cellMusicInitializeSystemWorkload(s32 mode, u32 container, vm::ptr<CellMusicCallback> func, vm::ptr<void> userData, vm::ptr<CellSpurs> spurs, vm::cptr<u8> priority, vm::cptr<struct CellSpursSystemWorkloadAttribute> attr)
error_code cellMusicInitializeSystemWorkload(s32 mode, u32 container, vm::ptr<CellMusicCallback> func, vm::ptr<void> userData, vm::ptr<CellSpurs> spurs, vm::cptr<u8> priority, vm::cptr<struct CellSpursSystemWorkloadAttribute> attr)
{
cellMusic.todo("cellMusicInitializeSystemWorkload(mode=0x%x, container=0x%x, func=*0x%x, userData=*0x%x, spurs=*0x%x, priority=*0x%x, attr=*0x%x)", mode, container, func, userData, spurs, priority, attr);
@@ -189,7 +239,7 @@ s32 cellMusicInitializeSystemWorkload(s32 mode, u32 container, vm::ptr<CellMusic
return CELL_OK;
}
s32 cellMusicInitialize(s32 mode, u32 container, s32 spuPriority, vm::ptr<CellMusicCallback> func, vm::ptr<void> userData)
error_code cellMusicInitialize(s32 mode, u32 container, s32 spuPriority, vm::ptr<CellMusicCallback> func, vm::ptr<void> userData)
{
cellMusic.todo("cellMusicInitialize(mode=0x%x, container=0x%x, spuPriority=0x%x, func=*0x%x, userData=*0x%x)", mode, container, spuPriority, func, userData);
@@ -215,7 +265,7 @@ s32 cellMusicInitialize(s32 mode, u32 container, s32 spuPriority, vm::ptr<CellMu
return CELL_OK;
}
s32 cellMusicFinalize2()
error_code cellMusicFinalize2()
{
cellMusic.todo("cellMusicFinalize2()");
@@ -233,7 +283,7 @@ s32 cellMusicFinalize2()
return CELL_OK;
}
s32 cellMusicGetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
error_code cellMusicGetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
{
cellMusic.todo("cellMusicGetSelectionContext2(context=*0x%x)", context);
@@ -243,7 +293,7 @@ s32 cellMusicGetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
return CELL_OK;
}
s32 cellMusicGetVolume(vm::ptr<f32> level)
error_code cellMusicGetVolume(vm::ptr<f32> level)
{
cellMusic.todo("cellMusicGetVolume(level=*0x%x)", level);
@@ -253,7 +303,7 @@ s32 cellMusicGetVolume(vm::ptr<f32> level)
return CELL_OK;
}
s32 cellMusicGetPlaybackStatus(vm::ptr<s32> status)
error_code cellMusicGetPlaybackStatus(vm::ptr<s32> status)
{
cellMusic.todo("cellMusicGetPlaybackStatus(status=*0x%x)", status);
@@ -263,7 +313,7 @@ s32 cellMusicGetPlaybackStatus(vm::ptr<s32> status)
return CELL_OK;
}
s32 cellMusicSetPlaybackCommand2(s32 command, vm::ptr<void> param)
error_code cellMusicSetPlaybackCommand2(s32 command, vm::ptr<void> param)
{
cellMusic.todo("cellMusicSetPlaybackCommand2(command=0x%x, param=*0x%x)", command, param);
@@ -284,7 +334,7 @@ s32 cellMusicSetPlaybackCommand2(s32 command, vm::ptr<void> param)
return CELL_OK;
}
s32 cellMusicSetPlaybackCommand(s32 command, vm::ptr<void> param)
error_code cellMusicSetPlaybackCommand(s32 command, vm::ptr<void> param)
{
cellMusic.todo("cellMusicSetPlaybackCommand(command=0x%x, param=*0x%x)", command, param);
@@ -305,7 +355,7 @@ s32 cellMusicSetPlaybackCommand(s32 command, vm::ptr<void> param)
return CELL_OK;
}
s32 cellMusicSelectContents2()
error_code cellMusicSelectContents2()
{
cellMusic.todo("cellMusicSelectContents2()");
@@ -323,7 +373,7 @@ s32 cellMusicSelectContents2()
return CELL_OK;
}
s32 cellMusicSelectContents(u32 container)
error_code cellMusicSelectContents(u32 container)
{
cellMusic.todo("cellMusicSelectContents(container=0x%x)", container);
@@ -341,7 +391,7 @@ s32 cellMusicSelectContents(u32 container)
return CELL_OK;
}
s32 cellMusicInitialize2(s32 mode, s32 spuPriority, vm::ptr<CellMusic2Callback> func, vm::ptr<void> userData)
error_code cellMusicInitialize2(s32 mode, s32 spuPriority, vm::ptr<CellMusic2Callback> func, vm::ptr<void> userData)
{
cellMusic.todo("cellMusicInitialize2(mode=%d, spuPriority=%d, func=*0x%x, userData=*0x%x)", mode, spuPriority, func, userData);
@@ -367,7 +417,7 @@ s32 cellMusicInitialize2(s32 mode, s32 spuPriority, vm::ptr<CellMusic2Callback>
return CELL_OK;
}
s32 cellMusicSetVolume(f32 level)
error_code cellMusicSetVolume(f32 level)
{
cellMusic.todo("cellMusicSetVolume(level=0x%x)", level);
@@ -387,7 +437,7 @@ s32 cellMusicSetVolume(f32 level)
return CELL_OK;
}
s32 cellMusicGetVolume2(vm::ptr<f32> level)
error_code cellMusicGetVolume2(vm::ptr<f32> level)
{
cellMusic.todo("cellMusicGetVolume2(level=*0x%x)", level);
+18 -13
View File
@@ -1,10 +1,11 @@
#pragma once
#pragma once
#include "Emu/Memory/vm_ptr.h"
// Error Codes
enum
enum CellMusicError : u32
{
CELL_MUSIC_CANCELED = 1,
CELL_MUSIC_PLAYBACK_FINISHED = 0x8002c101,
CELL_MUSIC_ERROR_PARAM = 0x8002c102,
CELL_MUSIC_ERROR_BUSY = 0x8002c103,
@@ -16,18 +17,22 @@ enum
CELL_MUSIC_DIALOG_OPEN = 0x8002c109,
CELL_MUSIC_DIALOG_CLOSE = 0x8002c10a,
CELL_MUSIC_ERROR_GENERIC = 0x8002c1ff,
};
CELL_MUSIC2_PLAYBACK_FINISHED = CELL_MUSIC_PLAYBACK_FINISHED,
CELL_MUSIC2_ERROR_PARAM = CELL_MUSIC_ERROR_PARAM,
CELL_MUSIC2_ERROR_BUSY = CELL_MUSIC_ERROR_BUSY,
CELL_MUSIC2_ERROR_NO_ACTIVE_CONTENT = CELL_MUSIC_ERROR_NO_ACTIVE_CONTENT,
CELL_MUSIC2_ERROR_NO_MATCH_FOUND = CELL_MUSIC_ERROR_NO_MATCH_FOUND,
CELL_MUSIC2_ERROR_INVALID_CONTEXT = CELL_MUSIC_ERROR_INVALID_CONTEXT,
CELL_MUSIC2_ERROR_PLAYBACK_FAILURE = CELL_MUSIC_ERROR_PLAYBACK_FAILURE,
CELL_MUSIC2_ERROR_NO_MORE_CONTENT = CELL_MUSIC_ERROR_NO_MORE_CONTENT,
CELL_MUSIC2_DIALOG_OPEN = CELL_MUSIC_DIALOG_OPEN,
CELL_MUSIC2_DIALOG_CLOSE = CELL_MUSIC_DIALOG_CLOSE,
CELL_MUSIC2_ERROR_GENERIC = CELL_MUSIC_ERROR_GENERIC,
enum CellMusic2Error : u32
{
CELL_MUSIC2_CANCELED = 1,
CELL_MUSIC2_PLAYBACK_FINISHED = 0x8002c101,
CELL_MUSIC2_ERROR_PARAM = 0x8002c102,
CELL_MUSIC2_ERROR_BUSY = 0x8002c103,
CELL_MUSIC2_ERROR_NO_ACTIVE_CONTENT = 0x8002c104,
CELL_MUSIC2_ERROR_NO_MATCH_FOUND = 0x8002c105,
CELL_MUSIC2_ERROR_INVALID_CONTEXT = 0x8002c106,
CELL_MUSIC2_ERROR_PLAYBACK_FAILURE = 0x8002c107,
CELL_MUSIC2_ERROR_NO_MORE_CONTENT = 0x8002c108,
CELL_MUSIC2_DIALOG_OPEN = 0x8002c109,
CELL_MUSIC2_DIALOG_CLOSE = 0x8002c10a,
CELL_MUSIC2_ERROR_GENERIC = 0x8002c1ff,
};
enum
+49 -23
View File
@@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "Emu/Cell/lv2/sys_lwmutex.h"
#include "Emu/Cell/lv2/sys_lwcond.h"
@@ -13,7 +13,7 @@
LOG_CHANNEL(cellMusicDecode);
// Return Codes
enum
enum CellMusicDecodeError : u32
{
CELL_MUSIC_DECODE_DECODE_FINISHED = 0x8002C101,
CELL_MUSIC_DECODE_ERROR_PARAM = 0x8002C102,
@@ -30,6 +30,32 @@ enum
CELL_MUSIC_DECODE_ERROR_GENERIC = 0x8002C1FF,
};
template<>
void fmt_class_string<CellMusicDecodeError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_MUSIC_DECODE_DECODE_FINISHED);
STR_CASE(CELL_MUSIC_DECODE_ERROR_PARAM);
STR_CASE(CELL_MUSIC_DECODE_ERROR_BUSY);
STR_CASE(CELL_MUSIC_DECODE_ERROR_NO_ACTIVE_CONTENT);
STR_CASE(CELL_MUSIC_DECODE_ERROR_NO_MATCH_FOUND);
STR_CASE(CELL_MUSIC_DECODE_ERROR_INVALID_CONTEXT);
STR_CASE(CELL_MUSIC_DECODE_ERROR_DECODE_FAILURE);
STR_CASE(CELL_MUSIC_DECODE_ERROR_NO_MORE_CONTENT);
STR_CASE(CELL_MUSIC_DECODE_DIALOG_OPEN);
STR_CASE(CELL_MUSIC_DECODE_DIALOG_CLOSE);
STR_CASE(CELL_MUSIC_DECODE_ERROR_NO_LPCM_DATA);
STR_CASE(CELL_MUSIC_DECODE_NEXT_CONTENTS_READY);
STR_CASE(CELL_MUSIC_DECODE_ERROR_GENERIC);
}
return unknown;
});
}
enum
{
CELL_MUSIC_DECODE_EVENT_STATUS_NOTIFICATION = 0,
@@ -69,7 +95,7 @@ struct music_decode2
vm::ptr<void> userData;
};
s32 cellMusicDecodeInitialize(s32 mode, u32 container, s32 spuPriority, vm::ptr<CellMusicDecodeCallback> func, vm::ptr<void> userData)
error_code cellMusicDecodeInitialize(s32 mode, u32 container, s32 spuPriority, vm::ptr<CellMusicDecodeCallback> func, vm::ptr<void> userData)
{
cellMusicDecode.todo("cellMusicDecodeInitialize(mode=0x%x, container=0x%x, spuPriority=0x%x, func=*0x%x, userData=*0x%x)", mode, container, spuPriority, func, userData);
@@ -86,7 +112,7 @@ s32 cellMusicDecodeInitialize(s32 mode, u32 container, s32 spuPriority, vm::ptr<
return CELL_OK;
}
s32 cellMusicDecodeInitializeSystemWorkload(s32 mode, u32 container, vm::ptr<CellMusicDecodeCallback> func, vm::ptr<void> userData, s32 spuUsageRate, vm::ptr<CellSpurs> spurs, vm::cptr<u8> priority, vm::cptr<struct CellSpursSystemWorkloadAttribute> attr)
error_code cellMusicDecodeInitializeSystemWorkload(s32 mode, u32 container, vm::ptr<CellMusicDecodeCallback> func, vm::ptr<void> userData, s32 spuUsageRate, vm::ptr<CellSpurs> spurs, vm::cptr<u8> priority, vm::cptr<struct CellSpursSystemWorkloadAttribute> attr)
{
cellMusicDecode.todo("cellMusicDecodeInitializeSystemWorkload(mode=0x%x, container=0x%x, func=*0x%x, userData=*0x%x, spuUsageRate=0x%x, spurs=*0x%x, priority=*0x%x, attr=*0x%x)", mode, container, func, userData, spuUsageRate, spurs, priority, attr);
@@ -103,7 +129,7 @@ s32 cellMusicDecodeInitializeSystemWorkload(s32 mode, u32 container, vm::ptr<Cel
return CELL_OK;
}
s32 cellMusicDecodeFinalize()
error_code cellMusicDecodeFinalize()
{
cellMusicDecode.todo("cellMusicDecodeFinalize()");
@@ -121,7 +147,7 @@ s32 cellMusicDecodeFinalize()
return CELL_OK;
}
s32 cellMusicDecodeSelectContents()
error_code cellMusicDecodeSelectContents()
{
cellMusicDecode.todo("cellMusicDecodeSelectContents()");
@@ -139,7 +165,7 @@ s32 cellMusicDecodeSelectContents()
return CELL_OK;
}
s32 cellMusicDecodeSetDecodeCommand(s32 command)
error_code cellMusicDecodeSetDecodeCommand(s32 command)
{
cellMusicDecode.todo("cellMusicDecodeSetDecodeCommand(command=0x%x)", command);
@@ -157,25 +183,25 @@ s32 cellMusicDecodeSetDecodeCommand(s32 command)
return CELL_OK;
}
s32 cellMusicDecodeGetDecodeStatus(vm::ptr<s32> status)
error_code cellMusicDecodeGetDecodeStatus(vm::ptr<s32> status)
{
cellMusicDecode.todo("cellMusicDecodeGetDecodeStatus(status=*0x%x)", status);
return CELL_OK;
}
s32 cellMusicDecodeRead(vm::ptr<void> buf, vm::ptr<u32> startTime, u64 reqSize, vm::ptr<u64> readSize, vm::ptr<s32> position)
error_code cellMusicDecodeRead(vm::ptr<void> buf, vm::ptr<u32> startTime, u64 reqSize, vm::ptr<u64> readSize, vm::ptr<s32> position)
{
cellMusicDecode.todo("cellMusicDecodeRead(buf=*0x%x, startTime=*0x%x, reqSize=0x%llx, readSize=*0x%x, position=*0x%x)", buf, startTime, reqSize, readSize, position);
return CELL_OK;
}
s32 cellMusicDecodeGetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
error_code cellMusicDecodeGetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
{
cellMusicDecode.todo("cellMusicDecodeGetSelectionContext(context=*0x%x)", context);
return CELL_OK;
}
s32 cellMusicDecodeSetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
error_code cellMusicDecodeSetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
{
cellMusicDecode.todo("cellMusicDecodeSetSelectionContext(context=*0x%x)", context);
@@ -193,15 +219,15 @@ s32 cellMusicDecodeSetSelectionContext(vm::ptr<CellMusicSelectionContext> contex
return CELL_OK;
}
s32 cellMusicDecodeGetContentsId(vm::ptr<CellSearchContentId> contents_id)
error_code cellMusicDecodeGetContentsId(vm::ptr<CellSearchContentId> contents_id)
{
cellMusicDecode.todo("cellMusicDecodeGetContentsId(contents_id=*0x%x)", contents_id);
return CELL_OK;
}
s32 cellMusicDecodeInitialize2(s32 mode, u32 container, s32 spuPriority, vm::ptr<CellMusicDecode2Callback> func, vm::ptr<void> userData, s32 speed, s32 bufsize)
error_code cellMusicDecodeInitialize2(s32 mode, u32 container, s32 spuPriority, vm::ptr<CellMusicDecode2Callback> func, vm::ptr<void> userData, s32 speed, s32 bufsize)
{
cellMusicDecode.todo("cellMusicDecodeInitialize2(mode=0x%x, container=0x%x, spuPriority=0x%x, func=*0x%x, userData=*0x%x, speed=0x%x, bufsize=0x%x)", mode, container, spuPriority, func, userData, speed, bufsize);
cellMusicDecode.todo("cellMusicDecodeInitialize2(mode=0x%x, container=0x%x, spuPriority=0x%x, func=*0x%x, userData=*0x%x, speed=0x%x, bufsize=0x%x)", mode, container, spuPriority, func, userData, speed, bufsize);
const auto musicDecode = g_fxo->get<music_decode2>();
musicDecode->func = func;
@@ -216,7 +242,7 @@ s32 cellMusicDecodeInitialize2(s32 mode, u32 container, s32 spuPriority, vm::ptr
return CELL_OK;
}
s32 cellMusicDecodeInitialize2SystemWorkload(s32 mode, u32 container, vm::ptr<CellMusicDecode2Callback> func, vm::ptr<void> userData, s32 spuUsageRate, s32 bufsize, vm::ptr<CellSpurs> spurs, vm::cptr<u8> priority, vm::cptr<CellSpursSystemWorkloadAttribute> attr)
error_code cellMusicDecodeInitialize2SystemWorkload(s32 mode, u32 container, vm::ptr<CellMusicDecode2Callback> func, vm::ptr<void> userData, s32 spuUsageRate, s32 bufsize, vm::ptr<CellSpurs> spurs, vm::cptr<u8> priority, vm::cptr<CellSpursSystemWorkloadAttribute> attr)
{
cellMusicDecode.todo("cellMusicDecodeInitialize2SystemWorkload(mode=0x%x, container=0x%x, func=*0x%x, userData=*0x%x, spuUsageRate=0x%x, bufsize=0x%x, spurs=*0x%x, priority=*0x%x, attr=*0x%x)", mode, container, func, userData, spuUsageRate, bufsize, spurs, priority, attr);
@@ -233,7 +259,7 @@ s32 cellMusicDecodeInitialize2SystemWorkload(s32 mode, u32 container, vm::ptr<Ce
return CELL_OK;
}
s32 cellMusicDecodeFinalize2()
error_code cellMusicDecodeFinalize2()
{
cellMusicDecode.todo("cellMusicDecodeFinalize2()");
@@ -251,7 +277,7 @@ s32 cellMusicDecodeFinalize2()
return CELL_OK;
}
s32 cellMusicDecodeSelectContents2()
error_code cellMusicDecodeSelectContents2()
{
cellMusicDecode.todo("cellMusicDecodeSelectContents2()");
@@ -269,7 +295,7 @@ s32 cellMusicDecodeSelectContents2()
return CELL_OK;
}
s32 cellMusicDecodeSetDecodeCommand2(s32 command)
error_code cellMusicDecodeSetDecodeCommand2(s32 command)
{
cellMusicDecode.todo("cellMusicDecodeSetDecodeCommand2(command=0x%x)", command);
@@ -287,25 +313,25 @@ s32 cellMusicDecodeSetDecodeCommand2(s32 command)
return CELL_OK;
}
s32 cellMusicDecodeGetDecodeStatus2(vm::ptr<s32> status)
error_code cellMusicDecodeGetDecodeStatus2(vm::ptr<s32> status)
{
cellMusicDecode.todo("cellMusicDecodeGetDecodeStatus2(status=*0x%x)", status);
return CELL_OK;
}
s32 cellMusicDecodeRead2(vm::ptr<void> buf, vm::ptr<u32> startTime, u64 reqSize, vm::ptr<u64> readSize, vm::ptr<s32> position)
error_code cellMusicDecodeRead2(vm::ptr<void> buf, vm::ptr<u32> startTime, u64 reqSize, vm::ptr<u64> readSize, vm::ptr<s32> position)
{
cellMusicDecode.todo("cellMusicDecodeRead2(buf=*0x%x, startTime=*0x%x, reqSize=0x%llx, readSize=*0x%x, position=*0x%x)", buf, startTime, reqSize, readSize, position);
return CELL_OK;
}
s32 cellMusicDecodeGetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
error_code cellMusicDecodeGetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
{
cellMusicDecode.todo("cellMusicDecodeGetSelectionContext2(context=*0x%x)", context);
return CELL_OK;
}
s32 cellMusicDecodeSetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
error_code cellMusicDecodeSetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
{
cellMusicDecode.todo("cellMusicDecodeSetSelectionContext2(context=*0x%x)", context);
@@ -323,7 +349,7 @@ s32 cellMusicDecodeSetSelectionContext2(vm::ptr<CellMusicSelectionContext> conte
return CELL_OK;
}
s32 cellMusicDecodeGetContentsId2(vm::ptr<CellSearchContentId> contents_id )
error_code cellMusicDecodeGetContentsId2(vm::ptr<CellSearchContentId> contents_id )
{
cellMusicDecode.todo("cellMusicDecodeGetContentsId2(contents_id=*0x%x)", contents_id);
return CELL_OK;
+25 -2
View File
@@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "cellSysutil.h"
@@ -7,7 +7,7 @@
LOG_CHANNEL(cellMusicExport);
// Return Codes
enum
enum CellMusicExportError : u32
{
CELL_MUSIC_EXPORT_UTIL_ERROR_BUSY = 0x8002c601,
CELL_MUSIC_EXPORT_UTIL_ERROR_INTERNAL = 0x8002c602,
@@ -21,6 +21,29 @@ enum
CELL_MUSIC_EXPORT_UTIL_ERROR_INITIALIZE = 0x8002c60a,
};
template<>
void fmt_class_string<CellMusicExportError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_BUSY);
STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_INTERNAL);
STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_PARAM);
STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_ACCESS_ERROR);
STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_DB_INTERNAL);
STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_DB_REGIST);
STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_SET_META);
STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_FLUSH_META);
STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_MOVE);
STR_CASE(CELL_MUSIC_EXPORT_UTIL_ERROR_INITIALIZE);
}
return unknown;
});
}
struct CellMusicExportSetParam
{
vm::bptr<char> title;
+10 -10
View File
@@ -1,57 +1,57 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
LOG_CHANNEL(cellNetAoi);
s32 cellNetAoiDeletePeer()
error_code cellNetAoiDeletePeer()
{
UNIMPLEMENTED_FUNC(cellNetAoi);
return CELL_OK;
}
s32 cellNetAoiInit()
error_code cellNetAoiInit()
{
UNIMPLEMENTED_FUNC(cellNetAoi);
return CELL_OK;
}
s32 cellNetAoiGetPspTitleId()
error_code cellNetAoiGetPspTitleId()
{
UNIMPLEMENTED_FUNC(cellNetAoi);
return CELL_OK;
}
s32 cellNetAoiTerm()
error_code cellNetAoiTerm()
{
UNIMPLEMENTED_FUNC(cellNetAoi);
return CELL_OK;
}
s32 cellNetAoiStop()
error_code cellNetAoiStop()
{
UNIMPLEMENTED_FUNC(cellNetAoi);
return CELL_OK;
}
s32 cellNetAoiGetRemotePeerInfo()
error_code cellNetAoiGetRemotePeerInfo()
{
UNIMPLEMENTED_FUNC(cellNetAoi);
return CELL_OK;
}
s32 cellNetAoiStart()
error_code cellNetAoiStart()
{
UNIMPLEMENTED_FUNC(cellNetAoi);
return CELL_OK;
}
s32 cellNetAoiGetLocalInfo()
error_code cellNetAoiGetLocalInfo()
{
UNIMPLEMENTED_FUNC(cellNetAoi);
return CELL_OK;
}
s32 cellNetAoiAddPeer()
error_code cellNetAoiAddPeer()
{
UNIMPLEMENTED_FUNC(cellNetAoi);
return CELL_OK;
+6 -4
View File
@@ -177,7 +177,7 @@ error_code cellNetCtlDelHandler(s32 hid)
error_code cellNetCtlGetInfo(s32 code, vm::ptr<CellNetCtlInfo> info)
{
cellNetCtl.todo("cellNetCtlGetInfo(code=0x%x (%s), info=*0x%x)", code, InfoCodeToName(code), info);
cellNetCtl.warning("cellNetCtlGetInfo(code=0x%x (%s), info=*0x%x)", code, InfoCodeToName(code), info);
const auto nph = g_fxo->get<named_thread<np_handler>>();
@@ -213,7 +213,7 @@ error_code cellNetCtlGetInfo(s32 code, vm::ptr<CellNetCtlInfo> info)
}
else if (code == CELL_NET_CTL_INFO_IP_ADDRESS)
{
strcpy_trunc(info->ip_address, nph->get_ip());
strcpy_trunc(info->ip_address, np_handler::ip_to_string(nph->get_local_ip_addr()));
}
else if (code == CELL_NET_CTL_INFO_NETMASK)
{
@@ -306,7 +306,6 @@ error_code cellNetCtlNetStartDialogUnloadAsync(vm::ptr<CellNetCtlNetStartDialogR
result->result = nph->get_net_status() == CELL_NET_CTL_STATE_IPObtained ? 0 : CELL_NET_CTL_ERROR_DIALOG_CANCELED;
sysutil_send_system_cmd(CELL_SYSUTIL_NET_CTL_NETSTART_UNLOADED, 0);
return CELL_OK;
}
@@ -331,6 +330,10 @@ error_code cellNetCtlGetNatInfo(vm::ptr<CellNetCtlNatInfo> natInfo)
return CELL_NET_CTL_ERROR_INVALID_SIZE;
}
natInfo->nat_type = CELL_NET_CTL_NATINFO_NAT_TYPE_2;
natInfo->stun_status = CELL_NET_CTL_NATINFO_STUN_OK;
natInfo->upnp_status = CELL_NET_CTL_NATINFO_UPNP_NO;
return CELL_OK;
}
@@ -467,7 +470,6 @@ error_code cellGameUpdateCheckStartWithoutDialogAsyncEx(vm::ptr<CellGameUpdateCa
return CELL_OK;
}
DECLARE(ppu_module_manager::cellNetCtl)("cellNetCtl", []()
{
REG_FUNC(cellNetCtl, cellNetCtlInit);
+20 -4
View File
@@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "Emu/Cell/lv2/sys_spu.h"
@@ -7,20 +7,36 @@
LOG_CHANNEL(cellOvis);
// Return Codes
enum
enum CellOvisError : u32
{
CELL_OVIS_ERROR_INVAL = 0x80410402,
CELL_OVIS_ERROR_ABORT = 0x8041040C,
CELL_OVIS_ERROR_ALIGN = 0x80410410,
};
s32 cellOvisGetOverlayTableSize(vm::cptr<char> elf)
template<>
void fmt_class_string<CellOvisError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_OVIS_ERROR_INVAL);
STR_CASE(CELL_OVIS_ERROR_ABORT);
STR_CASE(CELL_OVIS_ERROR_ALIGN);
}
return unknown;
});
}
error_code cellOvisGetOverlayTableSize(vm::cptr<char> elf)
{
cellOvis.todo("cellOvisGetOverlayTableSize(elf=%s)", elf);
return CELL_OK;
}
s32 cellOvisInitializeOverlayTable(vm::ptr<void> ea_ovly_table, vm::cptr<char> elf)
error_code cellOvisInitializeOverlayTable(vm::ptr<void> ea_ovly_table, vm::cptr<char> elf)
{
cellOvis.todo("cellOvisInitializeOverlayTable(ea_ovly_table=*0x%x, elf=%s)", ea_ovly_table, elf);
return CELL_OK;
+38 -19
View File
@@ -14,7 +14,27 @@ bool squeue_test_exit()
LOG_CHANNEL(cellPamf);
s32 pamfStreamTypeToEsFilterId(u8 type, u8 ch, CellCodecEsFilterId& pEsFilterId)
template<>
void fmt_class_string<CellPamfError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_PAMF_ERROR_STREAM_NOT_FOUND);
STR_CASE(CELL_PAMF_ERROR_INVALID_PAMF);
STR_CASE(CELL_PAMF_ERROR_INVALID_ARG);
STR_CASE(CELL_PAMF_ERROR_UNKNOWN_TYPE);
STR_CASE(CELL_PAMF_ERROR_UNSUPPORTED_VERSION);
STR_CASE(CELL_PAMF_ERROR_UNKNOWN_STREAM);
STR_CASE(CELL_PAMF_ERROR_EP_NOT_FOUND);
}
return unknown;
});
}
error_code pamfStreamTypeToEsFilterId(u8 type, u8 ch, CellCodecEsFilterId& pEsFilterId)
{
// convert type and ch to EsFilterId
verify(HERE), (ch < 16);
@@ -178,7 +198,7 @@ u8 pamfGetStreamChannel(vm::ptr<CellPamfReader> pSelf, u32 stream)
return 0xff;
}
s32 cellPamfGetHeaderSize(vm::ptr<PamfHeader> pAddr, u64 fileSize, vm::ptr<u64> pSize)
error_code cellPamfGetHeaderSize(vm::ptr<PamfHeader> pAddr, u64 fileSize, vm::ptr<u64> pSize)
{
cellPamf.warning("cellPamfGetHeaderSize(pAddr=*0x%x, fileSize=0x%llx, pSize=*0x%x)", pAddr, fileSize, pSize);
@@ -189,7 +209,7 @@ s32 cellPamfGetHeaderSize(vm::ptr<PamfHeader> pAddr, u64 fileSize, vm::ptr<u64>
return CELL_OK;
}
s32 cellPamfGetHeaderSize2(vm::ptr<PamfHeader> pAddr, u64 fileSize, u32 attribute, vm::ptr<u64> pSize)
error_code cellPamfGetHeaderSize2(vm::ptr<PamfHeader> pAddr, u64 fileSize, u32 attribute, vm::ptr<u64> pSize)
{
cellPamf.warning("cellPamfGetHeaderSize2(pAddr=*0x%x, fileSize=0x%llx, attribute=0x%x, pSize=*0x%x)", pAddr, fileSize, attribute, pSize);
@@ -200,7 +220,7 @@ s32 cellPamfGetHeaderSize2(vm::ptr<PamfHeader> pAddr, u64 fileSize, u32 attribut
return CELL_OK;
}
s32 cellPamfGetStreamOffsetAndSize(vm::ptr<PamfHeader> pAddr, u64 fileSize, vm::ptr<u64> pOffset, vm::ptr<u64> pSize)
error_code cellPamfGetStreamOffsetAndSize(vm::ptr<PamfHeader> pAddr, u64 fileSize, vm::ptr<u64> pOffset, vm::ptr<u64> pSize)
{
cellPamf.warning("cellPamfGetStreamOffsetAndSize(pAddr=*0x%x, fileSize=0x%llx, pOffset=*0x%x, pSize=*0x%x)", pAddr, fileSize, pOffset, pSize);
@@ -213,7 +233,7 @@ s32 cellPamfGetStreamOffsetAndSize(vm::ptr<PamfHeader> pAddr, u64 fileSize, vm::
return CELL_OK;
}
s32 cellPamfVerify(vm::ptr<PamfHeader> pAddr, u64 fileSize)
error_code cellPamfVerify(vm::ptr<PamfHeader> pAddr, u64 fileSize)
{
cellPamf.todo("cellPamfVerify(pAddr=*0x%x, fileSize=0x%llx)", pAddr, fileSize);
@@ -221,7 +241,7 @@ s32 cellPamfVerify(vm::ptr<PamfHeader> pAddr, u64 fileSize)
return CELL_OK;
}
s32 cellPamfReaderInitialize(vm::ptr<CellPamfReader> pSelf, vm::cptr<PamfHeader> pAddr, u64 fileSize, u32 attribute)
error_code cellPamfReaderInitialize(vm::ptr<CellPamfReader> pSelf, vm::cptr<PamfHeader> pAddr, u64 fileSize, u32 attribute)
{
cellPamf.warning("cellPamfReaderInitialize(pSelf=*0x%x, pAddr=*0x%x, fileSize=0x%llx, attribute=0x%x)", pSelf, pAddr, fileSize, attribute);
@@ -245,7 +265,7 @@ s32 cellPamfReaderInitialize(vm::ptr<CellPamfReader> pSelf, vm::cptr<PamfHeader>
return CELL_OK;
}
s32 cellPamfReaderGetPresentationStartTime(vm::ptr<CellPamfReader> pSelf, vm::ptr<CellCodecTimeStamp> pTimeStamp)
error_code cellPamfReaderGetPresentationStartTime(vm::ptr<CellPamfReader> pSelf, vm::ptr<CellCodecTimeStamp> pTimeStamp)
{
cellPamf.warning("cellPamfReaderGetPresentationStartTime(pSelf=*0x%x, pTimeStamp=*0x%x)", pSelf, pTimeStamp);
@@ -256,7 +276,7 @@ s32 cellPamfReaderGetPresentationStartTime(vm::ptr<CellPamfReader> pSelf, vm::pt
return CELL_OK;
}
s32 cellPamfReaderGetPresentationEndTime(vm::ptr<CellPamfReader> pSelf, vm::ptr<CellCodecTimeStamp> pTimeStamp)
error_code cellPamfReaderGetPresentationEndTime(vm::ptr<CellPamfReader> pSelf, vm::ptr<CellCodecTimeStamp> pTimeStamp)
{
cellPamf.warning("cellPamfReaderGetPresentationEndTime(pSelf=*0x%x, pTimeStamp=*0x%x)", pSelf, pTimeStamp);
@@ -324,7 +344,7 @@ u8 cellPamfReaderGetNumberOfSpecificStreams(vm::ptr<CellPamfReader> pSelf, u8 st
return 0;
}
s32 cellPamfReaderSetStreamWithIndex(vm::ptr<CellPamfReader> pSelf, u8 streamIndex)
error_code cellPamfReaderSetStreamWithIndex(vm::ptr<CellPamfReader> pSelf, u8 streamIndex)
{
cellPamf.warning("cellPamfReaderSetStreamWithIndex(pSelf=*0x%x, streamIndex=%d)", pSelf, streamIndex);
@@ -337,14 +357,13 @@ s32 cellPamfReaderSetStreamWithIndex(vm::ptr<CellPamfReader> pSelf, u8 streamInd
return CELL_OK;
}
s32 cellPamfReaderSetStreamWithTypeAndChannel(vm::ptr<CellPamfReader> pSelf, u8 streamType, u8 ch)
error_code cellPamfReaderSetStreamWithTypeAndChannel(vm::ptr<CellPamfReader> pSelf, u8 streamType, u8 ch)
{
cellPamf.warning("cellPamfReaderSetStreamWithTypeAndChannel(pSelf=*0x%x, streamType=%d, ch=%d)", pSelf, streamType, ch);
// it probably doesn't support "any audio" or "any video" argument
if (streamType > 5 || ch >= 16)
{
cellPamf.error("cellPamfReaderSetStreamWithTypeAndChannel(): invalid arguments (streamType=%d, ch=%d)", streamType, ch);
Emu.Pause();
return CELL_PAMF_ERROR_INVALID_ARG;
}
@@ -364,7 +383,7 @@ s32 cellPamfReaderSetStreamWithTypeAndChannel(vm::ptr<CellPamfReader> pSelf, u8
return CELL_PAMF_ERROR_STREAM_NOT_FOUND;
}
s32 cellPamfReaderSetStreamWithTypeAndIndex(vm::ptr<CellPamfReader> pSelf, u8 streamType, u8 streamIndex)
error_code cellPamfReaderSetStreamWithTypeAndIndex(vm::ptr<CellPamfReader> pSelf, u8 streamType, u8 streamIndex)
{
cellPamf.warning("cellPamfReaderSetStreamWithTypeAndIndex(pSelf=*0x%x, streamType=%d, streamIndex=%d)", pSelf, streamType, streamIndex);
@@ -417,7 +436,7 @@ s32 cellPamfReaderSetStreamWithTypeAndIndex(vm::ptr<CellPamfReader> pSelf, u8 st
return CELL_PAMF_ERROR_STREAM_NOT_FOUND;
}
s32 cellPamfStreamTypeToEsFilterId(u8 type, u8 ch, vm::ptr<CellCodecEsFilterId> pEsFilterId)
error_code cellPamfStreamTypeToEsFilterId(u8 type, u8 ch, vm::ptr<CellCodecEsFilterId> pEsFilterId)
{
cellPamf.warning("cellPamfStreamTypeToEsFilterId(type=%d, ch=%d, pEsFilterId=*0x%x)", type, ch, pEsFilterId);
@@ -437,7 +456,7 @@ s32 cellPamfReaderGetStreamIndex(vm::ptr<CellPamfReader> pSelf)
return pSelf->stream;
}
s32 cellPamfReaderGetStreamTypeAndChannel(vm::ptr<CellPamfReader> pSelf, vm::ptr<u8> pType, vm::ptr<u8> pCh)
error_code cellPamfReaderGetStreamTypeAndChannel(vm::ptr<CellPamfReader> pSelf, vm::ptr<u8> pType, vm::ptr<u8> pCh)
{
cellPamf.warning("cellPamfReaderGetStreamTypeAndChannel(pSelf=*0x%x, pType=*0x%x, pCh=*0x%x", pSelf, pType, pCh);
@@ -448,7 +467,7 @@ s32 cellPamfReaderGetStreamTypeAndChannel(vm::ptr<CellPamfReader> pSelf, vm::ptr
return CELL_OK;
}
s32 cellPamfReaderGetEsFilterId(vm::ptr<CellPamfReader> pSelf, vm::ptr<CellCodecEsFilterId> pEsFilterId)
error_code cellPamfReaderGetEsFilterId(vm::ptr<CellPamfReader> pSelf, vm::ptr<CellCodecEsFilterId> pEsFilterId)
{
cellPamf.warning("cellPamfReaderGetEsFilterId(pSelf=*0x%x, pEsFilterId=*0x%x)", pSelf, pEsFilterId);
@@ -463,7 +482,7 @@ s32 cellPamfReaderGetEsFilterId(vm::ptr<CellPamfReader> pSelf, vm::ptr<CellCodec
return CELL_OK;
}
s32 cellPamfReaderGetStreamInfo(vm::ptr<CellPamfReader> pSelf, vm::ptr<void> pInfo, u32 size)
error_code cellPamfReaderGetStreamInfo(vm::ptr<CellPamfReader> pSelf, vm::ptr<void> pInfo, u32 size)
{
cellPamf.warning("cellPamfReaderGetStreamInfo(pSelf=*0x%x, pInfo=*0x%x, size=%d)", pSelf, pInfo, size);
@@ -706,7 +725,7 @@ u32 cellPamfReaderGetNumberOfEp(vm::ptr<CellPamfReader> pSelf)
return 0; //pSelf->pAddr->stream_headers[pSelf->stream].ep_num;
}
s32 cellPamfReaderGetEpIteratorWithIndex(vm::ptr<CellPamfReader> pSelf, u32 epIndex, vm::ptr<CellPamfEpIterator> pIt)
error_code cellPamfReaderGetEpIteratorWithIndex(vm::ptr<CellPamfReader> pSelf, u32 epIndex, vm::ptr<CellPamfEpIterator> pIt)
{
cellPamf.todo("cellPamfReaderGetEpIteratorWithIndex(pSelf=*0x%x, epIndex=%d, pIt=*0x%x)", pSelf, epIndex, pIt);
@@ -714,7 +733,7 @@ s32 cellPamfReaderGetEpIteratorWithIndex(vm::ptr<CellPamfReader> pSelf, u32 epIn
return CELL_OK;
}
s32 cellPamfReaderGetEpIteratorWithTimeStamp(vm::ptr<CellPamfReader> pSelf, vm::ptr<CellCodecTimeStamp> pTimeStamp, vm::ptr<CellPamfEpIterator> pIt)
error_code cellPamfReaderGetEpIteratorWithTimeStamp(vm::ptr<CellPamfReader> pSelf, vm::ptr<CellCodecTimeStamp> pTimeStamp, vm::ptr<CellPamfEpIterator> pIt)
{
cellPamf.todo("cellPamfReaderGetEpIteratorWithTimeStamp(pSelf=*0x%x, pTimeStamp=*0x%x, pIt=*0x%x)", pSelf, pTimeStamp, pIt);
@@ -722,7 +741,7 @@ s32 cellPamfReaderGetEpIteratorWithTimeStamp(vm::ptr<CellPamfReader> pSelf, vm::
return CELL_OK;
}
s32 cellPamfEpIteratorGetEp(vm::ptr<CellPamfEpIterator> pIt, vm::ptr<CellPamfEp> pEp)
error_code cellPamfEpIteratorGetEp(vm::ptr<CellPamfEpIterator> pIt, vm::ptr<CellPamfEp> pEp)
{
cellPamf.todo("cellPamfEpIteratorGetEp(pIt=*0x%x, pEp=*0x%x)", pIt, pEp);
+3 -3
View File
@@ -1,9 +1,9 @@
#pragma once
#pragma once
#include "Emu/Memory/vm_ptr.h"
// Error Codes
enum
enum CellPamfError : u32
{
CELL_PAMF_ERROR_STREAM_NOT_FOUND = 0x80610501,
CELL_PAMF_ERROR_INVALID_PAMF = 0x80610502,
@@ -396,7 +396,7 @@ struct CellPamfReader
CHECK_SIZE(CellPamfReader, 128);
s32 cellPamfReaderInitialize(vm::ptr<CellPamfReader> pSelf, vm::cptr<PamfHeader> pAddr, u64 fileSize, u32 attribute);
error_code cellPamfReaderInitialize(vm::ptr<CellPamfReader> pSelf, vm::cptr<PamfHeader> pAddr, u64 fileSize, u32 attribute);
#include <mutex>
#include <condition_variable>
+16 -16
View File
@@ -1,93 +1,93 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
LOG_CHANNEL(cellPesmUtility);
s32 cellPesmCloseDevice()
error_code cellPesmCloseDevice()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmEncryptSample()
error_code cellPesmEncryptSample()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmEncryptSample2()
error_code cellPesmEncryptSample2()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmEndMovieRec()
error_code cellPesmEndMovieRec()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmFinalize()
error_code cellPesmFinalize()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmFinalize2()
error_code cellPesmFinalize2()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmGetSinf()
error_code cellPesmGetSinf()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmInitEntry()
error_code cellPesmInitEntry()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmInitEntry2()
error_code cellPesmInitEntry2()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmInitialize()
error_code cellPesmInitialize()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmLoadAsync()
error_code cellPesmLoadAsync()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmOpenDevice()
error_code cellPesmOpenDevice()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmPrepareRec()
error_code cellPesmPrepareRec()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmStartMovieRec()
error_code cellPesmStartMovieRec()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
}
s32 cellPesmUnloadAsync()
error_code cellPesmUnloadAsync()
{
UNIMPLEMENTED_FUNC(cellPesmUtility);
return CELL_OK;
+21 -2
View File
@@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "cellSysutil.h"
@@ -7,7 +7,7 @@
LOG_CHANNEL(cellPhotoDecode);
// Return Codes
enum
enum CellPhotoDecodeError : u32
{
CELL_PHOTO_DECODE_ERROR_BUSY = 0x8002c901,
CELL_PHOTO_DECODE_ERROR_INTERNAL = 0x8002c902,
@@ -17,6 +17,25 @@ enum
CELL_PHOTO_DECODE_ERROR_DECODE = 0x8002c906,
};
template<>
void fmt_class_string<CellPhotoDecodeError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_PHOTO_DECODE_ERROR_BUSY);
STR_CASE(CELL_PHOTO_DECODE_ERROR_INTERNAL);
STR_CASE(CELL_PHOTO_DECODE_ERROR_PARAM);
STR_CASE(CELL_PHOTO_DECODE_ERROR_ACCESS_ERROR);
STR_CASE(CELL_PHOTO_DECODE_ERROR_INITIALIZE);
STR_CASE(CELL_PHOTO_DECODE_ERROR_DECODE);
}
return unknown;
});
}
struct CellPhotoDecodeSetParam
{
vm::bptr<void> dstBuffer;
+28 -5
View File
@@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "cellSysutil.h"
@@ -7,7 +7,7 @@
LOG_CHANNEL(cellPhotoExport);
// Return Codes
enum
enum CellPhotoExportError : u32
{
CELL_PHOTO_EXPORT_UTIL_ERROR_BUSY = 0x8002c201,
CELL_PHOTO_EXPORT_UTIL_ERROR_INTERNAL = 0x8002c202,
@@ -21,6 +21,29 @@ enum
CELL_PHOTO_EXPORT_UTIL_ERROR_INITIALIZE = 0x8002c20a,
};
template<>
void fmt_class_string<CellPhotoExportError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_BUSY);
STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_INTERNAL);
STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_PARAM);
STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_ACCESS_ERROR);
STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_DB_INTERNAL);
STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_DB_REGIST);
STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_SET_META);
STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_FLUSH_META);
STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_MOVE);
STR_CASE(CELL_PHOTO_EXPORT_UTIL_ERROR_INITIALIZE);
}
return unknown;
});
}
struct CellPhotoExportSetParam
{
vm::bptr<char> photo_title;
@@ -31,19 +54,19 @@ struct CellPhotoExportSetParam
using CellPhotoExportUtilFinishCallback = void(s32 result, vm::ptr<void> userdata);
s32 cellPhotoInitialize()
error_code cellPhotoInitialize()
{
UNIMPLEMENTED_FUNC(cellPhotoExport);
return CELL_OK;
}
s32 cellPhotoFinalize()
error_code cellPhotoFinalize()
{
UNIMPLEMENTED_FUNC(cellPhotoExport);
return CELL_OK;
}
s32 cellPhotoRegistFromFile()
error_code cellPhotoRegistFromFile()
{
UNIMPLEMENTED_FUNC(cellPhotoExport);
return CELL_OK;
+21 -2
View File
@@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "Emu/Cell/lv2/sys_fs.h"
#include "cellSysutil.h"
@@ -8,7 +8,7 @@
LOG_CHANNEL(cellPhotoImportUtil);
// Return Codes
enum
enum CellPhotoImportError : u32
{
CELL_PHOTO_IMPORT_ERROR_BUSY = 0x8002c701,
CELL_PHOTO_IMPORT_ERROR_INTERNAL = 0x8002c702,
@@ -18,6 +18,25 @@ enum
CELL_PHOTO_IMPORT_ERROR_INITIALIZE = 0x8002c706,
};
template<>
void fmt_class_string<CellPhotoImportError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_PHOTO_IMPORT_ERROR_BUSY);
STR_CASE(CELL_PHOTO_IMPORT_ERROR_INTERNAL);
STR_CASE(CELL_PHOTO_IMPORT_ERROR_PARAM);
STR_CASE(CELL_PHOTO_IMPORT_ERROR_ACCESS_ERROR);
STR_CASE(CELL_PHOTO_IMPORT_ERROR_COPY);
STR_CASE(CELL_PHOTO_IMPORT_ERROR_INITIALIZE);
}
return unknown;
});
}
enum
{
CELL_PHOTO_IMPORT_HDD_PATH_MAX = 1055,
+6 -6
View File
@@ -1,33 +1,33 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
LOG_CHANNEL(cellRtcAlarm);
s32 cellRtcAlarmRegister()
error_code cellRtcAlarmRegister()
{
UNIMPLEMENTED_FUNC(cellRtcAlarm);
return CELL_OK;
}
s32 cellRtcAlarmUnregister()
error_code cellRtcAlarmUnregister()
{
UNIMPLEMENTED_FUNC(cellRtcAlarm);
return CELL_OK;
}
s32 cellRtcAlarmNotification()
error_code cellRtcAlarmNotification()
{
UNIMPLEMENTED_FUNC(cellRtcAlarm);
return CELL_OK;
}
s32 cellRtcAlarmStopRunning()
error_code cellRtcAlarmStopRunning()
{
UNIMPLEMENTED_FUNC(cellRtcAlarm);
return CELL_OK;
}
s32 cellRtcAlarmGetStatus()
error_code cellRtcAlarmGetStatus()
{
UNIMPLEMENTED_FUNC(cellRtcAlarm);
return CELL_OK;
+82 -31
View File
@@ -6,6 +6,57 @@
LOG_CHANNEL(cellRudp);
template <>
void fmt_class_string<CellRudpError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_RUDP_ERROR_NOT_INITIALIZED);
STR_CASE(CELL_RUDP_ERROR_ALREADY_INITIALIZED);
STR_CASE(CELL_RUDP_ERROR_INVALID_CONTEXT_ID);
STR_CASE(CELL_RUDP_ERROR_INVALID_ARGUMENT);
STR_CASE(CELL_RUDP_ERROR_INVALID_OPTION);
STR_CASE(CELL_RUDP_ERROR_INVALID_MUXMODE);
STR_CASE(CELL_RUDP_ERROR_MEMORY);
STR_CASE(CELL_RUDP_ERROR_INTERNAL);
STR_CASE(CELL_RUDP_ERROR_CONN_RESET);
STR_CASE(CELL_RUDP_ERROR_CONN_REFUSED);
STR_CASE(CELL_RUDP_ERROR_CONN_TIMEOUT);
STR_CASE(CELL_RUDP_ERROR_CONN_VERSION_MISMATCH);
STR_CASE(CELL_RUDP_ERROR_CONN_TRANSPORT_TYPE_MISMATCH);
STR_CASE(CELL_RUDP_ERROR_QUALITY_LEVEL_MISMATCH);
STR_CASE(CELL_RUDP_ERROR_THREAD);
STR_CASE(CELL_RUDP_ERROR_THREAD_IN_USE);
STR_CASE(CELL_RUDP_ERROR_NOT_ACCEPTABLE);
STR_CASE(CELL_RUDP_ERROR_MSG_TOO_LARGE);
STR_CASE(CELL_RUDP_ERROR_NOT_BOUND);
STR_CASE(CELL_RUDP_ERROR_CANCELLED);
STR_CASE(CELL_RUDP_ERROR_INVALID_VPORT);
STR_CASE(CELL_RUDP_ERROR_WOULDBLOCK);
STR_CASE(CELL_RUDP_ERROR_VPORT_IN_USE);
STR_CASE(CELL_RUDP_ERROR_VPORT_EXHAUSTED);
STR_CASE(CELL_RUDP_ERROR_INVALID_SOCKET);
STR_CASE(CELL_RUDP_ERROR_BUFFER_TOO_SMALL);
STR_CASE(CELL_RUDP_ERROR_MSG_MALFORMED);
STR_CASE(CELL_RUDP_ERROR_ADDR_IN_USE);
STR_CASE(CELL_RUDP_ERROR_ALREADY_BOUND);
STR_CASE(CELL_RUDP_ERROR_ALREADY_EXISTS);
STR_CASE(CELL_RUDP_ERROR_INVALID_POLL_ID);
STR_CASE(CELL_RUDP_ERROR_TOO_MANY_CONTEXTS);
STR_CASE(CELL_RUDP_ERROR_IN_PROGRESS);
STR_CASE(CELL_RUDP_ERROR_NO_EVENT_HANDLER);
STR_CASE(CELL_RUDP_ERROR_PAYLOAD_TOO_LARGE);
STR_CASE(CELL_RUDP_ERROR_END_OF_DATA);
STR_CASE(CELL_RUDP_ERROR_ALREADY_ESTABLISHED);
STR_CASE(CELL_RUDP_ERROR_KEEP_ALIVE_FAILURE);
}
return unknown;
});
}
struct rudp_info
{
// allocator functions
@@ -17,7 +68,7 @@ struct rudp_info
vm::ptr<void> handler_arg;
};
s32 cellRudpInit(vm::ptr<CellRudpAllocator> allocator)
error_code cellRudpInit(vm::ptr<CellRudpAllocator> allocator)
{
cellRudp.warning("cellRudpInit(allocator=*0x%x)", allocator);
@@ -52,7 +103,7 @@ s32 cellRudpInit(vm::ptr<CellRudpAllocator> allocator)
return CELL_OK;
}
s32 cellRudpEnd()
error_code cellRudpEnd()
{
cellRudp.warning("cellRudpEnd()");
@@ -70,13 +121,13 @@ s32 cellRudpEnd()
return CELL_OK;
}
s32 cellRudpEnableInternalIOThread()
error_code cellRudpEnableInternalIOThread()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpSetEventHandler(vm::ptr<CellRudpEventHandler> handler, vm::ptr<void> arg)
error_code cellRudpSetEventHandler(vm::ptr<CellRudpEventHandler> handler, vm::ptr<void> arg)
{
cellRudp.todo("cellRudpSetEventHandler(handler=*0x%x, arg=*0x%x)", handler, arg);
@@ -93,163 +144,163 @@ s32 cellRudpSetEventHandler(vm::ptr<CellRudpEventHandler> handler, vm::ptr<void>
return CELL_OK;
}
s32 cellRudpSetMaxSegmentSize(u16 mss)
error_code cellRudpSetMaxSegmentSize(u16 mss)
{
cellRudp.todo("cellRudpSetMaxSegmentSize(mss=%d)", mss);
return CELL_OK;
}
s32 cellRudpGetMaxSegmentSize()
error_code cellRudpGetMaxSegmentSize()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpCreateContext()
error_code cellRudpCreateContext()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpSetOption()
error_code cellRudpSetOption()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpGetOption()
error_code cellRudpGetOption()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpGetContextStatus()
error_code cellRudpGetContextStatus()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpGetStatus()
error_code cellRudpGetStatus()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpGetLocalInfo()
error_code cellRudpGetLocalInfo()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpGetRemoteInfo()
error_code cellRudpGetRemoteInfo()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpAccept()
error_code cellRudpAccept()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpBind()
error_code cellRudpBind()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpListen()
error_code cellRudpListen()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpInitiate()
error_code cellRudpInitiate()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpActivate()
error_code cellRudpActivate()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpTerminate()
error_code cellRudpTerminate()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpRead()
error_code cellRudpRead()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpWrite()
error_code cellRudpWrite()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpGetSizeReadable()
error_code cellRudpGetSizeReadable()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpGetSizeWritable()
error_code cellRudpGetSizeWritable()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpFlush()
error_code cellRudpFlush()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpPollCreate()
error_code cellRudpPollCreate()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpPollDestroy()
error_code cellRudpPollDestroy()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpPollControl()
error_code cellRudpPollControl()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpPollWait()
error_code cellRudpPollWait()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpPollCancel()
error_code cellRudpPollCancel()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpNetReceived()
error_code cellRudpNetReceived()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
}
s32 cellRudpProcessEvents()
error_code cellRudpProcessEvents()
{
UNIMPLEMENTED_FUNC(cellRudp);
return CELL_OK;
+2 -2
View File
@@ -1,9 +1,9 @@
#pragma once
#pragma once
#include "Emu/Memory/vm_ptr.h"
// Return Codes
enum
enum CellRudpError : u32
{
CELL_RUDP_SUCCESS = 0,
CELL_RUDP_ERROR_NOT_INITIALIZED = 0x80770001,
+147 -122
View File
@@ -7,7 +7,32 @@
LOG_CHANNEL(cellSail);
s32 cellSailMemAllocatorInitialize(vm::ptr<CellSailMemAllocator> pSelf, vm::ptr<CellSailMemAllocatorFuncs> pCallbacks)
template <>
void fmt_class_string<CellSailError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_SAIL_ERROR_INVALID_ARG);
STR_CASE(CELL_SAIL_ERROR_INVALID_STATE);
STR_CASE(CELL_SAIL_ERROR_UNSUPPORTED_STREAM);
STR_CASE(CELL_SAIL_ERROR_INDEX_OUT_OF_RANGE);
STR_CASE(CELL_SAIL_ERROR_EMPTY);
STR_CASE(CELL_SAIL_ERROR_FULLED);
STR_CASE(CELL_SAIL_ERROR_USING);
STR_CASE(CELL_SAIL_ERROR_NOT_AVAILABLE);
STR_CASE(CELL_SAIL_ERROR_CANCEL);
STR_CASE(CELL_SAIL_ERROR_MEMORY);
STR_CASE(CELL_SAIL_ERROR_INVALID_FD);
STR_CASE(CELL_SAIL_ERROR_FATAL);
}
return unknown;
});
}
error_code cellSailMemAllocatorInitialize(vm::ptr<CellSailMemAllocator> pSelf, vm::ptr<CellSailMemAllocatorFuncs> pCallbacks)
{
cellSail.warning("cellSailMemAllocatorInitialize(pSelf=*0x%x, pCallbacks=*0x%x)", pSelf, pCallbacks);
@@ -16,61 +41,61 @@ s32 cellSailMemAllocatorInitialize(vm::ptr<CellSailMemAllocator> pSelf, vm::ptr<
return CELL_OK;
}
s32 cellSailFutureInitialize(vm::ptr<CellSailFuture> pSelf)
error_code cellSailFutureInitialize(vm::ptr<CellSailFuture> pSelf)
{
cellSail.todo("cellSailFutureInitialize(pSelf=*0x%x)", pSelf);
return CELL_OK;
}
s32 cellSailFutureFinalize(vm::ptr<CellSailFuture> pSelf)
error_code cellSailFutureFinalize(vm::ptr<CellSailFuture> pSelf)
{
cellSail.todo("cellSailFutureFinalize(pSelf=*0x%x)", pSelf);
return CELL_OK;
}
s32 cellSailFutureReset(vm::ptr<CellSailFuture> pSelf, b8 wait)
error_code cellSailFutureReset(vm::ptr<CellSailFuture> pSelf, b8 wait)
{
cellSail.todo("cellSailFutureReset(pSelf=*0x%x, wait=%d)", pSelf, wait);
return CELL_OK;
}
s32 cellSailFutureSet(vm::ptr<CellSailFuture> pSelf, s32 result)
error_code cellSailFutureSet(vm::ptr<CellSailFuture> pSelf, s32 result)
{
cellSail.todo("cellSailFutureSet(pSelf=*0x%x, result=%d)", pSelf, result);
return CELL_OK;
}
s32 cellSailFutureGet(vm::ptr<CellSailFuture> pSelf, u64 timeout, vm::ptr<s32> pResult)
error_code cellSailFutureGet(vm::ptr<CellSailFuture> pSelf, u64 timeout, vm::ptr<s32> pResult)
{
cellSail.todo("cellSailFutureGet(pSelf=*0x%x, timeout=%lld, result=*0x%x)", pSelf, timeout, pResult);
return CELL_OK;
}
s32 cellSailFutureIsDone(vm::ptr<CellSailFuture> pSelf, vm::ptr<s32> pResult)
error_code cellSailFutureIsDone(vm::ptr<CellSailFuture> pSelf, vm::ptr<s32> pResult)
{
cellSail.todo("cellSailFutureIsDone(pSelf=*0x%x, result=*0x%x)", pSelf, pResult);
return CELL_OK;
}
s32 cellSailDescriptorGetStreamType()
error_code cellSailDescriptorGetStreamType()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailDescriptorGetUri()
error_code cellSailDescriptorGetUri()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailDescriptorGetMediaInfo()
error_code cellSailDescriptorGetMediaInfo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailDescriptorSetAutoSelection(vm::ptr<CellSailDescriptor> pSelf, b8 autoSelection)
error_code cellSailDescriptorSetAutoSelection(vm::ptr<CellSailDescriptor> pSelf, b8 autoSelection)
{
cellSail.warning("cellSailDescriptorSetAutoSelection(pSelf=*0x%x, autoSelection=%d)", pSelf, autoSelection);
@@ -83,7 +108,7 @@ s32 cellSailDescriptorSetAutoSelection(vm::ptr<CellSailDescriptor> pSelf, b8 aut
return CELL_OK;
}
s32 cellSailDescriptorIsAutoSelection(vm::ptr<CellSailDescriptor> pSelf)
error_code cellSailDescriptorIsAutoSelection(vm::ptr<CellSailDescriptor> pSelf)
{
cellSail.warning("cellSailDescriptorIsAutoSelection(pSelf=*0x%x)", pSelf);
@@ -95,7 +120,7 @@ s32 cellSailDescriptorIsAutoSelection(vm::ptr<CellSailDescriptor> pSelf)
return CELL_OK;
}
s32 cellSailDescriptorCreateDatabase(vm::ptr<CellSailDescriptor> pSelf, vm::ptr<void> pDatabase, u32 size, u64 arg)
error_code cellSailDescriptorCreateDatabase(vm::ptr<CellSailDescriptor> pSelf, vm::ptr<void> pDatabase, u32 size, u64 arg)
{
cellSail.warning("cellSailDescriptorCreateDatabase(pSelf=*0x%x, pDatabase=*0x%x, size=0x%x, arg=0x%llx)", pSelf, pDatabase, size, arg);
@@ -115,55 +140,55 @@ s32 cellSailDescriptorCreateDatabase(vm::ptr<CellSailDescriptor> pSelf, vm::ptr<
return CELL_OK;
}
s32 cellSailDescriptorDestroyDatabase()
error_code cellSailDescriptorDestroyDatabase()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailDescriptorOpen()
error_code cellSailDescriptorOpen()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailDescriptorClose()
error_code cellSailDescriptorClose()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailDescriptorSetEs()
error_code cellSailDescriptorSetEs()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailDescriptorClearEs()
error_code cellSailDescriptorClearEs()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailDescriptorGetCapabilities()
error_code cellSailDescriptorGetCapabilities()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailDescriptorInquireCapability()
error_code cellSailDescriptorInquireCapability()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailDescriptorSetParameter()
error_code cellSailDescriptorSetParameter()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailSoundAdapterInitialize(vm::ptr<CellSailSoundAdapter> pSelf, vm::cptr<CellSailSoundAdapterFuncs> pCallbacks, vm::ptr<void> pArg)
error_code cellSailSoundAdapterInitialize(vm::ptr<CellSailSoundAdapter> pSelf, vm::cptr<CellSailSoundAdapterFuncs> pCallbacks, vm::ptr<void> pArg)
{
cellSail.warning("cellSailSoundAdapterInitialize(pSelf=*0x%x, pCallbacks=*0x%x, pArg=*0x%x)", pSelf, pCallbacks, pArg);
@@ -187,7 +212,7 @@ s32 cellSailSoundAdapterInitialize(vm::ptr<CellSailSoundAdapter> pSelf, vm::cptr
return CELL_OK;
}
s32 cellSailSoundAdapterFinalize(vm::ptr<CellSailSoundAdapter> pSelf)
error_code cellSailSoundAdapterFinalize(vm::ptr<CellSailSoundAdapter> pSelf)
{
cellSail.warning("cellSailSoundAdapterFinalize(pSelf=*0x%x)", pSelf);
@@ -204,7 +229,7 @@ s32 cellSailSoundAdapterFinalize(vm::ptr<CellSailSoundAdapter> pSelf)
return CELL_OK;
}
s32 cellSailSoundAdapterSetPreferredFormat(vm::ptr<CellSailSoundAdapter> pSelf, vm::cptr<CellSailAudioFormat> pFormat)
error_code cellSailSoundAdapterSetPreferredFormat(vm::ptr<CellSailSoundAdapter> pSelf, vm::cptr<CellSailAudioFormat> pFormat)
{
cellSail.warning("cellSailSoundAdapterSetPreferredFormat(pSelf=*0x%x, pFormat=*0x%x)", pSelf, pFormat);
@@ -213,7 +238,7 @@ s32 cellSailSoundAdapterSetPreferredFormat(vm::ptr<CellSailSoundAdapter> pSelf,
return CELL_OK;
}
s32 cellSailSoundAdapterGetFrame(vm::ptr<CellSailSoundAdapter> pSelf, u32 samples, vm::ptr<CellSailSoundFrameInfo> pInfo)
error_code cellSailSoundAdapterGetFrame(vm::ptr<CellSailSoundAdapter> pSelf, u32 samples, vm::ptr<CellSailSoundFrameInfo> pInfo)
{
cellSail.todo("cellSailSoundAdapterGetFrame(pSelf=*0x%x, samples=%d, pInfo=*0x%x)", pSelf, samples, pInfo);
@@ -235,7 +260,7 @@ s32 cellSailSoundAdapterGetFrame(vm::ptr<CellSailSoundAdapter> pSelf, u32 sample
return CELL_OK;
}
s32 cellSailSoundAdapterGetFormat(vm::ptr<CellSailSoundAdapter> pSelf, vm::ptr<CellSailAudioFormat> pFormat)
error_code cellSailSoundAdapterGetFormat(vm::ptr<CellSailSoundAdapter> pSelf, vm::ptr<CellSailAudioFormat> pFormat)
{
cellSail.warning("cellSailSoundAdapterGetFormat(pSelf=*0x%x, pFormat=*0x%x)", pSelf, pFormat);
@@ -244,19 +269,19 @@ s32 cellSailSoundAdapterGetFormat(vm::ptr<CellSailSoundAdapter> pSelf, vm::ptr<C
return CELL_OK;
}
s32 cellSailSoundAdapterUpdateAvSync()
error_code cellSailSoundAdapterUpdateAvSync()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailSoundAdapterPtsToTimePosition()
error_code cellSailSoundAdapterPtsToTimePosition()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailGraphicsAdapterInitialize(vm::ptr<CellSailGraphicsAdapter> pSelf, vm::cptr<CellSailGraphicsAdapterFuncs> pCallbacks, vm::ptr<void> pArg)
error_code cellSailGraphicsAdapterInitialize(vm::ptr<CellSailGraphicsAdapter> pSelf, vm::cptr<CellSailGraphicsAdapterFuncs> pCallbacks, vm::ptr<void> pArg)
{
cellSail.warning("cellSailGraphicsAdapterInitialize(pSelf=*0x%x, pCallbacks=*0x%x, pArg=*0x%x)", pSelf, pCallbacks, pArg);
@@ -282,7 +307,7 @@ s32 cellSailGraphicsAdapterInitialize(vm::ptr<CellSailGraphicsAdapter> pSelf, vm
return CELL_OK;
}
s32 cellSailGraphicsAdapterFinalize(vm::ptr<CellSailGraphicsAdapter> pSelf)
error_code cellSailGraphicsAdapterFinalize(vm::ptr<CellSailGraphicsAdapter> pSelf)
{
cellSail.todo("cellSailGraphicsAdapterFinalize(pSelf=*0x%x)", pSelf);
@@ -299,7 +324,7 @@ s32 cellSailGraphicsAdapterFinalize(vm::ptr<CellSailGraphicsAdapter> pSelf)
return CELL_OK;
}
s32 cellSailGraphicsAdapterSetPreferredFormat(vm::ptr<CellSailGraphicsAdapter> pSelf, vm::cptr<CellSailVideoFormat> pFormat)
error_code cellSailGraphicsAdapterSetPreferredFormat(vm::ptr<CellSailGraphicsAdapter> pSelf, vm::cptr<CellSailVideoFormat> pFormat)
{
cellSail.warning("cellSailGraphicsAdapterSetPreferredFormat(pSelf=*0x%x, pFormat=*0x%x)", pSelf, pFormat);
@@ -308,20 +333,20 @@ s32 cellSailGraphicsAdapterSetPreferredFormat(vm::ptr<CellSailGraphicsAdapter> p
return CELL_OK;
}
s32 cellSailGraphicsAdapterGetFrame(vm::ptr<CellSailGraphicsAdapter> pSelf, vm::ptr<CellSailGraphicsFrameInfo> pInfo)
error_code cellSailGraphicsAdapterGetFrame(vm::ptr<CellSailGraphicsAdapter> pSelf, vm::ptr<CellSailGraphicsFrameInfo> pInfo)
{
cellSail.todo("cellSailGraphicsAdapterGetFrame(pSelf=*0x%x, pInfo=*0x%x)", pSelf, pInfo);
return CELL_OK;
}
s32 cellSailGraphicsAdapterGetFrame2(vm::ptr<CellSailGraphicsAdapter> pSelf, vm::ptr<CellSailGraphicsFrameInfo> pInfo, vm::ptr<CellSailGraphicsFrameInfo> pPrevInfo, vm::ptr<u64> pFlipTime, u64 flags)
error_code cellSailGraphicsAdapterGetFrame2(vm::ptr<CellSailGraphicsAdapter> pSelf, vm::ptr<CellSailGraphicsFrameInfo> pInfo, vm::ptr<CellSailGraphicsFrameInfo> pPrevInfo, vm::ptr<u64> pFlipTime, u64 flags)
{
cellSail.todo("cellSailGraphicsAdapterGetFrame2(pSelf=*0x%x, pInfo=*0x%x, pPrevInfo=*0x%x, flipTime=*0x%x, flags=0x%llx)", pSelf, pInfo, pPrevInfo, pFlipTime, flags);
return CELL_OK;
}
s32 cellSailGraphicsAdapterGetFormat(vm::ptr<CellSailGraphicsAdapter> pSelf, vm::ptr<CellSailVideoFormat> pFormat)
error_code cellSailGraphicsAdapterGetFormat(vm::ptr<CellSailGraphicsAdapter> pSelf, vm::ptr<CellSailVideoFormat> pFormat)
{
cellSail.warning("cellSailGraphicsAdapterGetFormat(pSelf=*0x%x, pFormat=*0x%x)", pSelf, pFormat);
@@ -330,266 +355,266 @@ s32 cellSailGraphicsAdapterGetFormat(vm::ptr<CellSailGraphicsAdapter> pSelf, vm:
return CELL_OK;
}
s32 cellSailGraphicsAdapterUpdateAvSync()
error_code cellSailGraphicsAdapterUpdateAvSync()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailGraphicsAdapterPtsToTimePosition()
error_code cellSailGraphicsAdapterPtsToTimePosition()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailAuReceiverInitialize()
error_code cellSailAuReceiverInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailAuReceiverFinalize()
error_code cellSailAuReceiverFinalize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailAuReceiverGet()
error_code cellSailAuReceiverGet()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailRendererAudioInitialize()
error_code cellSailRendererAudioInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailRendererAudioFinalize()
error_code cellSailRendererAudioFinalize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailRendererAudioNotifyCallCompleted()
error_code cellSailRendererAudioNotifyCallCompleted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailRendererAudioNotifyFrameDone()
error_code cellSailRendererAudioNotifyFrameDone()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailRendererAudioNotifyOutputEos()
error_code cellSailRendererAudioNotifyOutputEos()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailRendererVideoInitialize()
error_code cellSailRendererVideoInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailRendererVideoFinalize()
error_code cellSailRendererVideoFinalize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailRendererVideoNotifyCallCompleted()
error_code cellSailRendererVideoNotifyCallCompleted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailRendererVideoNotifyFrameDone()
error_code cellSailRendererVideoNotifyFrameDone()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailRendererVideoNotifyOutputEos()
error_code cellSailRendererVideoNotifyOutputEos()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailSourceInitialize()
error_code cellSailSourceInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailSourceFinalize()
error_code cellSailSourceFinalize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailSourceNotifyCallCompleted()
error_code cellSailSourceNotifyCallCompleted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailSourceNotifyInputEos()
error_code cellSailSourceNotifyInputEos()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailSourceNotifyStreamOut()
error_code cellSailSourceNotifyStreamOut()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailSourceNotifySessionError()
error_code cellSailSourceNotifySessionError()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailSourceNotifyMediaStateChanged()
error_code cellSailSourceNotifyMediaStateChanged()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailSourceNotifyOpenCompleted()
error_code cellSailSourceNotifyOpenCompleted()
{
fmt::throw_exception("Unexpected function" HERE);
}
s32 cellSailSourceNotifyStartCompleted()
error_code cellSailSourceNotifyStartCompleted()
{
fmt::throw_exception("Unexpected function" HERE);
}
s32 cellSailSourceNotifyStopCompleted()
error_code cellSailSourceNotifyStopCompleted()
{
fmt::throw_exception("Unexpected function" HERE);
}
s32 cellSailSourceNotifyReadCompleted()
error_code cellSailSourceNotifyReadCompleted()
{
fmt::throw_exception("Unexpected function" HERE);
}
s32 cellSailSourceSetDiagHandler()
error_code cellSailSourceSetDiagHandler()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailSourceNotifyCloseCompleted()
error_code cellSailSourceNotifyCloseCompleted()
{
fmt::throw_exception("Unexpected function" HERE);
}
s32 cellSailMp4MovieGetBrand()
error_code cellSailMp4MovieGetBrand()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailMp4MovieIsCompatibleBrand()
error_code cellSailMp4MovieIsCompatibleBrand()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailMp4MovieGetMovieInfo()
error_code cellSailMp4MovieGetMovieInfo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailMp4MovieGetTrackByIndex()
error_code cellSailMp4MovieGetTrackByIndex()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailMp4MovieGetTrackById()
error_code cellSailMp4MovieGetTrackById()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailMp4MovieGetTrackByTypeAndIndex()
error_code cellSailMp4MovieGetTrackByTypeAndIndex()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailMp4TrackGetTrackInfo()
error_code cellSailMp4TrackGetTrackInfo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailMp4TrackGetTrackReferenceCount()
error_code cellSailMp4TrackGetTrackReferenceCount()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailMp4TrackGetTrackReference()
error_code cellSailMp4TrackGetTrackReference()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailAviMovieGetMovieInfo()
error_code cellSailAviMovieGetMovieInfo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailAviMovieGetStreamByIndex()
error_code cellSailAviMovieGetStreamByIndex()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailAviMovieGetStreamByTypeAndIndex()
error_code cellSailAviMovieGetStreamByTypeAndIndex()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailAviMovieGetHeader()
error_code cellSailAviMovieGetHeader()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailAviStreamGetMediaType()
error_code cellSailAviStreamGetMediaType()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailAviStreamGetHeader()
error_code cellSailAviStreamGetHeader()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerInitialize()
error_code cellSailPlayerInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerInitialize2(ppu_thread& ppu,
error_code cellSailPlayerInitialize2(ppu_thread& ppu,
vm::ptr<CellSailPlayer> pSelf,
vm::ptr<CellSailMemAllocator> pAllocator,
vm::ptr<CellSailPlayerFuncNotified> pCallback,
@@ -618,7 +643,7 @@ s32 cellSailPlayerInitialize2(ppu_thread& ppu,
return CELL_OK;
}
s32 cellSailPlayerFinalize(vm::ptr<CellSailPlayer> pSelf)
error_code cellSailPlayerFinalize(vm::ptr<CellSailPlayer> pSelf)
{
cellSail.todo("cellSailPlayerFinalize(pSelf=*0x%x)", pSelf);
@@ -635,19 +660,19 @@ s32 cellSailPlayerFinalize(vm::ptr<CellSailPlayer> pSelf)
return CELL_OK;
}
s32 cellSailPlayerRegisterSource()
error_code cellSailPlayerRegisterSource()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerGetRegisteredProtocols()
error_code cellSailPlayerGetRegisteredProtocols()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerSetSoundAdapter(vm::ptr<CellSailPlayer> pSelf, u32 index, vm::ptr<CellSailSoundAdapter> pAdapter)
error_code cellSailPlayerSetSoundAdapter(vm::ptr<CellSailPlayer> pSelf, u32 index, vm::ptr<CellSailSoundAdapter> pAdapter)
{
cellSail.warning("cellSailPlayerSetSoundAdapter(pSelf=*0x%x, index=%d, pAdapter=*0x%x)", pSelf, index, pAdapter);
@@ -663,7 +688,7 @@ s32 cellSailPlayerSetSoundAdapter(vm::ptr<CellSailPlayer> pSelf, u32 index, vm::
return CELL_OK;
}
s32 cellSailPlayerSetGraphicsAdapter(vm::ptr<CellSailPlayer> pSelf, u32 index, vm::ptr<CellSailGraphicsAdapter> pAdapter)
error_code cellSailPlayerSetGraphicsAdapter(vm::ptr<CellSailPlayer> pSelf, u32 index, vm::ptr<CellSailGraphicsAdapter> pAdapter)
{
cellSail.warning("cellSailPlayerSetGraphicsAdapter(pSelf=*0x%x, index=%d, pAdapter=*0x%x)", pSelf, index, pAdapter);
@@ -679,25 +704,25 @@ s32 cellSailPlayerSetGraphicsAdapter(vm::ptr<CellSailPlayer> pSelf, u32 index, v
return CELL_OK;
}
s32 cellSailPlayerSetAuReceiver()
error_code cellSailPlayerSetAuReceiver()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerSetRendererAudio()
error_code cellSailPlayerSetRendererAudio()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerSetRendererVideo()
error_code cellSailPlayerSetRendererVideo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerSetParameter(vm::ptr<CellSailPlayer> pSelf, s32 parameterType, u64 param0, u64 param1)
error_code cellSailPlayerSetParameter(vm::ptr<CellSailPlayer> pSelf, s32 parameterType, u64 param0, u64 param1)
{
cellSail.warning("cellSailPlayerSetParameter(pSelf=*0x%x, parameterType=0x%x, param0=0x%llx, param1=0x%llx)", pSelf, parameterType, param0, param1);
@@ -712,7 +737,7 @@ s32 cellSailPlayerSetParameter(vm::ptr<CellSailPlayer> pSelf, s32 parameterType,
return CELL_OK;
}
s32 cellSailPlayerGetParameter(vm::ptr<CellSailPlayer> pSelf, s32 parameterType, vm::ptr<u64> pParam0, vm::ptr<u64> pParam1)
error_code cellSailPlayerGetParameter(vm::ptr<CellSailPlayer> pSelf, s32 parameterType, vm::ptr<u64> pParam0, vm::ptr<u64> pParam1)
{
cellSail.todo("cellSailPlayerGetParameter(pSelf=*0x%x, parameterType=0x%x, param0=*0x%x, param1=*0x%x)", pSelf, parameterType, pParam0, pParam1);
@@ -725,25 +750,25 @@ s32 cellSailPlayerGetParameter(vm::ptr<CellSailPlayer> pSelf, s32 parameterType,
return CELL_OK;
}
s32 cellSailPlayerSubscribeEvent()
error_code cellSailPlayerSubscribeEvent()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerUnsubscribeEvent()
error_code cellSailPlayerUnsubscribeEvent()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerReplaceEventHandler()
error_code cellSailPlayerReplaceEventHandler()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerBoot(ppu_thread& ppu, vm::ptr<CellSailPlayer> pSelf, u64 userParam)
error_code cellSailPlayerBoot(ppu_thread& ppu, vm::ptr<CellSailPlayer> pSelf, u64 userParam)
{
cellSail.warning("cellSailPlayerBoot(pSelf=*0x%x, userParam=%d)", pSelf, userParam);
@@ -767,7 +792,7 @@ s32 cellSailPlayerBoot(ppu_thread& ppu, vm::ptr<CellSailPlayer> pSelf, u64 userP
return CELL_OK;
}
s32 cellSailPlayerAddDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailDescriptor> pDesc)
error_code cellSailPlayerAddDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailDescriptor> pDesc)
{
cellSail.warning("cellSailPlayerAddDescriptor(pSelf=*0x%x, pDesc=*0x%x)", pSelf, pDesc);
@@ -785,7 +810,7 @@ s32 cellSailPlayerAddDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailD
return CELL_OK;
}
s32 cellSailPlayerCreateDescriptor(vm::ptr<CellSailPlayer> pSelf, s32 streamType, vm::ptr<void> pMediaInfo, vm::cptr<char> pUri, vm::pptr<CellSailDescriptor> ppDesc)
error_code cellSailPlayerCreateDescriptor(vm::ptr<CellSailPlayer> pSelf, s32 streamType, vm::ptr<void> pMediaInfo, vm::cptr<char> pUri, vm::pptr<CellSailDescriptor> ppDesc)
{
cellSail.todo("cellSailPlayerCreateDescriptor(pSelf=*0x%x, streamType=%d, pMediaInfo=*0x%x, pUri=%s, ppDesc=**0x%x)", pSelf, streamType, pMediaInfo, pUri, ppDesc);
@@ -837,7 +862,7 @@ s32 cellSailPlayerCreateDescriptor(vm::ptr<CellSailPlayer> pSelf, s32 streamType
return CELL_OK;
}
s32 cellSailPlayerDestroyDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailDescriptor> pDesc)
error_code cellSailPlayerDestroyDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailDescriptor> pDesc)
{
cellSail.todo("cellSailPlayerAddDescriptor(pSelf=*0x%x, pDesc=*0x%x)", pSelf, pDesc);
@@ -847,7 +872,7 @@ s32 cellSailPlayerDestroyDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellS
return CELL_OK;
}
s32 cellSailPlayerRemoveDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailDescriptor> ppDesc)
error_code cellSailPlayerRemoveDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailDescriptor> ppDesc)
{
cellSail.warning("cellSailPlayerAddDescriptor(pSelf=*0x%x, pDesc=*0x%x)", pSelf, ppDesc);
@@ -862,109 +887,109 @@ s32 cellSailPlayerRemoveDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSa
return pSelf->descriptors;
}
s32 cellSailPlayerGetDescriptorCount(vm::ptr<CellSailPlayer> pSelf)
error_code cellSailPlayerGetDescriptorCount(vm::ptr<CellSailPlayer> pSelf)
{
cellSail.warning("cellSailPlayerGetDescriptorCount(pSelf=*0x%x)", pSelf);
return pSelf->descriptors;
return not_an_error(pSelf->descriptors);
}
s32 cellSailPlayerGetCurrentDescriptor()
error_code cellSailPlayerGetCurrentDescriptor()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerOpenStream()
error_code cellSailPlayerOpenStream()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerCloseStream()
error_code cellSailPlayerCloseStream()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerOpenEsAudio()
error_code cellSailPlayerOpenEsAudio()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerOpenEsVideo()
error_code cellSailPlayerOpenEsVideo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerOpenEsUser()
error_code cellSailPlayerOpenEsUser()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerReopenEsAudio()
error_code cellSailPlayerReopenEsAudio()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerReopenEsVideo()
error_code cellSailPlayerReopenEsVideo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerReopenEsUser()
error_code cellSailPlayerReopenEsUser()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerCloseEsAudio()
error_code cellSailPlayerCloseEsAudio()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerCloseEsVideo()
error_code cellSailPlayerCloseEsVideo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerCloseEsUser()
error_code cellSailPlayerCloseEsUser()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerStart()
error_code cellSailPlayerStart()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerStop()
error_code cellSailPlayerStop()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerNext()
error_code cellSailPlayerNext()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerCancel()
error_code cellSailPlayerCancel()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerSetPaused(vm::ptr<CellSailPlayer> pSelf, b8 paused)
error_code cellSailPlayerSetPaused(vm::ptr<CellSailPlayer> pSelf, b8 paused)
{
cellSail.todo("cellSailPlayerSetPaused(pSelf=*0x%x, paused=%d)", pSelf, paused);
return CELL_OK;
@@ -995,37 +1020,37 @@ s32 cellSailPlayerGetRepeatMode(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailS
return pSelf->repeatMode;
}
s32 cellSailPlayerSetEsAudioMuted()
error_code cellSailPlayerSetEsAudioMuted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerSetEsVideoMuted()
error_code cellSailPlayerSetEsVideoMuted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerIsEsAudioMuted()
error_code cellSailPlayerIsEsAudioMuted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerIsEsVideoMuted()
error_code cellSailPlayerIsEsVideoMuted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerDumpImage()
error_code cellSailPlayerDumpImage()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
s32 cellSailPlayerUnregisterSource()
error_code cellSailPlayerUnregisterSource()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
+2 -2
View File
@@ -1,11 +1,11 @@
#pragma once
#pragma once
#include "cellVpost.h"
#include "Emu/Memory/vm_ptr.h"
// Error Codes
enum
enum CellSailError : u32
{
CELL_SAIL_ERROR_INVALID_ARG = 0x80610701,
CELL_SAIL_ERROR_INVALID_STATE = 0x80610702,
+60 -76
View File
@@ -1,368 +1,352 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
#include "cellSail.h"
LOG_CHANNEL(cellSailRec);
// Error Codes
enum
{
CELL_SAIL_ERROR_INVALID_ARG = 0x80610701,
CELL_SAIL_ERROR_INVALID_STATE = 0x80610702,
CELL_SAIL_ERROR_UNSUPPORTED_STREAM = 0x80610703,
CELL_SAIL_ERROR_INDEX_OUT_OF_RANGE = 0x80610704,
CELL_SAIL_ERROR_EMPTY = 0x80610705,
CELL_SAIL_ERROR_FULLED = 0x80610706,
CELL_SAIL_ERROR_USING = 0x80610707,
CELL_SAIL_ERROR_NOT_AVAILABLE = 0x80610708,
CELL_SAIL_ERROR_CANCEL = 0x80610709,
CELL_SAIL_ERROR_MEMORY = 0x806107F0,
CELL_SAIL_ERROR_INVALID_FD = 0x806107F1,
CELL_SAIL_ERROR_FATAL = 0x806107FF,
};
s32 cellSailProfileSetEsAudioParameter()
error_code cellSailProfileSetEsAudioParameter()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailProfileSetEsVideoParameter()
error_code cellSailProfileSetEsVideoParameter()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailProfileSetStreamParameter()
error_code cellSailProfileSetStreamParameter()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailVideoConverterCanProcess()
error_code cellSailVideoConverterCanProcess()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailVideoConverterProcess()
error_code cellSailVideoConverterProcess()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailVideoConverterCanGetResult()
error_code cellSailVideoConverterCanGetResult()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailVideoConverterGetResult()
error_code cellSailVideoConverterGetResult()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailFeederAudioInitialize()
error_code cellSailFeederAudioInitialize()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailFeederAudioFinalize()
error_code cellSailFeederAudioFinalize()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailFeederAudioNotifyCallCompleted()
error_code cellSailFeederAudioNotifyCallCompleted()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailFeederAudioNotifyFrameOut()
error_code cellSailFeederAudioNotifyFrameOut()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailFeederAudioNotifySessionEnd()
error_code cellSailFeederAudioNotifySessionEnd()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailFeederAudioNotifySessionError()
error_code cellSailFeederAudioNotifySessionError()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailFeederVideoInitialize()
error_code cellSailFeederVideoInitialize()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailFeederVideoFinalize()
error_code cellSailFeederVideoFinalize()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailFeederVideoNotifyCallCompleted()
error_code cellSailFeederVideoNotifyCallCompleted()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailFeederVideoNotifyFrameOut()
error_code cellSailFeederVideoNotifyFrameOut()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailFeederVideoNotifySessionEnd()
error_code cellSailFeederVideoNotifySessionEnd()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailFeederVideoNotifySessionError()
error_code cellSailFeederVideoNotifySessionError()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderInitialize()
error_code cellSailRecorderInitialize()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderFinalize()
error_code cellSailRecorderFinalize()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderSetFeederAudio()
error_code cellSailRecorderSetFeederAudio()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderSetFeederVideo()
error_code cellSailRecorderSetFeederVideo()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderSetParameter()
error_code cellSailRecorderSetParameter()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderGetParameter()
error_code cellSailRecorderGetParameter()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderSubscribeEvent()
error_code cellSailRecorderSubscribeEvent()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderUnsubscribeEvent()
error_code cellSailRecorderUnsubscribeEvent()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderReplaceEventHandler()
error_code cellSailRecorderReplaceEventHandler()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderBoot()
error_code cellSailRecorderBoot()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderCreateProfile()
error_code cellSailRecorderCreateProfile()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderDestroyProfile()
error_code cellSailRecorderDestroyProfile()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderCreateVideoConverter()
error_code cellSailRecorderCreateVideoConverter()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderDestroyVideoConverter()
error_code cellSailRecorderDestroyVideoConverter()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderOpenStream()
error_code cellSailRecorderOpenStream()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderCloseStream()
error_code cellSailRecorderCloseStream()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderStart()
error_code cellSailRecorderStart()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderStop()
error_code cellSailRecorderStop()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderCancel()
error_code cellSailRecorderCancel()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderRegisterComposer()
error_code cellSailRecorderRegisterComposer()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderUnregisterComposer()
error_code cellSailRecorderUnregisterComposer()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailRecorderDumpImage()
error_code cellSailRecorderDumpImage()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerInitialize()
error_code cellSailComposerInitialize()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerFinalize()
error_code cellSailComposerFinalize()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerGetStreamParameter()
error_code cellSailComposerGetStreamParameter()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerGetEsAudioParameter()
error_code cellSailComposerGetEsAudioParameter()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerGetEsUserParameter()
error_code cellSailComposerGetEsUserParameter()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerGetEsVideoParameter()
error_code cellSailComposerGetEsVideoParameter()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerGetEsAudioAu()
error_code cellSailComposerGetEsAudioAu()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerGetEsUserAu()
error_code cellSailComposerGetEsUserAu()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerGetEsVideoAu()
error_code cellSailComposerGetEsVideoAu()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerTryGetEsAudioAu()
error_code cellSailComposerTryGetEsAudioAu()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerTryGetEsUserAu()
error_code cellSailComposerTryGetEsUserAu()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerTryGetEsVideoAu()
error_code cellSailComposerTryGetEsVideoAu()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerReleaseEsAudioAu()
error_code cellSailComposerReleaseEsAudioAu()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerReleaseEsUserAu()
error_code cellSailComposerReleaseEsUserAu()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerReleaseEsVideoAu()
error_code cellSailComposerReleaseEsVideoAu()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerNotifyCallCompleted()
error_code cellSailComposerNotifyCallCompleted()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
}
s32 cellSailComposerNotifySessionError()
error_code cellSailComposerNotifySessionError()
{
UNIMPLEMENTED_FUNC(cellSailRec);
return CELL_OK;
+17 -18
View File
@@ -1120,7 +1120,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
{
if (operation != SAVEDATA_OP_FIXED_SAVE && operation != SAVEDATA_OP_FIXED_LOAD && operation != SAVEDATA_OP_FIXED_DELETE)
{
lv2_sleep(ppu, 5000);
lv2_sleep(ppu, 30000);
break;
}
@@ -1162,7 +1162,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
break;
}
case CELL_SAVEDATA_OPTION_NOCONFIRM:
lv2_sleep(ppu, 5000);
lv2_sleep(ppu, 30000);
break;
default :
@@ -1419,22 +1419,17 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
}
// Update PARAM.SFO
psf.clear();
psf.insert(
{
{ "ACCOUNT_ID", psf::array(16, "0000000000000000") }, // ???
{ "ATTRIBUTE", statSet->setParam->attribute.value() },
{ "CATEGORY", psf::string(4, "SD") }, // ???
{ "PARAMS", psf::string(1024, {}) }, // ???
{ "PARAMS2", psf::string(12, {}) }, // ???
{ "PARENTAL_LEVEL", statSet->setParam->parental_level.value() },
{ "DETAIL", psf::string(CELL_SAVEDATA_SYSP_DETAIL_SIZE, statSet->setParam->detail) },
{ "SAVEDATA_DIRECTORY", psf::string(CELL_SAVEDATA_DIRNAME_SIZE, save_entry.dirName) },
{ "SAVEDATA_LIST_PARAM", psf::string(CELL_SAVEDATA_SYSP_LPARAM_SIZE, statSet->setParam->listParam) },
{ "SUB_TITLE", psf::string(CELL_SAVEDATA_SYSP_SUBTITLE_SIZE, statSet->setParam->subTitle) },
{ "TITLE", psf::string(CELL_SAVEDATA_SYSP_TITLE_SIZE, statSet->setParam->title) }
});
psf::assign(psf, "ACCOUNT_ID", psf::array(16, "0000000000000000")); // ???
psf::assign(psf, "ATTRIBUTE", statSet->setParam->attribute.value());
psf::assign(psf, "CATEGORY", psf::string(4, "SD")); // ???
psf::assign(psf, "PARAMS", psf::string(1024, {})); // ???
psf::assign(psf, "PARAMS2", psf::string(12, {})); // ???
psf::assign(psf, "PARENTAL_LEVEL", statSet->setParam->parental_level.value());
psf::assign(psf, "DETAIL", psf::string(CELL_SAVEDATA_SYSP_DETAIL_SIZE, statSet->setParam->detail));
psf::assign(psf, "SAVEDATA_DIRECTORY", psf::string(CELL_SAVEDATA_DIRNAME_SIZE, save_entry.dirName));
psf::assign(psf, "SAVEDATA_LIST_PARAM", psf::string(CELL_SAVEDATA_SYSP_LPARAM_SIZE, statSet->setParam->listParam));
psf::assign(psf, "SUB_TITLE", psf::string(CELL_SAVEDATA_SYSP_SUBTITLE_SIZE, statSet->setParam->subTitle));
psf::assign(psf, "TITLE", psf::string(CELL_SAVEDATA_SYSP_TITLE_SIZE, statSet->setParam->title));
has_modified = true;
}
else if (save_entry.isNew)
@@ -1467,6 +1462,8 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
return {CELL_SAVEDATA_ERROR_PARAM, "50"};
}
cellSaveData.warning("savedata_op(): Recreating savedata. (mode=%d)", statSet->reCreateMode);
// Clear secure file info
for (auto it = psf.cbegin(), end = psf.cend(); it != end;)
{
@@ -1718,6 +1715,8 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
};
// clang-format on
cellSaveData.warning("savedata_op(): Fileop: file=\"%s\", type=%d, op=%d", file_path, fileSet->fileType, fileSet->fileOperation);
if ((file_path == "." || file_path == "..") && fileSet->fileOperation <= CELL_SAVEDATA_FILEOP_WRITE_NOTRUNC)
{
savedata_result = CELL_SAVEDATA_ERROR_BROKEN;
+37 -20
View File
@@ -1,10 +1,10 @@
#include "stdafx.h"
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"
LOG_CHANNEL(cellSheap);
// Return Codes
enum
enum CellSheapError : u32
{
CELL_SHEAP_ERROR_INVAL = 0x80410302,
CELL_SHEAP_ERROR_BUSY = 0x8041030A,
@@ -12,109 +12,126 @@ enum
CELL_SHEAP_ERROR_SHORTAGE = 0x80410312,
};
s32 cellSheapInitialize()
template <>
void fmt_class_string<CellSheapError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_SHEAP_ERROR_INVAL);
STR_CASE(CELL_SHEAP_ERROR_BUSY);
STR_CASE(CELL_SHEAP_ERROR_ALIGN);
STR_CASE(CELL_SHEAP_ERROR_SHORTAGE);
}
return unknown;
});
}
error_code cellSheapInitialize()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellSheapAllocate()
error_code cellSheapAllocate()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellSheapFree()
error_code cellSheapFree()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellSheapQueryMax()
error_code cellSheapQueryMax()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellSheapQueryFree()
error_code cellSheapQueryFree()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapInitialize()
error_code cellKeySheapInitialize()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapBufferNew()
error_code cellKeySheapBufferNew()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapBufferDelete()
error_code cellKeySheapBufferDelete()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapMutexNew()
error_code cellKeySheapMutexNew()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapMutexDelete()
error_code cellKeySheapMutexDelete()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapBarrierNew()
error_code cellKeySheapBarrierNew()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapBarrierDelete()
error_code cellKeySheapBarrierDelete()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapSemaphoreNew()
error_code cellKeySheapSemaphoreNew()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapSemaphoreDelete()
error_code cellKeySheapSemaphoreDelete()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapRwmNew()
error_code cellKeySheapRwmNew()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapRwmDelete()
error_code cellKeySheapRwmDelete()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapQueueNew()
error_code cellKeySheapQueueNew()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
}
s32 cellKeySheapQueueDelete()
error_code cellKeySheapQueueDelete()
{
UNIMPLEMENTED_FUNC(cellSheap);
return CELL_OK;
+58 -2
View File
@@ -17,6 +17,11 @@
LOG_CHANNEL(cellSpurs);
extern u64 ppu_ldarx(ppu_thread&, u32);
extern u32 ppu_lwarx(ppu_thread&, u32);
extern bool ppu_stwcx(ppu_thread&, u32, u32);
extern bool ppu_stdcx(ppu_thread&, u32, u64);
error_code sys_spu_image_close(ppu_thread&, vm::ptr<sys_spu_image> img);
//----------------------------------------------------------------------------
@@ -4087,9 +4092,60 @@ s32 cellSpursJobHeaderSetJobbin2Param()
return CELL_OK;
}
s32 cellSpursAddUrgentCommand()
s32 cellSpursAddUrgentCommand(ppu_thread& ppu, vm::ptr<CellSpursJobChain> jobChain, u64 newCmd)
{
UNIMPLEMENTED_FUNC(cellSpurs);
cellSpurs.trace("cellSpursAddUrgentCommand(jobChain=*0x%x, newCmd=0x%llx)", jobChain, newCmd);
if (!jobChain)
return CELL_SPURS_JOB_ERROR_NULL_POINTER;
if (!jobChain.aligned(128))
return CELL_SPURS_JOB_ERROR_ALIGN;
if (jobChain->workloadId >= 32)
return CELL_SPURS_JOB_ERROR_INVAL;
for (u32 i = 0;;)
{
if (i >= std::size(jobChain->urgentCmds))
{
// Exausted all slots
return CELL_SPURS_JOB_ERROR_BUSY;
}
u64 currCmd = ppu_ldarx(ppu, jobChain.ptr(&CellSpursJobChain::urgentCmds, i).addr());
std::atomic_thread_fence(std::memory_order_acq_rel);
bool found = false;
bool reset = false;
if (!currCmd)
{
if (i != 0 && !jobChain->urgentCmds[i - 1])
{
// Restart search, someone emptied out the previous one
reset = true;
}
else
{
found = true;
currCmd = newCmd;
}
}
if (reset || !ppu_stdcx(ppu, jobChain.ptr(&CellSpursJobChain::urgentCmds, i).addr(), currCmd))
{
// Someone modified the job chain or the previous slot is empty, restart search
i = 0;
continue;
}
if (found)
break;
i++;
}
return CELL_OK;
}

Some files were not shown because too many files have changed in this diff Show More