Commit Graph

4027 Commits

Author SHA1 Message Date
KorewaWatchful 9dddc4e784 ci: update andorid build/ci 2026-05-25 22:54:28 -04:00
Pedro Montes Alcalde c93dcb7ee1 i18n: Make use of static assets instead of hardcoded base (#3968) 2026-05-25 20:56:35 -03:00
Pedro Montes Alcalde d7c48ec07c vita3k: Rework linux default paths (#3967) 2026-05-25 20:24:17 -03:00
asdf560 1fd6f4ee13 gui-qt: New theme (#3963)
* gui-qt: move external themes to static assets

* gui:qt: new classic imgui theme

---------

Co-authored-by: debopopo <debo@popo.com>
Co-authored-by: KorewaWatchful <dagestanec5550@gmail.com>
2026-05-25 15:41:06 -04:00
troglodyte b7f2c50dad gui-qt: add copy test environment summary to compatibility menu (#3962)
when a game already has a compatibility report, the context menu only
lets you copy the vita3k build summary. this adds a second action to
also copy the test environment summary (os, cpu, gpu, ram) so users
can paste it into existing issue comments without having to manually
type it out.

closes #3586
2026-05-25 15:39:59 -04:00
Pedro Montes Alcalde 7d8365521c ci: Add AppImage zsync update (#3965) 2026-05-25 00:23:28 -03:00
KorewaWatchful 62cefc69ef gxm: clear stale gxm sync object tracking 2026-05-24 19:07:06 -04:00
KorewaWatchful 905ac6a5a6 renderer: refactor frame host and fix macos vulkan issues 2026-05-24 19:07:06 -04:00
troglodyte f3a0d0abc4 gui-qt: don't crash when deleting an archive locked by another process (#3956)
* gui-qt: don't crash on install file delete failures

when you install a .zip, .vpk, .pkg, or firmware .pup and tick the matching "delete after install" option, vita3k tries to remove the installer file from disk. the archive and pkg dialogs use the throwing fs::remove overload, which raises a filesystem_error when the file is locked by another process. since the call runs inside a qt slot, the exception escapes into the qt event loop and the whole emulator goes down with it.

the firmware dialog uses QFile::remove instead, which returns a bool that the code was ignoring, so a locked firmware file silently stuck around with no feedback to the user.

leaving the installer open in something like 7-zip while installing is enough to trigger either case.

this swaps fs::remove for the non-throwing error_code overload in the archive and pkg dialogs, and checks the bool from QFile::remove in the firmware dialog. anything that could not be removed gets shown in a warning so the user knows what stuck around, and the install itself still finishes normally.

* gui-qt: route firmware drops through the install dialog

dropping a .pup onto the main window used to run install_pup inline with a bare QProgressDialog and its own success/failure handling, bypassing FirmwareInstallDialog entirely. that path duplicated the progress UI and never offered the "delete firmware file after install?" option that the menu-triggered flow exposes.

route the drop through FirmwareInstallDialog instead, matching the existing .pkg and .vpk drop routing right next to it. this adds a constructor that takes a pre-supplied firmware path so the dialog skips its file picker when invoked from a drop.

dropped firmware installs now share the threaded progress UI, the warning when the file is locked, and the optional cleanup checkbox with the menu trigger.
2026-05-23 13:06:55 -04:00
KorewaWatchful 85cb48046f gui: themes and qss refactor
# Conflicts:
#	.github/workflows/c-cpp.yml
#	.github/workflows/codeql-analysis.yml
#	vita3k/gui-qt/src/controls_dialog.cpp
2026-05-22 20:43:59 -04:00
KorewaWatchful cf37c74444 ci: overhaul ci 2026-05-21 10:50:42 -04:00
KorewaWatchful 9def9989b7 ci: use clang-format action for format checks 2026-05-20 22:31:29 -04:00
nishinji 53cbaa4c8b vita3k: Switch to C++23 2026-05-20 20:06:57 -04:00
Gamid 16afc7b89d gxm/app: fix shutdown deadlocks caused by scegxm/clean up session controller (#3950)
* gxm: track sync objects and invalidate on shutdown

* app/gxm: shutdown cleanup
2026-05-20 19:20:51 -04:00
KorewaWatchful b52c735f39 overlay: fix input related bugs 2026-05-20 19:05:54 -04:00
Sergi (セルジ) 0517f5f5fb kernel/thread: rework run_loop lifecycle (drop ThreadToDo + something_to_do)
Replace ThreadToDo and the something_to_do condvar with four boolean
flags: exit_requested, delete_requested, suspend_requested,
single_stepping. run_loop() returns void.

call_level brackets each frame: incremented on entry, decremented just
before return.

All call-level exits (normal exit, guest return, delete) converge on a
single block at the top of the loop that fires the end callback and parks
dormant. This wakes wait_thread_end waiters on every exit path.
If deleted, return completely from all run_loop() nested levels.
2026-05-19 21:46:51 -04:00
bookmist 713143f16e mem: alloc_at returns 0 on failure
Previously, alloc_at would unconditionally return the requested address, only logging a critical error if the address was already in use.
2026-05-19 20:51:07 -04:00
nishinji dcfebeada8 Update labeler.yml 2026-05-19 20:47:23 -04:00
shinra-electric ceefd1b192 CI: Resolve actions build warnings (#3904)
* Bump ccache-action to v1.2.23

* Change msvc-dev-cmd to use TheMrMilchmann fork
2026-05-18 15:36:29 -04:00
KorewaWatchful 7b9b4f6976 android: fix adrenotools macro 2026-05-18 12:39:42 -04:00
Dicot0721 d9b605854b android: Add x86_64 ABI
- Disable adrenotools in Android x86_64 build to compile.
- Fix incorrect type for parameter of JNI function.
2026-05-18 11:38:20 -03:00
Macdu f52b3af7b4 renderer: Improve depth buffer accuracy
Co-authored-by: SaturnSky <ikadro@gmail.com>
2026-05-18 10:12:02 -04:00
Sergi (セルジ) 63aaa5051e kernel: two-phase thread shutdown
Replace `exit_delete_all_threads_and_wait()` with two separate operations:
- `process_exit()` blocks until all guest threads have exited (host-only)
- `request_process_exit()` fires the registered callback and returns immediately, safe to call from guest threads.

Threads are now SDL_DetachThread'd at creation. `thread_deleted_cond` on `KernelState` is used for join semantics in `process_exit()`.

Remove `shutting_down` from sync primitives; `exit_delete()` wakes blocked threads via `update_status(run)`, which all `status_cond` predicates already check.

`process_exit_callback` carries an `optional<AppLaunchRequest>` so `LoadExec` relaunches flow through the same path as normal exits. `AppLaunchRequest`/`AppLaunchReason` extracted to `emuenv/app_launch_request.h` so kernel can include it without a circular dependency.

After this, further simplification to `ThreadStatus` will be done in https://github.com/Vita3K/Vita3K/pull/3922.
2026-05-18 09:56:39 -04:00
KorewaWatchful 74cae4a3f7 android: add trophy browser 2026-05-17 23:13:50 -04:00
bookmist 78d5574649 io: replace better-enums lib to boost::describe 2026-05-17 23:52:17 +03:00
bookmist 4e03f06a06 gui-qt: fix string/path/QString conversion for non ASCII strings for old Windows 2026-05-17 01:22:14 +03:00
KorewaWatchful c8efb16435 refresh controllers on app relaunch 2026-05-15 18:25:13 -04:00
KorewaWatchful 71a445f209 gui: bugfixes 2026-05-15 18:09:52 -04:00
aifunc 81e551db23 gui: fix macOS A key physical mapping 2026-05-15 11:31:32 -04:00
KorewaWatchful 91f533f86f emu: complete gui overhaul 2026-05-13 17:58:56 -04:00
KorewaWatchful a01f2b15b6 Revert "gui: Add Vita3K Network (V3KN) and cloud save manager."
This reverts commit cb1f592c8a.
2026-05-13 17:58:56 -04:00
Zangetsu38 cb1f592c8a gui: Add Vita3K Network (V3KN) and cloud save manager.
- Add V3KN account management dialog wtih create/login/logout/delete account, change avatar/panel/password/online id/server, quota refresh.
- Add show server error/success popup inside V3KN account management dialog.
- Add Cloud screen to LiveArea with cloud button for upload/download savedata on V3KN
- Add "Please wait" and "Connecting… Please wait." dialogs for network operations (upload/download, auth)
- Add overwrite confirmation dialog and "Copying" progress dialogs for cloud/local saves.
- Draw Cloud icons.
util/net_utils: Some refactor and protocol improvements.
- Add Upload file func with multipart/form-data support
- Add keep-alive support for (download/upload)file.
- Refactor get_web_response() to support POST bodies and return server-side errors
- Refactor download_file() for stability and clearer error handling
- Clean up duplicated logic and unify request handling.
2026-05-13 21:36:30 +02:00
Sergi (セルジ) 6e52f1ce0c cpu: move halt instruction block to KernelState, shared across all threads
Each thread was allocating its own identical 4-byte NOP+WFI block.
Since all threads point LR at the same sentinel, one allocation in KernelState is sufficient.

Note that this is a Dynarmic-specific "hack" to make it stop execution (`jit->Run()`) after the guest code returns (jumps back LR):
- Prior JIT execution, we prepare LR to point to this NOP+WFI block.
- When the guest function returns, it will jump into this NOP+WFI block and `Dynarmic::A32::Exception::WaitForInterrupt` will be called. Then we call `cpu->jit->HaltExecution()` which will make `jit->Run()` return
2026-05-13 19:10:50 +02:00
ikhoeyZX 9abe85f90f [Android/Overlay] Add L3 R3 and hide controller button 2026-05-11 17:33:07 +02:00
Sergi (セルジ) b72d34de59 kernel: extract abort dispatch into ThreadState::dispatch_abort
Makes `ThreadState::run_loop` simpler to understand.
2026-05-11 02:28:51 -04:00
Sergi (セルジ) 6a6bbfc8a7 kernel: remove CPUProtocol abstraction, inline SVC dispatch in run_loop
`CPUProtocol::get_watch_memory_addr` is never used, so we can drop it.
After that, `CPUProtocol` only has `call_svc`, whose implementation is
just 3 lines: read the NID, call `call_import`, and `clear_exclusive`.
We can inline those at the call site and get rid of `CPUProtocol`
completely.
2026-05-10 23:26:51 -04:00
Sergi (セルジ) ffbe7493fe debugger/kernel: remove unused trampoline machinery
The Debugger trampoline API (`Trampoline` struct, `TrampolineCallback`,
`add_trampoline` / `get_trampoline` / `remove_trampoline`, `TRAMPOLINE_JUMPER_SVC`
and `TRAMPOLINE_HANDLER_SVC`, plus the two SVC-dispatch branches in
`CPUProtocol::call_svc`) has never had a caller.
2026-05-10 21:48:26 -04:00
KorewaWatchful a91cc994a9 modules: fix debug string linkage, add missing tracy module name for vshbridge 2026-05-09 16:59:24 -04:00
Francisco José García García 66c21b65f7 kubridge: warn when registering unimplemented exception handler types
Only DABT (type 0) is dispatched from run_loop. PABT (1) and UNDEF (2)
are stored in exception_handlers[] but never triggered. Log a warning
so it's obvious when a plugin expects a type we don't dispatch yet.
2026-05-09 21:04:18 +02:00
Francisco José García García dbbf5bd758 stubs: return unique UIDs from stub allocators
ksceKernelAllocRemoteProcessHeap returned 0 (invalid UID on Vita) and
ksceKernelRegisterProcEventHandler returned the same hardcoded 0x40001
on every call. Use atomic counters to return distinct UIDs so callers
that pass them back to the corresponding Free/Unregister don't collide.
2026-05-09 21:04:18 +02:00
Francisco José García García 35e71d6eef taiHEN: reduce log noise in hot lookup paths
- Trim find_import_stub segment-address dump to a one-liner (fires per NID)
- Remove module_get_offset success log (fires on every offset query)
- Remove module_get_export_func cache-hit log (fires on every export lookup)
- Promote dynamic SVC stub creation to LOG_INFO (one-time per NID, useful)
2026-05-09 21:04:18 +02:00
Francisco José García García 3c9399e596 taiHEN: replace TaiHook raw pointers with unique_ptr
Raw new/delete across three allocation sites and one release site was
error-prone. Switched map to unique_ptr, removed the unused `next`
chain pointer, and eliminated the manual delete.
2026-05-09 21:04:18 +02:00
Francisco José García García 5c80509e96 modules: add Tracy instrumentation to taiHEN, kubridge, ScePowerForDriver
Addresses reviewer comment requesting TRACY_MODULE_NAME + TRACY_FUNC
in all new HLE modules added by this branch.
2026-05-09 21:04:18 +02:00
Francisco José García García 8927849a05 kubridge: apply requested protection in kuKernelMemCommit
The computed MemPerm was logged but ignored — the function always called
unprotect_inner regardless of the protection flags. Now it mirrors the
kuKernelMemProtect logic: restrictive perms use add_protect so the fault
handler can catch violations; ReadWrite unprotects as before.
2026-05-09 21:04:18 +02:00
Francisco José García García e52bc060e8 kernel: clear thread-local CPU state on run_loop exit
set_current_cpu_state was set on entry but never cleared. A recycled host
thread would carry a stale CPUState pointer into the next vita thread's
signal handler. Use a scope guard to clear it on all exit paths.
2026-05-09 21:04:18 +02:00
Francisco José García García ce5b4eb3d1 cpu: fix CP15 catch-all sharing state across unhandled registers
Using a single `dummy` field meant any unhandled MCR/MRC would read back
whatever the last unhandled write stored, silently corrupting guest reads.
Return CallbackOrAccessOneWord{} (no-op) instead.
2026-05-09 21:04:18 +02:00
Francisco José García García dfc31d5098 Address PR review: JIT cache invalidation + kernel.mutex locking
- SceCpuForDriver: ksceKernelCpuIcacheInvalidateRange and
  ksceKernelCpuIcacheAndL2WritebackInvalidateRange now call
  invalidate_jit_cache() to properly invalidate dynarmic's JIT cache
- taiHEN: All loaded_modules accesses now protected by kernel.mutex
  using scoped locks to avoid deadlocks with state->mutex and
  export_nids_mutex (lock order: kernel.mutex -> export_nids_mutex -> state->mutex)
2026-05-09 21:04:18 +02:00
Francisco José García García 7f9b366d5b Fix CI: clang-format + substitute_sym on non-Apple platforms 2026-05-09 21:04:18 +02:00
Francisco José García García 5e63470b0a Rename module files: SceLibTaihen→taiHEN, SceKubridge→kubridge
Drop vendor-invented names from source paths and internal names:
- vita3k/modules/SceLibTaihen/SceLibTaihen.cpp → taiHEN/taiHEN.cpp
- vita3k/modules/SceKubridge/SceKubridge.cpp → kubridge/kubridge.cpp
- LIBRARY_INIT: SceLibTaihen → taihen (correct name per taiHEN exports.yml)
- LIBRARY() registration updated accordingly
2026-05-09 21:04:18 +02:00
Francisco José García García c370630a55 kubridge: Implement real exception handler dispatch
- Add abort_pending/abort_fault_addr/abort_is_write atomics to CPUState
- Add thread-local set/get_current_cpu_state() for signal-safe access
- Store registered exception handlers in KernelState::exception_handlers[]
- kuKernelRegisterExceptionHandler: stores handler address (atomic)
- kuKernelReleaseExceptionHandler: clears handler address (atomic)
- MemProtect/Decommit fault callbacks halt CPU via abort_aware_fault_callback
- run_loop dispatches DABT handler with KuKernelAbortContext on guest stack
- SceLibTaihen: snapshot pre-plugin NIDs to avoid overriding system exports
2026-05-09 21:04:18 +02:00