* poc
* Set up variable game specific variable copies
* Set up getters to return the game specific option if it exists
* Avoid exceptions if a value isn't in the config
* Make sure the custom configs folder exists
* Update + review comments + rewrite
* The loathsome clang-formatter
* Specify which getter/setter is used everywhere
* This works, but it's missing some hotkeys and the GUI isn't hooked up to anything now
* More hotkeys
* Remove debug log
* clang
* accidentally used the wrong value here
* gui changes for new backend (#10)
* gui changes for new backend
* fix lmeta
* don't erase non-hotkey lines
* do not erase hotkey configs in kbm or controller guis
* Fix repeated inputs
* Documentation
---------
Co-authored-by: rainmakerv2 <30595646+rainmakerv3@users.noreply.github.com>
* Allow vector and scalar offset in buffer address arg to
LoadBuffer/StoreBuffer
* remove is_ring check
* fix atomics and update pattern matching for tess factor stores
* remove old asserts about soffset
* small fixes
* copyright
* Handle sgpr initialization for 2 special hull shader values, including tess factor buffer offset
* Qt: Add FSR settings to settings GUI
* Move FSR settings from Imgui.ini to main config
* move passing fsr settings to presenter constuctor
* cleanup: use struct instead of function call
* cleanup: make variable names consistent with others
* Update fsr settings real-time in qt, save button in Imgui
* Linux build fix, missing running game check
* syntax fix
* Change gamerunning checks to if (presenter)
* libSceVrTracker stubs, structs, enums, and errors
* sceVrTrackerQueryMemory
* Clang and slight struct cleanup
* Implement sceVrTrackerInit
* Store memory pointers and sizes
Mainly for future developers, since I doubt these memory areas will be particularly useful for these stubs.
* sceVrTrackerRegisterDevice
I haven't really identified the difference between the two register device functions, but I do know that they both internally call the internal function with slightly different parameters.
* sceVrTrackerUnregisterDevice
Also changes Hmd and Move handles to be values closer to what real hardware returns, since this function seemingly relies on handles being different for all these device types.
* sceVrTrackerTerm
* Additional error checks in sceVrTrackerRegisterDeviceInternal
* sceVrTrackerGetTime
* sceVrTrackerRecalibrate
Recalibration succeeds on real hardware (at least for some device types), so I've left the stub log intact.
* Update vr_tracker.cpp
* sceVrTrackerSetDurationUntilStatusNotTracking stub
Only handled the error checks, so I left the stub log intact.
* sceVrTrackerGpu* functions
Most of these can't succeed without a camera attached.
* Rename SceKernelIovec to OrbisKernelIovec
Fixes the naming scheme to match the rest of the project.
* Type fixups
Noticed this while working on the actual thing this PR is about.
* More type fixups
* Update file_system.cpp
* Abstract directory handling
* Clang
* Directory fstat
* Fix dirent loading logic
* PfsDirectory size
Seemed to be hardcoded when I ran tests, so I've hardcoded it here.
Also fixed up the reclen-aligning logic based on hardware observations.
* GetDents cleanup
Bring back the bytes < 512 error return from before, as that's still something that can be checked for out here.
I've also swapped the file type stuff to run from a switch case, so that the check for invalid file type can be used as the default case
* Support reading directories
* getdents
For PfsDirectory, getdents behaves like read does on normal directories. Since dirents are stored internally with a different struct, this means getdents has to convert the dirents before returning data.
For NormalDirectory, getdents is identical to read, so it can just call read and set the basep output.
* Directory readv
* Directory preadv
Since the file mutex is locked before these calls, messing with dirents_index like this shouldn't cause any weird side effects.
* return ORBIS_OK instead of 0
to better align with our coding standards.
* Directory lseek
* Un-modify CMakePresets.json
I keep this modified locally for Linux, but accidentally pushed it.
* Clang
* Fix mac compile
* Potential windows compile fix?
* Filename fix
* Fix normal directory d_reclen
* Comment cleanup
* Remove unnecessary dirent conversion logic
On real hardware, the records are still returned with the same reclen, despite the change in structure.
* PfsDirectory dirents_index fixes
Some weird stuff happens once you reach eof on directories.
Thankfully, PfsDirectories are rather tame in this regard.
* Change comment
* Rewrite normal directory reads
The logic for these seems to behave like a normal file, so instead of tracking a dirents_index, keep an internal buffer representing the file contents, and copy that to output buffers as needed.
* Update pfs_directory.cpp
* Clang
* Fix normal dirents
When rewriting the code, I forgot to account for the increased reclen value for the last dirent in the buffer.
* PfsDirectory::lseek fixes
Based on some additional tests, it seems like lseek unconditionally returns dirents_index, not the actual file position.
Also fixed some bugs with the logic for calculating the proper offset when games do wonky things, and fixed a potential area where games could crash.
* Downgrade stat and fstat log to debug
These functions can get pretty spammy.
* PfsDirectory: Properly track if end of file is reached
Using the metric `dirents_index < directory_content_size` fails when `directory_content_size` is larger than the actual directory size we report.
Since, from what I can tell, PfsDirectories shouldn't ever report more than 0x10000 bytes for size, this change is necessary.
* Revert "PfsDirectory: Properly track if end of file is reached"
I need to do some hardware tests to see if all this excess logic is actually necessary.
* Fix PfsDirectory directory_size
Turns out, if your game has over 1000 files in a folder, it will actually cause the size to increase.
* Update copyright date
* Move devices and directories into file_sys
I've also updated the copyright dates on all these files.
* C++ style type casts
* Remove unnecessary memset
* Use a vector for the data buffer
Simplifies logic for freeing the buffer, based on review suggestions.
* Fix potential oob array access
* Change type casts in Create function
* Clang
* std::memcpy instead of memcpy
* NormalDirectory::lseek cleanup
* Create constants for directory alignment values.
* Use const wherever possible
* Includes cleanup
Layer must be output from the final pre-rasterization stage, so when tessellation is
being used the vertex shader cannot set it. We could pass it through to the tessellation
shaders in some way, but unless it becomes an issue that's more effort than it's worth.