Commit graph

227 commits

Author SHA1 Message Date
FirebirdTA01
9878f15221
gdbstub: Fix GDB command matching and don't reply with "Unrecognized Command" (#3497)
Also:
* Mark thread as suspended so we can resume later
2025-04-01 16:46:02 +03:00
Pedro Montes Alcalde
4a14d546ba
Tick Tick Tick, thats the sound of 2024 flying by (#3503) 2025-01-19 18:51:43 -03:00
SpikeHD
0ebcc09292
patch: Add support for patch files (#3419)
* feat: poc patch loading

* fix: remove some logging, tweak filename requirements

* fix: clang format

* fix: loop -> memcpy

* fix: patching the wrong file

* fix: patch path in shared path on linux

* fix: newline

* fix: change to txt

* fix: explicit std

* fix: conditionally load patches

* fix: stroull -> stoull
2024-11-15 23:32:55 +01:00
bookmist
ef0dbb23c8 * kernel: fix bug in variable binding on module load
Sometimes module export variables was ignored and a stub used instead of them
2024-11-13 10:29:06 +03:00
bookmist
d2c6c4ac4f kernel: more correct thread local storage emulation, also stub ThreadVfpException functions
used mostly for lle libkernel
2024-11-05 00:06:59 +03:00
scribam
77abeaa167
vita3k: More cleanup (#3379)
* vita3k: Use C++17 nested namespace definition

* vita3k: Remove redundant call to c_str()

* vita3k: Prefer C++ header

* vita3k: Use structured bindings

* shader: Add explicit fallthrough

* vita3k: Cleanup headers and dependencies

* util: Add WIN32_LEAN_AND_MEAN before <Windows.h>

* modules: Remove redundant 'const' specifier on a constexpr variable

* modules: Remove redundant return statement at the end of a function with a void return type

* clang-format: Use C++20 standard

* vita3k: Insert new line at EOF

* host: rename filesystem.hpp to filesystem.h
2024-09-18 21:48:08 +02:00
scribam
612d1f8d81
vita3k: cleanup (#3357)
* module: add missing pragma once

* cmake/vita3k: delete unused files

* vita3k: delete useless semi-colons

* vita3k: cleanup headers

* audio: add missing override to destructors

* vita3k: fix typos

* external: disable unused curl targets
2024-09-02 13:03:58 +02:00
nishinji
b8ef1dd732 vita3k: Use constexpr for constants and small optimize 2024-05-21 23:42:57 +02:00
Pedro Montes Alcalde
d4c0c499a4
mem/threads: Include some missing header files (#3291) 2024-05-13 17:02:42 -03:00
bookmist
47de017b71 kernel/load_self: fix memory leak 2024-04-25 02:04:59 +03:00
bookmist
1fda880a94 vita3k: big code cleanup
Improvements
* lang: a bit more verbose error on wrong lang xml

Bugfixes
* kernel/sync_primitives: fix theoretically possible AV
* modules/SceAudio: a bit more correct sceAudioOutSetConfig
* fix wrong objects initialisation ({0} -> {})

Warning fixes
* clang warning: Macro argument should be enclosed in parentheses
[bugprone-macro-parentheses]
* modules: set unsigned type for Sce*ErrorCode enums
* clang warning: variable might be not be initialized
* clang warning: Function returns by const value. Consider returning by non-const value instead.
* clang warning: Prefer transparent functors [modernize-use-transparent-functors]

Refactoring
* io/device: move functions implementation from .h to .cpp file
* vita3k: fix fs::path usage
* clang warning: 'if' statement is unnecessary; deleting null pointer has no effect
* vita3k: use structured bindings and references in for-each-loops
* vita3k: simplify container operations, extract frequent operations to utility functions
* clang⚠️ 'contains' member function can be used
* kernel/sync_primitives: refactoring. drop unused parameter of handle_timeout
* vita3k: drop unused function parameters

* vita3k: fix typecasts
use static_cast instead of reinterpret casts if possible
use correct constants (1/1.0/1.0f)
correct variable types to minimise typecasts
use explicit typecasts (not everywhere)
replace c-style typecasts to c++ style typecasts (not everywhere)
* clang warning: remove redundant typecasts
* clang warning: Cast drops const qualifier

Optimisation
* vita3k: remove unused includes
* clang warning: Constness of returning variable prevents automatic move
[performance-no-automatic-move]
* clang warning: String concatenation results in allocation of unnecessary temporary strings
[performance-inefficient-string-concatenation]
* vita3k: use std::move
* vita3k: optimization. push_back -> emplace_back
* vita3k: fix datatypes to avoid unnesessary conversions
* clang warning: remove unneeded string->c_str->string conversion
* clang warning: The parameter is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
* clang warning: 'find' called with a string literal consisting of a single character
[performance-faster-string-find]
* clang warning: Result of a postfix operator is discarded, consider replacing it with a prefix operator
* clang warning: Pass value parameters by const reference

Code cleanup
* io/io: remove once used variables
* net/posixsocket: remove struct keyword
* vita3k: use raw string literals to avoid excessive escaping
* vita3k: refactoring. replace Ptr<> to pointer in Sce functions
* vita3k: drop unused variables and incorrect comments
* clang warning: readability-inconsistent-declaration-parameter-name
* clang warning: Extra ';' after member function definition
* clang warning: Possible misuse of comma operator (, is used instead of ;)
* clang warning: Algorithm accepting an iterator and a count can be used
* clang warning: Declaration and assignment can be joined
* clang warning: Type trait can be simplified using a template alias or a variable template

* vita3k: cleanup class methods
remove unimplemented (and obviously not used) methods
move deleted methods to public
change empty body to =default
remove auto constructors
set member default values
2024-03-18 15:44:56 +03:00
Macdu
e3a201d485
kernel: Add support for module unloading/reloading (#3246) 2024-03-15 10:07:25 +01:00
bookmist
6ce9b6598e vita3k: some minor bugfixes
kernel/thread: fix possible crash in log_stack_traceback
modules/SceLibKernel: more correct sceClibSnprintf
kernel/load_self: fix possible crash on incorrect library modules. load process params from first loaded module (eboot.bin) only
modules/SceGxm: fix crash if display_thread not found
kernel/debugger: remove direct access to mem.memory to support memory mapping more complete
vita3k: remove direct access to kernel.threads (it's not thread-safe)
vita3k: implement and fix virtual destructors for class hierarchies to prevent memory leaks (except screen_filters)
clang-tidy warning: Constructing string from nullptr is undefined behaviour
clang warning: use after std::move
2024-02-12 20:21:40 +03:00
bookmist
d3f3038aee vita3k: set fs::path type for string paths and refactoring
avoid not need conversion string->wstring->string for linux and macos
native logging of fs::path
more correct conversion from std path to boost path
refactor pathes for shaders compiler, shorten parameters lists
crypto::hex_string: remove not needed null character as last character in string
2024-01-24 11:33:30 +03:00
nishinji
d8b8e069d1
vita3k: typo fixes (#3179) 2024-01-18 11:49:08 +01:00
Pedro Montes Alcalde
34565e3ef4
Vita2024K: Happy 2024 2024-01-01 12:36:32 -03:00
Macdu
d78a08794a
kernel: Page-align the stack size (#3134) 2023-12-17 20:54:48 +01:00
Macdu
8a302b2b7d
kernel: Improve thread end callback (#3129) 2023-12-16 17:26:27 +01:00
redpolline
1fe42cdc4f io: Support emuenv changes
kernel: Support emuenv changes
modules: Support emuenv changes
packages: Support emuenv changes
2023-10-17 13:31:19 +02:00
Macdu
6672090c10 renderer/vulkan: Rewrite surface cache 2023-10-16 00:47:43 +02:00
Macdu
6f35f1a3ab vita3k: Use LOG_..._ONCE when appropriate 2023-10-10 16:31:47 +02:00
Macdu
53734af964 kernel: Remove spamming log 2023-10-07 10:51:11 +02:00
Macdu
3e4bade31a modules/SceThreadMgr: Fix sceKernelOpenTimer 2023-09-27 15:35:21 +02:00
scribam
df2ffeb48e
external: Update submodules (#2926)
* external: Update CLI11 to version v2.3.2

* external: Update MoltenVK to 1.2.5

* external: Update SPIRV-Cross to sdk-1.3.261.1

* external: Update Vulkan-Headers to v1.3.261

* external: Update capstone to 5.0.1

* external: Update cubeb

* external: Update dirent to 1.24

* external: Update fmt to 10.1.1

* external: Update glad to 2.0.4

* external: Update glslang to sdk-1.3.261.1

* external: Update googletest to v1.14.0

* external: Update imgui to version v1.89.9

* external: Update imgui_club

* external: Update miniz to version 3.0.2

* external: Update nativefiledialog-extended to version v1.1.0

* external: Update openssl to 3.1.2

* external: Update pugixml to version v1.13

* external: Update spdlog to v1.12.0

* external: Update stb

* external: Update tracy to v0.9.1

* external: Update vita-toolchain

* external: Update xxHash to v0.8.2

* external: Update yaml-cpp to version 0.8.0
2023-09-16 13:42:44 +02:00
scribam
34310c6087 vita3k: Prefer contains() instead of find() + end() 2023-09-14 13:05:23 +02:00
bookmist
130a09be2d kernel/load_self: implement function's associated reftables 2023-08-16 22:00:25 +03:00
Macdu
ca4371ac31 kernel, modules: Implement sceSysmoduleLoadModuleInternal(WithArg)
Co-Authored-By: bookmist <roshst@yandex.ru>
Co-Authored-By: Zangetsu38 <dante38@free.fr>
2023-07-28 12:17:29 +02:00
Macdu
a911de4569 kernel, modules: Improve nid performance 2023-07-27 18:37:33 +02:00
Macdu
5cb4c46c17 kernel: Fix thread start/end callbacks and cleanup 2023-07-26 19:55:09 +02:00
bookmist
c7440923c2 vita3k: refactoring module load and start, use LLE for libsmart and libface 2023-07-25 15:16:59 +03:00
Macdu
b4249a67f4 kernel: Implement sceKernelRegisterThreadEventHandler 2023-07-24 19:53:09 +02:00
Zangetsu38
e1560db6de modules/SceKernelThreadMgr: Implement sceKernelOpenEventFlag.
- Add sync primitive log on other find functions.
2023-07-20 12:30:03 +02:00
Zangetsu38
4fedf56459 modules/SceKernelThreadMgr: Implement some Kernel functions.
- Implement sceKernelDeleteMsgPipe
- Implement sceKernelOpenMutex
- Implement sceKernelOpenSema
2023-07-18 15:05:16 +02:00
Pedro Montes Alcalde
24d6c1dd94
gui: Fix allocations dialog typo and incorrect type (#2618) 2023-07-16 12:03:34 -03:00
Macdu
91d43d122d kernel: Implement timer events 2023-07-11 21:57:44 +02:00
bookmist
1cd8c8378e kernel/sync_primitives: more accurate implementation of message pipes 2023-06-05 00:04:31 +02:00
bookmist
04b356173b modules/SceLibKernel: stubbed sceKernelGetRWLockInfo, sceKernelTrySendMsgPipe 2023-05-27 20:45:58 +03:00
Macdu
a80acaab74 kernel: Fix compressed self dump 2023-05-11 04:28:11 +02:00
bookmist
4ba2e086cc Vita3K: code cleanup and optimisations 2023-05-10 15:31:55 +03:00
Macdu
1b7e038ddd kernel: Fix simple event auto reset 2023-05-10 01:36:38 +02:00
Zangetsu38
1812252ec4 modules/SceJpegUser: Implement sceJpegDecodeMJpeg function.
codec/mjpeg: Add support of format AV_PIX_FMT_YUVJ420P.
kernel: set variable paused_threads_status in private.

Co-Authored-by: 1whatleytay <32211852+1whatleytay@users.noreply.github.com>
2023-05-08 15:16:00 +02:00
Zangetsu38
39bfd76424 vita3k: implement Pause/resume app. 2023-05-06 22:49:48 +02:00
Macdu
4a8d08265a modules/SceSysmodule: Improve sceSysmoduleIsLoaded check 2023-05-06 20:04:07 +02:00
Macdu
26930943a6 kernel: Implement DONT_WAIT flag for msg pipes 2023-05-03 21:20:47 +02:00
bookmist
dd603f3417 modules: implement some functions:
modules/SceThreadmgr: implement _sceKernelGetMutexInfo, sceKernelSetTimerTimeWide
refactor _sceKernelGetLwMutexInfoById
_sceKernelGetSemaInfo - fix returning data
_sceKernelGetThreadInfo - also return thread exit status
sceKernelChangeThreadVfpException, sceIoIoctl - describe parameters

modules/SceGxm: implement sceGxmProgramGetOutputRegisterFormat, sceGxmDepthStencilSurfaceGetFormat

modules/SceRtcUser: implement sceRtcCompareTick, sceRtcGetDosTime, sceRtcGetWin32FileTime

modules/SceKernelModulemgr: sceKernelGetModuleInfo change assert to error code

modules/SceLibKernel: sceKernelCreateMutex: add stub if priority ceiling feature is used

config/state: add forgotten module (SceNetInternal) into tracy modules list
2023-03-01 23:30:26 +01:00
bookmist
3c19f400e9 kernel/load_self: implement late binding for export variables
also remove unused code
2023-02-13 11:37:21 +03:00
bookmist
3afaf558d4 modules/SceSysmodule: describe parameters for sceSysmoduleLoadModuleInternal 2023-01-19 13:35:30 +03:00
bookmist
d28f780b42 modules/SceThreadmgr: implement sceKernelCancelSema, _sceKernelCancelSema
kernel/sync_primitives: fix error code in semaphore_signal
modules/SceThreadmgr: describe some functions, fix an assert, drop unused header
2023-01-19 13:35:30 +03:00
bookmist
0a419822ce modules/SceLibKernel: export module variables __stack_chk_guard, __sce_libcparam
Not really needed, just to hide errors when importing almost all modules
Also add logs to error handling functions
2023-01-19 13:35:30 +03:00
EXtremeExploit
41a17e79c7 Planet Earth Season 2023 2023-01-02 10:46:20 +01:00