Commit Graph

206 Commits

Author SHA1 Message Date
wheremyfoodat
0b8d8af9c7 Scheduler: Optimize by adding a proper reschedule function 2025-10-12 02:26:51 +03:00
wheremyfoodat
72b9aecda5 Thread scheduling fixes (#722)
* Add thread preemption when a thread wakes up from a timeout

* Add arbiter sleeping with timeout

Update threads.cpp

* Scheduler: Fix event numbers

* More address arbiter fixes

* Update preempt threads branch (#755)

* CI: Fix Vulkan SDK action (#723)

* GPU registers: Fix writes to some registers ignoring the mask (#725)

Co-authored-by: henry <23128103+atem2069@users.noreply.github.com>

* OLED theme

* OLED theme config fix (#736)

Co-authored-by: smiRaphi <neogt404@gmail.com>

* Adding Swedish translation

* Fix Metal renderer compilation on iOS

* [Core] Improve iOS compilation workflow

* [Qt] Hook Swedish to UI

* AppDataDocumentProvider: Typo (#740)

* More iOS work

* More iOS progress

* More iOS work

* AppDataDocumentProvider: Add missing ``COLUMN_FLAGS`` in the default document projectation (#741)

Fixes unable to copy files from device to app's internal storage problem

* More iOS work

* ios: Simplify MTKView interface (still doesn't work though)

* ios: Pass CAMetalLayer instead of void* to Obj-C++ bridging header

* Fix bridging cast

* FINALLY IOS GRAPHICS

* ios: Remove printf spam

* Metal: Reimplement some texture formats on iOS

* metal: implement texture decoder

* metal: check for format support

* metal: implement texture swizzling

* metal: remove unused texture functions

* Shadergen types: Add Metal & MSL

* Format

* Undo submodule changes

* Readme: Add Chonkystation 3

* Metal: Use std::unique_ptr for texture decode

* AppDataDocumentProvider: Allow to remove documents (#744)

* AppDataDocumentProvider: Allow to remove documents

* Typo

* Metal renderer fixes for iOS

* iOS driver: Add doc comments

* iOS: Add frontend & frontend build files (#746)

* iOS: Add SwiftUI part to repo

* Add iOS build script

* Update SDL2 submodule

* Fix iOS build script

* CI: Update xcode tools for iOS

* Update iOS_Build.yml

* Update iOS build

* Lower XCode version

* A

* Update project.pbxproj

* Update iOS_Build.yml

* Update iOS_Build.yml

* Update build.sh

* iOS: Fail on build error

* iOS: Add file picker (#747)

* iOS: Add file picker

* Fix lock placement

* Qt: Add runpog icon (#752)

* Update discord-rpc submodule (#753)

* Remove cryptoppwin submodule (#754)

---------

Co-authored-by: henry <23128103+atem2069@users.noreply.github.com>
Co-authored-by: smiRaphi <neogt404@gmail.com>
Co-authored-by: smiRaphi <87574679+smiRaphi@users.noreply.github.com>
Co-authored-by: Daniel Nylander <po@danielnylander.se>
Co-authored-by: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Co-authored-by: Samuliak <samuliak77@gmail.com>
Co-authored-by: Albert <45282415+ggrtk@users.noreply.github.com>

---------

Co-authored-by: henry <23128103+atem2069@users.noreply.github.com>
Co-authored-by: smiRaphi <neogt404@gmail.com>
Co-authored-by: smiRaphi <87574679+smiRaphi@users.noreply.github.com>
Co-authored-by: Daniel Nylander <po@danielnylander.se>
Co-authored-by: Ishan09811 <156402647+Ishan09811@users.noreply.github.com>
Co-authored-by: Samuliak <samuliak77@gmail.com>
Co-authored-by: Albert <45282415+ggrtk@users.noreply.github.com>
2025-10-12 00:00:15 +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
8e20bd6220 Long overdue clang-format pass on most of the project (#773) 2025-07-06 18:25:20 +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
9dcb0a1d47 Fix outdated comment 2025-07-02 20:21:56 +03:00
wheremyfoodat
5a2d71553c FS: Add missing file seeks 2025-06-28 04:51:07 +03:00
wheremyfoodat
86d1bde845 Temporarily give 80MB to all processes (#715) 2025-02-02 23:18:54 +02:00
wheremyfoodat
5042594f3b Add missing SVC logs 2025-01-03 19:23:46 +02:00
wheremyfoodat
84c358660c Implement Luma icache SVCs 2025-01-03 19:21:45 +02:00
wheremyfoodat
33c3e67b31 CRO: Lighter icache flushes 2025-01-03 19:14:59 +02:00
wheremyfoodat
8c80099339 Implement shared font relocation 2024-10-22 19:13:25 +03:00
wheremyfoodat
0f80d0af7a Rename Handle to HorizonHandle, add metal-cpp submodule, format 2024-07-23 15:22:15 +03:00
wheremyfoodat
bee414a4f8 Downgrade SetFileSize failure to warning 2024-07-14 23:05:49 +03:00
wheremyfoodat
1c9a3ac3d3 Add Y2R event delay 2024-07-02 15:30:38 +03:00
wheremyfoodat
e4bea43fd6 Implement GetResourceLimitValue for thread count (#438) 2024-03-07 19:48:08 +02:00
wheremyfoodat
f58354af06 Update DSP semaphore on semaphore event signal
Fixes Pokemon X and other DSP-needy games...
2024-02-18 03:54:00 +02:00
wheremyfoodat
8ff2d7f9b2 Update comment 2024-01-27 15:44:01 +02:00
wheremyfoodat
491b415759 Remove thread sleepTick/waitingNs 2024-01-27 15:38:27 +02:00
wheremyfoodat
99a1a0133d Initial idle skip implementation 2024-01-27 01:58:21 +02:00
wheremyfoodat
85a2ca1bf4 Stub svcUnmapMemoryBlock 2024-01-24 19:06:39 +02:00
wheremyfoodat
c108da5e02 Moar appletting 2024-01-24 18:51:44 +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
1430f1c4c2 Implement SVC 0x3B (GetThreadContext) 2024-01-02 17:18:47 +02:00
wheremyfoodat
a82c03312a Handle svcClose for file objects 2023-12-17 20:47:50 +02:00
wheremyfoodat
ae24bd0701 Optionally flush file in File::Write 2023-12-17 20:36:00 +02:00
wheremyfoodat
ba3db24f30 [Kernel] Fix WaitSynchronization1 ABI 2023-12-06 02:39:55 +02:00
wheremyfoodat
1f7fc2274a Add vector of timer handles 2023-11-04 18:28:28 +02:00
wheremyfoodat
708b10c194 Fix svcSetTimer ABI maybe...? 2023-11-04 18:26:20 +02:00
wheremyfoodat
798b10ec69 Fix KTimer not properly triggering 2023-11-04 18:07:13 +02:00
offtkp
13f2ddc77e Fix ambiguity between enum and type 2023-10-21 02:32:24 +03:00
wheremyfoodat
2ab37b3d4a Don't sleep on service handles for the time being 2023-10-06 18:16:46 +03:00
wheremyfoodat
c48f8327c6 Start implementing SystemSaveData 2023-09-13 23:15:18 +03:00
wheremyfoodat
46cf049e3b Add CSND::ExecuteCommands 2023-09-10 23:00:26 +03:00
wheremyfoodat
b394cacbc7 More CSND stubbing 2023-09-10 16:51:44 +03:00
wheremyfoodat
7bf56c2413 [CPU] Add function for clearing JIT cache 2023-09-05 20:57:48 +03:00
wheremyfoodat
137f29509f Add warning 2023-08-31 22:48:35 +03:00
wheremyfoodat
cb3f7fa134 Remove hacky timer hacks 2023-08-31 22:47:43 +03:00
wheremyfoodat
1d601e41ba Merge branch 'master' into timerz 2023-08-21 18:57:18 +03:00
wheremyfoodat
dd6508eb26 Migrate shared font to cmrc 2023-08-21 14:53:50 +03:00
wheremyfoodat
8796440ae9 Add resource limit for threads to getResourceLimitLimitValues 2023-08-20 18:27:23 +03:00
wheremyfoodat
cce796ec0c Make SendSyncRequest warn instead of panic on invalid handles
Some games like Arc Baseball use invalid handles...
2023-08-20 18:03:42 +03:00
wheremyfoodat
d4f074b231 Merge pull request #217 from wheremyfoodat/services
Add the GetThreadIdealProcessor SVC and fix UB
2023-08-20 03:58:07 +03:00
wheremyfoodat
434827e11e Add svcGetThreadIdealProcessor 2023-08-20 03:43:26 +03:00
wheremyfoodat
574fe95bca Add missing log 2023-08-20 02:21:05 +03:00
wheremyfoodat
8a435cc36b Add note about default processor ID 2023-08-20 01:55:41 +03:00
wheremyfoodat
5b8bb12860 Make svcCreateThread panic with invalid IDs 2023-08-20 01:52:23 +03:00
wheremyfoodat
6895a1d9d6 Implement svcGetCurrentProcessorNumber 2023-08-20 01:51:24 +03:00