Commit Graph

4461 Commits (f10a304ecdc2457124d6333862bdaaa46577fe1e)

Author SHA1 Message Date
bunnei 78bc2b70bb svc: Some logging cleanup. 9 years ago
bunnei e98a3ca171 svc: Update MemoryInfo flags for 64-bit. 9 years ago
bunnei cb889f9220 svc: Initial nx impl. for QueryMemory, ConnectToPort, SendSyncRequest, etc. 9 years ago
bunnei d62750c46d Remove more 3DS-specific code. 9 years ago
bunnei 15983dcfdc Remove more 3DS-specific code. 9 years ago
bunnei dbd15b0d10 Remove more 3DS-specific code. 9 years ago
bunnei 72b03025ac Remove lots more 3DS-specific code. 9 years ago
bunnei 0906de9a14 hle: Remove a large amount of 3ds-specific service code. 9 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
9 years ago
bunnei 23ce4f5afc loader: Various improvements for NSO/NRO loaders. 9 years ago
Dragios 83e5f639e6 Change command header in nwm::UDS Initialize function 9 years ago
Sebastian Valle 20e19a340c Merge pull request #2991 from Subv/getpointer
Remove more usages of GetPointer.
9 years ago
Sebastian Valle 74d4050924 Merge pull request #2975 from shinyquagsire23/archive-ncch-container-and-override
file_sys/archive_ncch: use NCCHs/.apps instead of .romfs files, NCCH section override
9 years ago
bunnei 33ea53094c loader: Add support for NRO, as well as various fixes and shared linker. 9 years ago
Sebastian Valle 84c344b9b1 Merge pull request #2953 from Subv/applet_launch
HLE/APT: Always set up the APT parameter when starting a library applet.
9 years ago
Subv 97f262c1f5 SVC: Removed GetPointer usage in the GetResourceLimit functions. 9 years ago
Subv 46fc7595b4 SVC: Remove GetPointer usage in CreatePort. 9 years ago
Subv 7b09b30ef1 SVC: Replace GetPointer usage with ReadCString in ConnectToPort. 9 years ago
Subv 3c0113632d SVC: Replace GetPointer usage with ReadBlock in OutputDebugString. 9 years ago
Subv 0cfb231e00 SVC: Replace GetPointer usage with Read32 in ReplyAndReceive. 9 years ago
Subv b863d6c860 SVC: Replace GetPointer usage with Read32 in WaitSynchronizationN. 9 years ago
Subv 7772fc0731 Memory: Remove all GetPointer usages from the GDB stub. 9 years ago
Huw Pascoe b3b34a1e76 Extracted the attribute setup and draw commands into their own functions 9 years ago
bunnei d454364bca nso: Fixes to support homebrew NSOs without a MOD header. 9 years ago
bunnei 15c7641bef Merge pull request #2977 from Subv/shmem_create
SharedMemory: Don't take over and unmap the source memory block when creating a shared memory, just reference it
9 years ago
Subv b18589ecf7 Kernel/SharedMemory: Don't take over and unmap the source memory block when creating a shared memory, just reference it.
Also reference the right offset into the backing block for the requested address.
9 years ago
Sebastian Valle 30fabc41c6 Merge pull request #2971 from Subv/per_process_memops
Memory: Add overloads for ReadBlock and WriteBlock that operate on a specific process.
9 years ago
Subv 1f2de7501b Memory: Make WriteBlock take a Process parameter on which to operate 9 years ago
Subv 811c01e5fe Memory: Make ReadBlock take a Process parameter on which to operate 9 years ago
Subv 8217ed7acb Kernel/Thread: Added a helper function to get a thread's command buffer VAddr. 9 years ago
Sebastian Valle 9c123c29a6 Merge pull request #2974 from Subv/nim_event
Services/NIM: Implement CheckForSysUpdateEvent.
9 years ago
shinyquagsire23 4887d18591 file_sys, loader: add support for reading TMDs to determine app paths 9 years ago
shinyquagsire23 8e10c9bb2e file_sys: add class for Title Metadata (TMD) 9 years ago
shinyquagsire23 e21f2348e7 file_sys/ncch_container: add RomFS, ExeFS override to allow for backward compatibility with existing .romfs system archive dumps 9 years ago
shinyquagsire23 c93e5ecfe6 file_sys/archive_ncch: use NCCHContainer instead of loading .romfs files 9 years ago
bunnei 6377585edb arm_interface: Set TLS address for dynarmic core. 9 years ago
bunnei 8c92435ded nso: Refactor and allocate .bss section. 9 years ago
bunnei fa1c7c7ee1 process: Support loading multiple codesets. 9 years ago
bunnei 6bafd3f4f7 loader: Add support for loading an NSO. 9 years ago
bunnei 9eb4888df7 externals: Add lz4. 9 years ago
bunnei 46297c9653 memory: Log with 64-bit values. 9 years ago
bunnei c5ce5c06e4 kernel: Various threading fixes to support 64-bit addressing. 9 years ago
bunnei f01472a5ff core: Various changes to support 64-bit addressing. 9 years ago
bunnei 3411883fe3 arm: Use 64-bit addressing in a bunch of places. 9 years ago
bunnei 1c4f9e822c elf: Check if machine is ARM. 9 years ago
Subv 5bae5a48b9 Services/NIM: Implement CheckForSysUpdateEvent.
Implementation verified by reverse engineering.
This lets the Home Menu boot without crashing on startup.
9 years ago
Huw Pascoe 529f4a0131 Moved down_count to CoreTiming 9 years ago
B3n30 afb1012bcd Services/UDS: Handle the rest of the connection sequence. (#2963)
Services/UDS: Handle the rest of the connection sequence.
9 years ago
Sebastian Valle 7056b9c46a Merge pull request #2946 from Subv/home_menu_apt
Implement PrepareToStartNewestHomeMenu and fixed an APT regression.
9 years ago
Sebastian Valle db752b52e8 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
9 years ago
Huw Pascoe a13ab958cb Fixed type conversion ambiguity 9 years ago
bunnei b07af7dda8 Merge pull request #2961 from Subv/load_titles
Loaders: Don't automatically set the current process every time we load an application.
9 years ago
Subv 8432749db7 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.
9 years ago
Sebastian Valle 0d42706a7b Merge pull request #2907 from Subv/warnings3
Disable unary operator- on Math::Vec2/Vec3/Vec4 for unsigned types.
9 years ago
Subv a321bce378 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
9 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.
9 years ago
James Rowe 5620327e03 Merge pull request #2954 from Subv/cache_unmapped_mem
Memory/RasterizerCache: Ignore unmapped memory regions when caching physical regions
9 years ago
Subv 3165466b66 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.
9 years ago
Subv a8d2f5787f Tests: Added Memory::IsValidVirtualAddress tests. 9 years ago
Subv c102e3ae28 Tests: Fixed ARM VFP tests 9 years ago
Subv 35da7f57ef 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.
9 years ago
Merry 0c20da7fde Merge pull request #2958 from Subv/audio_buffer_datatype
Audio: Use std::deque instead of std::vector for the audio buffer type (StereoBuffer16)
9 years ago
Subv e27ae04696 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.
9 years ago
Subv 41f6c9f87f 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.
9 years ago
Subv d7459354f5 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)
9 years ago
Subv 774e7deae8 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.
9 years ago
B3n30 d881dee818 Merge pull request #2952 from MerryMage/page-tables
Switchable Page Tables
9 years ago
B3n30 dc6a365337 Merge pull request #2951 from huwpascoe/perf-4
Optimized Morton
9 years ago
B3n30 78022b5a79 Merge pull request #2949 from wwylele/fix-tr
citra-qt: fix some untranslated strings
9 years ago
B3n30 a21b9deb98 Merge pull request #2948 from Subv/register_service
HLE/SRV: Implemented RegisterService.
9 years ago
Max Thomas c91ccbd0ba 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
9 years ago
B3n30 d673d508dd 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
9 years ago
Huw Pascoe 903906da3b 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
9 years ago
MerryMage 67a70bd9e1 ARM_Interface: Implement PageTableChanged 9 years ago
MerryMage 4e5eb2044a memory: Remove GetCurrentPageTablePointers 9 years ago
MerryMage c02bbb7030 memory: Add GetCurrentPageTable/SetCurrentPageTable
Don't expose Memory::current_page_table as a global.
9 years ago
Huw Pascoe 876aa82c29 Optimized Morton 9 years ago
wwylele 7117fcc024 citra-qt: fix some untranslated strings 9 years ago
Subv 7096f01c14 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. "
9 years ago
Subv b57d58c0dc 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.
9 years ago
James Rowe 93930a966f Merge pull request #2921 from jroweboy/batch-fix-2
GPU: Add draw for immediate and batch modes
9 years ago
Subv 0b33e36292 HLE/SRV: Implemented RegisterService.
Now system modules can do more than just crash immediately on startup.
9 years ago
James Rowe 19d41dcc6e Remove pipeline.gpu_mode and fix minor issues 9 years ago
Yuri Kunde Schlesner a7758b0b36 Merge pull request #2928 from huwpascoe/master
Fixed framebuffer warning
9 years ago
bunnei 6fc123d67c Merge pull request #2933 from huwpascoe/perf-1
Improved performance of FromAttributeBuffer
9 years ago
B3n30 28c726f205 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
9 years ago
Huw Pascoe a234e4c200 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.
9 years ago
Huw Pascoe 6a110ac5f5 Fixed framebuffer warning 9 years ago
Yuri Kunde Schlesner 255fd8768d Merge pull request #2906 from Subv/ns_new_framework
Services/NS: Port ns:s to the new service framework.
9 years ago
Subv 3d86e3afc4 Services/NS: Port ns:s to the new service framework. 9 years ago
Yuri Kunde Schlesner 699c920991 Merge pull request #2900 from wwylele/clip-2
PICA: implement custom clip plane
9 years ago
B3n30 813837c5cf 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
9 years ago
Subv 7a3ab7c63d CPU/Dynarmic: Disable the fast page-table access in dynarmic until it supports switching page tables at runtime. 9 years ago
Subv 3bde97ea05 Tests/VFP: Use a standalone pagetable for the TestEnvironment memory operations.
This fixes building the tests
9 years ago
Subv f18a176b60 Kernel/Memory: Make IsValidPhysicalAddress not go through the current process' virtual memory mapping. 9 years ago
Subv b178089251 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.
9 years ago
Subv 214150f00c Kernel/Memory: Changed GetPhysicalPointer so that it doesn't go through the current process' page table to obtain a pointer. 9 years ago
bunnei 588077184b Merge pull request #2915 from wwylele/font-archive-2
APT: load different shared font depending on the region
9 years ago
James Rowe ad0b57f407 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.
9 years ago
Subv c34ec5e77c Kernel/Memory: Switch the current page table when a new process is scheduled. 9 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.
9 years ago
bunnei 11baa40d75 Merge pull request #2865 from wwylele/gs++
PICA: implemented geometry shader
9 years ago
bunnei ff4941fb3a Merge pull request #2914 from wwylele/fresnel-fix
pica/lighting: only apply Fresnel factor for the last light
9 years ago
Weiyi Wang 617b6974b9 Merge pull request #2831 from Subv/uds_auth
Services/UDS: Handle beacon frames and the basic AP connection sequence frames.
9 years ago
mailwl 11f2eff17d Remove _flag in var names 9 years ago
mailwl 589babbf74 Mii Selector Applet: update Mii structures 9 years ago
James Rowe 79f177c6d2 Fix icon for citra qt 9 years ago
wwylele 59a9aaf388 APT: load different shared font depending on the region 9 years ago
wwylele 12fbc8c8df pica/lighting: only apply Fresnel factor for the last light 9 years ago
DaMan 40505bc4fc Add manifest 9 years ago
bunnei f251b8873a Merge pull request #2909 from wwylele/telemetry-gas
video_core: report telemetry for gas mode
9 years ago
wwylele e2c41a5891 video_core: report telemetry for gas mode 9 years ago
bunnei e450a2d2b8 Merge pull request #2858 from MerryMage/interp-on-a-frame-basis
interpolate: Interpolate on a frame-by-frame basis
9 years ago
bunnei f0e461bf6f Merge pull request #2891 from wwylele/sw-bump
SwRasterizer/Lighting: implement bump mapping
9 years ago
bunnei 75cd28a7cc Merge pull request #2899 from wwylele/touch-refactor
Refactor touch input into a TouchDevice
9 years ago
Sebastian Valle acbd46366c Merge pull request #2905 from danzel/fix-2902
Use recursive_mutex instead of mutex to fix #2902
9 years ago
danzel 8266064796 Use recursive_mutex instead of mutex to fix #2902 9 years ago
MerryMage 933508e2a2 interpolate: Interpolate on a frame-by-frame basis 9 years ago
Weiyi Wang 647f017c6d Merge pull request #2892 from Subv/warnings2
Warnings: Fixed a few missing-return warnings in video_core.
9 years ago
Subv f64cd87604 Services/UDS: Remove an old duplicated declaration of WifiPacket. 9 years ago
Subv d088dbfbe1 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.
9 years ago
Subv 2e9f544ecc 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. 9 years ago
Subv 54411bef4e Services/UDS: Add functions to generate 802.11 auth and assoc response frames. 9 years ago
bunnei 7698567fc9 web_backend: Fix CPR bug where Winsock is not properly initializing. 9 years ago
Subv da88f3b8f0 Warnings: Fixed a few missing-return warnings in video_core. 9 years ago
bunnei c8562b21d9 web_backend: Fix asynchronous JSON post by spawning new thread. 9 years ago
bunnei 04bd0c957e web_services: Refactor to remove dependency on Core. 9 years ago
bunnei 9f0da33c33 qt: Add an option to view/regenerate telemetry ID. 9 years ago
bunnei 5d7b364a21 default_ini: Use correct telemetry endpoint URL. 9 years ago
bunnei 2e37201c63 # 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.
9 years ago
bunnei fb17e866aa qt: Add web configuration tab. 9 years ago
bunnei 41328afb58 web_backend: User config for username and token, support anonymous post. 9 years ago
bunnei 40f417125b telemetry: Log frontend type. 9 years ago
bunnei c781aea947 settings: Add enable_telemetry, citra_username, and citra_token. 9 years ago
bunnei d6a819c7cb telemetry_session: Log telemetry ID. 9 years ago
bunnei 59ad933022 citra_qt: Show one-time callout messages to user. 9 years ago
ThaMighty90 3cdf854e44 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
9 years ago
wwylele 417cb45e3f SwRasterizer/Clipper: flip the sign convention to match PICA and OpenGL 9 years ago
wwylele addbcd5784 gl_rasterizer: implement custom clip plane 9 years ago
wwylele ea51a3af26 SwRasterizer: implement custom clip plane 9 years ago
wwylele 2617de1fe6 EmuWindow: refactor touch input into a TouchDevice 9 years ago
wwylele c84e60b470 HID: use TouchDevice for touch pad 9 years ago
James Rowe 61442d6afb 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).
9 years ago
bunnei 2bbff9fa96 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.
9 years ago
Subv f484927ed0 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. 9 years ago
Subv bca8916cea 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.
9 years ago
James Rowe a8675f4287 Merge pull request #2888 from Subv/warnings
Fixed some warnings in the core project.
9 years ago
wwylele 4d058cfb76 motion_emu: fix initialization order 9 years ago
wwylele 17c6104d2a gl_rasterizer/lighting: more accurate CP formula 9 years ago
wwylele b5aa570354 SwRasterizer/Lighting: implement LUT input CP 9 years ago