summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
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