Commit graph

218 commits

Author SHA1 Message Date
bunnei
5160c0c975 Merge pull request #912 from lioncash/global-var
video_core: Eliminate the g_renderer global variable
2018-08-05 16:37:39 -04:00
bunnei
4c42134b09 Merge pull request #849 from DarkLordZach/xci
XCI and Encrypted NCA Support
2018-08-04 14:33:11 -04:00
Lioncash
69bbe31ca8 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().
2018-08-04 02:36:58 -04:00
Lioncash
49dc22f84e 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.
2018-08-04 02:36:57 -04:00
Lioncash
3bcf090d37 core/memory: Get rid of 3DS leftovers
Removes leftover code from citra that isn't needed.
2018-08-03 11:22:47 -04:00
bunnei
299975e4a8 Merge pull request #892 from lioncash/global
video_core: Make global EmuWindow instance part of the base renderer …
2018-08-03 00:31:32 -04:00
bunnei
20b6c79859 Merge pull request #894 from lioncash/object
kernel: Move object class to its own source files
2018-08-03 00:28:43 -04:00
Lioncash
db3603df94 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.
2018-08-02 10:23:10 -04:00
Lioncash
38c2af9330 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.
2018-08-01 23:34:42 -04:00
Lioncash
153a00ebc0 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.
2018-08-01 21:40:30 -04:00
Zach Hilman
9b710a5901 Use more descriptive error codes and messages 2018-08-01 00:16:54 -04:00
bunnei
fe039386fc audio_core: Move to audout_u impl.
- This is necessary so streams are created on the same thread.
2018-07-30 18:44:16 -04:00
bunnei
2097b6c72e core: Add AudioCore to global state. 2018-07-27 22:33:37 -04:00
MerryMage
34bf2dbf68 Implement exclusive monitor 2018-07-22 15:55:17 +01:00
bunnei
5ab4dc3e1e Merge pull request #687 from lioncash/instance
core: Don't construct instance of Core::System, just to access its live instance
2018-07-18 18:55:58 -07:00
Zach Hilman
82150bd5c1 Virtual Filesystem 2: Electric Boogaloo (#676)
* Virtual Filesystem

* Fix delete bug and documentate

* Review fixes + other stuff

* Fix puyo regression
2018-07-18 18:07:11 -07:00
Lioncash
74185c108e 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.
2018-07-18 18:18:27 -04:00
Lioncash
e72928762f 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.
2018-07-18 18:18:27 -04:00
bunnei
0c22a8d514 Revert "Virtual Filesystem (#597)"
This reverts commit 12e9522b32.
2018-07-07 20:24:51 -07:00
Zach Hilman
12e9522b32 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
2018-07-06 10:51:32 -04:00
James Rowe
d74d2a77cb Update clang format 2018-07-02 21:45:47 -04:00
James Rowe
e159c550d8 Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
bunnei
4b895995ab core: Run all CPU cores separately, even in single-thread mode. 2018-05-10 19:34:53 -04:00
bunnei
5a5850af69 threading: Reschedule only on cores that are necessary. 2018-05-10 19:34:52 -04:00
bunnei
bbd273e7ce core: Add a configuration setting for use_multi_core. 2018-05-10 19:34:47 -04:00
bunnei
6eacbd693d core: Support session close with multicore. 2018-05-10 19:34:47 -04:00
bunnei
fc8b0d9d2b core: Create a thread for each CPU core, keep in lock-step with a barrier. 2018-05-10 19:34:46 -04:00
bunnei
0867e78c8a core: Move common CPU core things to its own class. 2018-05-10 19:34:46 -04:00
Lioncash
0a1e044322 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.
2018-04-26 15:37:16 -04:00
Lioncash
4bd499d440 core: Relocate g_service_manager to the System class
Converts the service manager from a global into an instance-based
variable.
2018-04-20 19:44:32 -04:00
N00byKing
6d5b25c136 core, main.h: Abort on 32Bit ROMs (#309)
* core, main.h: Abort on 32Bit ROMs

* main.cpp: Fix Grammar
2018-04-06 11:06:32 -04:00
bunnei
32181284be config: Use simplified checkbox (from Citra) for CPU JIT. 2018-03-26 23:02:37 -04:00
N00byKing
d3bdad2aaa Clang Fixes 2018-03-19 17:53:35 +01:00
N00byKing
8d34c0d2a0 More Warning cleanups 2018-03-19 17:27:04 +01:00
N00byKing
1212e9e231 Clean Warnings (?) 2018-03-19 17:07:08 +01:00
bunnei
8d9b2cb438 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)
2018-03-18 22:35:47 -04:00
bunnei
f16763ed52 core: Move process creation out of global state. 2018-03-14 18:42:19 -04:00
N00byKing
3660aa9318 Implements citra-emu/citra#3184 2018-02-25 11:44:21 +01:00
MerryMage
8c64261d9a core: Fix scheduler-shutdown related crash 2018-02-21 16:38:18 +00:00
bunnei
87335e8404 scheduler: Cleanup based on PR feedback. 2018-02-19 16:46:42 -05:00
bunnei
539977f39b kernel: Use Scheduler class for threading. 2018-02-18 15:17:16 -05:00
bunnei
f75cee6a24 core: Use shared_ptr for cpu_core. 2018-02-18 14:52:09 -05:00
Subv
0088b3128b 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.
2018-02-11 23:44:12 -05:00
bunnei
4f20190c95 Merge pull request #72 from N00byKing/patch-2
Implement Pull #3275 from citra: core: Don't Shutdown before we've even Init-ed
2018-01-20 23:11:10 -05:00
River City Ransomware
3f3688db0b 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
2018-01-19 19:36:09 -05:00
N00byKing
cdcfc19258 Update core.cpp 2018-01-17 18:12:06 +01:00
James Rowe
bd5740a721 Remove gpu debugger and get yuzu qt to compile 2018-01-12 19:11:04 -07:00
MerryMage
6fe2dc0b15 configuration: Add cpu_core configuration option 2018-01-12 17:48:52 -05:00
MerryMage
ced9768819 arm_dynarmic: Implement core 2018-01-12 17:48:29 -05:00
B3n30
1b2aa3780d CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)
* CoreTiming: New CoreTiming; Add Test for CoreTiming
2018-01-08 19:10:25 -05:00