Commit Graph

369 Commits (127b3da0f13ea0850c10115d45488dfe32a0a3f4)

Author SHA1 Message Date
Hedges e2b74f6354 GDBStub works with both Unicorn and Dynarmic now (#941)
* GDBStub works with both Unicorn and Dynarmic now

* Tidy up
7 years ago
bunnei c0af42d6eb
Merge pull request #912 from lioncash/global-var
video_core: Eliminate the g_renderer global variable
7 years ago
bunnei 2b06301dbf
Merge pull request #849 from DarkLordZach/xci
XCI and Encrypted NCA Support
7 years ago
Lioncash 2665457f4a renderer_base: Make Rasterizer() return the rasterizer by reference
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().
7 years ago
Lioncash 6030c5ce41 video_core: Eliminate the g_renderer global variable
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.
7 years ago
Lioncash 26de4bb521 core/memory: Get rid of 3DS leftovers
Removes leftover code from citra that isn't needed.
7 years ago
bunnei 00ba704a7f
Merge pull request #892 from lioncash/global
video_core: Make global EmuWindow instance part of the base renderer …
7 years ago
bunnei 4c3c608d59
Merge pull request #894 from lioncash/object
kernel: Move object class to its own source files
7 years ago
Lioncash c6db1c390b hw: Remove unused files
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.
7 years ago
Lioncash bf45092c61 kernel: Move object class to its own source files
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.
7 years ago
Lioncash 0f2ac928f2 video_core: Make global EmuWindow instance part of the base renderer class
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.
7 years ago
Zach Hilman 187d8e215f Use more descriptive error codes and messages 7 years ago
bunnei eaf66b4c9f audio_core: Move to audout_u impl.
- This is necessary so streams are created on the same thread.
7 years ago
bunnei 2a742229ee core: Add AudioCore to global state. 7 years ago
MerryMage 0b1c2e5505 Implement exclusive monitor 7 years ago
bunnei 49b0966003
Merge pull request #687 from lioncash/instance
core: Don't construct instance of Core::System, just to access its live instance
7 years ago
Zach Hilman 29aff8d5ab Virtual Filesystem 2: Electric Boogaloo (#676)
* Virtual Filesystem

* Fix delete bug and documentate

* Review fixes + other stuff

* Fix puyo regression
7 years ago
Lioncash 10d2ab8098 core: Make System's default constructor private
This makes it a compilation error to construct additional instances of
the System class directly, preventing accidental wasteful constructions
over and over.
7 years ago
Lioncash 3a4841e403 core: Don't construct instance of Core::System, just to access its live instance
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.
7 years ago
bunnei 913896cbd9 Revert "Virtual Filesystem (#597)"
This reverts commit 77c684c114.
7 years ago
Zach Hilman 77c684c114 Virtual Filesystem (#597)
* 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
7 years ago
James Rowe 0d46f0df12 Update clang format 7 years ago
James Rowe 638956aa81 Rename logging macro back to LOG_* 7 years ago
bunnei edc52250b8 core: Run all CPU cores separately, even in single-thread mode. 8 years ago
bunnei 8aa5d25f82 threading: Reschedule only on cores that are necessary. 8 years ago
bunnei 9bf2a428f9 core: Add a configuration setting for use_multi_core. 8 years ago
bunnei cba69fdcd4 core: Support session close with multicore. 8 years ago
bunnei 9776ff9179 core: Create a thread for each CPU core, keep in lock-step with a barrier. 8 years ago
bunnei 5590245930 core: Move common CPU core things to its own class. 8 years ago
Lioncash c33755e2b9
core: Replace remaining old non-generic logger usages with fmt-capable equivalents
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.
8 years ago
Lioncash 659a612368 core: Relocate g_service_manager to the System class
Converts the service manager from a global into an instance-based
variable.
8 years ago
N00byKing 358050cfc6 core, main.h: Abort on 32Bit ROMs (#309)
* core, main.h: Abort on 32Bit ROMs

* main.cpp: Fix Grammar
8 years ago
bunnei 94f4009c3b config: Use simplified checkbox (from Citra) for CPU JIT. 8 years ago
N00byKing 1d8b6ad13b Clang Fixes 8 years ago
N00byKing 0e72d0d826 More Warning cleanups 8 years ago
N00byKing ef875d6a35 Clean Warnings (?) 8 years ago
bunnei 23a0d2d7b7
Merge pull request #193 from N00byKing/3184_2_robotic_boogaloo
Implement Pull #3184 from citra: core/arm: Improve timing accuracy before service calls in JIT (Rebased)
8 years ago
bunnei 7d6653268f core: Move process creation out of global state. 8 years ago
N00byKing bc88cae0c7 Implements citra-emu/citra#3184 8 years ago
MerryMage 1cdc74c5e9 core: Fix scheduler-shutdown related crash 8 years ago
bunnei 8db80d8389 scheduler: Cleanup based on PR feedback. 8 years ago
bunnei ac81c02ed9 kernel: Use Scheduler class for threading. 8 years ago
bunnei 2d4a6883bc core: Use shared_ptr for cpu_core. 8 years ago
Subv 6cddf9d88e Make a GPU class in VideoCore to contain the GPU state.
Also moved the GPU MemoryManager class to video_core since it makes more sense for it to be there.
8 years ago
bunnei d904b0db58
Merge pull request #72 from N00byKing/patch-2
Implement Pull #3275 from citra: core: Don't Shutdown before we've even Init-ed
8 years ago
River City Ransomware c8a094e164 Port citra #3352 to yuzu (#103)
* 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
8 years ago
N00byKing 30d2ba9de3
Update core.cpp 8 years ago
James Rowe 389979018c Remove gpu debugger and get yuzu qt to compile 8 years ago
MerryMage b628192bf2 configuration: Add cpu_core configuration option 8 years ago
MerryMage d2fbc78320 arm_dynarmic: Implement core 8 years ago
B3n30 82151d407d CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)
* CoreTiming: New CoreTiming; Add Test for CoreTiming
8 years ago
bunnei 3f8b9181b5 unicorn: Use for arm interface on Windows. 8 years ago
bunnei b172f0d770 arm: Remove SkyEye/Dyncom code that is ARMv6-only. 8 years ago
bunnei 45db4bb3ea logging: Rename category "Core_ARM11" to "Core_ARM". 8 years ago
bunnei b1d5db1cf6 Merge remote-tracking branch 'upstream/master' into nx
# Conflicts:
#	src/core/CMakeLists.txt
#	src/core/arm/dynarmic/arm_dynarmic.cpp
#	src/core/arm/dyncom/arm_dyncom.cpp
#	src/core/hle/kernel/process.cpp
#	src/core/hle/kernel/thread.cpp
#	src/core/hle/kernel/thread.h
#	src/core/hle/kernel/vm_manager.cpp
#	src/core/loader/3dsx.cpp
#	src/core/loader/elf.cpp
#	src/core/loader/ncch.cpp
#	src/core/memory.cpp
#	src/core/memory.h
#	src/core/memory_setup.h
8 years ago
Subv 7f48aa8d25 Loaders: Don't automatically set the current process every time we load an application.
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.
8 years ago
Subv 6d2734a074 Kernel/Memory: Give each Process its own page table.
The loader is in charge of setting the newly created process's page table as the main one during the loading process.
8 years ago
B3n30 5d0a1e7efd Added missing parts in libnetwork (#2838)
* Network: Set and send the game information over enet

Added Callbacks for RoomMember and GetMemberList to Room in preparation for web_services.
8 years ago
bunnei df8b9863f9 telemetry: Log performance, configuration, and system data. 8 years ago
TheKoopaKingdom f008b22e3b Addressed Bunnei's review comments, and made some other tweaks:
- 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.
9 years ago
TheKoopaKingdom a8aef599e0 Created a whitelist of system archives to prevent false positives creating dialogs. 9 years ago
TheKoopaKingdom 37bec598ea Made some changes from review comments:
- 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.
9 years ago
TheKoopaKingdom 1ecb322daa Added system for handling core errors in citra-qt. 9 years ago
bunnei f3e14cae1e core: Keep track of telemetry for the current emulation session. 9 years ago
Yuri Kunde Schlesner f18d454eb6 Kernel: Map special regions according to ExHeader
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.
9 years ago
Yuri Kunde Schlesner b285c2a4ed Core: Make PerfStats internally locked
More ergonomic to use and will be required for upcoming changes.
9 years ago
Yuri Kunde Schlesner c75ae6c585 Add performance statistics to status bar 9 years ago
Yuri Kunde Schlesner da6a40e3d1 core: Free AppLoader on shutdown to release file (#2558)
Fixes #2455
9 years ago
wwylele fe2ed4bf72 Core: reset cpu_core in Shutdown to make IsPoweredOn work properly 9 years ago
bunnei e26fbfd1d7 core: Replace "AppCore" nomenclature with just "CPU". 9 years ago
bunnei 5ac5cbeab7 Address clang-format issues. 9 years ago
bunnei 4fc8b8229e core: Remove HLE module, consolidate code & various cleanups. 9 years ago
bunnei 232ef55c1a core: Consolidate core and system state, remove system module & cleanups. 9 years ago
Lioncash ba20dd9b61 gdbstub: Remove global variable from public interface
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.
9 years ago
Yuri Kunde Schlesner 84fbbe2629 Use negative priorities to avoid special-casing the self-include 9 years ago
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
9 years ago
Yuri Kunde Schlesner 396a8d91a4 Manually tweak source formatting and then re-run clang-format 9 years ago
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 9 years ago
bunnei 14085ec670 core: Add configuration option for CPU JIT. 9 years ago
bunnei 75cbfeee58 Merge pull request #1762 from bunnei/global
hle: Get rid of direct global access to g_reschedule
10 years ago
bunnei 4cb2995c61 HLE: Rename RescheduleIsPending to IsReschedulePending. 10 years ago
MerryMage a06dcfeb61 Common: Remove Common::make_unique, use std::make_unique 10 years ago
Lioncash 6b7ebb3f82 hle: Get rid of global access to g_reschedule
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.
10 years ago
LittleWhite 4be68dddfb Improve error report from Init() functions
Add error popup when citra initialization failed
10 years ago
Lioncash cee8df6ff0 core: Use unique_ptr for holding the interpreter instances 10 years ago
polaris- 31dee93e84 Implement gdbstub 10 years ago
Emmanuel Gil Peyrot aea15f5c73 Core: Cleanup core includes. 10 years ago
Yuri Kunde Schlesner 7ada357b2d Memmap: Re-organize memory function in two files
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.
11 years ago
Yuri Kunde Schlesner 4f7a055081 Thread: Remove the idle thread
Instead just use nullptr to represent no thread is active.
11 years ago
Subv 000876858d Core/Memory: Give every emulated thread it's own TLS area.
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.
11 years ago
Yuri Kunde Schlesner 1c0b87edc2 Memory: Re-organize and rename memory area address constants 11 years ago
Yuri Kunde Schlesner e1fbac3ca1 Common: Remove common.h 11 years ago
Lioncash 8004d35ea1 core: Migrate 3DS-specific CP15 register setting into Init 11 years ago
Lioncash b7fac494cd dyncom: Switch the app and system cores into the correct mode at initialization 11 years ago
Lioncash f44781fd7b arm: Adios armemu 11 years ago
Yuri Kunde Schlesner 9bf8462b96 Thread: Reduce use of Handles and move some funcs to inside the class. 11 years ago
Yuri Kunde Schlesner 7b3452c730 Move ThreadContext to core/core.h and deal with the fallout 11 years ago
Subv 40c1439c34 Core: Fixed a crash and removed some unused variables.
ARM_Disasm only has static methods, so there's no need to have an instance of it.
11 years ago
Subv 60a373a786 Threads: Use a dummy idle thread when no other are ready.
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.
11 years ago
bunnei 853b46c681 Core: Change default CPU to dyncom. 11 years ago
purpasmart96 ebfd831ccb License change 11 years ago
Yuri Kunde Schlesner 0600e2d8b5 Convert old logging calls to new logging macros 11 years ago
Lioncash 7cbecde2ca Add static to some variables 11 years ago
archshift 0783498f57 Use configuration files to enable or disable the new dyncom interpreter. 11 years ago
archshift 6e606c515f core: Prune redundant includes 11 years ago
bunnei eb36d3fc90 Core: Refactor core to use only one function for execution.
Core: Cleaned up comment to be more readable.

Citra: Changed loop to be more readable.
11 years ago
bunnei ec14ffe1cd GSP: Implements preliminary command synchronization via GPU interrupts.
Core: Added a comment to explain the logic for the RunLoop iterations.
11 years ago
bunnei 004df76795 Merge branch 'threading' of https://github.com/bunnei/citra
Conflicts:
	src/core/hle/function_wrappers.h
	src/core/hle/service/gsp.cpp
12 years ago
bunnei c95972275e HLE: Updated all uses of NULL to nullptr (to be C++11 compliant) 12 years ago
bunnei 0deeda54ee Core: Cleaned up SingleStep(), updated default LCD refresh to assume each instruction is ~3 cycles 12 years ago
bunnei 3449aaa350 Core: Changed HW update/thread reschedule to occur more frequently (assume each instruction is ~3 cycles) 12 years ago
bunnei 174cc9a0ed hle: added a hokey way to force a thread reschedule during CPU single step mode (as used by the debugger) 12 years ago
bunnei 9839f3b6cd core: changed time delay before kernel reschedule to "approximate" a screen refresh 12 years ago
bunnei 51f636b3d4 core: added Kernel::Reschedule() call to check for thread changes, shortened delay time to 100 instructions 12 years ago
bunnei 265c770a9d updated how we call ARM core to make things much faster 12 years ago
bunnei 5d95bb9843 cleaned up some logging messages 12 years ago
bunnei f68de21ad1 added initial modules for setting up SysCall HLE 12 years ago
bunnei de0a034a84 fixed project includes to use new directory structure 12 years ago
bunnei 63e46abdb8 got rid of 'src' folders in each sub-project 12 years ago