Commit Graph

9290 Commits

Author SHA1 Message Date
bunnei
c92de3cc70 Merge pull request #1764 from bunnei/macrointerpreter
macro_interpreter: Implement AddWithCarry and SubtractWithBorrow.
2018-11-22 08:43:29 -08:00
Lioncash
d055c988ec core: Relocate CPU core management to its own class
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-22 04:28:19 -05:00
bunnei
e3278c0938 macro_interpreter: Implement AddWithCarry and SubtractWithBorrow.
- Used by Undertale.
2018-11-22 00:58:00 -05:00
bunnei
50d02961ac audout_u: Add support for multiple IAudioOut streams.
- Used by Undertale.
2018-11-22 00:53:39 -05:00
bunnei
747d66b59e maxwell_3d: Implement alternate blend equations.
- Used by Undertale.
2018-11-22 00:51:01 -05:00
Lioncash
4321487c2d common/thread: Drop Hungarian notation on SetCurrentThreadName's parameter
This is inconsistent with our coding style.
2018-11-22 00:40:26 -05:00
bunnei
b2e747d7b4 Merge pull request #1737 from FernandoS27/layer-copy
Implemented Fast Layered Copy
2018-11-21 21:39:16 -08:00
bunnei
dbad7a8558 Merge pull request #1771 from lioncash/bit-set
common: Remove bit_set.h
2018-11-21 21:36:15 -08:00
Zach Hilman
52696a99c1 scheduler: Add explanations for YieldWith and WithoutLoadBalancing 2018-11-22 00:33:53 -05:00
bunnei
2d68a9b9fa Merge pull request #1767 from lioncash/handle
kernel/handle_table: Minor changes
2018-11-21 21:26:48 -08:00
Lioncash
b86419c574 common/thread: Make Barrier's 'count' member non-const
While admirable as a means to ensure immutability, this has the
unfortunate downside of making the class non-movable. std::move cannot
actually perform a move operation if the provided operand has const data
members (std::move acts as an operation to "slide" resources out of an
object instance). Given Barrier contains move-only types such as
std::mutex, this can lead to confusing error messages if an object ever
contained a Barrier instance and said object was attempted to be moved.
2018-11-21 21:47:08 -05:00
Lioncash
92ac099702 common/thread: Initialize class member variables where applicable
Simplifies the constructor interfaces for Barrier and Event classes.
2018-11-21 21:45:01 -05:00
Lioncash
d1a5af5b2c common/thread: Group non-member functions together
Keeps the non-member interface in one spot instead of split into two
places, making it nicer to locate functions.
2018-11-21 21:42:33 -05:00
Lioncash
39c8ea3e88 common/thread: Remove SleepCurrentThread()
This is also unused and superceded by standard functionality. The
standard library provides std::this_thread::sleep_for(), which provides
a much more flexible interface, as different time units can be used with
it.
2018-11-21 21:40:11 -05:00
Lioncash
171cca777d common/thread: Remove unused CurrentThreadId()
This is an old function that's no longer necessary. C++11 introduced
proper threading support to the language and a thread ID can be
retrieved via std::this_thread::get_id() if it's ever needed.
2018-11-21 21:37:11 -05:00
Lioncash
3bcdbe4289 common: Remove bit_set.h
This is an analog of BitSet from Dolphin that was introduced to allow
iterating over a set of bits. Given it's currently unused, and given
that std::bitset exists, we can remove this. If it's ever needed in the
future it can be brought back.
2018-11-21 21:30:10 -05:00
Zach Hilman
f4682d25fc applets: Add StubApplet
This will log all data it receives, log all calls to its methods and push dummy data into both channels on execution.
2018-11-21 21:20:02 -05:00
ReinUsesLisp
3dd1197355 gl_shader_decompiler: Rename internal flag strings 2018-11-21 22:31:42 -03:00
ReinUsesLisp
ad78fdb0f0 gl_shader_decompiler: Rename control codes to condition codes 2018-11-21 22:31:16 -03:00
greggameplayer
ac03258e93 Automatically disable joycons docked
when docked mode is enable
2018-11-22 01:24:39 +01:00
ReinUsesLisp
81beb717ce gl_shader_decompiler: Fix register overwriting on texture calls 2018-11-21 21:21:19 -03:00
Lioncash
8a37c234cc kernel/handle_table: Move private static functions into the cpp file
These don't depend on class state, and are effectively implementation
details, so they can go into the cpp file .
2018-11-21 18:31:01 -05:00
Lioncash
7b97b05825 kernel/handle_table: Restrict handle table size to 1024 entries
The previous handle table size is a holdover from Citra. The actual
handle table construct on Horizon only allows for a maximum of 1024
entries.
2018-11-21 18:28:03 -05:00
Lioncash
5356da70ad kernel/handle_table: Default destructor in the cpp file
We don't need to potentially inline the teardown logic of all of the
handle instances.
2018-11-21 18:23:09 -05:00
bunnei
18cdd56494 Merge pull request #1753 from FernandoS27/ufbtype
Use default values for unknown framebuffer pixel format
2018-11-21 14:15:27 -08:00
bunnei
335dd7e6bd Merge pull request #1752 from ReinUsesLisp/unimpl-decompiler
gl_shader_decompiler: Use UNIMPLEMENTED when applicable
2018-11-21 14:13:28 -08:00
FernandoS27
eb4c34a16b Properly Implemented TXQ Instruction 2018-11-21 18:12:36 -04:00
bunnei
249cd123eb Merge pull request #1742 from lioncash/hle-swkbd
am/applets: Minor cleanup
2018-11-21 11:43:43 -08:00
ReinUsesLisp
b4ca00f0bc gl_shader_decompiler: Implement BFI_IMM_R 2018-11-21 16:12:30 -03:00
bunnei
0fff22b348 nvhost_ctrl_gpu: Implement IoctlGetGpuTime.
- Used by Undertale.
2018-11-21 11:43:25 -05:00
bunnei
875dbe6875 Merge pull request #1754 from ReinUsesLisp/zero-register
gl_shader_decompiler: Remove UNREACHABLE when setting RZ
2018-11-21 08:06:29 -08:00
bunnei
b8e3b46c8d Merge pull request #1758 from lioncash/rect
common/math_util: Minor cleanup
2018-11-21 08:05:39 -08:00
FernandoS27
b3f2391211 Removed pre 4.3 ARB extensions 2018-11-21 11:43:17 -04:00
FernandoS27
7a3f617292 Update OpenGL's backend version from 3.3 to 4.3 2018-11-21 11:43:17 -04:00
FernandoS27
edf3b40e45 Use default values for unknown framebuffer pixel format 2018-11-21 07:33:34 -04:00
Lioncash
d70078ad71 common: Remove dependency on xbyak
Xbyak is currently entirely unused. Rather than carting it along, remove
it and get rid of a dependency. If it's ever needed in the future, then
it can be re-added (and likely be more up to date at that point in
time).
2018-11-21 03:43:41 -05:00
ReinUsesLisp
387e0ed814 gl_shader_decompiler: Implement R2P_IMM 2018-11-21 04:56:00 -03:00
Lioncash
953b45d747 common/math_util: Simplify std::make_signed usages to std::make_signed_t
Gets rid of the need to use typename to access the ::type alias.
2018-11-21 02:08:18 -05:00
Lioncash
629c916510 common/math_util: Make Rectangle's constructors constexpr
Allows objects that contain rectangle instances to be constexpr
constructible as well.
2018-11-21 02:08:18 -05:00
Lioncash
1ceb22dc8c common/math_util: Remove unnecessary static from PI
const/constexpr variables have internal linkage by default.
2018-11-21 02:08:18 -05:00
Lioncash
c68168f367 common/math_util: Remove unused IntervalsIntersect() function
This hasn't been used since the project started, so we may as well get
rid of it to keep it from bit rotting.
2018-11-21 02:08:15 -05:00
bunnei
135aa13fb7 Merge pull request #1751 from bunnei/color-mask-fix
maxwell_3d: Initialize rasterizer color mask registers as enabled.
2018-11-20 19:20:13 -08:00
ReinUsesLisp
ffbc450ed8 gl_shader_decompiler: Remove UNREACHABLE when setting RZ 2018-11-20 22:23:10 -03:00
ReinUsesLisp
f8feafc6f1 gl_shader_decompiler: Use UNIMPLEMENTED instead of LOG+UNREACHABLE when applicable 2018-11-20 22:00:13 -03:00
bunnei
ceab585a97 maxwell_3d: Initialize rasterizer color mask registers as enabled.
- Fixes rendering regression with Sonic Mania.
2018-11-20 19:58:06 -05:00
Lioncash
b0921e92c8 am: Correct build failure
The interface for shared memory was changed, but another commit was
merged that relied on the (previously public) internals of SharedMemory.

This amends that discrepancy.
2018-11-20 19:49:07 -05:00
Zach Hilman
b6a9dba787 patch_manager: Show LayeredExeFS patch in add-ons column
The decision was made to name them LayeredExeFS instead of just LayeredFS to differentiate from normal RomFS-based mods. The name may be long/unweildy, but conveys the meaning well.
2018-11-20 19:22:34 -05:00
bunnei
6fe5212afd Merge pull request #1734 from lioncash/shared
kernel/shared_memory: Make data members private, plus minor interface changes
2018-11-20 16:13:30 -08:00
bunnei
b76a3f912a Merge pull request #1733 from lioncash/ldr
ldr: Clean up error codes
2018-11-20 16:13:09 -08:00
bunnei
9b7882a192 Merge pull request #1746 from lioncash/random
kernel/process: Move <random> include to the cpp file
2018-11-20 16:12:29 -08:00