summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-02-14general: rename CurrentProcess to ApplicationProcessLiam1-21/+21
2022-12-17EmuThread: refactorLiam1-12/+6
2022-12-06general: improve handling of system startup failureLiam1-1/+3
2022-11-26core: Use atomic instead of a lock to protect is_paused.bunnei1-6/+5
- This allows us to call IsPaused() elsewhere if we are holding the suspend lock.
2022-10-30kernel: reinitialize after dram layout changeLiam1-1/+8
2022-10-23core: barrier service thread shutdownLiam1-0/+1
2022-10-19core: Initialize: Add missing braces.bunnei1-2/+4
2022-10-19core: core_timing: Re-initialize if single/multicore state changes.bunnei1-5/+20
2022-10-19core: Partially persist emulation state across game boots.bunnei1-29/+36
2022-10-06NVDRV: Further refactors and eliminate old code.Fernando Sahmkow1-11/+0
2022-10-06NVDRV: Refactor Host1xFernando Sahmkow1-1/+1
2022-10-06VideoCore: Refactor syncing.Fernando Sahmkow1-0/+12
2022-09-13Remove pause callbacks from coretimingKelebek11-4/+0
2022-08-27yuzu: Display current game version in multiplayer roomFearlessTobi1-0/+9
Makes it easier for users to recognize connection errors caused by different game versions.
2022-07-27chore: make yuzu REUSE compliantAndrea Pappacoda1-3/+2
[REUSE] is a specification that aims at making file copyright information consistent, so that it can be both human and machine readable. It basically requires that all files have a header containing copyright and licensing information. When this isn't possible, like when dealing with binary assets, generated files or embedded third-party dependencies, it is permitted to insert copyright information in the `.reuse/dep5` file. Oh, and it also requires that all the licenses used in the project are present in the `LICENSES` folder, that's why the diff is so huge. This can be done automatically with `reuse download --all`. The `reuse` tool also contains a handy subcommand that analyzes the project and tells whether or not the project is (still) compliant, `reuse lint`. Following REUSE has a few advantages over the current approach: - Copyright information is easy to access for users / downstream - Files like `dist/license.md` do not need to exist anymore, as `.reuse/dep5` is used instead - `reuse lint` makes it easy to ensure that copyright information of files like binary assets / images is always accurate and up to date To add copyright information of files that didn't have it I looked up who committed what and when, for each file. As yuzu contributors do not have to sign a CLA or similar I couldn't assume that copyright ownership was of the "yuzu Emulator Project", so I used the name and/or email of the commit author instead. [REUSE]: https://reuse.software Follow-up to 01cf05bc75b1e47beb08937439f3ed9339e7b254
2022-07-25network: Move global state into a seperate classFearlessTobi1-3/+13
Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com>
2022-07-25core: Fix -Wunused-variableFearlessTobi1-1/+3
2022-07-25yuzu: Add ui files for multiplayer roomsFearlessTobi1-1/+16
2022-07-22Project AndioKelebek11-3/+48
2022-06-14kernel: implement KProcess suspensionLiam1-10/+8
2022-06-10core/debugger: fix a number of shutdown deadlocksLiam1-0/+6
2022-06-01core/debugger: Implement new GDB stub debuggerLiam1-4/+25
2022-04-24Remove unused PrepareReschedule functionMerry1-4/+0
2022-03-19core: Reduce unused includesameerj1-1/+0
2022-03-07core: Don't shutdown a null GPUlat9nq1-1/+3
When CreateGPU fails, yuzu would try and shutdown the GPU instance regardless of whether any instance was actually created. Check for nullptr before calling its methods to prevent a crash.
2022-02-21core: hle: kernel: KProcess: Pass in KResourceLimit on process creation.bunnei1-1/+10
- This allows us to have a resource limit per process, rather than use the global system resource limit.
2022-01-04gpu: Add shut down method to synchronize threads before destructionameerj1-0/+2
2021-12-07core: hle: kernel: Reflect non-emulated threads as core 3.bunnei1-6/+0
2021-11-25core: Register HIDgerman771-3/+11
2021-11-05core: Reorder perf_stats destruction order on Shutdownameerj1-1/+1
Avoids the gpu_core using perf_stats after it's been freed.
2021-11-04general: Get the current process program id directly from the systemMorph1-0/+4
This allows us to avoid including KProcess' header file in files that only need to get the current process' program id.
2021-11-04general: Rename GetTitleID to GetProgramIDMorph1-1/+1
2021-11-04core: Remove unused includesameerj1-4/+0
2021-10-27Revert PR7009Feng Chen1-13/+3
2021-10-17settings: Remove std::chrono usageameerj1-2/+3
Alleviates the dependency on chrono for all files that include settings.h
2021-10-16NvHost/Core: Address Feedback.Fernando Sahmkow1-15/+19
2021-10-16Suspend temporallyFernandoS271-0/+27
2021-10-15core: Move ResultStatus outside of SystemMorph1-24/+25
Allows it to be a forward declaration in other header files.
2021-10-15core: Remove static system instanceMorph1-14/+1
2021-10-02core: Add Exit and ExitCallbackMorph1-0/+13
This allows ISelfController::Exit to stop the currently running application. This is typically used by homebrew to exit back to the homebrew menu after calling consoleExit with libnx.
2021-09-24video_core: Fix jthread related hangs when stopping emulationameerj1-1/+1
jthread on some compilers is more picky when it comes to the order in which objects are destroyed.
2021-09-16gpu: Use std::jthread for async gpu threadameerj1-5/+1
2021-09-14core: Destroy main_process during shutdownameerj1-3/+12
The main_process was never being cleaned up, causing a noticeable memory leak after subsequent launches. This change cleans up the memory during Core Shutdown, mitigating the leak.
2021-08-26Revert "kernel: Various improvements to scheduler"bunnei1-0/+6
2021-08-24logging: Fix log filter during initializationameerj1-1/+9
The log filter was being ignored on initialization due to the logging instance being initialized before the config instance, so the log filter was set to its default value. This fixes that oversight, along with using descriptive exceptions instead of abort() calls.
2021-08-13logging: Simplify and make thread-safeyzct123451-2/+7
This simplifies the logging system. This also fixes some lost messages on startup. The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation. With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
2021-08-07core: hle: kernel: Reflect non-emulated threads as core 3.bunnei1-6/+0
2021-07-24general: Rename "Frame Limit" references to "Speed Limit"ameerj1-5/+5
This setting is best referred to as a speed limit, as it involves the limits of all timing based aspects of the emulator, not only framerate. This allows us to differentiate it from the fps unlocker setting.
2021-07-20file_sys: Support load game collection (#6582)Feng Chen1-7/+6
Adds support for loading games with multiple programs embedded within such as the Dragon Quest 1+2+3 Collection
2021-07-14service: Append service name prefix to common filenamesMorph1-2/+2
2021-07-08general: Code formatting improvementslat9nq1-2/+2
Slight improvements to readability. Dropped suggestions for string_view (settings.h:101), pass by value (settings.h:82), reverting double to a float (config.cpp:316), and other smaller ones, some out of scope. Addresses review feedback. Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2021-06-28general: Make most settings a BasicSettinglat9nq1-3/+3
Creates a new BasicSettings class in common/settings, and forces setting a default and label for each setting that uses it in common/settings. Moves defaults and labels from both frontends into common settings. Creates a helper function in each frontend to facillitate reading the settings now with the new default and label properties. Settings::Setting is also now a subclass of Settings::BasicSetting. Also adds documentation for both Setting and BasicSetting.
2021-06-22core: Make is_powered_on atomicRodrigo Locatti1-2/+3
Fixes potential data races when shutting down.
2021-05-26common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph1-2/+2
* common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
2021-05-17general: Demote custom_rtc to regular settinglat9nq1-1/+1
2021-05-16perf_stats: Rework FPS counter to be more accurateameerj1-1/+2
The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case. This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics. The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values. The status bar update frequency was also changed from 2 seconds to 500ms.
2021-05-06hle: kernel: Rename Process to KProcess.bunnei1-7/+7
2021-05-06hle: kernel: Migrate KClientPort to KAutoObject.bunnei1-1/+1
2021-05-06hle: kernel: Refactor several threads/events/sharedmemory to use slab heaps.bunnei1-1/+1
2021-05-06hle: kernel: Migrate KProcess to KAutoObject.bunnei1-3/+6
2021-05-06core: Defer CoreTiming initialization.bunnei1-1/+1
2021-05-06core: memory: Add a work-around to allocate and access kernel memory regions by vaddr.bunnei1-0/+1
2021-04-15common: Move settings to common from core.bunnei1-1/+10
- Removes a dependency on core and input_common from common.
2021-04-07video_core/gpu_thread: Implement a ShutDown method.Markus Wick1-1/+1
This was implicitly done by `is_powered_on = false`, however the explicit method allows us to block until the GPU is actually gone. This should fix a race condition while removing the other subsystems while the GPU is still active.
2021-03-02core: Shutdown: Move kernel cleanup to later in shutdown.bunnei1-12/+1
- Fixes a shutdown crash due to a race condition with GPU still accessing memory.
2021-02-21kernel: Fix resource release exception on exitameerj1-0/+3
After rewriting the resource limit, objects releasing reserved resources require a live kernel instance. This commit fixes exceptions that occur due to the kernel being destroyed before some objects released their resources, allowing for a graceful exit.
2021-01-29core: hle: kernel: Rename Thread to KThread.bunnei1-1/+1
2021-01-20lm: Recode LM serviceChloe Marcec1-12/+0
Rework the service to spit out to logs instead of a seperate file as well as fix any crashes caused by lm.
2020-12-29core: Do not reset device_memory on shutdown.bunnei1-1/+0
- This will be reset on initialization.
2020-12-29core: settings: Untangle multicore from asynchronous GPU.bunnei1-1/+1
- Now that GPU is always threaded, we can support multicore with synchronous GPU.
2020-12-08core: Remove unnecessary enum casts in log callsLioncash1-3/+2
Follows the video core PR. fmt doesn't require casts for enum classes anymore, so we can remove quite a few casts.
2020-12-06hle: kernel: Rewrite scheduler implementation based on Mesopshere.bunnei1-21/+5
2020-11-29core: arm: Implement InvalidateCacheRange for CPU cache invalidation.bunnei1-0/+4
2020-11-29hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.bunnei1-8/+5
2020-11-27core: Eliminate remaining usages of the global system instanceLioncash1-6/+1
Removes all remaining usages of the global system instance. After this, migration can begin to migrate to being constructed and managed entirely by the various frontends.
2020-11-26core: Reduce string copies in GetGameFileFromPath()Lioncash1-12/+22
Eliminates some minor string churn where applicable. Also eliminates an unnecessary vector copy.
2020-11-25core: loader: Implement support for loading indexed programs.bunnei1-6/+23
2020-11-24hle: services: Fix a crash with improper NVFlinger lifetime management. (#4977)bunnei1-3/+6
* hle: services: Fix a crash with improper NVFlinger lifetime management. - This crash would happen when attempting to shutdown yuzu early on in boot.
2020-11-18patch_manager: Remove usages of the global system instanceLioncash1-3/+3
With this, only 19 usages of the global system instance remain within the core library. We're almost there.
2020-11-18core: Remove unused private Init function for the System classLioncash1-8/+4
This isn't used, so it can be removed.
2020-11-18core: Make use of [[nodiscard]] with the System classLioncash1-1/+5
Given this is a central class, we should flag cases where the return value of some functions not being used is likely a bug.
2020-11-01core: Initialize GPU before services.bunnei1-4/+6
2020-10-13service: time: Update current time with changes to RTC setting.bunnei1-1/+14
- This can be used to advance time, e.g. for Pokemon Sword/Shield pokejobs.
2020-09-17service/sm: Eliminate dependency on the global system instanceLioncash1-1/+1
2020-09-17file_sys/bis_factory: Eliminate usage of the global system accessorLioncash1-2/+2
2020-09-16core/loader: Remove dependencies on the global system instanceLioncash1-1/+1
Now all that remains is: 18 instances in file_sys code 14 instances in GDB stub code (this can be tossed wholesale) 4 instances in HLE code 2 instances in settings code.
2020-09-06video_core: Remove all Core::System references in rendererReinUsesLisp1-1/+0
Now that the GPU is initialized when video backends are initialized, it's no longer needed to query components once the game is running: it can be done when yuzu is booting. This allows us to pass components between constructors and in the process remove all Core::System references in the video backend.
2020-08-18common/telemetry: Migrate namespace into the Common namespaceLioncash1-6/+6
Migrates the Telemetry namespace into the Common namespace to make the code consistent with the rest of our common code.
2020-08-16common/fileutil: Convert namespace to Common::FSLioncash1-1/+1
Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
2020-07-28device_memory: Remove unused system memberLioncash1-1/+1
This isn't used by anything in particular, so it can be removed.
2020-07-19core/network: Add network abstractionReinUsesLisp1-0/+4
This commit adds a network abstraction designed to implement bsd:s but at the same time work as a generic abstraction to implement any networking code we have to use from core. This is implemented on top of BSD sockets on Unix systems and winsock on Windows. The code is designed around winsocks having compatibility definitions to support both BSD and Windows sockets.
2020-07-10configuration: implement per-game configurations (#4098)lat9nq1-3/+3
* Switch game settings to use a pointer In order to add full per-game settings, we need to be able to tell yuzu to switch to using either the global or game configuration. Using a pointer makes it easier to switch. * configuration: add new UI without changing existing funcitonality The new UI also adds General, System, Graphics, Advanced Graphics, and Audio tabs, but as yet they do nothing. This commit keeps yuzu to the same functionality as originally branched. * configuration: Rename files These weren't included in the last commit. Now they are. * configuration: setup global configuration checkbox Global config checkbox now enables/disables the appropriate tabs in the game properties dialog. The use global configuration setting is now saved to the config, defaulting to true. This also addresses some changes requested in the PR. * configuration: swap to per-game config memory for properties dialog Does not set memory going in-game. Swaps to game values when opening the properties dialog, then swaps back when closing it. Uses a `memcpy` to swap. Also implements saving config files, limited to certain groups of configurations so as to not risk setting unsafe configurations. * configuration: change config interfaces to use config-specific pointers When a game is booted, we need to be able to open the configuration dialogs without changing the settings pointer in the game's emualtion. A new pointer specific to just the configuration dialogs can be used to separate changes to just those config dialogs without affecting the emulation. * configuration: boot a game using per-game settings Swaps values where needed to boot a game. * configuration: user correct config during emulation Creates a new pointer specifically for modifying the configuration while emulation is in progress. Both the regular configuration dialog and the game properties dialog now use the pointer Settings::config_values to focus edits to the correct struct. * settings: split Settings::values into two different structs By splitting the settings into two mutually exclusive structs, it becomes easier, as a developer, to determine how to use the Settings structs after per-game configurations is merged. Other benefits include only duplicating the required settings in memory. * settings: move use_docked_mode to Controls group `use_docked_mode` is set in the input settings and cannot be accessed from the system settings. Grouping it with system settings causes it to be saved with per-game settings, which may make transferring configs more difficult later on, especially since docked mode cannot be set from within the game properties dialog. * configuration: Fix the other yuzu executables and a regression In main.cpp, we have to get the title ID before the ROM is loaded, else the renderer will reflect only the global settings and now the user's game specific settings. * settings: use a template to duplicate memory for each setting Replaces the type of each variable in the Settings::Values struct with a new class that allows basic data reading and writing. The new struct Settings::Setting duplicates the data in memory and can manage global overrides per each setting. * configuration: correct add-ons config and swap settings when apropriate Any add-ons interaction happens directly through the global values struct. Swapping bewteen structs now also includes copying the necessary global configs that cannot be changed nor saved in per-game settings. General and System config menus now update based on whether it is viewing the global or per-game settings. * settings: restore old values struct No longer needed with the Settings::Setting class template. * configuration: implement hierarchical game properties dialog This sets the apropriate global or local data in each setting. * clang format * clang format take 2 can the docker container save this? * address comments and style issues * config: read and write settings with global awareness Adds new functions to read and write settings while keeping the global state in focus. Files now generated per-game are much smaller since often they only need address the global state. * settings: restore global state when necessary Upon closing a game or the game properties dialog, we need to restore all global settings to the original global state so that we can properly open the configuration dialog or boot a different game. * configuration: guard setting values incorrectly This disables setting values while a game is running if the setting is overwritten by a per game setting. * config: don't write local settings in the global config Simple guards to prevent writing the wrong settings in the wrong files. * configuration: add comments, assume less, and clang format No longer assumes that a disabled UI element means the global state is turned off, instead opting to directly answer that question. Still however assumes a game is running if it is in that state. * configuration: fix a logic error Should not be negated * restore settings' global state regardless of accept/cancel Fixes loading a properties dialog and causing the global config dialog to show local settings. * fix more logic errors Fixed the frame limit would set the global setting from the game properties dialog. Also strengthened the Settings::Setting member variables and simplified the logic in config reading (ReadSettingGlobal). * fix another logic error In my efforts to guard RestoreGlobalState, I accidentally negated the IsPowered condition. * configure_audio: set toggle_stretched_audio to tristate * fixed custom rtc and rng seed overwriting the global value * clang format * rebased * clang format take 4 * address my own review Basically revert unintended changes * settings: literal instead of casting "No need to cast, use 1U instead" Thanks, Morph! Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> * Revert "settings: literal instead of casting " This reverts commit 95e992a87c898f3e882ffdb415bb0ef9f80f613f. * main: fix status buttons reporting wrong settings after stop emulation * settings: Log UseDockedMode in the Controls group This should have happened when use_docked_mode was moved over to the controls group internally. This just reflects this in the log. * main: load settings if the file has a title id In other words, don't exit if the loader has trouble getting a title id. * use a zero * settings: initalize resolution factor with constructor instead of casting * Revert "settings: initalize resolution factor with constructor instead of casting" This reverts commit 54c35ecb46a29953842614620f9b7de1aa9d5dc8. * configure_graphics: guard device selector when Vulkan is global Prevents the user from editing the device selector if Vulkan is the global renderer backend. Also resets the vulkan_device variable when the users switches back-and-forth between global and Vulkan. * address reviewer concerns Changes function variables to const wherever they don't need to be changed. Sets Settings::Setting to final as it should not be inherited from. Sets ConfigurationShared::use_global_text to static. Co-Authored-By: VolcaEM <volcaem@users.noreply.github.com> * main: load per-game settings after LoadROM This prevents `Restart Emulation` from restoring the global settings *after* the per-game settings were applied. Thanks to BSoDGamingYT for finding this bug. * Revert "main: load per-game settings after LoadROM" This reverts commit 9d0d48c52d2dcf3bfb1806cc8fa7d5a271a8a804. * main: only restore global settings when necessary Loading the per-game settings cannot happen after the ROM is loaded, so we have to specify when to restore the global state. Again thanks to BSoD for finding the bug. * configuration_shared: address reviewer concerns except operator overrides Dropping operator override usage in next commit. Co-Authored-By: LC <lioncash@users.noreply.github.com> * settings: Drop operator overrides from Setting template Requires using GetValue and SetValue explicitly. Also reverts a change that broke title ID formatting in the game properties dialog. * complete rebase * configuration_shared: translate "Use global configuration" Uses ConfigurePerGame to do so, since its usage, at least as of now, corresponds with ConfigurationShared. * configure_per_game: address reviewer concern As far as I understand, it prevents the program from unnecessarily copying strings. Co-Authored-By: LC <lioncash@users.noreply.github.com> Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> Co-authored-by: VolcaEM <volcaem@users.noreply.github.com> Co-authored-by: LC <lioncash@users.noreply.github.com>
2020-06-28Core/Common: Address Feedback.Fernando Sahmkow1-1/+1
2020-06-27Services/NvFlinger: Do vSync in a sepparate thread on Multicore.Fernando Sahmkow1-2/+6
2020-06-27Core: Split Microprofile Dynarmic timing per CoreFernando Sahmkow1-3/+12
2020-06-27General: Correct rebase, sync gpu and context management.Fernando Sahmkow1-2/+1
2020-06-27General: Move ARM_Interface into Threads.Fernando Sahmkow1-19/+15
2020-06-27SingleCore: Move Host Timing from a sepparate thread to main cpu thread.Fernando Sahmkow1-0/+2
2020-06-27GUI: Make multicore only work with Async and add GUI for multicore.Fernando Sahmkow1-2/+9
2020-06-27General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running.Fernando Sahmkow1-0/+15
2020-06-27General: Initial Setup for Single Core.Fernando Sahmkow1-0/+3
2020-06-27SVC: Correct GetThreadPriority, SetThreadPriority, GetThreadCoreMask, SetThreadCoreMask, GetCurrentProcessorNumberFernando Sahmkow1-0/+8
2020-06-27HostTiming: Pause the hardware clock on pause.Fernando Sahmkow1-1/+1
2020-06-27General: Recover Prometheus project from harddrive failure Fernando Sahmkow1-27/+30
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host Timing, Reworks the Kernel's Scheduler, Introduce Idle State and Suspended State, Recreates the bootmanager, Initializes Multicore system.
2020-04-17core: system: Rename GetDeviceManager -> DeviceManager.bunnei1-4/+4
- More consistent with other system components.
2020-04-17core: Construct/Destruct DeviceMemory on Init/Shutdown.bunnei1-4/+7
2020-04-17core: device_manager: Add a simple class to manage device RAM.bunnei1-1/+11
2020-04-17core: memory: Move to Core::Memory namespace.bunnei1-2/+2
- helpful to disambiguate Kernel::Memory namespace.
2020-03-26Address review and fix broken yuzu-tester buildJames Rowe1-1/+3
2020-03-25Frontend/GPU: Refactor context managementJames Rowe1-16/+4
Changes the GraphicsContext to be managed by the GPU core. This eliminates the need for the frontends to fool around with tricky MakeCurrent/DoneCurrent calls that are dependent on the settings (such as async gpu option). This also refactors out the need to use QWidget::fromWindowContainer as that caused issues with focus and input handling. Now we use a regular QWidget and just access the native windowHandle() directly. Another change is removing the debug tool setting in FrameMailbox. Instead of trying to block the frontend until a new frame is ready, the core will now take over presentation and draw directly to the window if the renderer detects that its hooked by NSight or RenderDoc Lastly, since it was in the way, I removed ScopeAcquireWindowContext and replaced it with a simple subclass in GraphicsContext that achieves the same result
2020-03-17gdbstub: Ensure gdbstub doesn't drop packets crucial to initializationGauvain "GovanifY" Roussel-Tarbouriech1-1/+1
2020-02-28video_core: Reintroduce dirty flags infrastructureReinUsesLisp1-0/+1
2020-02-26core: frontend: Refactor scope_acquire_window_context to scope_acquire_context.bunnei1-0/+3
2020-02-22System: Expose Host thread registering routines from kernel.Fernando Sahmkow1-0/+8
2020-01-29core: Only wait for idle on gpu_core when it was initializedReinUsesLisp1-1/+3
This fixes crashes when a Vulkan device fails to initialize.
2020-01-27System: Address FeedbackFernando Sahmkow1-2/+2
2020-01-26System: Correct PrepareReschedule.Fernando Sahmkow1-1/+1
2020-01-26Core: Refactor CpuCoreManager to CpuManager and Cpu to Core Manager.Fernando Sahmkow1-23/+21
This commit instends on better naming the new purpose of this classes.
2020-01-25Core: Refactor CPU Management.Fernando Sahmkow1-13/+22
This commit moves ARM Interface and Scheduler handling into the kernel.
2020-01-03yuzu: Remove Maxwell debuggerReinUsesLisp1-10/+0
This was carried from Citra and wasn't really used on yuzu. It also adds some runtime overhead. This commit removes it from yuzu's codebase.
2019-11-27core/memory: Introduce skeleton of Memory classLioncash1-3/+13
Currently, the main memory management code is one of the remaining places where we have global state. The next series of changes will aim to rectify this. This change simply introduces the main skeleton of the class that will contain all the necessary state.
2019-10-19core: Fix clang-format errors.bunnei1-9/+10
2019-10-18Fix null pointer deref.Nicolae-Andrei Cociorba1-10/+12
2019-10-17core/core: Resolve -Wreorder warningsLioncash1-2/+2
Amends the initializer lists to be ordered in the same manner that they're declared within the class.
2019-10-15Kernel: Style and CorrectionsFernando Sahmkow1-2/+3
2019-10-15Correct PrepareRescheduleFernando Sahmkow1-0/+5
2019-10-15Add interfacing to the Global SchedulerFernando Sahmkow1-0/+10
2019-10-06hle/service: Replace global system instance calls with instance-based onesLioncash1-3/+4
Migrates the HLE service code off the use of directly accessing the global system instance where trivially able to do so. This removes all usages of Core::CurrentProcess from the service code, only 8 occurrences of this function exist elsewhere. There's still quite a bit of "System::GetInstance()" being used, however this was able to replace a few instances.
2019-10-05Core: Wait for GPU to be idle before shutting down.Fernando Sahmkow1-0/+2
2019-09-30core/loader: Track the NSO build ID of the current processZach Hilman1-0/+9
2019-09-22lm: Flush manager output on core shutdownZach Hilman1-0/+2
2019-09-22core: Add LM::Manager to systemZach Hilman1-3/+12
Allows centralized control over logging mechanisms.
2019-09-22core: Track system exit lock statusZach Hilman1-0/+11
Used to determine if yuzu should confirm before pausing or stopping a game.
2019-09-22dmnt_cheat_vm: Make Cheat VM compliant to code styleZach Hilman1-2/+1
2019-09-22core: Initialize cheats after load to avoid VMManager crashZach Hilman1-0/+5
This used to occur due to the VMManager being nullptr at the time cheats were registered (during load, but before it was done). This is bypassed by not accessing the VMManager for offset data until load is complete,
2019-09-22core: Update RegisterCheatList for new VMZach Hilman1-8/+9
2019-09-21core: Store FileSystemController in coreZach Hilman1-0/+24
2019-09-10Add frametime logging for tracking performance over timefearlessTobi1-8/+17
Co-Authored-By: jroweboy <jroweboy@gmail.com>
2019-09-05service/am: Remove usages of global system accessorsLioncash1-1/+2
Avoids the use of global accessors, removing the reliance on global state. This also makes dependencies explicit in the interface, as opposed to being hidden
2019-07-05Gpu: Implement Hardware Interrupt Manager and manage GPU interruptsFernando Sahmkow1-1/+11
2019-06-29core: Keep instance of APM ControllerZach Hilman1-0/+12
2019-06-29fsp-srv: Implement OutputAccessLogToSdCardZach Hilman1-1/+1
Allows games to log data to the SD.
2019-06-26glue: Correct missing bytes in ApplicationLaunchParameterZach Hilman1-2/+0
2019-06-25core: Keep track of ARPManager and register current application on bootZach Hilman1-0/+68
2019-06-21core: Move Freezer class to tools namespaceZach Hilman1-2/+2
2019-06-21memory: Add class to manage and enforce memory freezingZach Hilman1-0/+2
2019-06-10kernel: Differentiate kernel and user processes when picking IDZach Hilman1-1/+2
This allows kernel internal type processes to be assigned IDs in the KIP range while userland processes are assigned in the user range.
2019-05-29core/core: Remove unnecessary includesLioncash1-8/+0
The contents of these includes aren't used anywhere in this translation unit.
2019-05-29core/loader: Remove LoadKernelSystemModeLioncash1-9/+0
This is a hold-over from Citra and doesn't apply to yuzu.
2019-05-29core/telemetry_session: Remove usages of the global system accessorLioncash1-1/+1
Makes the dependency explicit in the TelemetrySession's interface instead of making it a hidden dependency. This also revealed a hidden issue with the way the telemetry session was being initialized. It was attempting to retrieve the app loader and log out title-specific information. However, this isn't always guaranteed to be possible. During the initialization phase, everything is being constructed. It doesn't mean an actual title has been selected. This is what the Load() function is for. This potentially results in dead code paths involving the app loader. Instead, we explicitly add this information when we know the app loader instance is available.
2019-05-26loader: Move NSO module tracking to AppLoaderZach Hilman1-10/+1
Also cleanup of general stuff
2019-05-25core: Add Reporter class to take/save reportsZach Hilman1-0/+6
2019-05-25core: Track load offsets of NSO modulesZach Hilman1-0/+10
Needed for backtrace decomposition
2019-04-17core: Remove specific applets in favor of AppletManagerZach Hilman1-33/+17
2019-04-12core/core: Move process execution start to System's Load()Lioncash1-1/+5
This gives us significantly more control over where in the initialization process we start execution of the main process. Previously we were running the main process before the CPU or GPU threads were initialized (not good). This amends execution to start after all of our threads are properly set up.
2019-04-12core/core: Move main process creation into Load()Lioncash1-4/+3
Now that we have dependencies on the initialization order, we can move the creation of the main process to a more sensible area: where we actually load in the executable data. This allows localizing the creation and loading of the process in one location, making the initialization of the process much nicer to trace.
2019-04-12video_core/gpu: Create threads separately from initializationLioncash1-11/+4
Like with CPU emulation, we generally don't want to fire off the threads immediately after the relevant classes are initialized, we want to do this after all necessary data is done loading first. This splits the thread creation into its own interface member function to allow controlling when these threads in particular get created.
2019-04-12core/cpu_core_manager: Create threads separately from initialization.Lioncash1-3/+6
Our initialization process is a little wonky than one would expect when it comes to code flow. We initialize the CPU last, as opposed to hardware, where the CPU obviously needs to be first, otherwise nothing else would work, and we have code that adds checks to get around this. For example, in the page table setting code, we check to see if the system is turned on before we even notify the CPU instances of a page table switch. This results in dead code (at the moment), because the only time a page table switch will occur is when the system is *not* running, preventing the emulated CPU instances from being notified of a page table switch in a convenient manner (technically the code path could be taken, but we don't emulate the process creation svc handlers yet). This moves the threads creation into its own member function of the core manager and restores a little order (and predictability) to our initialization process. Previously, in the multi-threaded cases, we'd kick off several threads before even the main kernel process was created and ready to execute (gross!). Now the initialization process is like so: Initialization: 1. Timers 2. CPU 3. Kernel 4. Filesystem stuff (kind of gross, but can be amended trivially) 5. Applet stuff (ditto in terms of being kind of gross) 6. Main process (will be moved into the loading step in a following change) 7. Telemetry (this should be initialized last in the future). 8. Services (4 and 5 should ideally be alongside this). 9. GDB (gross. Uses namespace scope state. Needs to be refactored into a class or booted altogether). 10. Renderer 11. GPU (will also have its threads created in a separate step in a following change). Which... isn't *ideal* per-se, however getting rid of the wonky intertwining of CPU state initialization out of this mix gets rid of most of the footguns when it comes to our initialization process.
2019-03-27core: Store system-wide ContentProvider for the emulatorZach Hilman1-0/+26
2019-03-22file_sys/cheat_engine: Remove use of global system accessorsLioncash1-2/+2
Instead, pass in the core timing instance and make the dependency explicit in the interface.
2019-03-08kernel: Make the address arbiter instance per-processLioncash1-1/+1
Now that we have the address arbiter extracted to its own class, we can fix an innaccuracy with the kernel. Said inaccuracy being that there isn't only one address arbiter. Each process instance contains its own AddressArbiter instance in the actual kernel. This fixes that and gets rid of another long-standing issue that could arise when attempting to create more than one process.
2019-03-07gpu: Refactor a/synchronous implementations into their own classes.bunnei1-2/+7
2019-03-07gpu: Refactor to take RendererBase instead of RasterizerInterface.bunnei1-1/+1
2019-03-07core: Set is_powered_on before GPU is initialized.bunnei1-1/+3
2019-03-05kernel/address_arbiter: Pass in system instance to constructorLioncash1-2/+3
Allows getting rid of reliance on the global accessor functions and instead operating on the provided system instance.
2019-03-05vm_manager: Remove cheat-specific ranges from VMManagerZach Hilman1-2/+4
2019-03-05core: Add support for registering and controlling ownership of CheatEngineZach Hilman1-0/+9
2019-03-04core/core: Replace direct usage of the global system telemetry accessor from Shutdown()Lioncash1-7/+7
The telemetry instance is actually a member of the class itself, so we can access it directly instead of going through the global accessor.
2019-02-16video_core: Remove usages of System::GetInstance() within the enginesLioncash1-1/+1
Avoids the use of the global accessor in favor of explicitly making the system a dependency within the interface.
2019-02-16core_timing: Convert core timing into a classLioncash1-5/+14
Gets rid of the largest set of mutable global state within the core. This also paves a way for eliminating usages of GetInstance() on the System class as a follow-up. Note that no behavioral changes have been made, and this simply extracts the functionality into a class. This also has the benefit of making dependencies on the core timing functionality explicit within the relevant interfaces.
2019-02-12core_timing: Rename CoreTiming namespace to Core::TimingLioncash1-3/+3
Places all of the timing-related functionality under the existing Core namespace to keep things consistent, rather than having the timing utilities sitting in its own completely separate namespace.
2019-02-07gl_shader_cache: Link loading screen with disk shader cache loadReinUsesLisp1-2/+0
2019-02-07gl_shader_disk_cache: Pass core system as argument and guard against games without title idsReinUsesLisp1-1/+1
2019-02-07rasterizer_interface: Add disk cache entry for the rasterizerReinUsesLisp1-0/+3
2019-01-17core/frontend/applets/web_browser: Make OpenPage() non-constLioncash1-6/+10
This is a function that definitely doesn't always have a non-modifying behavior across all implementations, so this should be made non-const. This gets rid of the need to mark data members as mutable to work around the fact mutating data members needs to occur.
2019-01-08settings: Use std::chrono::seconds instead of s64 for RTCZach Hilman1-2/+1
2019-01-08core: Set custom RTC differential on game bootZach Hilman1-0/+7
2018-12-29web_browser: Add bounds checking to applet interfaceZach Hilman1-0/+5
2018-12-28core: Add getter and setter for WebBrowserApplet frontendZach Hilman1-0/+13
2018-12-03core: Add getter/setter for ProfileSelector in SystemZach Hilman1-0/+11
2018-12-03core: Make GetGameFileFromPath function externally accessibleZach Hilman1-3/+5
2018-11-22core: Relocate CPU core management to its own classLioncash1-97/+22
Keeps the CPU-specific behavior from being spread throughout the main System class. This will also act as the home to contain member functions that perform operations on all cores. The reason for this being that the following pattern is sort of prevalent throughout sections of the codebase: If clearing the instruction cache for all 4 cores is necessary: Core::System::GetInstance().ArmInterface(0).ClearInstructionCache(); Core::System::GetInstance().ArmInterface(1).ClearInstructionCache(); Core::System::GetInstance().ArmInterface(2).ClearInstructionCache(); Core::System::GetInstance().ArmInterface(3).ClearInstructionCache(); This is kind of... well, silly to copy around whenever it's needed. especially when it can be reduced down to a single line. This change also puts the basics in place to begin "ungrafting" all of the forwarding member functions from the System class that are used to access CPU state or invoke CPU-specific behavior. As such, this change itself makes no changes to the direct external interface of System. This will be covered by another changeset.
2018-11-18am: Deglobalize software keyboard appletZach Hilman1-0/+17
2018-10-30global: Use std::optional instead of boost::optional (#1578)Frederic L1-1/+1
* get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build
2018-10-28core: Add missing const variants of getters for the System classLioncash1-2/+26
Many of the Current<Thing> getters (as well as a few others) were missing const qualified variants, which makes it a pain to retrieve certain things from const qualified references to System.
2018-10-18core: Remove unnecessary assert in ArmInterface()Lioncash1-2/+1
CpuCore already does this sort of checking, so we can just call that instead of duplicating the assertions.
2018-10-15core_cpu: Make Cpu scheduler instances unique_ptrs instead of shared_ptrsLioncash1-4/+12
2018-10-15core: Make the live Cpu instances unique_ptrs instead of shared_ptrsLioncash1-9/+9
There's no need for shared ownership here, as the only owning class instance of those Cpu instances is the System class itself. We can also make the thread_to_cpu map use regular pointers instead of shared_ptrs, given that the Cpu instances will always outlive the cases where they're used with that map.
2018-10-15core: Make the exclusive monitor a unique_ptr instead of a shared_ptrLioncash1-2/+3
Like the barrier, this is owned entirely by the System and will always outlive the encompassing state, so shared ownership semantics aren't necessary here.
2018-10-15core: Make CPUBarrier a unique_ptr instead of a shared_ptrLioncash1-3/+3
This will always outlive the Cpu instances, since it's destroyed after we destroy the Cpu instances on shutdown, so there's no need for shared ownership semantics here.
2018-10-13filesystem: Make CreateFactories() and InstallInterface() take a VfsFilesystem instance by referenceLioncash1-1/+1
Neither of these functions alter the ownership of the provided pointer, so we can simply make the parameters a reference rather than a direct shared pointer alias. This way we also disallow passing incorrect memory values like nullptr.
2018-10-10kernel/thread: Use a regular pointer for the owner/current processLioncash1-3/+4
There's no real need to use a shared pointer in these cases, and only makes object management more fragile in terms of how easy it would be to introduce cycles. Instead, just do the simple thing of using a regular pointer. Much of this is just a hold-over from citra anyways. It also doesn't make sense from a behavioral point of view for a process' thread to prolong the lifetime of the process itself (the process is supposed to own the thread, not the other way around).
2018-09-29loader: Make the Load() function take a process as a regular reference, not a SharedPtrLioncash1-1/+1
A process should never require being reference counted in this situation. If the handle to a process is freed before this function is called, it's definitely a bug with our lifetime management, so we can put the requirement in place for the API that the process must be a valid instance.
2018-09-26vfs_concat/vfs_layered: Remove friend declarations from ConcatenatedVfsFileLioncash1-1/+1
Given these are only added to the class to allow those functions to access the private constructor, it's a better approach to just make them static functions in the interface, to make the dependency explicit.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-7/+7
2018-09-07core: Migrate current_process pointer to the kernelLioncash1-4/+7
Given we now have the kernel as a class, it doesn't make sense to keep the current process pointer within the System class, as processes are related to the kernel. This also gets rid of a subtle case where memory wouldn't be freed on core shutdown, as the current_process pointer would never be reset, causing the pointed to contents to continue to live.
2018-09-06core/core: Remove unnecessary sm/controller includeLioncash1-1/+0
The only reason this include was necessary, was because the constructor wasn't defaulted in the cpp file and the compiler would inline it wherever it was used. However, given Controller is forward declared, all those inlined constructors would see an incomplete type, causing a compilation failure. So, we just place the constructor in the cpp file, where it can see the complete type definition, allowing us to remove this include.
2018-09-04core: Use a raw pointer in GetGPUDebugContext.Markus Wick1-2/+2
This helper is called very often. The memory ownership shall not be transfered, so just return the raw pointer.
2018-09-02vfs_real: Forward declare IOFileLioncash1-2/+3
Eliminates the need to rebuild some source files if the file_util header ever changes. This also uncovered some indirect inclusions, which have also been fixed.
2018-08-31core/core: Replace includes with forward declarations where applicableLioncash1-4/+15
The follow-up to e2457418dae19b889b2ad85255bb95d4cd0e4bff, which replaces most of the includes in the core header with forward declarations. This makes it so that if any of the headers the core header was previously including change, then no one will need to rebuild the bulk of the core, due to core.h being quite a prevalent inclusion. This should make turnaround for changes much faster for developers.
2018-08-31core: Make the main System class use the PImpl idiomLioncash1-174/+341
core.h is kind of a massive header in terms what it includes within itself. It includes VFS utilities, kernel headers, file_sys header, ARM-related headers, etc. This means that changing anything in the headers included by core.h essentially requires you to rebuild almost all of core. Instead, we can modify the System class to use the PImpl idiom, which allows us to move all of those headers to the cpp file and forward declare the bulk of the types that would otherwise be included, reducing compile times. This change specifically only performs the PImpl portion.
2018-08-29kernel: Eliminate kernel global stateLioncash1-4/+12
As means to pave the way for getting rid of global state within core, This eliminates kernel global state by removing all globals. Instead this introduces a KernelCore class which acts as a kernel instance. This instance lives in the System class, which keeps its lifetime contained to the lifetime of the System class. This also forces the kernel types to actually interact with the main kernel instance itself instead of having transient kernel state placed all over several translation units, keeping everything together. It also has a nice consequence of making dependencies much more explicit. This also makes our initialization a tad bit more correct. Previously we were creating a kernel process before the actual kernel was initialized, which doesn't really make much sense. The KernelCore class itself follows the PImpl idiom, which allows keeping all the implementation details sealed away from everything else, which forces the use of the exposed API and allows us to avoid any unnecessary inclusions within the main kernel header.
2018-08-24core: Remove always true conditionals in Load()Lioncash1-7/+4
These conditions are always true, since the outer conditional already checks for these conditions.
2018-08-12qt: Add 'Install to NAND' option to menuZach Hilman1-0/+1
Prompts for title type on NCA files.
2018-08-12loader: Join 0* files in directory if filename is 00Zach Hilman1-1/+33
i.e. Load the concatenated 00+01 if 01 exists as well. Needed for split NAND NCAs.
2018-08-12core: Namespace EmuWindowLioncash1-2/+2
Gets the class out of the global namespace.
2018-08-10loader: Add more descriptive errorsZach Hilman1-22/+4
Full list of new errors and descriptions in core/loader/loader.h
2018-08-09core: Port core to VfsFilesystem for file accessZach Hilman1-2/+6
2018-08-07GDBStub works with both Unicorn and Dynarmic now (#941)Hedges1-1/+4
* GDBStub works with both Unicorn and Dynarmic now * Tidy up
2018-08-04renderer_base: Make Rasterizer() return the rasterizer by referenceLioncash1-1/+1
All calling code assumes that the rasterizer will be in a valid state, which is a totally fine assumption. The only way the rasterizer wouldn't be is if initialization is done incorrectly or fails, which is checked against in System::Init().
2018-08-04video_core: Eliminate the g_renderer global variableLioncash1-3/+6
We move the initialization of the renderer to the core class, while keeping the creation of it and any other specifics in video_core. This way we can ensure that the renderer is initialized and doesn't give unfettered access to the renderer. This also makes dependencies on types more explicit. For example, the GPU class doesn't need to depend on the existence of a renderer, it only needs to care about whether or not it has a rasterizer, but since it was accessing the global variable, it was also making the renderer a part of its dependency chain. By adjusting the interface, we can get rid of this dependency.
2018-08-03core/memory: Get rid of 3DS leftoversLioncash1-3/+3
Removes leftover code from citra that isn't needed.
2018-08-02hw: Remove unused filesLioncash1-3/+0
None of these files are used in any meaningful way. They're just leftovers from citra. Also has the benefit of getting rid of an unused global variable.
2018-08-02kernel: Move object class to its own source filesLioncash1-1/+0
General moving to keep kernel object types separate from the direct kernel code. Also essentially a preliminary cleanup before eliminating global kernel state in the kernel code.
2018-08-02video_core: Make global EmuWindow instance part of the base renderer classLioncash1-2/+2
Makes the global a member of the RendererBase class. We also change this to be a reference. Passing any form of null pointer to these functions is incorrect entirely, especially given the code itself assumes that the pointer would always be in a valid state. This also makes it easier to follow the lifecycle of instances being used, as we explicitly interact the renderer with the rasterizer, rather than it just operating on a global pointer.
2018-08-01Use more descriptive error codes and messagesZach Hilman1-4/+8
2018-07-31audio_core: Move to audout_u impl.bunnei1-2/+0
- This is necessary so streams are created on the same thread.
2018-07-28core: Add AudioCore to global state.bunnei1-0/+2
2018-07-22Implement exclusive monitorMerryMage1-1/+2
2018-07-19Virtual Filesystem 2: Electric Boogaloo (#676)Zach Hilman1-1/+2
* Virtual Filesystem * Fix delete bug and documentate * Review fixes + other stuff * Fix puyo regression
2018-07-19core: Make System's default constructor privateLioncash1-0/+2
This makes it a compilation error to construct additional instances of the System class directly, preventing accidental wasteful constructions over and over.
2018-07-19core: Don't construct instance of Core::System, just to access its live instanceLioncash1-1/+1
This would result in a lot of allocations and related object construction, just to toss it all away immediately after the call. These are definitely not intentional, and it was intended that all of these should have been accessing the static function GetInstance() through the name itself, not constructed instances.
2018-07-08Revert "Virtual Filesystem (#597)"bunnei1-2/+1
This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
2018-07-06Virtual Filesystem (#597)Zach Hilman1-1/+2
* Add VfsFile and VfsDirectory classes * Finish abstract Vfs classes * Implement RealVfsFile (computer fs backend) * Finish RealVfsFile and RealVfsDirectory * Finished OffsetVfsFile * More changes * Fix import paths * Major refactor * Remove double const * Use experimental/filesystem or filesystem depending on compiler * Port partition_filesystem * More changes * More Overhaul * FSP_SRV fixes * Fixes and testing * Try to get filesystem to compile * Filesystem on linux * Remove std::filesystem and document/test * Compile fixes * Missing include * Bug fixes * Fixes * Rename v_file and v_dir * clang-format fix * Rename NGLOG_* to LOG_* * Most review changes * Fix TODO * Guess 'main' to be Directory by filename
2018-07-03Update clang formatJames Rowe1-2/+2
2018-07-03Rename logging macro back to LOG_*James Rowe1-7/+7
2018-05-11core: Run all CPU cores separately, even in single-thread mode.bunnei1-6/+20
2018-05-11threading: Reschedule only on cores that are necessary.bunnei1-0/+5
2018-05-11core: Add a configuration setting for use_multi_core.bunnei1-6/+26
2018-05-11core: Support session close with multicore.bunnei1-4/+11
2018-05-11core: Create a thread for each CPU core, keep in lock-step with a barrier.bunnei1-5/+25
2018-05-11core: Move common CPU core things to its own class.bunnei1-48/+9
2018-04-26core: Replace remaining old non-generic logger usages with fmt-capable equivalentsLioncash1-11/+11
LOG_GENERIC usages will be amended in a follow-up to keep API changes separate from interface changes, as it will require removing a parameter from the relevant function in the VMManager class.
2018-04-21core: Relocate g_service_manager to the System classLioncash1-6/+22
Converts the service manager from a global into an instance-based variable.
2018-04-06core, main.h: Abort on 32Bit ROMs (#309)N00byKing1-0/+4
* core, main.h: Abort on 32Bit ROMs * main.cpp: Fix Grammar
2018-03-27config: Use simplified checkbox (from Citra) for CPU JIT.bunnei1-7/+3
2018-03-19Clang FixesN00byKing1-1/+2
2018-03-19More Warning cleanupsN00byKing1-1/+1
2018-03-19Clean Warnings (?)N00byKing1-1/+1
2018-03-14core: Move process creation out of global state.bunnei1-1/+3
2018-02-25Implements citra-emu/citra#3184N00byKing1-4/+8
2018-02-21core: Fix scheduler-shutdown related crashMerryMage1-5/+9
2018-02-19scheduler: Cleanup based on PR feedback.bunnei1-1/+1
2018-02-18kernel: Use Scheduler class for threading.bunnei1-1/+2
2018-02-18core: Use shared_ptr for cpu_core.bunnei1-3/+3
2018-02-12Make a GPU class in VideoCore to contain the GPU state.Subv1-0/+2
Also moved the GPU MemoryManager class to video_core since it makes more sense for it to be there.
2018-01-20Port citra #3352 to yuzu (#103)River City Ransomware1-0/+7
* Port citra #3352 to yuzu This change allows non x86_64 architectures to compile yuzu by skipping the building of dynarmic * Fixed clang-format errors * fixes more clang-format errors
2018-01-17Update core.cppN00byKing1-1/+0
2018-01-13Remove gpu debugger and get yuzu qt to compileJames Rowe1-8/+0
2018-01-12configuration: Add cpu_core configuration optionMerryMage1-2/+10
2018-01-12arm_dynarmic: Implement coreMerryMage1-1/+3
2018-01-09CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)B3n301-0/+1
* CoreTiming: New CoreTiming; Add Test for CoreTiming
2018-01-04unicorn: Use for arm interface on Windows.bunnei1-8/+1
2018-01-03arm: Remove SkyEye/Dyncom code that is ARMv6-only.bunnei1-3/+2
2017-10-23logging: Rename category "Core_ARM11" to "Core_ARM".bunnei1-1/+1
2017-09-27Loaders: Don't automatically set the current process every time we load an application.Subv1-2/+4
The loaders will now just create a Kernel::Process, construct it and return it to the caller, which is responsible for setting it as the current process and configuring the global page table.
2017-09-10Kernel/Memory: Give each Process its own page table.Subv1-1/+0
The loader is in charge of setting the newly created process's page table as the main one during the loading process.
2017-08-19Added missing parts in libnetwork (#2838)B3n301-0/+5
* Network: Set and send the game information over enet Added Callbacks for RoomMember and GetMemberList to Room in preparation for web_services.
2017-07-18telemetry: Log performance, configuration, and system data.bunnei1-0/+10
2017-06-03Addressed Bunnei's review comments, and made some other tweaks:TheKoopaKingdom1-6/+5
- Deleted GetStatus() because it wasn't used anywhere outside of Core::System. - Fixed design flaw where the message bar status could be set despite the game being stopped.
2017-06-03Created a whitelist of system archives to prevent false positives creating dialogs.TheKoopaKingdom1-4/+2
2017-06-03Made some changes from review comments:TheKoopaKingdom1-9/+13
- Made LoadKernelSystemMode return a pair consisting of a system mode and a result code (Could use review). - Deleted ErrorOpenGL error code in favor of just having ErrorVideoCore. - Made dialog messages more clear. - Compared archive ID in fs_user.cpp to ArchiveIdCode::NCCH as opposed to hex magic. - Cleaned up some other stuff.
2017-06-03Added system for handling core errors in citra-qt.TheKoopaKingdom1-6/+18
2017-05-25core: Keep track of telemetry for the current emulation session.bunnei1-0/+3
2017-05-10Kernel: Map special regions according to ExHeaderYuri Kunde Schlesner1-2/+3
This replaces the hardcoded VRAM/DSP mappings with ones made based on the ExHeader ARM11 Kernel caps list. While this has no visible effect for most applications (since they use a standard set of mappings) it does improve support for system modules and n3DS exclusives.
2017-02-27Core: Make PerfStats internally lockedYuri Kunde Schlesner1-3/+2
More ergonomic to use and will be required for upcoming changes.
2017-02-27Add performance statistics to status barYuri Kunde Schlesner1-0/+9
2017-02-11core: Free AppLoader on shutdown to release file (#2558)Yuri Kunde Schlesner1-9/+2
Fixes #2455
2016-12-24Core: reset cpu_core in Shutdown to make IsPoweredOn work properlywwylele1-0/+1
2016-12-22core: Replace "AppCore" nomenclature with just "CPU".bunnei1-7/+7
2016-12-22Address clang-format issues.bunnei1-3/+3
2016-12-22core: Remove HLE module, consolidate code & various cleanups.bunnei1-7/+19
2016-12-22core: Consolidate core and system state, remove system module & cleanups.bunnei1-25/+87
2016-12-15gdbstub: Remove global variable from public interfaceLioncash1-1/+1
Currently, this is only ever queried, so adding a function to check if the server is enabled is more sensible. If directly modifying this externally is ever desirable, it should be done by adding a function to the interface, rather than exposing implementation details directly.
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner1-1/+1
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot1-3/+1
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner1-2/+1
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-2/+3
2016-09-15core: Add configuration option for CPU JIT.bunnei1-7/+12
2016-05-06HLE: Rename RescheduleIsPending to IsReschedulePending.bunnei1-1/+1
2016-04-05Common: Remove Common::make_unique, use std::make_uniqueMerryMage1-3/+2
2016-03-21hle: Get rid of global access to g_rescheduleLioncash1-1/+1
This shouldn't be directly exposed if there's already a partial API that operates on it. We can just provide the rest of that API.
2016-03-08Improve error report from Init() functionsLittleWhite1-2/+1
Add error popup when citra initialization failed
2015-12-30core: Use unique_ptr for holding the interpreter instancesLioncash1-6/+9
2015-10-04Implement gdbstubpolaris-1-0/+17
2015-09-20Implement gdbstubpolaris-1-0/+17
2015-06-28Core: Cleanup core includes.Emmanuel Gil Peyrot1-3/+0
2015-05-15Memmap: Re-organize memory function in two filesYuri Kunde Schlesner1-1/+0
memory.cpp/h contains definitions related to acessing memory and configuring the address space mem_map.cpp/h contains higher-level definitions related to configuring the address space accoording to the kernel and allocating memory.
2015-05-12Thread: Remove the idle threadYuri Kunde Schlesner1-2/+2
Instead just use nullptr to represent no thread is active.
2015-05-11Core/Memory: Give every emulated thread it's own TLS area.Subv1-4/+0
The TLS area for thread T with id Ti is located at TLS_AREA_VADDR + (Ti - 1) * 0x200. This allows some games like Mario Kart 7 to continue further.
2015-05-09Memory: Re-organize and rename memory area address constantsYuri Kunde Schlesner1-1/+1
2015-05-07Common: Remove common.hYuri Kunde Schlesner1-0/+1
2015-04-06core: Migrate 3DS-specific CP15 register setting into InitLioncash1-0/+5
2015-02-13dyncom: Switch the app and system cores into the correct mode at initializationLioncash1-5/+4
2015-02-01arm: Adios armemuLioncash1-12/+2
2015-01-09Thread: Reduce use of Handles and move some funcs to inside the class.Yuri Kunde Schlesner1-1/+1
2015-01-09Move ThreadContext to core/core.h and deal with the falloutYuri Kunde Schlesner1-0/+1
2015-01-09Core: Fixed a crash and removed some unused variables.Subv1-6/+0
ARM_Disasm only has static methods, so there's no need to have an instance of it.
2015-01-08Threads: Use a dummy idle thread when no other are ready.Subv1-1/+12
This thread will not actually execute instructions, it will only advance the timing/events and try to yield immediately to the next ready thread, if there aren't any ready threads then it will be rescheduled and start its job again.
2015-01-03Core: Change default CPU to dyncom.bunnei1-2/+2
2014-12-21License changepurpasmart961-1/+1
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner1-2/+2
2014-11-19Add static to some variablesLioncash1-7/+7
2014-10-28Use configuration files to enable or disable the new dyncom interpreter.archshift1-3/+14
2014-09-09core: Prune redundant includesarchshift1-6/+0
2014-08-31Core: Refactor core to use only one function for execution.bunnei1-18/+8
Core: Cleaned up comment to be more readable. Citra: Changed loop to be more readable.
2014-08-06GSP: Implements preliminary command synchronization via GPU interrupts.bunnei1-8/+12
Core: Added a comment to explain the logic for the RunLoop iterations.
2014-06-13HLE: Updated all uses of NULL to nullptr (to be C++11 compliant)bunnei1-4/+4
2014-06-13Core: Cleaned up SingleStep(), updated default LCD refresh to assume each instruction is ~3 cyclesbunnei1-11/+12
2014-06-13Core: Changed HW update/thread reschedule to occur more frequently (assume each instruction is ~3 cycles)bunnei1-2/+2
2014-06-05hle: added a hokey way to force a thread reschedule during CPU single step mode (as used by the debugger)bunnei1-1/+2
2014-05-30core: changed time delay before kernel reschedule to "approximate" a screen refreshbunnei1-3/+12
2014-05-23core: added Kernel::Reschedule() call to check for thread changes, shortened delay time to 100 instructionsbunnei1-1/+6
2014-05-17updated how we call ARM core to make things much fasterbunnei1-3/+6
2014-04-11cleaned up some logging messagesbunnei1-20/+2
2014-04-11added initial modules for setting up SysCall HLEbunnei1-0/+18
2014-04-09fixed project includes to use new directory structurebunnei1-6/+8
2014-04-09got rid of 'src' folders in each sub-projectbunnei1-0/+0
2014-04-09fixed some license headers that I missedbunnei1-23/+3
2014-04-05added g_app_core->Step and HW::Update to Core::SingleStep to be consistent with other changes madebunnei1-1/+5
2014-04-05- added an interface layer for ARM coresbunnei1-76/+11
- cleaned up core.cpp a bit
2014-04-04added some commented out ARMulator functionsbunnei1-20/+3
2014-04-04Add Core::GetState() for debuggerMathieu Vaillancourt1-0/+5
2014-04-01added very hackish ARMulator core initialization and CPU steppingbunnei1-6/+97
2013-10-03moved some core functions over to system moduleShizZy1-4/+2
2013-10-02added a message option to Core::Halt functionShizZy1-1/+1
2013-09-27added system.h to projectShizZy1-3/+15
2013-09-19added log msg to coreShizZy1-0/+2
2013-09-14renamed project to 'citrus'ShizZy1-1/+1
2013-09-08updated common pathsShizZy1-0/+2
2013-09-06added core and mem_map files to the projectShizZy1-2/+46
2013-09-05added missing filesShizZy1-0/+2