The memory_type default is based on fpPS4 behavior.
I'm not entirely sure how the offset should be handled, but since the value we use defaults to 0 anyway, that should be better than leaving random data in that area.
The headers for these functions were technically not the same as the actual function definition. This didn't cause any emulation issues, but caused some weird issues with my IDE.
Found this issue while looking at code from fpPS4. VirtualQuery was setting is_commited to true when the queried region was reserved.
Also sets the protection value in the VirtualQueryInfo, as I'd assume not storing that could cause issues in games.
This fixes all games currently hanging on the sceKernelmprotect stub.
* video_core: Compile shader permutations
* spirv: Only specific storage image format for atomics
* ir: Avoid cube coord patching for storage image
* spirv: Fix default attributes
* data_share: Add more instructions
* video_core: Query storage flag with runtime state
* kernel: Use std::list for semaphore
* video_core: Use texture buffers for untyped format load/store
* buffer_cache: Limit view usage
* vk_pipeline_cache: Fix invalid iterator
* image_view: Reduce log spam when alpha=1 in storage swizzle
* video_core: More features and proper spirv feature detection
* video_core: Attempt no2 for specialization
* spirv: Remove conflict
* vk_shader_cache: Small cleanup
* Cheats/Patches
Adds the possibility of applying cheats/patches according to the specific game serial+version
The logic for adding modifications has not yet been implemented!
Interface based on issues/372 https://github.com/shadps4-emu/shadPS4/issues/372
[X]Front-end
[]Back-end
Create a synchronized fork of the cheats/patches repository
* Clang Format
* separate files
The code has been separated into separate files as suggested by georgemoralis.
Added the Patch tab, which has not been implemented yet.
Added the 'applyCheat' area to apply the modification, not implemented yet...
And added LOG_INFO.
* reuse
* initial implementation of cheat functionality
* Update cheats_patches.cpp
sets all added buttons to the size of the largest button.
and fixes some aesthetic issues.
* move eboot_address to module.h
fixes the non-qt builds and makes more sense to be there anyway
* Patchs menu and fixes
adds the possibility to download Patches, it does not modify the memory yet.
and some other fixes
* MemoryPatcher namespace, activate cheats on start
* format
* initial patch implementation
* format
* format again...
* convertValueToHex
* Fixes
Choosing which cheat file to use.
And some other fixes
* fix bytes16, bytes32, bytes64 type patches
If a patch is any of these types we convert it from little endian to big endian
* format
* format again :(
* Implement pattern scanning for mask type patches
* add check to stop patches applying to wrong game
previously if you added a patch to a game, but closed the window and opened a different game it would still try to apply the patch, this is now fixed
* format
* Fix 'Hint' 0x400000 | and Author
* Management |save checkbox | shadps4 repository
MENU - Cheats/Patches Management (implementing Patches)
save patches checkbox
add shadps4 repository
* Load saved patches, miscellaneous fixes
* Fix an issue with mask patches not being saved
* format + remove debug log
* multiple patches | TR translation for cheats/patches
* clang
* ENABLE_QT_GUI
* OK
* move memory_patcher to qt_gui
* clang
* add cheats hu_HU
* fix log
* Remove the item from the patchesListView if no patches were added (the game has patches, but not for the current version)
---------
Co-authored-by: CrazyBloo <CrazyBloo@users.noreply.github.com>
* memory: Size direct memory based on requested flexible memory.
* memory: Guard against OrbisProcParam without an OrbisKernelMemParam.
* memory: Account for alignment in direct memory suitability checks and add more debugging.
fix: file name typo constant_propogation_pass.cpp
fix typo from 'symbol_vitrual_addr' variable
fix typo in emit_spirv_context_get_set.cpp
fix typo from constant_propagation_pass.cpp in CMakeLists
fix typo in these some config.cpp functions
- setSliderPosition
- setSliderPositionGrid
- getSliderPosition
- getSliderPositionGrid
fix typo inside src\core\aerolib\stubs.cpp
fix typo in a comment from src\core\file_format\pkg.cpp
fix typo inside src\core\file_sys\fs.cpp + fs.h
- NeedsCaseInsensiveSearch -> NeedsCaseInsensitiveSearch
fix 2 function typos: sceAppContentAddcontEnqueueDownloadByEntitlemetId and sceAppContentAddcontMountByEntitlemetId
fix typo on comment inside src\core\libraries\kernel\file_system.cpp
fix typo on src\core\libraries\videoout\driver.cpp
fix typo in src\core\memory.cpp
fix typo from comment in src\qt_gui\game_list_utils.h
fix typo in src\video_core\amdgpu\liverpool.h
- window_offset_disble to window_offset_disable
fix typo from comments in src\video_core\host_shaders\detile_m32x1.comp + detile_m32x2.comp
- subotimal -> suboptimal
fix typo from comment in src\video_core\renderer_vulkan\renderer_vulkan.cpp
- dimentions -> dimensions
fix typo from enum in src\common\debug.h and other files
- MarkersPallete -> MarkersPalette
fix last typo in src\video_core\amdgpu\pm4_opcodes.h
- PremableCntl -> PreambleCntl
* core/libraries/kernel: Fix inaccurate direct memory size
* core/memory: Fix available dmem query on non-free dmem areas
* core/kernel: return ENOMEM if memory area size is zero
* core/kernel: Fix returns on `sceKernelAvailableDirectMemorySize`
* core/memory: Remove unneeded size alignment
* cfg: Add one more divergence case
* Seen in RDR shaders
* renderer_vulkan: Reduce number of compiled shaders
* vk_pipeline_cache: Remove some unnecessary checks
I used a switch statement for future proofing, as some codes differ between Windows, Mac, Linux, or Orbis. Right now I've only added the codes that should be possible to encounter.
* gui: add option to boot a game by choosing elf file
* core: some small implementations
* fs: implement open func
* add some validations
* spirv: add image format
* video_core: add eR16Uint to formats
Details:
* Switched SDL audio mutex to RW lock. This fixes games that continiously call SetVolume in a different thread (like Ghostbusters)
* Added contition to buffer audio packets independent of video packets. This fixes choppy audio across many games.
* Increased the number of audio frame buffers from 2 to 4. Just in case.
* Migrated to std::jthread and std::mutex from pthreads.
* Fixed a race condition with joins on avplayer close that caused a crash.
* scePthreadAttrSetstack implementation
Used by Final Fantasy XV
* Address Comments
Verify parameters before calling the pthread_attr_setstack function.
Swap uses of SCE prefix with ORBIS prefix.
* Quick fix
Addresses the newest review and appears to fix issues caused in games by my previous commit.
* translator: Use templates for stronger type guarantees
* spirv: Define buffer offsets upfront
* Saves a lot of shader instructions
* buffer_cache: Use dynamic vertex input when available
* Fixes issues when games like dark souls rebind vertex buffers with different stride
* externals: Update boost
* spirv: Use runtime array for ssbos
* ssbos can be large and typically their size will vary, especially in generic copy/clear cs shaders
* fs: Lock when doing case insensitive search
* Dark Souls does fs lookups from different threads
* texture_cache: More precise invalidation from compute
* Fixes unrelated render targets being cleared
* texture_cache: Use hashes for protect gpu modified images from reupload
* translator: Treat V_CNDMASK as float
* Sometimes it can have input modifiers. Worst this will cause is some extra calls to uintBitsToFloat and opposite. But most often this is used as float anyway
* translator: Small optimization for V_SAD_U32
* Fix review
* clang format
* Handle empty mutex attribute
- scePthreadMutexInit did not return default when the mutex attributes were empty, now it does
* fix conditional unsafety
* Update thread_management.cpp
fix deref
* accurate heap api
- modified HeapAPI to a struct with preset function fields
- utilized the full array parameter passed to _sceKernelRtldSetApplicationHeapAPI
* fallback to std malloc
* clang format
* Declare all HeapAPI replacement functions
- calloc, realloc, memalign, reallocalign, malloc_stats, malloc_stats_fast, malloc_usable_size
- posix_memalign corrected parameters
* resolve suggestions
- `using` definition replacement for AppHeapAPI
- linux uses heap_malloc, windows uses std::malloc
---------
Co-authored-by: microsoftv <6063922+microsoftv@users.noreply.github.com>
* shader_recompiler: fix for float convert and debug asserts
* libraries: kernel: correct return code on invalid semaphore
* amdgpu: additional case for cb extents retrieval heuristic
* removed redundant check in assert
* amdgpu: fix for linear tiling mode detection fin color buffers
* texture_cache: fix for unexpected scheduler flushes by detiler
* renderer_vulkan: missing depth barrier
* texture_cache: missed slices in rt view; + detiler format
* Fix OrbisKernelBatchMapEntry struct
UE4 games and GTA V cause the BatchMap offset to overflow on Windows. Changing the type fixes this, and doesn't seem to cause any regressions on Windows or Linux.
* Implement posix_sem_trywait
Grand Theft Auto V needs this.
* Add missing scePthreadAttrGetdetachstate NID
Noticed this missing NID while testing games.
* translator: Implemtn f32 to f16 convert
* shader_recompiler: Add bit instructions
* shader_recompiler: More data share instructions
* shader_recompiler: Remove exec contexts, fix S_MOV_B64
* shader_recompiler: Split instruction parsing into categories
* shader_recompiler: Better BFS search
* shader_recompiler: Constant propagation pass for cmp_class_f32
* shader_recompiler: Partial readfirstlane implementation
* shader_recompiler: Stub readlane/writelane only for non-compute
* hack: Fix swizzle on RDR
* Will properly fix this when merging this
* clang format
* address_space: Bump user area size to full
* shader_recompiler: V_INTERP_MOV_F32
* Should work the same as spirv will emit flat decoration on demand
* kernel: Add MAP_OP_MAP_FLEXIBLE
* image_view: Attempt to apply storage swizzle on format
* vk_scheduler: Barrier attachments on renderpass end
* clang format
* liverpool: cs state backup
* shader_recompiler: More instructions and formats
* vector_alu: Proper V_MBCNT_U32_B32
* shader_recompiler: Port some dark souls things
* file_system: Implement sceKernelRename
* more formats
* clang format
* resource_tracking_pass: Back to assert
* translate: Tracedata
* kernel: Remove tracy lock
* Solves random crashes in Dark Souls
* code: Review comments
* Fix in searchFree should fix#337
* clang format fix
* sceKernelSetVirtualRangeName implementation
* improved vaddr conversion
* updated VirtualQuery to include name too
* unmap also removed name thanks @red_prig
* fixed copy...