Commit graph

4476 commits

Author SHA1 Message Date
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
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
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
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
Max Thomas 042b389b57 Loader/NCCH: Add support for loading application updates (#2927)
* loader/ncch: split NCCH parsing into its own file

* loader/ncch: add support for loading update NCCHs from the SD card

* loader/ncch: fix formatting

* file_sys/ncch_container: Return a value for OpenFile

* loader/ncch: cleanup, always instantiate overlay_ncch to base_ncch

* file_sys/ncch_container: better encryption checks, allow non-app NCCHs to load properly and for the existence of NCCH structures to be checked

* file_sys/ncch_container: pass filepath as a const reference
2017-09-25 08:17:38 +02:00
B3n30 9ab7d720db Services/UDS: Added a function to send EAPoL-Start packets (#2920)
* Services/UDS: Added a function to generate the EAPoL-Start packet body.

* Services/UDS: Added filter for beacons.

* Services/UDS: Lock a mutex when accessing connection_status from both the emulation and network thread.

* Services/UDS: Handle the Association Response frame and respond with the EAPoL-Start frame.

* fixup: make use of current_node, changed received_beacons into a list, mutex and assert corrections

* fixup: fix damn clang-format
2017-09-25 08:16:27 +02:00
Huw Pascoe cb0886468d Optimized Float<M,E> multiplication
Before:

ucomiss xmm1, xmm1
jp      .L9
pxor    xmm2, xmm2
mov     edx, 1
ucomiss xmm0, xmm2
setp    al
cmovne  eax, edx
test    al, al
jne     .L9
.L3:
movaps  xmm0, xmm2
ret
.L9:
ucomiss xmm0, xmm0
jp      .L10
pxor    xmm2, xmm2
mov     edx, 1
ucomiss xmm1, xmm2
setp    al
cmovne  eax, edx
test    al, al
je      .L3

After:

movaps  xmm2, xmm1
mulss   xmm2, xmm0
ucomiss xmm2, xmm2
jnp     .L3
ucomiss xmm1, xmm0
jnp     .L11
.L3:
movaps  xmm0, xmm2
ret
.L11:
pxor    xmm2, xmm2
jmp     .L3
2017-09-25 00:54:02 +01:00
MerryMage 0e49bffe03 ARM_Interface: Implement PageTableChanged 2017-09-24 23:08:25 +01:00
MerryMage ecf27fbf82 memory: Remove GetCurrentPageTablePointers 2017-09-24 22:43:28 +01:00
MerryMage 6b8ad273fc memory: Add GetCurrentPageTable/SetCurrentPageTable
Don't expose Memory::current_page_table as a global.
2017-09-24 22:42:42 +01:00
Huw Pascoe 275530d7a9 Optimized Morton 2017-09-24 22:27:14 +01:00
wwylele 9c4b6162af citra-qt: fix some untranslated strings 2017-09-24 17:53:35 +03:00
Subv 5a30962cf1 HLE/APT: Always return an error from PrepareToStartNewestHomeMenu so that the Home Menu doesn't try to reboot the system.
As per 3dbrew:
"During Home Menu start-up it uses APT:PrepareToStartNewestHomeMenu. If that doesn't return an error(normally NS returns 0xC8A0CFFC for that), Home Menu starts a hardware reboot with APT:StartNewestHomeMenu etc. "
2017-09-24 08:59:31 -05:00
Subv c3b1470a42 HLE/APT: Prepare the APT Wakeup parameter when the game calls Initialize
We need to know what is being run so we can set the APT parameter destination AppId correctly.
Delaying the preparation of the parameter until we know which AppId is running lets us support booting both the Home Menu and normal game Applications.
2017-09-24 08:59:30 -05:00
James Rowe 4c4807a251 Merge pull request #2921 from jroweboy/batch-fix-2
GPU: Add draw for immediate and batch modes
2017-09-24 07:57:16 -06:00
Subv 2e487c9bce HLE/SRV: Implemented RegisterService.
Now system modules can do more than just crash immediately on startup.
2017-09-24 00:12:58 -05:00
James Rowe a10022da25 Remove pipeline.gpu_mode and fix minor issues 2017-09-23 09:28:20 -06:00
Yuri Kunde Schlesner b9365deb5a Merge pull request #2928 from huwpascoe/master
Fixed framebuffer warning
2017-09-22 04:06:38 +02:00
bunnei 4db1bff95e Merge pull request #2933 from huwpascoe/perf-1
Improved performance of FromAttributeBuffer
2017-09-19 13:18:35 -04:00
B3n30 fdd8a6ef0c WebService: Verify username and token (#2930)
* WebService: Verify username and token; Log errors in PostJson

* Fixup: added docstrings to the functions

* Webservice: Added Icons to the verification, imrpved error detection in cpr, fixup nits

* fixup: fmt warning
2017-09-18 21:18:26 -04:00
Huw Pascoe 1089bdda80 Improved performance of FromAttributeBuffer
Ternary operator is optimized by the compiler
whereas std::min() is meant to return a value.

I've noticed a 5%-10% emulation speed increase.
2017-09-17 15:56:36 +01:00
Huw Pascoe a35ca6c623 Fixed framebuffer warning 2017-09-17 11:57:06 +01:00
Yuri Kunde Schlesner defb247fff Merge pull request #2906 from Subv/ns_new_framework
Services/NS: Port ns:s to the new service framework.
2017-09-16 21:13:51 +02:00
Subv 891916efff Services/NS: Port ns:s to the new service framework. 2017-09-16 10:52:45 -05:00
Yuri Kunde Schlesner e379255d9b Merge pull request #2900 from wwylele/clip-2
PICA: implement custom clip plane
2017-09-16 10:23:00 +02:00
B3n30 ccdc31ca9f Merge pull request #2842 from Subv/switchable_page_table
Kernel/Memory: Give each process its own page table and allow switching the current page table upon reschedule
2017-09-15 22:41:45 +02:00
Subv 85f1a05d7e CPU/Dynarmic: Disable the fast page-table access in dynarmic until it supports switching page tables at runtime. 2017-09-15 14:26:22 -05:00
Subv 082f12048a Tests/VFP: Use a standalone pagetable for the TestEnvironment memory operations.
This fixes building the tests
2017-09-15 14:26:20 -05:00
Subv 8932f435fc Kernel/Memory: Make IsValidPhysicalAddress not go through the current process' virtual memory mapping. 2017-09-15 14:26:18 -05:00
Subv 9200465e55 Kernel/Threads: Don't clear the CPU instruction cache when performing a context switch from an idle thread into a thread in the same process.
We were unnecessarily clearing the cache when going from Process A -> Idle -> Process A, this caused extreme performance regressions.
2017-09-15 14:26:15 -05:00
Subv 71281c2114 Kernel/Memory: Changed GetPhysicalPointer so that it doesn't go through the current process' page table to obtain a pointer. 2017-09-15 14:26:13 -05:00
bunnei b957876d61 Merge pull request #2915 from wwylele/font-archive-2
APT: load different shared font depending on the region
2017-09-11 21:39:56 -04:00
James Rowe 08a1641f8a GPU: Add draw for immediate and batch modes
PR #1461 introduced a regression where some games would change configuration
even while in the poorly named "drawing" mode, which broke the heuristic
citra was using to determine when to draw the batch. This change adds
back in a draw call for batching, and also adds in a draw call in
immediate mode each time it adds a triangle.
2017-09-11 09:21:43 -06:00
Subv 23ad87098d Kernel/Memory: Switch the current page table when a new process is scheduled. 2017-09-10 15:14:31 -05:00
Subv 36100ec791 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.
2017-09-10 15:13:41 -05:00
bunnei f536a8d269 Merge pull request #2865 from wwylele/gs++
PICA: implemented geometry shader
2017-09-07 23:02:59 -04:00
bunnei d9e82a499e Merge pull request #2914 from wwylele/fresnel-fix
pica/lighting: only apply Fresnel factor for the last light
2017-09-05 10:00:49 -04:00
Weiyi Wang 312e762696 Merge pull request #2831 from Subv/uds_auth
Services/UDS: Handle beacon frames and the basic AP connection sequence frames.
2017-09-05 15:03:56 +03:00
mailwl 4edc09f6b3 Remove _flag in var names 2017-09-04 12:15:15 +03:00
mailwl 977f7eee79 Mii Selector Applet: update Mii structures 2017-09-04 12:04:12 +03:00
James Rowe f841eb37ea Fix icon for citra qt 2017-09-03 11:26:10 -06:00
wwylele 7bf08b4f6e APT: load different shared font depending on the region 2017-09-03 12:34:11 +03:00
wwylele 3b210dd006 pica/lighting: only apply Fresnel factor for the last light 2017-09-03 08:22:03 +03:00
DaMan 9a09519e7a Add manifest 2017-09-02 20:08:11 -04:00
bunnei 2e3cb85793 Merge pull request #2909 from wwylele/telemetry-gas
video_core: report telemetry for gas mode
2017-08-31 11:12:55 -04:00
wwylele c58f627516 video_core: report telemetry for gas mode 2017-08-31 12:54:17 +03:00
bunnei a334004da8 Merge pull request #2858 from MerryMage/interp-on-a-frame-basis
interpolate: Interpolate on a frame-by-frame basis
2017-08-30 21:56:43 -04:00
bunnei 84ac533b17 Merge pull request #2891 from wwylele/sw-bump
SwRasterizer/Lighting: implement bump mapping
2017-08-30 21:07:30 -04:00
bunnei d181a67df9 Merge pull request #2899 from wwylele/touch-refactor
Refactor touch input into a TouchDevice
2017-08-29 11:29:10 -04:00
Sebastian Valle 8b1fdb9394 Merge pull request #2905 from danzel/fix-2902
Use recursive_mutex instead of mutex to fix #2902
2017-08-29 09:35:56 -05:00
danzel e16c96d587 Use recursive_mutex instead of mutex to fix #2902 2017-08-29 20:39:55 +12:00
MerryMage cbb31422b7 interpolate: Interpolate on a frame-by-frame basis 2017-08-28 10:54:41 +01:00
Weiyi Wang d74c3415fb Merge pull request #2892 from Subv/warnings2
Warnings: Fixed a few missing-return warnings in video_core.
2017-08-28 03:21:51 -05:00
Subv 02af4789cc Services/UDS: Remove an old duplicated declaration of WifiPacket. 2017-08-27 10:48:15 -05:00
Subv 0e1a05aaec Services/UDS: Handle the connection sequence packets.
There is currently no stage tracking, a client is considered "Connected" when it receives the EAPoL Logoff packet from the server, this is not yet implemented.
2017-08-27 10:48:13 -05:00
Subv 088500377e Services/UDS: Store the received beacon frames until RecvBeaconBroadcastData is called, up to 15 beacons at the same time, removing any older beacon frames when the limit is exceeded. 2017-08-27 10:48:11 -05:00
Subv 44350f7ea1 Services/UDS: Add functions to generate 802.11 auth and assoc response frames. 2017-08-27 10:48:09 -05:00
bunnei 2c616c7f45 web_backend: Fix CPR bug where Winsock is not properly initializing. 2017-08-26 19:45:41 -04:00
Subv 1ba7703833 Warnings: Fixed a few missing-return warnings in video_core. 2017-08-26 11:58:22 -05:00
bunnei 85bfee814a web_backend: Fix asynchronous JSON post by spawning new thread. 2017-08-25 23:37:47 -04:00
bunnei 0783d36b5a web_services: Refactor to remove dependency on Core. 2017-08-25 23:10:02 -04:00
bunnei d10cd5d7ea qt: Add an option to view/regenerate telemetry ID. 2017-08-25 23:10:02 -04:00
bunnei c871b582f3 default_ini: Use correct telemetry endpoint URL. 2017-08-25 23:10:01 -04:00
bunnei ebd40bac63 # This is a combination of 2 commits.
# This is the 1st commit message:

qt: Add web configuration tab.

# The commit message #2 will be skipped:

# fixup! qt: Add web configuration tab.
2017-08-25 23:10:01 -04:00
bunnei b4d06de621 qt: Add web configuration tab. 2017-08-25 23:10:01 -04:00
bunnei 5dddc43fde web_backend: User config for username and token, support anonymous post. 2017-08-25 23:10:01 -04:00
bunnei 24326a8436 telemetry: Log frontend type. 2017-08-25 23:10:01 -04:00
bunnei 3142ed98b6 settings: Add enable_telemetry, citra_username, and citra_token. 2017-08-25 23:10:00 -04:00
bunnei 58d3f0ae1d telemetry_session: Log telemetry ID. 2017-08-25 23:10:00 -04:00
bunnei 8ed5cd044d citra_qt: Show one-time callout messages to user. 2017-08-25 23:10:00 -04:00
ThaMighty90 791a419280 SidebySide Layout (#2859)
* added a SidebySide Layout

* Reworked, so both screen have the same height and cleaned up screen translates.

* added the option in the UI, hope this is the right way to do it. formated framebuffer_layout.cpp

* delete the x64 files

* deleted ui_configure_graphics.h

* added Option for the Layout in the xml

* got rid of SIDE_BY_SIDE_ASPECT_RATIO because it was useless. pulled translate into variables

* changed shift variables to u32 and moved them in their respective branch. remove notr="true" for the Screen layout drop down

* reworked intends :). changed function description for SideFrameLayout

* some description reworking
2017-08-25 17:53:07 -04:00
wwylele b67850c882 SwRasterizer/Clipper: flip the sign convention to match PICA and OpenGL 2017-08-25 07:26:45 +03:00
wwylele 55eaecad8f gl_rasterizer: implement custom clip plane 2017-08-25 07:26:45 +03:00
wwylele 5893bb84af SwRasterizer: implement custom clip plane 2017-08-24 15:34:27 +03:00
wwylele 2814d0fba2 EmuWindow: refactor touch input into a TouchDevice 2017-08-24 15:00:56 +03:00
wwylele 5ec879dfaa HID: use TouchDevice for touch pad 2017-08-24 13:56:43 +03:00
James Rowe 35e185309b Merge pull request #2839 from Subv/global_kernel_lock
Kernel/HLE: Use a mutex  to synchronize access to the HLE kernel state between the cpu thread and any other possible threads that might touch the kernel (network thread, etc).
2017-08-23 18:17:44 -06:00
bunnei add21dee2f Merge pull request #2893 from Subv/not_schedule_main_thread
Kernel/Threads: Don't immediately switch to the new main thread when loading a new process.
2017-08-22 17:45:47 -04:00
Subv 36220f3873 Kernel/Memory: Acquire the global HLE lock when a memory read/write operation falls outside of the fast path, for it might perform an MMIO operation. 2017-08-22 09:30:58 -05:00
Subv 9cf64ca2cf Kernel/HLE: Use a mutex to synchronize access to the HLE kernel state between the cpu thread and any other possible threads that might touch the kernel (network thread, etc).
This mutex is acquired in SVC::CallSVC, ie, as soon as the guest application enters the HLE kernel, and should be acquired by the aforementioned threads before modifying kernel structures.
2017-08-22 09:30:55 -05:00
James Rowe 95ccb3a6e6 Merge pull request #2888 from Subv/warnings
Fixed some warnings in the core project.
2017-08-22 08:09:09 -06:00
wwylele 56684ad10b motion_emu: fix initialization order 2017-08-22 11:43:44 +03:00
wwylele 709d362609 gl_rasterizer/lighting: more accurate CP formula 2017-08-22 09:34:44 +03:00
wwylele 6813c61423 SwRasterizer/Lighting: implement LUT input CP 2017-08-22 09:34:44 +03:00
wwylele f75c6b4d36 SwRasterizer/Lighting: implement bump mapping 2017-08-22 09:34:44 +03:00
Subv 733dfe220e Kernel/Threads: Don't immediately switch to the new main thread when loading a new process.
This is necessary for loading multiple processes at the same time.
The main thread will be automatically scheduled when necessary once the scheduler runs.
2017-08-21 20:54:29 -05:00
Subv 1c6f3ee4ba GPU/Warnings: Explicitly cast the screen refresh ticks to u64. 2017-08-21 08:34:30 -05:00
Subv f94bd67a0d Warnings: Add UNREACHABLE macros to switches that contemplate all possible values. 2017-08-21 08:34:28 -05:00
Subv ecfad8a134 HLE/Applets: Fixed some conversion warnings when creating the framebuffer shared memory objects. 2017-08-21 08:34:27 -05:00
Subv 690eed4d9e CPU/Dynarmic: Fixed a warning when incrementing the number of ticks in ExecuteInstructions. 2017-08-21 08:34:25 -05:00
Subv 015a96a59b Dyncom: Use size_t instead of int to store the instruction offsets in the instruction cache.
Fixes a few warnings.
2017-08-21 08:34:23 -05:00
Subv b2d8872e56 Dyncom: Fixed a conversion warning when decoding thumb instructions. 2017-08-21 08:20:36 -05:00
wwylele c0bc013929 swrasterizer: remove invalid TODO
This function is called in clipping, before the pespective divide, and is not used in later rasterization. Thus it doesn't need perspective correction.
2017-08-21 08:03:07 +03:00
wwylele a931e4974e swrasterizer/clipper: remove tested TODO
hwtested. Current implementation is the correct behavior
2017-08-21 08:03:07 +03:00
wwylele a8499f3adb gl_shader_gen: simplify and clarify the depth transformation between vertex shader and fragment shader 2017-08-21 08:03:07 +03:00
wwylele d332ede188 gl_rasterizer: add clipping plane z<=0 defined in PICA 2017-08-21 08:03:07 +03:00
Yuri Kunde Schlesner d7d434cbc7 Merge pull request #2872 from wwylele/sw-geo-factor
SwRasterizer/Lighting: implement geometric factor
2017-08-20 17:49:42 -07:00
James Rowe df206639cf Merge pull request #2861 from wwylele/motion-refactor
Refactor MotionEmu into a InputDevice
2017-08-19 23:43:01 -06:00
wwylele 13014535c1 HID: fix a comment and a warning 2017-08-20 08:37:48 +03:00
James Rowe 989749253e Merge pull request #2871 from wwylele/sw-spotlight
SwRasterizer/Lighting: implement spot light
2017-08-19 20:10:24 -06:00
B3n30 95fd4a5e9d 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.
2017-08-19 11:14:33 -06:00
wwylele 35b3fef422 pica/command_processor: build geometry pipeline and run geometry shader
The geometry pipeline manages data transfer between VS, GS and primitive assembler. It has known four modes:
 - no GS mode: sends VS output directly to the primitive assembler (what citra currently does)
 - GS mode 0: sends VS output to GS input registers, and sends GS output to primitive assembler
 - GS mode 1: sends VS output to GS uniform registers, and sends GS output to primitive assembler. It also takes an index from the index buffer at the beginning of each primitive for determine the primitive size.
 - GS mode 2: similar to mode 1, but doesn't take the index and uses a fixed primitive size.
hwtest shows that immediate mode also supports GS (at least for mode 0), so the geometry pipeline gets refactored into its own class for supporting both drawing mode.
In the immediate mode, some games don't set the pipeline registers to a valid value until the first attribute input, so a geometry pipeline reset flag is set in `pipeline.vs_default_attributes_setup.index` trigger, and the actual pipeline reconfigure is triggered in the first attribute input.
In the normal drawing mode with index buffer, the vertex cache is a little bit modified to support the geometry pipeline. Instead of OutputVertex, it now holds AttributeBuffer, which is the input to the geometry pipeline. The AttributeBuffer->OutputVertex conversion is done inside the pipeline vertex handler. The actual hardware vertex cache is believed to be implemented in a similar way (because this is the only way that makes sense).
Both geometry pipeline and GS unit rely on states preservation across drawing call, so they are put into the global state. In the future, the other three vertex shader units should be also placed in the global state, and a scheduler should be implemented on top of the four units. Note that the current gs_unit already allows running VS on it in the future.
2017-08-19 10:13:20 +03:00
wwylele 6d51febdc4 pica/shader/jit: implement SETEMIT and EMIT 2017-08-19 10:13:20 +03:00
wwylele ab3e6dba1f pica/primitive_assembly: Handle winding for GS primitive
hwtest shows that, although GS always emit a group of three vertices as one primitive, it still respects to the topology type, as if the three vertices are input into the primitive assembler independently and sequentially. It is also shown that the winding flag in SETEMIT only takes effect for Shader topology type, which is believed to be the actual difference between List and Shader (hence removed the TODO). However, only Shader topology type is observed in official games when GS is in use, so the other mode seems to be just unintended usage.
2017-08-19 10:13:20 +03:00
wwylele 4283f4b244 correct constness 2017-08-19 10:13:20 +03:00
wwylele 4d4dbc83a7 pica/shader/interpreter: implement SETEMIT and EMIT 2017-08-19 10:13:20 +03:00
wwylele 2599928707 pica/shader: extend UnitState for GS
Among four shader units in pica, a special unit can be configured to run both VS and GS program. GSUnitState represents this unit, which extends UnitState (which represents the other three normal units) with extra state for primitive emitting. It uses lots of raw pointers to represent internal structure in order to keep it standard layout type for JIT to access.
This unit doesn't handle triangle winding (inverting) itself; instead, it calls a WindingSetter handler. This will be explained in the following commits
2017-08-19 10:13:20 +03:00
wwylele 6e56beafbf motion_emu: no need to include thread in header 2017-08-19 07:21:02 +03:00
Yuri Kunde Schlesner e24db32ae8 Merge pull request #2881 from MerryMage/dsp-firm-check
dsp_dsp: Remove size assertion in LoadComponent
2017-08-15 20:14:41 -07:00
MerryMage 98edc03737 dsp_dsp: Remove size assertion in LoadComponent 2017-08-15 10:16:50 +01:00
Dave Leaver 4c281049aa Fix Spelling/English mistakes 2017-08-14 09:15:39 +12:00
Sebastian Valle ebc3701d0e Merge pull request #2843 from Subv/applet_slots
Services/APT: Use an array to hold data about the 4 possible concurrent applet types (Application, Library, HomeMenu, System)
2017-08-12 10:27:57 -05:00
wwylele a26768503a gl_shader_gen: don't call SampleTexture when bump map is not used 2017-08-11 18:35:00 +03:00
wwylele d500f79b8e move MotionEmu from core/frontend to input_common as a InputDevice 2017-08-11 11:05:08 +03:00
wwylele 31da8b8353 HID: use MotionDevice for Accelerometer and Gyroscope 2017-08-11 11:03:18 +03:00
Weiyi Wang 4f6f33f155 Merge pull request #2874 from danzel/spelling-1
Fix some spelling mistakes
2017-08-11 11:02:14 +03:00
danzel 6610e914a3 Fix some spelling mistakes 2017-08-11 19:51:16 +12:00
wwylele 1904567e36 SwRasterizer/Lighting: implement spot light 2017-08-11 01:19:10 +03:00
wwylele b7e4eb7d90 SwRasterizer/Lighting: implement geometric factor 2017-08-11 01:18:43 +03:00
Weiyi Wang ed7b0bfad0 Merge pull request #2863 from wwylele/pad-state-zero
HID: zero unused PadState bits
2017-08-10 17:50:18 +03:00
wwylele b05c60172b HID: zero unused PadState bits 2017-08-10 17:01:03 +03:00
wwylele 72905b0389 SwRasterizer/Lighting: use make_tuple instead of constructor
implicit tuple constructor is a c++17 thing, which is not supported by some not-so-old libraries. Play safe for now
2017-08-10 12:19:58 +03:00
wwylele edc3516958 pica/regs: layout geometry shader configuration regs
All the register meanings are derived from ctrulib (3dbrew is outdated for most of them)
2017-08-10 01:53:08 +03:00
bunnei e9c9b0ff53 Merge pull request #2862 from j-selby/update-cryptopp
Update CryptoPP (byte ambiguity)
2017-08-09 16:18:43 -04:00
Weiyi Wang ae040b4f3b Merge pull request #2822 from wwylele/sw_lighting-2
Implement fragment lighting in the sw renderer (take 2)
2017-08-09 18:54:29 +03:00
Weiyi Wang 16020d23ac Merge pull request #2856 from wwylele/shader-share
pica: upload shared shader code & swizzle to both unit
2017-08-09 18:52:30 +03:00
mailwl 77aedbdc52 Service/dlp: Update function tables according 3dbrew 2017-08-09 16:14:07 +03:00
James b09fccfe6d Update cryptopp 2017-08-08 17:50:09 +10:00
Subv 02b8723f3c Services/APT: Use the AppletAttributes union directly when dealing with applet attrs. 2017-08-07 16:09:55 -05:00
Subv 99fe2f6ec7 Services/APT: Use an array to hold data about the 4 possible concurrent applet types (Application, Library, HomeMenu, System).
This gives each applet type its own set of events as per the real NS module.
2017-08-07 14:53:58 -05:00
wwylele 089c0d897b pica: upload shared shader code to both unit 2017-08-07 10:30:05 +03:00
Andrea Pascal 0aeb557fe7 Quickfix typo in OpenGL 3.3 error message
User pointed out on the Discord server that "nothave" is erroneously concatenated. Added a space to prevent it.
2017-08-04 23:11:27 -04:00
bunnei df6409c59f telemetry: Add field for OsPlatform. 2017-08-03 20:10:38 -04:00
bunnei 512facf394 telemetry: Add field for BuildName. 2017-08-03 20:10:37 -04:00
bunnei 9d33e7a94c telemetry: Add field for RequiresSharedFont. 2017-08-03 20:10:37 -04:00
bunnei 27e05b885a telemetry_session: Log BuildDate and ProgramName fields. 2017-08-03 20:10:37 -04:00
bunnei e6b95d5511 common: Add build timestamp to scm_rev. 2017-08-03 20:10:37 -04:00
bunnei 1d3d7645bb core: Expose AppLoader as a public interface. 2017-08-03 20:10:37 -04:00
bunnei e5f2839605 loader: Expose program title. 2017-08-03 20:10:37 -04:00
wwylele fe4c91ae4c SwRasterizer/Lighting: shorten file name 2017-08-03 13:51:22 +03:00
wwylele 0af90eabd8 SwRasterizer/Lighting: move to its own file 2017-08-02 22:20:40 +03:00
wwylele a402f75cf4 SwRasterizer/Lighting: reduce confusion 2017-08-02 22:07:15 +03:00
wwylele cfd3edb942 SwRasterizer/Lighting: move quaternion normalization to the caller 2017-08-02 22:05:53 +03:00
James 9da055f84c Handle invalid filenames when renaming files/directories 2017-07-31 17:11:53 +10:00
Weiyi Wang 05e0bef66d Merge pull request #2848 from wwylele/shader-loop-fix
pica/shader_interpreter: fix off-by-one in LOOP
2017-07-29 12:34:28 +03:00
bunnei 361dcc2e17 Merge pull request #2679 from MerryMage/interp-tests
DynCom VFP tests
2017-07-27 11:21:36 -04:00
bunnei 43c11bbd89 Merge pull request #2840 from Subv/apt_parameter
Services/APT: Corrected the behavior of the Receive/Send/Glance/CancelParameter functions
2017-07-27 11:14:27 -04:00
wwylele dc6f41bcc5 pica/shader_interpreter: fix off-by-one in LOOP 2017-07-27 13:48:27 +03:00
bunnei 72d36b8260 Merge pull request #2837 from wwylele/shader-debugger-fix
Misc shader debugger fixes
2017-07-26 16:00:10 -04:00
B3n30 9f9afc3fd5 Network: Moved NintendoOUI initalization to RoomMember constructor 2017-07-26 21:06:40 +02:00
MerryMage 22e08c7e6b tests: Add tests for vadd 2017-07-23 12:29:51 +01:00
MerryMage 75f30767d3 tests: Arm testing framework 2017-07-23 12:08:43 +01:00
Sebastian Valle 803fda3c67 Merge pull request #2816 from wwylele/proctex-lutlutlut
gl_rasterizer: use texture buffer for proctex LUT
2017-07-22 23:03:48 -05:00
Sebastian Valle 62cdefaed0 Merge pull request #2834 from wwylele/depth-enable-fix
gl_rasterizer_cache: fix using_depth_fb
2017-07-22 23:02:59 -05:00
Weiyi Wang c40c9bf285 Merge pull request #2799 from yuriks/virtual-cached-range-flush
Add address conversion functions returning optional, Add function to flush virtual region from rasterizer cache
2017-07-22 10:15:52 +03:00
Subv 20eb92534e Service/APT: Log Send/Cancel/Receive/GlanceParameter calls even if they return an error. 2017-07-21 15:03:06 -05:00
Subv e0cfa309b6 Services/APT: Return the proper error code when calling SendParameter with an outstanding parameter already in memory. 2017-07-21 14:59:26 -05:00
Subv f8f6966ce1 Services/APT: Reset the APT parameter inside CancelParameter if the conditions are met. 2017-07-21 14:59:25 -05:00
Subv f678b8da42 Services/APT: Properly clear the apt parameter after a successful ReceiveParameter call. 2017-07-21 14:59:22 -05:00
Subv 00128a81d3 Services/APT: Use the right error codes in ReceiveParameter and GlanceParameter when the parameter doesn't exist. 2017-07-21 14:59:21 -05:00
Subv 725a45fe9f Services/APT: Use boost::optional for the APT parameter structure. 2017-07-21 14:59:20 -05:00
wwylele d9a05eec0b debugger/shader: display LOOP 2017-07-20 23:30:34 +03:00
wwylele b5711f9f54 debugger/shader: print the invert flag for JMPU 2017-07-20 23:18:07 +03:00
wwylele 2fcfd76fb2 debugger/shader: fix address register for reverted arithmetic op 2017-07-20 23:12:08 +03:00
wwylele 69b544d73a debugger/shader: fix inverted uniform flow control 2017-07-20 22:47:53 +03:00
bunnei b2bfbf5120 telemetry: Log performance, configuration, and system data. 2017-07-17 21:32:28 -04:00
bunnei f6ed592be0 Merge pull request #2804 from Kloen/theming
citra-qt: UI Themes
2017-07-17 21:30:01 -04:00
Weiyi Wang 9eb8dd311c Merge pull request #2818 from B3n30/network
Enable data transfer over ENet
2017-07-17 17:08:02 +03:00
B3n30 e2992eb321 stubbed frd::UnscrambleLocalFriendCode (#2827) 2017-07-16 21:32:08 -05:00