shadPS4/src/core/libraries
Stephen Miller 20b11f2d63
libkernel: Fix sceKernelAllocateDirectMemory and sceKernelAvailableDirectMemorySize (#2803)
* AllocateDirectMemory fixes

search_start and search_end were ignored in certain cases, this fixes that issue.
I've also basically rewritten the function in the process, since the lack of documentation made it difficult to make the proper adjustments.

* DirectQueryAvailable fixes

remaining_size was calculated incorrectly in cases where a free dmem_area had a base earlier than search_start, or an end after search_end.

* Reduce sceKernelGetDirectMemorySize log severity

By this point, we've confirmed that sceKernelGetDirectMemorySize is hardware-accurate. There's no reason to clog logs with this function, which games usually call before every sceKernelAllocateDirectMemory call.

* Clang

* Fix phys_addr_out

phys_addr_out should be equal to search_start in cases where search_start is greater than the dmem_area base.

* Dividing by zero is fun

Need to check for alignment when aligning things.

* Update memory.cpp

* Clang
2025-04-18 11:00:14 +03:00
..
ajm Avoid processing job buffers before codec initialization (#2507) 2025-02-23 06:47:44 +03:00
app_content change sizeof to TmpMount.size (#2523) 2025-02-24 12:44:22 +02:00
audio libraries: Initial Audio3d implementation. (#2776) 2025-04-13 23:46:10 -07:00
audio3d libraries: Initial Audio3d implementation. (#2776) 2025-04-13 23:46:10 -07:00
avplayer fix: fix #1457 again by moving av_err2str to a common header (#1688) 2024-12-08 00:52:03 +02:00
disc_map HLE discmap (#2686) 2025-03-25 23:54:32 +02:00
fiber libraries/fiber: print fiber ctx size on stack overflow 2025-01-24 19:37:34 +01:00
game_live_streaming Network libs fixes , stubs and more (#1324) 2024-10-11 10:37:36 +03:00
gnmdriver Properly implement sceVideoOutGetBufferLabelAddress (#2642) 2025-03-12 20:36:01 +02:00
hmd libSceHmd Stubs (#2355) 2025-02-05 17:24:53 +02:00
ime fix for ime (#2475) 2025-03-01 20:02:29 +02:00
jpeg Support for Vulkan 1.4 (#1665) 2024-12-07 19:41:41 +02:00
kernel libkernel: Fix sceKernelAllocateDirectMemory and sceKernelAvailableDirectMemorySize (#2803) 2025-04-18 11:00:14 +03:00
libc_internal libcInternal HLE fixes (#2491) 2025-02-22 10:56:35 +02:00
libpng hot-fix: debug build fixed 2024-12-01 15:46:08 +01:00
mouse dummy sceMouse module and change sceMouseRead to debug to reduce spam (#2074) 2025-01-06 18:45:53 +02:00
move libraries: Reduce some controller log spam. (#2777) 2025-04-13 18:12:02 +03:00
network [Lib] libsceHttp (#2576) 2025-03-02 23:09:38 +02:00
ngs2 Fix libSceNgs2 HLE regressions (#2732) 2025-04-01 08:57:47 +03:00
np_common Implement sceNpCmp functions (#2114) 2025-01-11 17:58:07 +01:00
np_manager Additional libSceNpManager functions and cleanup (#2195) 2025-01-19 19:12:42 -08:00
np_party stubbed webbrowserdialog,npparty (#2234) 2025-01-24 19:22:06 +02:00
np_score Reorganization of includes (Part 2) 2024-08-30 15:48:21 +02:00
np_trophy load trophy from .wav (#2603) 2025-03-06 16:20:55 +02:00
np_web_api Add libSceNpWebApi (#2150) 2025-01-15 13:19:41 +02:00
pad libraries: Reduce some controller log spam. (#2777) 2025-04-13 18:12:02 +03:00
playgo video_core: Various small improvements and bug fixes (#2525) 2025-02-24 14:31:12 +02:00
random core: Library cleanup (#1631) 2024-11-30 22:37:36 +02:00
razor_cpu libraries: Add libSceRazorCpu HLE skeleton. (#1624) 2024-11-30 11:30:22 +02:00
remote_play Network libs fixes , stubs and more (#1324) 2024-10-11 10:37:36 +03:00
rtc core: Library cleanup (#1631) 2024-11-30 22:37:36 +02:00
save_data language fix (#2421) 2025-02-13 20:01:35 +02:00
screenshot Reorganization of includes (Part 2) 2024-08-30 15:48:21 +02:00
share_play Network libs fixes , stubs and more (#1324) 2024-10-11 10:37:36 +03:00
system Handle error behavior in sceSysmoduleGetModuleInfoForUnwind stub (#2629) 2025-03-09 23:17:33 +02:00
ulobjmgr libraries: Proper ulobjmgr stubs (#2740) 2025-04-02 02:41:40 +02:00
usbd usbd: Implement libusb passthrough (#2271) 2025-03-31 18:55:21 +03:00
videodec hotfix: Raise videodec memory back up to 16MB. 2025-01-29 01:32:12 -08:00
videoout Implement sceVideoOutGetEventCount and sceVideoOutDeleteVblankEvent (#2753) 2025-04-13 17:08:27 -07:00
web_browser_dialog stubbed webbrowserdialog,npparty (#2234) 2025-01-24 19:22:06 +02:00
zlib libraries: Implement libSceZlib. (#2256) 2025-01-28 18:48:19 +02:00
error_codes.h core: Library cleanup (#1631) 2024-11-30 22:37:36 +02:00
libs.cpp libraries: Proper ulobjmgr stubs (#2740) 2025-04-02 02:41:40 +02:00
libs.h kernel: Rewrite pthread emulation (#1440) 2024-11-21 22:59:38 +02:00