Commit Graph

93 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
0446bcdaa1 Add Metal support to Qt frontend and clean up renderer creation code (#795)
* Qt: Initial support for Metal renderer

* Clean up graphics context code

* Nits

* More nits

* Qt: Move screen-related stuff to own folder

* Qt: Make screen widget polymorphic

* Qt: Re-add Metal

* Add factory for screen widget

* Qt: Support compilation without Metal

* Qt: Fix build without Metal

* Oops

* oops
2025-07-26 23:13:08 +03:00
wheremyfoodat
415bf7b0a4 Initial DSP debugger work 2025-07-08 23:39:12 +03:00
wheremyfoodat
9dc52577ea Qt: Initial CPU debugger widget implementation
Co-Authored-By: liuk707 <62625900+liuk7071@users.noreply.github.com>
2025-07-07 03:46:51 +03:00
wheremyfoodat
cf321b1ed8 Better screen layout support 2025-07-06 02:41:44 +03:00
wheremyfoodat
9932e58bf0 Add thread debugger 2025-07-03 16:58:56 +03:00
Jonian Guveli
042ab6de03 [WIP] Libretro: Add audio support (#714)
* Libretro: Add audio support

* Adding audio interface part 1

* Audio device pt 2

* More audio device

* More audio device

* Morea uudi odevice

* More audio device

* More audio device

* More audio device

---------

Co-authored-by: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com>
2025-02-09 05:04:36 +02:00
wheremyfoodat
cb8b13e129 Support GLES on desktop 2024-12-28 19:52:42 +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
1baf8a13ed JNI driver: Add setAudioEnabled hook 2024-11-20 21:45:22 +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
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
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
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
87b838f1bf Merge branch 'master' into scheduler 2024-01-22 14:34:04 +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
6386605b97 We can now load lua scripts properly 2023-12-16 16:36:03 +02:00
wheremyfoodat
070d5b1c6d Fix configuration file path on Android 2023-11-28 12:08:25 +02:00
wheremyfoodat
b0261234a6 [Qt] Properly update HID service 2023-10-30 20:53:41 +02:00
offtkp
7e7d4f7f16 Make cheats struct more versatile 2023-10-27 02:23:41 +03:00
wheremyfoodat
d4a84c337e Fix forward declaration of SDL_Window 2023-10-26 18:09:01 +03:00
wheremyfoodat
e900e9d614 Add Renderer::deinitGraphicsContext 2023-10-25 22:46:45 +03:00
offtkp
4172194479 Implement getFps hc function 2023-10-21 11:55:26 +03:00
offtkp
977ab53b68 Format the hydra 2023-10-20 19:50:57 +03:00
offtkp
d19a00d97d Friendship revoked with httpserver 2023-10-20 19:33:37 +03:00
offtkp
23636b22fa Hydra core 2023-10-20 19:31:55 +03:00
offtkp
b5b94a3526 Add some renderer related helper functions in emulator and renderergl 2023-10-20 02:59:53 +03:00
offtkp
fb0a2a6801 Decouple emulator and frontend code 2023-10-18 15:24:42 +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
wheremyfoodat
5155682e0f Get emulator rendering working with Qt 2023-10-01 01:28:08 +03:00
wheremyfoodat
89ed176d97 Setting up Qt (#294)
* Initial Qt setup

* Fix copy paste derp

* Remove QApplication include

* Test MacOS Qt build

* Update Qt_Build.yml

* Update Qt_Build.yml

* Properly detect architecture for Qt

* Revert back to manual Qt installation to handle DLL nightmares

* Install Qt for MacOS CI

* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* Rename lua.hpp to lua_manager.hpp

* Add Windows Qt deploy step

* Update Qt_Build.yml

* Update Qt_Build.yml

* Update Qt_Build.yml

* Update Qt_Build.yml

* AAAAAAAAAAAAAAAAAAAAAA

* Update Qt_Build.yml

* AAAAAAAAAAAAAA

* Update Qt_Build.yml

* Update Qt_Build.yml

* Update Qt_Build.yml

* Create mac-bundle-qt.sh

* Update Qt_Build.yml

* Update Qt_Build.yml

* Update mac-bundle-qt.sh

* Update Qt_Build.yml

* Update mac-bundle-qt.sh

* Update mac-bundle-qt.sh

* Update mac-bundle-qt.sh

* Update mac-bundle-qt.sh

* Recovering from heartbreak after the dylibbundler fork made me sad

* Help

* Update Qt_Build.yml

* Add mac dynlib manager from MelonDS

* Update mac-bundle-qt.sh

* Update mac-bundle-qt.sh

* Update mac-libs.rb

* Update mac-bundle-qt.sh

* Create linux-appimage-qt.sh

* Update Qt_Build.yml
2023-09-29 17:30:13 +03:00
wheremyfoodat
b908f3efc1 Embed LuaJIT part 1 2023-09-17 16:15:54 +03:00
wheremyfoodat
3110da1fd6 Add amiibo loading interface 2023-09-08 19:01:44 +03:00
Théo B
29352d223b feat: 3dsx loading
romFS works too, pretty neat
2023-09-03 00:31:03 +02:00
wheremyfoodat
1c11e2df40 Add Discord RPC (#161)
* Add discord-rpc submodule

* Add Discord RPC

* Fix up Discord status

* Fix CMake because MacOS sucks

* Slightly less hacky fix
2023-08-08 00:23:39 +03:00
wheremyfoodat
bceaf3b6b7 Rename HTTP server files 2023-07-28 14:21:00 +03:00
wheremyfoodat
3653eb538f Fix struct & class confusion 2023-07-27 12:38:38 +03:00
wheremyfoodat
037d16ae7c Merge pull request #140 from wheremyfoodat/pause
Add resume/pause button, some hotkeys, more HTTPanda commands
2023-07-26 20:30:47 +03:00
wheremyfoodat
fa6ce2a7f2 Add new HTTP(anda) commands 2023-07-26 20:12:36 +03:00
wheremyfoodat
1107dff9fa Implement pause/resume 2023-07-26 19:29:34 +03:00
wheremyfoodat
eef87da979 Better cheat interface 2023-07-26 03:27:30 +03:00
offtkp
3a21661f45 Refactor http server 2023-07-24 11:43:40 +03:00
wheremyfoodat
97f8ea6cfd Get our first AR code running 2023-07-20 13:50:32 +03:00
wheremyfoodat
0904638df0 [Cheats] Add boilerplate 2023-07-19 20:51:45 +03:00
Wunkolo
2c57936c50 Fix EmulatorConfig initialization order
`config` was being consumed much too early before it has a chance to
call `load`. This caused GPU to read weird uninitialized data, and then
`load` called, and then further initialization to occur based on default
data and the data inside of `config.toml`. `EmulatorConfig` needs to be
loaded in first before any sort of initialization happens, by adding a
new constructor so that it can be initialized sooner.
2023-07-17 10:23:19 -07:00