Commit Graph

149 Commits

Author SHA1 Message Date
wheremyfoodat
bd81c72608 Fix uninitialized warning and remove header pollution (#803)
* Fix uninitialized warning and remove header pollution

* Nits

* IWYU

* More IWYU
2025-08-07 23:12:45 +03:00
wheremyfoodat
6d1ef7cb4f Memory rework pt 2 (#801)
* Memory: Rework FCRAM management entirely

Disables a lot of functionality... but I didn't want to commit too much to this commit
Also reworks virtual memory management somewhat (but needs more work)

* Accurately handle MemoryState for virtual memory

Previously all non-free blocks were marked as Reserved

* Memory: Consolidate state and permission changes

Can now use a single function to change either state, permissions, or both
Also merge vmem blocks that have the same state and permissions

* Memory: Fix double reset for FCRAM manager

Fix minor bug with permission tracking

* Memory: Implement Protect operation in ControlMemory

* Memory: Implement Unmap in ControlMemory

Also do a sanity check to make sure the memory region is free for linear allocations

* Memory: Make TLS only 0x200 bytes for each thread

Also move TLS to Base region

* RO: Unmap CROs when unloaded

Thanks @noumidev

* Kernel: Return used app memory for Commit ResourceLimit

Not quite correct, but nothing to be done until process management is improved
Also remove the stack limit for CXIs (thanks amogus)

* Kernel: Report used app memory for GetProcessInfo 2

Not really correct, but it should be accurate for applications at least

* Formatting changes

* Initial fastmem support

* PCSX2 fastmem depression

* Move away from PCSX2 fastmem

* Add enum_flag_ops.hpp

* Finally building on Windows

* Almost got a PoC

* Fix arm64 builds

* This somehow works

* This also works...

* Properly fix fastmem

* Add free region manager

* Update boost

* Add ScopeExit

* Comment out asserts on Linux/Mac/Android

* Comment out ASSERT_MSG asserts too

* Fix derp

* Attempt to fix Android

* Disable fastmem on Android

* Fix Android again maybe pt 2

* android pls

* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* Update host_memory.cpp

* Properly reset memory arena on reset

* Proper ashmem code for Android

* more

* Add temporary Android buildjet script for faster prototype builds

* Fix fastmem (again)

* Clean up shared memory

* Remove Android BuildJet runner

* a

* Revert "a"

This reverts commit 5443ad6f2a794c19c9b1a1567ca1c7f58eed78cd.

* Re-add ELF support

* Re-add 3DSX support

* GetSystemInfo, GetProcessInfo: Memory sizes should be in bytes

* Update Boost

* Update metal-cpp

* Fix metal renderer compilation

* Fix fastmem mapping

* Clean up fastmem code

* Fix oopsie again

* Emulator: Reorder struct

* Kernel types: Cleanup

* Cleanup

* More cleanup

* Make invalid mprotects warn instead of panicking

* Add setting for toggling fastmem

* More cleanup

* Properly initialize BSS to zeroes

* Remove unused code

* Formatting

* Cleanup

* Memory/CRO: Workaround for Pokemon XY

* NCSD loader: Fix BSS (again)

* NCSD loader: Fix BSS (again) (again)

* More memory fixes

* Memory: Remove unused code

* FS: Warn on unimplemented functions instead of panic

* Update software_keyboard.cpp

* Libretro: Add fastmem option

* FRD: Stub SaveLocalAccountData

---------

Co-authored-by: PSI-Rockin <PSI-Rockin@users.noreply.github.com>
2025-08-07 20:18:09 +03:00
wheremyfoodat
9932e58bf0 Add thread debugger 2025-07-03 16:58:56 +03:00
wheremyfoodat
228068901b Add system call intercepts to Lua 2025-07-03 13:02:10 +03:00
wheremyfoodat
dc7f8a48bd IR: Move to scheduler 2025-07-03 02:42:43 +03:00
wheremyfoodat
382c0f953d Initial CPP implementation 2025-07-01 01:44:55 +03:00
wheremyfoodat
a0aa11dac0 Add optional texture hashing 2025-06-23 02:45:13 +03:00
wheremyfoodat
cb8b13e129 Support GLES on desktop 2024-12-28 19:52:42 +02:00
Thomas
e8c0b7f9c5 Store configuration file in AppData root if not in working directory (#693)
* Store configuration file in AppData root if not in working directory

This fixes MacOS app bundles, as the emulator cannot write the config
file into the app bundle.

* Remove duplicate fs calls

* I'm an idiot sandwich

---------

Co-authored-by: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com>
2024-12-26 23:26:37 +02:00
wheremyfoodat
873fca076a Handle lack of an audio device gracefully without hangs 2024-12-05 01:27:12 +02:00
Jonian Guveli
156328fbfb [WIP] Qt: Add config window controls (#655)
* Qt: Add config window controls

* Fix Windows build

* Fix audio slider

* Qt configs: Make thread-safe, properly update audio enable & renderdoc settings

* Qt configs: Add `connectCheckbox` function

* Qt configs: Add `connectCheckbox` function

* Rename spuLayout

* Add Discord RPC reloading

* Allow configuring the app icon

* Qt: Serialize icon & theme, properly set them

* Add rnap and rcow icons

* Qt: Fix forceShadergen config

---------

Co-authored-by: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com>
2024-12-01 23:06:47 +02:00
wheremyfoodat
3b6190b69a Add volume slider & mute audio settings 2024-11-28 19:10:55 +02:00
wheremyfoodat
b251f84ab1 DSP: Add option to enable/disable AAC 2024-11-28 19:10:55 +02:00
wheremyfoodat
889c2453de Audio: Properly close audio device on emulator destruction (#637)
* Audio: Properly close audio device on emulator destruction

* Undo oopsie
2024-11-19 23:41:52 +02:00
wheremyfoodat
4629314961 Add support for .ncch files 2024-11-19 00:48:42 +02:00
wheremyfoodat
2754df9b94 Add renderdoc API support (#585)
* Add renderdoc API support

* FIx renderdoc include directory

* Fix RenderDoc linking

* Fix Renderdoc linking (again)

* Maybe fix renderdoc
2024-08-23 05:30:25 +03:00
Eric Warmenhoven
992c9fb98c add libretro gitlab CI file 2024-08-17 17:09:46 -04:00
wheremyfoodat
0cf5687e64 Merge pull request #566 from wheremyfoodat/hle-dsp
Fixing remaining HLE DSP hangs
2024-08-04 14:35:44 +00:00
wheremyfoodat
85bae2e94e HLE DSP: Handle cycle drifting 2024-08-04 16:46:43 +03:00
wheremyfoodat
f572373fc1 AES: Implement seed crypto 2024-07-30 14:29:18 +03:00
wheremyfoodat
d0f13de4c5 Fix swapping loaded ELF files 2024-07-26 16:25:38 +03:00
wheremyfoodat
623a9a64d6 LR: Format/Cleanup 2024-07-09 16:11:25 +03:00
Jonian Guveli
ea03d135da Allow overriding config/data paths in emulator 2024-07-09 14:48:22 +03:00
wheremyfoodat
1c9a3ac3d3 Add Y2R event delay 2024-07-02 15:30:38 +03:00
Paris Oplopoios
27ad7b01f3 Rename Emulator::run to FrontendSDL::run (#466)
* Rename Emulator::run to FrontendSDL::run

* Update frontend_sdl.cpp

---------

Co-authored-by: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com>
2024-03-16 23:20:37 +02:00
wheremyfoodat
9d8868cffd Don't start audio device on resume if audio is disabled 2024-02-25 18:36:35 +02:00
wheremyfoodat
d459cb1d6c Get audio output working with LLE DSP (#419)
* Implement audio output

* Semi-proper audio output

* Add audio enable and vsync settings

* Add audio enable and vsync settings

* Optimize audio output a bit

* Make max ring buffer timeout smaller

* Make max ring buffer timeout smaller

* Revert to spinlocking for audio sync

* Sleep emulator thread if too many samples queued

* Fix Teakra submodule breaking

* Don't start audio device too soon

* Fix IWYU errors

* Fix compilation errors on GCC/Clang

* Ignore std::hardware_destructive_interference_size on Android NDK

* Fix more IWYU errors
2024-02-24 03:26:23 +02:00
wheremyfoodat
6279ed699a Store program ID and expose it in Lua (#414) 2024-02-22 16:26:31 +02:00
wheremyfoodat
7a5bb2859e Make DSP backends properly configurable 2024-02-19 17:57:21 +02:00
wheremyfoodat
33eb096ef8 Better DSP scheduling 2024-02-18 22:22:00 +02:00
wheremyfoodat
5dd3c02ffb Moar Teak LLE
Co-Authored-By: PSISP <12768103+psi-rockin@users.noreply.github.com>
2024-02-17 03:48:37 +02:00
wheremyfoodat
363c71e66c Hook DSP interface to DSP service HLE
Co-Authored-By: PSISP <12768103+psi-rockin@users.noreply.github.com>
2024-02-17 01:36:10 +02:00
wheremyfoodat
0a51a80d91 Add DSP emulation interface
Co-Authored-By: PSISP <12768103+psi-rockin@users.noreply.github.com>
2024-02-17 00:39:55 +02:00
wheremyfoodat
52accdde43 Test to fix android build 2024-01-25 21:45:15 +02:00
wheremyfoodat
3c06098ead Mark VBlank event likely 2024-01-22 15:07:52 +02:00
wheremyfoodat
87b838f1bf Merge branch 'master' into scheduler 2024-01-22 14:34:04 +02:00
wheremyfoodat
af996c55ba Remove debug printfs 2024-01-22 04:14:46 +02:00
wheremyfoodat
0be099d1ea Hook up KTimer to scheduler 2024-01-22 04:04:05 +02:00
wheremyfoodat
fa82dad38d First stuff running with scheduler 2024-01-22 02:29:14 +02:00
wheremyfoodat
75663d0601 More app folder utilities 2024-01-21 22:27:58 +02:00
offtkp
3aa977c6c5 Clean up smdh getting 2023-12-28 00:28:19 +02:00
wheremyfoodat
c3cd6acefe Merge pull request #340 from hydra-emu/pandroid4
Pandroid
2023-12-13 23:20:07 +02:00
wheremyfoodat
070d5b1c6d Fix configuration file path on Android 2023-11-28 12:08:25 +02:00
offtkp
469ae2805c Add initial pandroid files 2023-11-14 15:30:53 +02:00
offtkp
fb0a2a6801 Decouple emulator and frontend code 2023-10-18 15:24:42 +03:00
offtkp
fa9af4fb2e Fix save path on Android 2023-10-18 00:34:08 +03:00
wheremyfoodat
0421eae7ae Set up icons 2023-10-07 23:15:43 +03:00
wheremyfoodat
ab2ff18290 Fix dumping 2023-10-07 21:52:47 +03:00
wheremyfoodat
abe4675477 Attempt to add RomFS dumping 2023-10-07 21:23:05 +03:00
wheremyfoodat
c10a3e7160 Make emulator output size properly configurable 2023-10-01 16:28:14 +03:00