Commit graph

5324 commits

Author SHA1 Message Date
MerryMage
6186f88b54 macOS: Build x86_64h slice
This commit produces a fat-binary with two slices. The x86_64 slice
is for all x64 systems, and the x86_64h slice targets x64 systems
starting with Haswell. The latter allows the compiler to use newer
instructions that are not available on older microarchitectures.
2017-10-02 18:34:19 +01:00
Sebastian Valle
cbf57de4e5 Merge pull request #2971 from Subv/per_process_memops
Memory: Add overloads for ReadBlock and WriteBlock that operate on a specific process.
2017-10-01 14:44:06 -05:00
Subv
1265575db5 Memory: Make WriteBlock take a Process parameter on which to operate 2017-10-01 14:18:36 -05:00
Subv
bf55d2f57e Memory: Make ReadBlock take a Process parameter on which to operate 2017-10-01 14:18:36 -05:00
Subv
141da6b667 Kernel/Thread: Added a helper function to get a thread's command buffer VAddr. 2017-10-01 14:18:35 -05:00
Sebastian Valle
fd974cb502 Merge pull request #2974 from Subv/nim_event
Services/NIM: Implement CheckForSysUpdateEvent.
2017-10-01 14:16:14 -05:00
shinyquagsire23
9c8cdede44 file_sys, loader: add support for reading TMDs to determine app paths 2017-10-01 10:54:02 -06:00
shinyquagsire23
f6564f232e file_sys: add class for Title Metadata (TMD) 2017-10-01 10:53:45 -06:00
shinyquagsire23
a151c0edec file_sys/ncch_container: add RomFS, ExeFS override to allow for backward compatibility with existing .romfs system archive dumps 2017-10-01 10:53:18 -06:00
shinyquagsire23
2f8af214f8 file_sys/archive_ncch: use NCCHContainer instead of loading .romfs files 2017-10-01 10:53:04 -06:00
Sebastian Valle
a403be5e32 Merge pull request #2973 from huwpascoe/down_count
Moved down_count to CoreTiming
2017-09-30 14:46:06 -05:00
bunnei
47d0206ac7 arm_interface: Set TLS address for dynarmic core. 2017-09-30 14:34:03 -04:00
bunnei
6d3b6e0041 nso: Refactor and allocate .bss section. 2017-09-30 14:33:58 -04:00
bunnei
39308848e3 process: Support loading multiple codesets. 2017-09-30 14:33:11 -04:00
bunnei
0e04a4ffd6 loader: Add support for loading an NSO. 2017-09-30 14:32:53 -04:00
bunnei
f4b1216c81 externals: Add lz4. 2017-09-30 14:30:04 -04:00
bunnei
55eaa14131 memory: Log with 64-bit values. 2017-09-30 14:28:54 -04:00
bunnei
6cfc867d93 kernel: Various threading fixes to support 64-bit addressing. 2017-09-30 14:28:54 -04:00
bunnei
e5731e94d6 core: Various changes to support 64-bit addressing. 2017-09-30 14:28:54 -04:00
bunnei
7f1ce2cf68 arm: Use 64-bit addressing in a bunch of places. 2017-09-30 14:28:53 -04:00
bunnei
d13377a2a9 elf: Check if machine is ARM. 2017-09-30 14:28:53 -04:00
Subv
ded3089f66 Services/NIM: Implement CheckForSysUpdateEvent.
Implementation verified by reverse engineering.
This lets the Home Menu boot without crashing on startup.
2017-09-30 13:21:45 -05:00
Huw Pascoe
ed9e0618c9 Moved down_count to CoreTiming 2017-09-30 17:38:14 +01:00
B3n30
6706b1994e Services/UDS: Handle the rest of the connection sequence. (#2963)
Services/UDS: Handle the rest of the connection sequence.
2017-09-30 18:18:45 +02:00
James Rowe
6aa70ae745 Merge pull request #2972 from Subv/ignore_.vs
Add the .vs folder and the CMakeSettings.json file from Visual Studio to gitignore
2017-09-30 10:11:53 -06:00
Subv
4c82746e83 Add the .vs folder and the CMakeSettings.json file from Visual Studio to gitignore. 2017-09-30 11:07:57 -05:00
Sebastian Valle
afd9af8417 Merge pull request #2946 from Subv/home_menu_apt
Implement PrepareToStartNewestHomeMenu and fixed an APT regression.
2017-09-30 10:47:42 -05:00
Sebastian Valle
2e30398e7a Merge pull request #2967 from Subv/thread_wakeup_callbacks
Kernel/Threads: When putting a thread to wait, specify a function to execute when it is awoken
2017-09-30 09:12:18 -05:00
Sebastian Valle
53d74215b2 Merge pull request #2962 from huwpascoe/static_cast
Fixed type conversion ambiguity
2017-09-30 08:22:14 -05:00
Huw Pascoe
da1c8d1522 Fixed type conversion ambiguity 2017-09-30 09:34:35 +01:00
bunnei
e2a34ccd89 Merge pull request #2961 from Subv/load_titles
Loaders: Don't automatically set the current process every time we load an application.
2017-09-29 14:58:42 -04:00
Subv
a0054d695e Kernel/Threads: When putting a thread to wait, specify a function to execute when it is awoken.
This change makes for a clearer (less confusing) path of execution in the scheduler, now the code to execute when a thread awakes is closer to the code that puts the thread to sleep (WaitSynch1, WaitSynchN). It also allows us to implement the special wake up behavior of ReplyAndReceive without hacking up WaitObject::WakeupAllWaitingThreads.

If savestates are desired in the future, we can change this implementation to one similar to the CoreTiming event system, where we first register the callback functions at startup and assign their identifiers to the Thread callback variable instead of directly assigning a lambda to the wake up callback variable.
2017-09-28 11:53:32 -05:00
Sebastian Valle
1d94b4fd3d Merge pull request #2907 from Subv/warnings3
Disable unary operator- on Math::Vec2/Vec3/Vec4 for unsigned types.
2017-09-27 15:45:38 -05:00
Subv
9f1b2d3260 Disable unary operator- on Math::Vec2/Vec3/Vec4 for unsigned types.
It is unlikely we will ever use this without first doing a Cast to a signed type.
Fixes 9 "unary minus operator applied to unsigned type, result still unsigned" warnings on MSVC2017.3
2017-09-27 09:06:41 -05:00
Subv
11920a6bd1 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.
2017-09-26 18:17:47 -05:00
James Rowe
47ca57f00f Merge pull request #2954 from Subv/cache_unmapped_mem
Memory/RasterizerCache: Ignore unmapped memory regions when caching physical regions
2017-09-26 16:55:47 -06:00
Subv
2e78c05d91 Kernel/Thread: Allow specifying which process a thread belongs to when creating it.
Don't automatically assume that Thread::Create will only be called when the parent process is currently scheduled. This assumption will be broken when applets or system modules are loaded.
2017-09-26 17:40:49 -05:00
Subv
2420759794 Tests: Added Memory::IsValidVirtualAddress tests. 2017-09-26 17:31:50 -05:00
Subv
6af5b05299 Tests: Fixed ARM VFP tests 2017-09-26 17:29:06 -05:00
Subv
3cb2bf08c3 Memory: Allow IsValidVirtualAddress to be called with a specific process parameter.
There is still an overload of IsValidVirtualAddress that only takes the VAddr and will default to the current process.
2017-09-26 17:27:44 -05:00
Merry
0e74e2bd52 Merge pull request #2958 from Subv/audio_buffer_datatype
Audio: Use std::deque instead of std::vector for the audio buffer type (StereoBuffer16)
2017-09-26 08:47:37 +01:00
Subv
04481f6a13 HLE/APT: Always set up the APT parameter when starting a library applet.
Only use the HLE interface if an HLE applet with the desired id was started.

This commit reorganizes the APT code surrounding parameter creation and delivery to make it easier to support LLE applets in the future.

As future work, the HLE applet interface can be reworked to utilize the same facilities as the LLE interface.
2017-09-25 23:47:50 -05:00
Subv
bfc70ef1d1 Memory/RasterizerCache: Ignore unmapped memory regions when caching physical regions.
Not all physical regions need to be mapped into the address space of every process, for example, system modules do not have a VRAM mapping.

This fixes a crash when loading applets and system modules.
2017-09-25 19:37:45 -05:00
Subv
3532957099 Audio: Use std::deque instead of std::vector for the audio buffer type (StereoBuffer16).
The current code inserts and deletes elements from the beginning of the audio buffer, which is very inefficient in an std::vector.

Profiling was done using VisualStudio2017's Performance Analyzer in Super Mario 3D Land.

Before this change: AudioInterp::Linear had 14.14% of the runtime (inclusive) and most of that time was spent in std::vector's insert implementation.
After this change: AudioInterp::Linear has 0.36% of the runtime (inclusive)
2017-09-25 18:31:37 -05:00
Sebastian Valle
09c4c87db5 Merge pull request #2947 from Subv/selfncch_factory
HLE/Archives: Allow multiple loaded applications to access their SelfNCCH archive independently.
2017-09-25 18:24:12 -05:00
Subv
f2b635a73d HLE/Archives: Allow multiple loaded applications to access their SelfNCCH archive independently.
The loaders now register each loaded ROM with the SelfNCCH factory, which keeps the data around for the duration of the emulation session.

When opening the SelfNCCH archive, the factory queries the current program's programid and uses that as a key to the map that contains the NCCHData structure (RomFS, Icon, Banner, etc).

3dsx files do not have a programid and will use a default of 0 for this value, thus, only 1 3dsx file with RomFS is loadable at the same time.
2017-09-25 09:45:02 -05:00
B3n30
75f023a48b Merge pull request #2952 from MerryMage/page-tables
Switchable Page Tables
2017-09-25 08:29:32 +02:00
B3n30
9b06d0afb7 Merge pull request #2951 from huwpascoe/perf-4
Optimized Morton
2017-09-25 08:28:55 +02:00
B3n30
91b85122af Merge pull request #2949 from wwylele/fix-tr
citra-qt: fix some untranslated strings
2017-09-25 08:23:04 +02:00
B3n30
c78c4f258d Merge pull request #2948 from Subv/register_service
HLE/SRV: Implemented RegisterService.
2017-09-25 08:22:05 +02:00