Weiyi Wang
05058863b5
cleanup includes
2019-03-26 10:50:41 -04:00
Weiyi Wang
5f11c5f733
Kernel: replace boost::intrusive_ptr with std::shared_ptr
2019-03-24 14:32:11 -04:00
Weiyi Wang
c1de8acfe5
Merge pull request #4689 from wwylele/server-leak
...
ServiceFrameworkBase: remove ownership to ServerPort
2019-03-24 14:29:41 -04:00
Weiyi Wang
21bda754b3
Merge pull request #4396 from FearlessTobi/open-delays
...
fs_user: Add a delay for each file open
2019-03-23 12:21:12 -04:00
fearlessTobi
d755a15891
fix compilation problems
2019-03-23 12:43:03 +01:00
Weiyi Wang
9b07ff9681
Merge pull request #4683 from wwylele/misc-global-clean
...
Misc global instance reference cleaup
2019-03-22 22:28:50 -04:00
Weiyi Wang
2138db3d7d
Merge pull request #4690 from wwylele/uds-deprecated
...
UDS: implement deprecated functions
2019-03-21 09:52:01 -04:00
Vamsi Krishna
aedf5a84b0
Merge pull request #4671 from jroweboy/mic4
...
Microphone support
2019-03-20 23:12:38 +05:30
James Rowe
9739e2b6fd
Support signed 8bit pcm in cubeb input. Address review
2019-03-17 22:52:03 -06:00
Lioncash
dbc3c8e9bb
core/core: Remove the global telemetry accessor function
...
With all usages converted off of it, this function can be removed.
2019-03-17 23:17:57 +01:00
Lioncash
6f251a6db2
core/core: Replace direct usage of the global system telemetry accessor from Shutdown()
...
The telemetry instance is actually a member of the class itself, so we
can access it directly instead of going through the global accessor.
2019-03-17 23:17:57 +01:00
Weiyi Wang
29c3d72940
Merge pull request #4678 from wwylele/mii-archive
...
archive_ncch: add open source mii archive
2019-03-17 15:54:28 -04:00
Weiyi Wang
4696b13170
UDS: I was drunk
2019-03-15 00:35:39 -04:00
Weiyi Wang
a986e35795
UDS: Change reply command ID for two versions of ConnectToNetwork
2019-03-14 10:10:18 -04:00
Weiyi Wang
9c016ff3a3
Y2R: pass in MemorySystem from service
2019-03-13 10:23:58 -04:00
Weiyi Wang
d6f3ac1f4e
IR: pass in Core::Timing for ExtraHID
2019-03-13 10:23:58 -04:00
Weiyi Wang
ea496507d5
DSP_DSP: use member system instead of global instance
2019-03-13 10:23:58 -04:00
Weiyi Wang
aaa599a849
UDS: duplicate DecryptBeaconData implementation for deprecated version
...
They are really identical in the NWM module code
2019-03-13 00:21:10 -04:00
Weiyi Wang
16fb6a2c8d
UDS: implement ConnectToNetworkDeprecated and forward params to ConnectToNetwork
2019-03-13 00:03:51 -04:00
Weiyi Wang
fc0fe5c3c0
UDS: devide IPC and impl for ConnectToNetwork
2019-03-13 00:03:51 -04:00
Weiyi Wang
e121c59583
UDS: implement BeginHostingNetworkDeprecated and forward params to BeginHostingNetwork
2019-03-13 00:03:51 -04:00
Weiyi Wang
5353d539ce
UDS: divide IPC and impl for BeginHostingNetwork
2019-03-12 23:00:18 -04:00
Weiyi Wang
1076864935
UDS: implement InitializeDeprecated and forward params to Initialize
2019-03-12 21:53:07 -04:00
Weiyi Wang
021c77bc9f
UDS: divide IPC and impl for InitializeWithVersion
2019-03-12 21:50:14 -04:00
Weiyi Wang
8750b81ce0
ServiceFrameworkBase: remove ownership to ServerPort
...
This causes a reference cycle because ServerPort also holds a shared pointer to SessionRequestHandler (inherited by ServiceFrameworkBase). Given that the member port is never used in ServiceFrameworkBase, we can simply remove it. The port object is kept alive by ServiceManager|KernelSystem::named_ports -> ClientPort -> ServerPort
2019-03-12 19:11:50 -04:00
Weiyi Wang
54d2f16c22
core: reset kernel after service manager in Shutdown
...
Services can hold kernel objects and do cleanup upon destruction, so we need to keep the kernel alive longer. The new order approximnately resembles the reverse construction order. I will revisit the ordering issue and make it less error-prone after global state cleanup
2019-03-12 19:06:20 -04:00
fearlessTobi
ff3d7532c9
nfc: Improve implementation of GetAmiiboConfig
...
When making the initial implementation, I forgot to add the series variable to the AmiiboConfig struct.
With this PR it is added and many of the AmiiboConfig fields get their proper values now.
The loading of the Amiibo data that is added here has been hwtested.
This fixes Amiibos in Yoshis Woolly World, Smash (partially) and probably other games too.
2019-03-12 19:08:01 +01:00
Weiyi Wang
6ce58248b0
APT: use member system instead of global instance
2019-03-10 11:10:24 -04:00
Weiyi Wang
36ae10f555
archive_ncch: add open source mii archive
2019-03-09 08:19:32 -05:00
Dimitri A
acaca4188e
gdbstub: Fix some bugs in IsMemoryBreak() and ServeBreak. Add workaround to let watchpoints break into GDB. ( #4651 )
...
* gdbstub: fix IsMemoryBreak() returning false while connected to client
As a result, the only existing codepath for a memory watchpoint hit to break into GDB (InterpeterMainLoop, GDB_BP_CHECK, ARMul_State::RecordBreak) is finally taken,
which exposes incorrect logic* in both RecordBreak and ServeBreak.
* a blank BreakpointAddress structure is passed, which sets r15 (PC) to NULL
* gdbstub: DynCom: default-initialize two members/vars used in conditionals
* gdbstub: DynCom: don't record memory watchpoint hits via RecordBreak()
For now, instead check for GDBStub::IsMemoryBreak() in InterpreterMainLoop and ServeBreak.
Fixes PC being set to a stale/unhit breakpoint address (often zero) when a memory watchpoint (rwatch, watch, awatch) is handled in ServeBreak() and generates a GDB trap.
Reasons for removing a call to RecordBreak() for memory watchpoints:
* The``breakpoint_data`` we pass is typed Execute or None. It describes the predicted next code breakpoint hit relative to PC;
* GDBStub::IsMemoryBreak() returns true if a recent Read/Write operation hit a watchpoint. It doesn't specify which in return, nor does it trace it anywhere. Thus, the only data we could give RecordBreak() is a placeholder BreakpointAddress at offset NULL and type Access. I found the idea silly, compared to simply relying on GDBStub::IsMemoryBreak().
There is currently no measure in the code that remembers the addresses (and types) of any watchpoints that were hit by an instruction, in order to send them to GDB as "extended stop information."
I'm considering an implementation for this.
* gdbstub: Change an ASSERT to DEBUG_ASSERT
I have never seen the (Reg[15] == last_bkpt.address) assert fail in practice, even after several weeks of (locally) developping various branches around GDB. Only leave it inside Debug builds.
2019-03-08 00:09:06 -05:00
bunnei
9560060f04
Merge pull request #4666 from FearlessTobi/port-2167
...
Port yuzu-emu/yuzu#2167 : "common: Move Quaternion, Rectangle, Vec2, Vec3, and Vec4 into the Common namespace"
2019-03-07 23:52:42 -05:00
James Rowe
f5df13eb24
Remove global state and add mic hot swapping
2019-03-06 20:59:58 -07:00
James Rowe
182d672c15
Add ifdef around cubeb for android. Address a few review comments
2019-03-06 20:03:22 -07:00
James Rowe
5f532c2560
Address review comments
2019-03-06 11:16:43 -07:00
fearlessTobi
2999c8325e
archive_extsavedata: add correct FileOpen delays
2019-03-06 18:53:44 +01:00
fearlessTobi
5055a6c262
Address review comments
2019-03-06 18:53:34 +01:00
James Rowe
5954dc11ba
Merge pull request #4669 from wwylele/rpc-server-freeze
...
rpc: send ending packet in Server instead of UDPServer
2019-03-06 09:11:04 -07:00
fearlessTobi
fc7e6c9cc9
fs_user: Add a delay for each file open
2019-03-06 16:09:24 +01:00
Weiyi Wang
d0de727a97
Merge pull request #4668 from wwylele/swkbd-size
...
applet/swkbd: use UTF-16 string to test string size
2019-03-05 12:23:54 -05:00
Pengfei Zhu
3ea30fe2b3
Merge pull request #4610 from zhaowenlan1779/cheats-ui
...
Implement UI for adding/editing/deleting cheats
2019-03-05 22:07:40 +08:00
James Rowe
c669aa8d55
Rest of the owl
2019-03-04 23:07:05 -07:00
James Rowe
7fccc995ce
Initial Mic setup
2019-03-04 23:06:42 -07:00
Weiyi Wang
b3261472fe
Merge pull request #4665 from FearlessTobi/port-yuzu-stuffz
...
Port various minor PRs from yuzu
2019-03-04 12:36:10 -05:00
Weiyi Wang
9c57b74907
Merge pull request #4618 from wwylele/fs-clean
...
FS: pass down program ID for archive operation (cleanup System::GetInstance part 3)
2019-03-04 12:34:54 -05:00
Weiyi Wang
870579d38f
rpc: send ending packet in Server instead of UDPServer
...
udp_server might not be created due to error (occupied port etc.), in which case its destructor and thread-ending call chain will not be excuted in Server::Stop. However, the ending packet still need to be send no matter udp is on or not, so move it to Server::Stop
2019-03-04 11:05:07 -05:00
Weiyi Wang
47ed3f4db5
applet/swkbd: use UTF-16 string to test string size
...
Also removed a TODO as it is verified that max_text_length is inclusive (allows size = max_text_length)
2019-03-04 10:33:23 -05:00
Lioncash
e1a4912ade
common/math_util: Move contents into the Common namespace
...
These types are within the common library, so they should be within the
Common namespace.
2019-03-02 18:13:10 +01:00
Lioncash
643472e24a
common/vector_math: Move Vec[x] types into the Common namespace
...
These types are within the common library, so they should be using the
Common namespace.
2019-03-02 15:04:13 +01:00
Lioncash
f322c51a63
core/frontend/emu_window: Make ClipToTouchScreen a const member function
...
This member function doesn't modify instance state, so it can have the
const specifier applied to it.
2019-03-02 14:06:09 +01:00
Weiyi Wang
ad1cfc8d50
Merge pull request #4608 from wwylele/sharedmem-circular
...
Kernel/SharedMemory: make owner_process a raw pointer
2019-02-25 10:32:45 -05:00
Weiyi Wang
93275d752b
Merge pull request #4645 from FearlessTobi/port-2116
...
Port yuzu-emu/yuzu#2116 : "threadsafe_queue: Remove NeedSize template parameter"
2019-02-25 10:25:11 -05:00
Weiyi Wang
206413ba7b
Merge pull request #4630 from wwylele/memory-no-lock
...
Memory: don't lock hle mutex in memory read/write
2019-02-25 10:23:23 -05:00
Weiyi Wang
5f10cc412f
Merge pull request #4632 from zhaowenlan1779/socu
...
service/soc_u: Implement getaddrinfo and getnameinfo
2019-02-25 10:23:13 -05:00
Weiyi Wang
42c777b0e5
Merge pull request #4617 from wwylele/hle-service-clean
...
HLE/IPC: clean up System::GetInstance
2019-02-25 10:22:13 -05:00
Weiyi Wang
c265f3f507
Merge pull request #4616 from wwylele/core-global-clean
...
Cleanup System::GetInstance reference - Part 1
2019-02-25 10:22:02 -05:00
Weiyi Wang
5f80075c31
Merge pull request #4596 from CarlKenner/master
...
Fix mouse touchscreen in SBS 3D mode
2019-02-22 16:24:22 -05:00
Weiyi Wang
8f2bd97277
Merge pull request #4655 from tgsm/gcc-version
...
Remove GCC version checks
2019-02-22 16:21:21 -05:00
tgsm
433ab35e7e
Remove GCC version checks
...
Citra can't be compiled using GCC <7 because of required C++17 support, so these version checks don't need to exist anymore.
2019-02-19 16:39:34 -05:00
tgsm
39e163b7ce
core: use nested namespaces
2019-02-18 20:34:18 -05:00
Weiyi Wang
f409342ab5
Merge pull request #4613 from BreadFish64/gles5
...
video_core: add GLES support
2019-02-17 15:44:39 -05:00
Lioncash
3bc78e577f
threadsafe_queue: Remove NeedSize template parameter
...
The necessity of this parameter is dubious at best, and in 2019 probably
offers completely negligible savings as opposed to just leaving this
enabled. This removes it and simplifies the overall interface.
2019-02-15 22:00:44 +01:00
Weiyi Wang
e6feef96c1
Service: clear IPC header for unimplemented function stub
2019-02-14 22:16:50 -05:00
Weiyi Wang
3f86be88f0
HLE/IPC: pass in kernel & memory reference from parent to avoid global state reference
2019-02-14 22:09:25 -05:00
Weiyi Wang
0a424b86d2
ServerSession: replace GetPointer with block copy for HLE translation
...
Do it in the same way as HLERequestContext::SleepClientThread callback and avoid unsafe GetPointer
2019-02-14 22:09:25 -05:00
Weiyi Wang
36c8e1d7a9
HLE/IPC: move command buffer translation into kernel as TODO says
2019-02-14 22:09:25 -05:00
Weiyi Wang
64f6e5e597
ARM: pass MemorySystem separately in the constructor and make System optional
...
So that unit test can test CPU without constructing the entire system. Also remove hacks in the System class
2019-02-14 14:04:46 -05:00
Weiyi Wang
9573ee46bd
Memory: replace Core::CPU
2019-02-14 14:04:46 -05:00
Weiyi Wang
5f6d9f1915
Kernel/IPC: use MemorySystem from parameter
2019-02-14 14:04:46 -05:00
Weiyi Wang
20f47583f6
Kernel: replace usage of Core::System::GetInstance().PrepareReschedule() with callback
2019-02-14 14:04:46 -05:00
Weiyi Wang
eb050b8403
Kernel: replace usage of Core::System::GetInstance()::Timing()
2019-02-14 14:04:46 -05:00
Weiyi Wang
276ca88c9e
kernel/thread: replace usage of Core::CPU()
2019-02-14 14:04:46 -05:00
Weiyi Wang
b9f6bd9278
ldr_ro: replace usage of Core::CPU()
2019-02-14 14:04:46 -05:00
Weiyi Wang
8f2c35d7b6
Merge pull request #4614 from wwylele/nwm-uds-global
...
NWM_UDS: move states into the class
2019-02-14 11:44:28 -05:00
zhupengfei
1995e8ff32
service/soc_u: address review comments
2019-02-10 18:49:18 +08:00
zhupengfei
08bf899d70
service/soc_u: Implement getaddrinfo and getnameinfo
2019-02-09 20:12:09 +08:00
Weiyi Wang
687fa0134d
Merge pull request #4609 from wwylele/nuke-zmq
...
Reimplement scripting over plain UDP
2019-02-08 18:38:21 -05:00
Weiyi Wang
7074dab2da
Memory: don't lock hle mutex in memory read/write
...
The comment already invalidates itself: neither MMIO nor rasterizer cache belongsHLE kernel state. This mutex has a too large scope if MMIO or cache is included, which is prone to dead lock when multiple thread acquires these resource at the same time. If necessary, each MMIO component or rasterizer should have their own lock.
2019-02-08 10:43:06 -05:00
BreadFish64
cd21abe50f
sdl: add GLES support
2019-02-03 15:58:09 -06:00
Weiyi Wang
a6d9baa05a
FS: pass down program ID for archive operation
...
To eliminate System::GetInstance usage. Archive type like SelfNCCH and SaveData changes the actual reference path for different client, so archive backend interface should accept client information from the service interface. Currently we only pass the program ID as the client information.
2019-02-02 20:44:13 -05:00
Weiyi Wang
008197a569
Remove scripting switch in cmake
2019-02-02 15:25:23 -05:00
Weiyi Wang
6347b5cbb4
Remove libzmq submodule
2019-02-02 15:25:23 -05:00
Weiyi Wang
d765a73a53
Scripting: reimplement protocol over plan UDP using boost::asio
2019-02-02 15:25:23 -05:00
zhupengfei
573036b38e
core/cheats: Add and change a few functions
...
Added a few interfaces for adding/deleting/replacing/saving cheats. The cheats list is guarded by a std::shared_mutex, and would only need a exclusive lock when it's being updated.
I marked the `Execute` function as `const` to avoid accidentally changing the internal state of the cheat on execution, so that execution can be considered a "read" operation which only needs a shared lock.
Whether a cheat is enabled or not is now saved by a special comment line `*citra_enabled`.
2019-02-02 08:15:23 +08:00
Weiyi Wang
ae57d72b33
Merge pull request #4603 from DimitriPilot3/gdbstub-watchpoint-fix1
...
gdbstub: only let Execute breakpoints write/restore BKPT opcodes into memory
2019-02-01 10:49:09 -05:00
Weiyi Wang
6382d9bfc3
NWM_UDS: move states into the class
2019-01-31 15:42:45 -05:00
Weiyi Wang
3a7a686fa9
Kernel/SharedMemory: make owner_process a raw pointer
...
To break a circular reference formed by process->handle_table->shared_memory->process. Since SharedMemory uses its owner process in the destructor, which is not kept alive by SharedMemory any more, we need to make sure that the lifetime of process is longer than the shared memory. To partially resolve this, Process now explicitly releases shared memory first in its destructor. This is with the assumtion that there is no inter-process reference to shared memory on exit, which is not true when we introduce more multi-process emulation. A TODO is left there for this, as more RE needs to be done on how 3DS handles this situation
2019-01-29 11:18:51 -05:00
Weiyi Wang
104829ae58
remove all occurance of specifying endianness inside BitField
...
This commit it automatically generated by command in zsh:
sed -i -- 's/BitField<\(.*\)_le>/BitField<\1>/g' **/*(D.)
BitField is now aware to endianness and default to little endian. It expects a value representation type without storage specification for its template parameter.
2019-01-28 22:09:43 -05:00
Carl Kenner
602334cb1e
Fix mouse touchscreen in SBS 3D mode.
...
You can now click or drag on either eye's touchscreen.
2019-01-27 16:25:42 +10:30
Dimitri ALBORA
d388fe58f7
gdbstub: only let Execute breakpoints write/restore BKPT opcodes into target memory
2019-01-26 22:08:39 +01:00
Weiyi Wang
054a97c08b
Merge pull request #4579 from xperia64/3d_slider
...
Change 3D Slider in-game
2019-01-23 20:23:55 -05:00
Lioncash
306ce6416a
vfp_helper: Remove accidental use of the comma operator in vfp_single_unpack()
...
Makes the line of code slightly easier to read properly.
2019-01-22 18:30:34 -05:00
fearlessTobi
1302c9c1e7
frontend: Remove V-Sync option from UI
...
The V-Sync option is fundamentally broken in Citra, so let's do the same as yuzu and remove it entirely for SDL2 and at least from the frontend for QT.
(It was also only used by 7.3% of users)
2019-01-19 17:43:44 +01:00
xperia64
c1ac39f058
Actually fix the race condition
2019-01-18 16:32:16 -05:00
xperia64
5f5646c850
Fix types
2019-01-18 15:24:39 -05:00
xperia64
6f2eb2a418
Do 3D slider updating in the HID module
2019-01-17 23:48:50 -05:00
xperia64
81f4cef201
Revert "Change 3D slider in-game"
...
This reverts commit bb9a972e35
.
Needs to be completely redone in the HID HLE service module.
2019-01-17 23:33:24 -05:00
Weiyi Wang
95a57a2fe3
Merge pull request #4538 from valentinvanelslande/profiles
...
Add multiple input profile support
2019-01-17 22:32:24 -05:00
xperia64
bb9a972e35
Change 3D slider in-game
2019-01-17 22:18:15 -05:00
Ben
4f23d5d69e
Merge pull request #4490 from wwylele/teakra-new
...
audio: implement DSP LLE
2019-01-11 16:45:00 +01:00
Valentin Vanelslande
62b40e9155
Merge branch 'master' into profiles
2019-01-07 10:39:44 -05:00
RicBent
707bc48440
Added new buttons to movie system
2018-12-29 08:19:59 -06:00
Valentin Vanelslande
5a14af5f38
address some comments
2018-12-29 08:27:06 -05:00
Mat M
ec7a3fb72c
Update src/core/settings.h
...
Co-Authored-By: valentinvanelslande <valentinvanelslandeacnl@gmail.com>
2018-12-28 23:33:40 -05:00
Valentin Vanelslande
8e614c3eb0
clang-format; address one comment
2018-12-28 23:31:55 -05:00
Valentin Vanelslande
39140bbff8
another fix
2018-12-28 21:24:01 -05:00
Valentin Vanelslande
16ebb38b4a
more fixes
2018-12-28 21:23:43 -05:00
Valentin Vanelslande
bf93b94658
fixes
2018-12-28 21:13:57 -05:00
Mat M
90965525ac
Apply suggestions from code review
...
Co-Authored-By: valentinvanelslande <valentinvanelslandeacnl@gmail.com>
2018-12-28 21:00:09 -05:00
Valentin Vanelslande
7c95032e3a
Add multiple input profile support
...
Only supported in the Qt frontend.
2018-12-28 20:28:45 -05:00
RicBent
6ad609a539
Added GPIO14 button and UI config buttons
2018-12-28 17:13:37 -06:00
RicBent
446b614409
Removed unnecessary debug key abbreviations
2018-12-28 13:33:54 -06:00
RicBent
403d2f0058
Added Debug Button
2018-12-28 12:47:50 -06:00
Lioncash
432e847c24
core/memory: Remove unnecessary memory zeroing in MemorySystem::Impl
...
std::make_unique for arrays is equivalent to doing:
std::unique_ptr<T>(new typename std::remove_extent<T>::type[size]())
(note the ending () after the array size specifier). This means that the
default value within memory for the constructed types will be whatever
the default constructor for that type does. Given the built-in
type for std::uint8_t doesn't have a constructor, this is equivalent to
forcing zero-initialization, so the memory will already be zeroed out on
construction. Because of that, there's no need to zero it out again.
2018-12-27 00:35:53 -05:00
Weiyi Wang
443f4b964d
DSP/LLE: add multithread mode
2018-12-21 20:49:24 -05:00
Weiyi Wang
05c372bf6c
Update teakra to fix macos issue; address comment feedbacks
2018-12-21 20:49:23 -05:00
Weiyi Wang
67213ca855
audio_core/lle: link ahbm and audio callback
2018-12-21 20:49:22 -05:00
Weiyi Wang
21da135cc6
Configuration: add option to use DSP LLE
2018-12-21 20:49:22 -05:00
Weiyi Wang
92e5c51adb
Service/DSP: implement semaphore event
2018-12-21 20:49:22 -05:00
Weiyi Wang
6f6ffceec4
audio_core/hle,lle: implement UnloadComponent
2018-12-21 20:49:21 -05:00
Weiyi Wang
4add509b20
audio_core/hle: move implementation of LoadComponent
2018-12-21 20:49:21 -05:00
Weiyi Wang
df8aaee965
DSP_DSP: avoid global in ReadPipe
2018-12-21 20:49:20 -05:00
Weiyi Wang
daf23eca2e
DSP_DSP: avoid global in WriteProcessPipe
2018-12-21 20:49:20 -05:00
Weiyi Wang
c9736b3300
audio_core/hle,lle: implement SetSemaphore
2018-12-21 20:49:20 -05:00
Weiyi Wang
14eb3561de
audio_core/hle: move implementation of RecvDataIsReady
2018-12-21 20:49:19 -05:00
Weiyi Wang
7f568a3c19
DSP/HLE: move implementation of RecvData to audio_core, behind common interface
2018-12-21 20:49:19 -05:00
Pengfei Zhu
eabc9727d8
Merge pull request #4468 from citra-emu/multiplayer-v4/main
...
Multiplayer version 4
2018-12-22 09:45:28 +08:00
zhupengfei
9d062d63da
network, citra_qt: Give moderation permission to community mods
...
Based on the `roles` payload in the JWT, the rooms will now give mod permission to Citra Community Moderators. To notify the client of its permissions, a new response, IdJoinSuccessAsMod is added, and there's now a new RoomMember::State called Moderator.
2018-12-15 20:28:03 +08:00
zhupengfei
ab335ccf1b
core, web_service: Changes to announce service
...
Separated registering and updating to correspond to the new announce API endpoint. Also added a verify_UID for JWT audience verification.
2018-12-15 11:02:52 +08:00
adityaruplaha
5f0e189238
Add Support for Room Descriptions
2018-12-15 11:02:50 +08:00
zhupengfei
c396e3c6e5
network: check Console ID conflicts
...
As Console ID can be sensitive data sometimes, this implementation sent a SHA256 hash of it instead.
2018-12-15 11:02:47 +08:00
Weiyi Wang
9293760d0a
Core, test: perform kernel and memory destruction in the correct order
...
The change in test is temporary due to it accessing global state
2018-12-10 23:29:08 -05:00
Weiyi Wang
b49f2d2958
APT: enable LLE applet
2018-12-10 22:25:02 -05:00
Weiyi Wang
bf2056f12e
Memory: apply rasterizer cache mark to all page tables and the global marker
2018-12-10 22:21:03 -05:00
Weiyi Wang
88161b8ac6
Memory: register page tables into a list for rasterizer cache marking
2018-12-10 22:13:10 -05:00
Weiyi Wang
9d616e5951
Memory: mark pages on mapping if it is already rasterizer-cached
2018-12-10 22:05:28 -05:00
Weiyi Wang
643b7d4dcb
Memory: move memory setup into MemorySystem
2018-12-10 22:01:09 -05:00
Weiyi Wang
e7a3c296c3
Memory: create rasterizer cache marker
2018-12-10 21:43:39 -05:00
Lioncash
dd2cbca3f4
hle/service: Remove unnecessary using declarations
...
Only one usage of the specified objects made use of the lack of
namespacing. Given the low usage, we can just remove these.
2018-12-08 14:52:30 +01:00
Lioncash
a32725540c
hle/service, hle/sm: Use structured bindings where applicable
...
Gets rid of the need to keep the variables separate from their actual
initialization spots.
2018-12-08 14:49:53 +01:00
Lioncash
0cb7654d60
hle/service, hle/sm: Use structured bindings where applicable
...
Gets rid of the need to keep the variables separate from their actual
initialization spots.
2018-12-08 14:48:01 +01:00
bunnei
edbdbf0ba1
Merge pull request #4480 from wwylele/memory-global-2
...
Memory: eliminate global state
2018-12-06 19:17:28 -05:00
Weiyi Wang
556ac5c075
Merge pull request #4469 from shutterbug2000/httpAddSet
...
Add HTTP_C::AddPostDataAscii
2018-12-06 14:28:56 -05:00
Weiyi Wang
b9f7c9142a
Merge pull request #4476 from FearlessTobi/fix-testcase-sending
...
web_service: move telemetry condition from TelemetrySession constructor to destructor
2018-12-06 14:28:21 -05:00
Weiyi Wang
23bad5d398
fix clang-format
2018-12-06 13:30:58 -05:00
Weiyi Wang
7e8ba6ed8e
Memory: move memory chunk into pImpl and make them dynamically allocated
...
Otherwise MSVC would give out-of-memory error on compile time
2018-12-06 13:30:47 -05:00
Weiyi Wang
ac1cda21c3
Address code style comments
2018-12-05 20:24:37 -05:00
Weiyi Wang
e87dc17da2
Pass system into arm interpreter; fix tests
2018-12-05 20:21:14 -05:00
Weiyi Wang
c6b3186475
Memory: IsValidVirtualAddress can be global
2018-12-05 20:21:14 -05:00
Weiyi Wang
42edab01d9
Memory: move states into class
2018-12-05 20:21:14 -05:00
Weiyi Wang
d18cda5a5d
Memory: move MarkRegionCached into class
2018-12-05 20:21:14 -05:00
Weiyi Wang
2582d64fb3
Memory: move block operations into class
2018-12-05 20:21:14 -05:00
Weiyi Wang
323990d402
Memory: move Read/Write8/16/32/64 and ReadCString into class
2018-12-05 20:21:14 -05:00
Weiyi Wang
1ec9ed6827
LDR_RO: pass memory in CROHelper
2018-12-05 20:21:14 -05:00
Weiyi Wang
76e0a4ece7
Memory: move GetPointer into class
2018-12-05 20:21:14 -05:00
Weiyi Wang
405218c3a7
Memory: move IsValidVirtualAddress into class
2018-12-05 20:21:14 -05:00
Weiyi Wang
296c458e0e
Memory: move GetPhysicalPointer and IsValidPhysicalAddress into class
2018-12-05 20:21:14 -05:00
Weiyi Wang
cfee59c6db
hw/gpu: pass in memory reference
2018-12-05 20:16:42 -05:00
Weiyi Wang
8bb404c82a
VideoCore: pass in memory system
...
currently set as global. Will change when videocore itself is wrapped as a class
2018-12-05 20:16:42 -05:00
Weiyi Wang
8c618c3fc3
Memory: move PageTable functions into class
2018-12-05 20:16:42 -05:00
Weiyi Wang
b199b7ada9
Memory: move GetFCRAMOffset into MemorySystem
2018-12-05 20:16:42 -05:00
Weiyi Wang
8118be6615
Kernel: pass in MemorySystem
2018-12-05 20:16:42 -05:00
Weiyi Wang
6992f76acf
Memory: create MemorySystem class
2018-12-05 20:16:42 -05:00
Weiyi Wang
76944ec0e0
Merge pull request #4279 from FearlessTobi/better-mii-stub
...
applets: stub mii selector to always return a standard mii
2018-12-01 19:41:21 -05:00
fearlessTobi
630e3d6dea
web_service: move telemetry condition from TelemetrySession constructor to destructor
...
Fixes an issue where Testcases couldn't be sent when Telemetry was disabled, because both things are tied closely together in the backend.
2018-11-30 19:01:05 +01:00
zhupengfei
071b41cb61
citra_qt, video_core: Screenshot functionality
...
Allows capturing screenshot at the current internal resolution (native for software renderer), but a setting is available to capture it in other resolutions. The screenshot is saved to a single PNG in the current layout.
2018-11-30 14:14:41 +08:00
Weiyi Wang
7e90abec78
Merge pull request #4442 from wwylele/memory-no-kernel
...
Memory: decouple from Kernel
2018-11-28 11:24:41 -05:00
fearlessTobi
48239be22c
mii_selector: Use BitField where possible
2018-11-27 14:57:51 +01:00
Weiyi Wang
2678c1a945
Merge pull request #4462 from FearlessTobi/fix-my-shit
...
ir_user: Remove ArrayToString() calls
2018-11-26 14:43:07 -05:00
fearlessTobi
5121fadb4f
ir:/movie: Replace for-loops with fmt::join
2018-11-26 20:04:18 +01:00
shutterbug2000
a7bbe60c18
Put AddPostDataAscii in the function list
2018-11-25 15:47:37 -06:00
shutterbug2000
4c198591d5
Add HTTP_C::AddPostDataAscii
2018-11-25 15:29:04 -06:00
Lioncash
067f09b41d
kernel/shared_memory: std::move the string parameter in SetName()
...
This avoids a potential reallocation.
2018-11-24 10:07:11 -05:00
fearlessTobi
fe99e5a51e
mii_selector: map raw data to the MiiResult struct
2018-11-24 14:35:06 +01:00
Weiyi Wang
210e558bea
Merge pull request #4456 from FearlessTobi/port-1767
...
Port yuzu-emu/yuzu#1734 and yuzu-emu/yuzu#1767 : Minor changes to "kernel"
2018-11-24 00:04:42 -05:00
bunnei
dc16ba009e
Merge pull request #4444 from FearlessTobi/port-1684
...
Port yuzu-emu/yuzu#1684 : "common/string_util: Minor cleanup"
2018-11-23 23:13:39 -05:00
Lioncash
86c36cb176
kernel/shared_memory: Make Map() and Unmap() take the target process by reference rather than as a pointer
...
Both member functions assume the passed in target process will not be
null. Instead of making this assumption implicit, we can change the
functions to be references and enforce this at the type-system level.
2018-11-23 17:00:12 +01:00
Lioncash
0f544af89a
kernel/shared_memory: Add a const qualified member function overload for GetPointer()
...
Given this doesn't mutate instance state, we can provide a
const-qualified variant as well.
2018-11-23 16:38:18 +01:00
Lioncash
1cb9bea504
kernel/shared_memory: Make data members private
...
Rather than allow unfettered access to the class internals, we hide all
members by default and create and API that other code can operate
against.
2018-11-23 16:20:18 +01:00
Lioncash
662c3ff684
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-23 15:58:12 +01:00
Lioncash
83f6e9ea72
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-23 15:58:07 +01:00
BreadFish64
f4472a10e6
core: undef PAGE_SIZE and PAGE_MASK
...
these are defined a system header which causes complications when building for android
2018-11-20 14:24:19 -05:00
fearlessTobi
fc51a6fd08
Fix functions which used Common::ArrayToString
2018-11-20 15:05:54 +01:00
Weiyi Wang
a854b23d9b
RPC: add missing include
2018-11-19 11:16:55 -05:00
Weiyi Wang
679dfd7cdf
Memory: remove CopyBlock with current process
2018-11-19 11:16:55 -05:00
Weiyi Wang
185a83f06d
Memory: remove ZeroBlock with current process
2018-11-19 11:16:55 -05:00
Weiyi Wang
4e99641a3b
Memory: remove WriteBlock with current process
2018-11-19 11:16:55 -05:00
Weiyi Wang
8871f5a4ac
Memory: remove ReadBlock with current process
2018-11-19 11:16:55 -05:00
Weiyi Wang
524364d95a
ldr_ro: pass process reference to memory operation
...
Note that not all memory operation is fixed. Specifically, u8/u16/u32 Read/Write is still using the current page tabel
2018-11-19 11:16:55 -05:00
Weiyi Wang
d4ba87d90a
Memory: remove GetMMIOHandler with current process
2018-11-19 11:16:55 -05:00
Weiyi Wang
7308b8d294
Memory: remove IsValidVirtualAddress with current process
2018-11-19 11:16:55 -05:00
Weiyi Wang
36cf104a02
Memory: replace GetPointerFromVMA with GetPointerForRasterizerCache
...
All usage of GetPointerFromVMA is to recover the pointer that is nulled by changing page type to RasterizerCachedMemory. Our rasterizer cache only works on linear heap and vram, so we can recover the pointer directly by address computation, instead of going through VMA table. Also removed a sanity check pointer!=nullptr in RasterizerMarkRegionCached(RasterizerCachedMemory=>Memory), as now the pointer is never null. The sanity check was added in f2a5a77
(#2797 ), which was originally necessary during VMA unmapping process, because the function is invloked by VMA after unmapping the page, which in turn invokes back to query the memory, forming a circular dependency. Now the dependency is resolved so the check is not necessary
2018-11-19 11:16:55 -05:00
Weiyi Wang
2b768da531
Merge pull request #4433 from wwylele/vmmanager-simple
...
VMManager: remove shared_ptr<vector> backing type
2018-11-19 11:13:22 -05:00
Weiyi Wang
a7d6bc4e84
Merge pull request #4441 from FearlessTobi/port-1688
...
Port yuzu-emu/yuzu#1688 : "service: Mark MakeFunctionString with the [[maybe_unused]] attribute."
2018-11-19 11:10:51 -05:00
Weiyi Wang
803f783f07
Merge pull request #4427 from wwylele/query-memory-merge
...
SVC: QueryMemory merges similar VMA
2018-11-19 11:10:15 -05:00
Weiyi Wang
471b4cf44f
Merge pull request #4436 from wwylele/p2ptr-boundary
...
Memory: GetPhysicalPointer should accept right open bound address
2018-11-19 11:05:42 -05:00
Weiyi Wang
1bc253f1be
Merge pull request #4353 from zaksabeast/ips-patches
...
Add IPS patching
2018-11-18 13:39:41 -05:00
Sebastian Valle
b1fa9c0a7c
Merge pull request #4434 from wwylele/shared-memory-state
...
Kernel/SharedMemory: set and reset source memory state
2018-11-18 12:23:21 -05:00
B3N30
2f3142e192
Fix 16bit comparison operations
2018-11-18 14:37:11 +01:00
Lioncash
39fcc3a589
service: Mark MakeFunctionString with the [[maybe_unused]] attribute.
...
When yuzu is compiled in release mode this function is unused, however,
when compiled in debug mode, it's used within a LOG_TRACE statement.
This prevents erroneous compilation warnings about an unused function
(that isn't actually totally unused).
2018-11-17 16:41:10 +01:00
bunnei
7f727177bf
Merge pull request #4431 from wwylele/no-v2p
...
Memory: remove VirtualToPhysicalAddress
2018-11-16 23:28:33 -08:00
Ben
b90ff739a0
Add CheatEngine and support for Gateway cheats ( #4406 )
...
* Add CheatEngine; Add support for Gateway cheats; Add Cheat UI
* fix a potential crash on some systems
* fix substr with negative length
* Add Joker to the NonOp comp handling
* Fixup JokerOp
* minor fixup in patchop; add todo for nested loops
* Add comment for PadState member variable in HID
* fix: stol to stoul in parsing cheat file
* fix misplaced parsing of values; fix patchop code
* add missing break
* Make read_func and write_func a template parameter
2018-11-16 18:01:10 -07:00
Weiyi Wang
95bbe2302b
Kernel/IPC: fix mapped buffer target address
2018-11-16 19:47:16 -05:00
Weiyi Wang
365eeb889f
Memory: GetPhysicalPointer should accept right open bound address
...
Also removed IO region check in GetPhysicalPointer as it doesn't make sense to get a pointer to MMIO
2018-11-16 10:27:30 -05:00
Weiyi Wang
d90094e8a7
Service: release shared memory object when finalize
...
Since last commit SharedMemory only reset source memory set on dtor, service should always release the ref as soon as possible to make the reset happen
2018-11-16 00:24:13 -05:00
Weiyi Wang
cfa9a322c7
Kernel/SharedMemory: set and reset source memory state
2018-11-16 00:24:08 -05:00
Weiyi Wang
b6ab4e466b
VMManager: remove all backing block related functions
...
The shared_ptr<vector> type backing memory is unused now, and is not expected to be used in the future
2018-11-16 00:16:13 -05:00
Weiyi Wang
7f9873d7ec
VMManager: change MapMemoryBlockToBase to use raw backing memory
...
And let ServerSession.MappedBufferContext hold the mapped memory
2018-11-16 00:16:13 -05:00
Weiyi Wang
0b8d2ecabe
IPC: store mapped buffer info in session context
...
So that it doesn't have to scan over the request buffer again on reply. This also allow us to store additional info like memory mapping
2018-11-16 00:16:13 -05:00
Weiyi Wang
560df843b1
Merge pull request #4405 from wwylele/svc-global
...
SVC: new wrapper template & pass system reference across the SVC barrier
2018-11-16 00:07:50 -05:00
Weiyi Wang
a51d7430d7
Merge pull request #4408 from wwylele/ro-map
...
ldr_ro: properly map CRS/CRO buffer
2018-11-16 00:07:33 -05:00
Zak Kurka
1ded48f5a3
Merge branch 'master' of github.com:citra-emu/citra into ips-patches
2018-11-15 07:11:18 -06:00
Zak Kurka
896577044d
Remove ApplyIPS from the class and header
2018-11-15 07:11:06 -06:00
Weiyi Wang
9e8d149ca7
Memory: remove unused VirtualToPhysical
2018-11-13 11:56:05 -05:00
Weiyi Wang
1388a44c41
GSP: uses a dedicate VirtualToPhysical converter
2018-11-13 11:24:46 -05:00
Weiyi Wang
12daaeedf1
Memory: Use the fixed PAddr directly in RasterizerFlushVirtualRegion
2018-11-13 11:24:46 -05:00
Weiyi Wang
248106d972
Skyeye: unstub cp15 virtual to physical address
2018-11-13 11:24:46 -05:00
Weiyi Wang
b1f55c9cab
Merge pull request #4429 from wwylele/io-size
...
Memory: IO area is at most 4MB
2018-11-13 11:09:14 -05:00
Weiyi Wang
fe47243690
Merge pull request #4413 from wwylele/memory-global
...
Fix shared font addres; Remove global PhysicalToVirtualAddress
2018-11-13 00:14:24 -05:00
Weiyi Wang
194118011a
Memory: IO area is at most 4MB
2018-11-12 15:12:12 -05:00
Weiyi Wang
c57ee36222
SVC: hide details in pimpl
2018-11-12 13:59:34 -05:00
Weiyi Wang
aec8b1e375
SVC: use context and generic templates
2018-11-12 13:59:34 -05:00
Weiyi Wang
28513c5177
ResultCode: use default copy assignment
...
Our definition of the copy assignment is equivalent to the default one, but prevents the type being trivially copyable
2018-11-12 13:59:34 -05:00
Weiyi Wang
d373a6430d
SVC: move function_wrappers.h into kernel
...
It is only used by kernel/SVC
2018-11-12 13:59:34 -05:00
Weiyi Wang
29ade3e610
Process: check source/target overlap for Map/Unmap
2018-11-11 12:39:05 -05:00
Weiyi Wang
3db8915356
ldr_ro: properly map CRS/CRO buffer
2018-11-11 12:39:05 -05:00
Weiyi Wang
617b388354
Kernel/Process: implement prvileged Map/Unmap
...
This is used by svcControlProcessMemory and maps memory as Locked/AliasCode pair.
Also fixed a bug where map didn't apply specified permissions to the alias memory
2018-11-11 12:39:05 -05:00
Ben
f43524fff1
Merge pull request #4415 from wwylele/tls-state
...
Kernel: correct MemoryState for TLS
2018-11-11 17:53:18 +01:00
Weiyi Wang
5179915fb4
filesys/ncch: prevent buffer overflow on calculating SHA256
2018-11-10 22:58:32 -05:00
Weiyi Wang
d0edb81182
Memory: convert PAddr for N3DS FCRAM extension
2018-11-09 10:40:04 -05:00
Weiyi Wang
98ddea4ddd
Kernel: correct MemoryState for TLS
2018-11-09 00:14:13 -05:00
Weiyi Wang
5325388e24
SVC: QueryMemory merges similar VMA
2018-11-08 20:42:21 -05:00
Weiyi Wang
2654a679b3
Memory: replace PhysicalToVirtualAddress with a more dedicated function
...
There is no external use of PhysicalToVirtualAddress any more, so it there is no need to have a generic function that handles all physical regions. Also, the previous APT change makes it possible that linear heap has some regions mapped to old and new VAddr regions at the same time, so we need to check both region and mark cached for the mapped one. RasterizerMarkRegionCached would skip the unmapped one in its loop
2018-11-08 00:19:57 -05:00
Weiyi Wang
8c65433ab5
Kernel, APT: SharedFont/SharedMemoryOnSharedDevice should always use old linear heap VAddr
2018-11-08 00:19:19 -05:00
Valentin Vanelslande
0f4a6e39c9
ldr_ro: change std::tie to structured binding
2018-11-07 13:38:52 -05:00
Weiyi Wang
1444d60109
Merge pull request #4400 from wwylele/core-timing-global
...
CoreTiming: wrap into class
2018-11-06 20:04:56 -05:00
Weiyi Wang
2067946f59
Kernel: reimplement memory management on physical FCRAM ( #4392 )
...
* Kernel: reimplement memory management on physical FCRAM
* Kernel/Process: Unmap does not care the source memory permission
What game usually does is after mapping the memory, they reprotect the source memory as no permission to avoid modification there
* Kernel/SharedMemory: zero initialize new-allocated memory
* Process/Thread: zero new TLS entry
* Kernel: fix a bug where code segments memory usage are accumulated twice
It is added to both misc and heap (done inside HeapAlloc), which results a doubled number reported by svcGetProcessInfo. While we are on it, we just merge the three number misc, heap and linear heap usage together, as there is no where they are distinguished.
Question: is TLS page also added to this number?
* Kernel/SharedMemory: add more object info on mapping error
* Process: lower log level; SharedMemory: store phys offset
* VMManager: add helper function to retrieve backing block list for a range
2018-11-06 15:00:47 -05:00
Weiyi Wang
9458e4d8ec
CoreTiming: wrap into class
2018-11-04 10:26:38 -05:00
Weiyi Wang
2d9dfe5bce
Kernel: thread manager still has to be destructed first
2018-11-04 09:29:28 -05:00
Weiyi Wang
57e1f47a52
Kernel: destruct thread/timer managers after processes ( #4399 )
...
Processes can keep some Thread/Timer object alive while the manager is already destructed, resulting use-after-free in Thread::Stop and Timer::dtor. To resolve this, the manager objects should be destructed after all related object destructed.
Fixes a bug where quiting citra causes crash while the game is using a Timer.
2018-11-04 10:24:37 +01:00
Weiyi Wang
fc84091d88
Service, Kernel: move named port list to kernel
2018-11-01 12:56:40 -04:00
Weiyi Wang
ece96807c4
Kernel: move memory_regions into Kernel instance
2018-11-01 12:56:40 -04:00
Weiyi Wang
263290d48c
HLE: move SharedPage into Kernel
...
similar to config_mem, kernel is responsible for setting up this
2018-11-01 12:56:40 -04:00
Weiyi Wang
773ec47629
Kernel: make config_mem and MapSharedPages members of KernelSystem
2018-11-01 12:56:40 -04:00
Weiyi Wang
95790218f2
HLE: move config_mem to kernel
...
ConfigMem is initialized in kernel and only used by kernel. It is also likely how it works on real 3DS
2018-11-01 11:21:34 -04:00
Weiyi Wang
a753b9c6cc
Merge pull request #4228 from NarcolepticK/lle-mapped-buffer
...
LLE Mapped Buffer: Add unmapping of write buffer, zero-size, and multiple page handling
2018-10-30 19:18:11 -04:00
Weiyi Wang
445538c2cf
Merge pull request #4371 from wwylele/kernel-global-3
...
Kernel: eliminate global state for threads and timers
2018-10-30 00:36:10 -04:00
Weiyi Wang
2183d0d6be
core: use internal kernel pointer directly
2018-10-30 00:35:37 -04:00
Weiyi Wang
bd4beb6558
Merge pull request #4386 from wwylele/codeset-class
...
Kernel/CodeSet: change struct to class
2018-10-30 00:30:50 -04:00
NarcolepticK
c97146226a
LLE Mapped Buffer: Addressed comments.
2018-10-29 18:35:34 -04:00
Weiyi Wang
f63098ccdf
Kernel/CodeSet: change struct to class
...
Fix a warning where class definition and forward declaration mismatch. CodeSet is a kernel object and have ctor/dtor/private members like others, so in convention it should be a class
2018-10-28 10:35:40 -04:00
Weiyi Wang
67888f92e5
Merge pull request #4348 from B3n30/native_firm_keys
...
Load keys from save mode native firm
2018-10-28 10:24:29 -04:00
fearlessTobi
6e6c437a52
applets: stub mii selector to always return a standard mii
...
To obtain the data, the LLEd mii selector of system version 11.8.0 was used.
In AppletManager::GlanceParameter, the following code was added to write the returned buffer data to a file:
if (parameter.buffer.size() == 132) {
std::u16string name(10, '\0');
std::memcpy(name.data(), parameter.buffer.data() + 0x26, 10 * sizeof(u16));
name = std::u16string(name.data());
FileUtil::IOFile file{fmt::format("{}.mii", Common::UTF16ToUTF8(name)), "wb"};
file.WriteBytes(parameter.buffer.data(), parameter.buffer.size());
}
Then "xxd -i" was used on the file to convert it to a hex array.
2018-10-27 12:23:24 +02:00
fearlessTobi
b7117bf050
compatdb: Use a seperate endpoint for testcase submission
2018-10-27 12:20:03 +02:00
Weiyi Wang
5b7d21c3cd
FileSys/DelayGenerator: add missing #include and virtual dtor ( #4363 )
...
* FileSys/DelayGenerator: add missing #include and virtual dtor
Added the needed include so that it won't cause error if another file includes this without including the depended files
Deleting a virtual class via base type without virtual dtor is UB, which happens inFileBackend.
* FileSys/DelayGenerator: move function definition into cpp file/n/nTo avoid generating vtable in all units that includes the header file
* filesys/delay_generator: rearrange #include
2018-10-27 12:46:03 +08:00
Weiyi Wang
59cb0ec570
Merge pull request #4359 from FearlessTobi/port-webstuff
...
web_service: Port yuzu-emu/yuzu#1465 and Port yuzu-emu/yuzu#1473 (Many self-contained changes)
2018-10-26 22:34:51 -04:00
Weiyi Wang
e5b93741d3
kernel/timer: add TimerManager for timer system states
2018-10-26 16:07:45 -04:00
Weiyi Wang
20ae37ba4f
kernel/Thread: move thread list into the manager
2018-10-26 16:07:45 -04:00
Weiyi Wang
7fc61920cc
kernel/Thread: move thread wake up table and callback handle into the manager
2018-10-26 16:07:45 -04:00
Weiyi Wang
0478bc3dee
Kernel/Thread: move thread queue, current thread, and scheduling related function into the manager
...
As we touched it, remove IPC::GetCommandBuffer
2018-10-26 16:07:11 -04:00
Weiyi Wang
876729ab52
kernel/thread: move next_thread_id into manager
2018-10-26 16:07:11 -04:00
Weiyi Wang
34f1fe088c
kernel/thread: add ThreadManager
2018-10-26 16:07:11 -04:00
Weiyi Wang
f3ee5feb02
Merge pull request #4358 from wwylele/kernel-global-2
...
kernel: Eliminate global state in process and handle_table
2018-10-26 15:51:36 -04:00
Weiyi Wang
8ad6cbfde2
kernel/thread: change owner_process parameter to reference
...
To enforce a valid process object
2018-10-26 09:37:46 -04:00
Weiyi Wang
fa0e82b812
SeedDB: replace seek(tell, set) with seek(cur) ( #4344 )
2018-10-25 21:39:26 -04:00
Weiyi Wang
e5c5d1ecce
Kernel: change owner_process in Thread/SharedMemory to raw pointer
...
Otherwise circular ownership would form in Process->handle_table->thread->owner_process
2018-10-25 19:54:06 -04:00
Tobias
dec3fb2dcf
nfc: Add Amiibo support (REOPENED) ( #4337 )
...
* Initial implementation
* Various fixes and new features
* Address some review comments
* Fixes
* Address more comments
* Use g_hle_lock
* Add more state checking, remove unneeded include
* Minor changes
2018-10-24 21:01:38 -04:00
Weiyi Wang
8d32843d68
thread/kernel: remove unused callback_id
...
we use the thread id for the same purpose now
2018-10-23 10:06:32 -04:00
Lioncash
6fb6737642
core/CMakeLists: Make all web_service-related libraries private
...
Now that all external dependencies are hidden, we can remove
json-headers from the publically linked libraries, as the use of this
library is now completely hidden from external users of the web_service
library. We can also make the web_services library private as well,
considering it's not a requirement. If a library needs to link in
web_service, it should be done explicitly -- not via indirect linking.
2018-10-23 15:43:40 +02:00
Lioncash
7142d3cf78
telemetry_session: Remove doxygen comment for a non-existent parameter
...
There's no "func" parameter, so this can just be removed.
2018-10-23 15:30:07 +02:00
Lioncash
61627c2042
telemetry_session: Add missing includes
...
Prevents potential compilation issues in the future by including missing
headers for certain functions and types.
2018-10-23 15:28:50 +02:00
Lioncash
d5bb2a21aa
telemetry_session: Remove unimplemented FinalizeAsyncJob prototype
...
This isn't implemented anywhere, so it can just be removed.
2018-10-23 15:27:05 +02:00
Weiyi Wang
eb285c33fd
kernel: make handle table per-process
2018-10-22 21:32:34 -04:00
Weiyi Wang
fda2a5cf54
kernel/thread: use std::unordered_map for callback record
2018-10-22 21:32:34 -04:00
Weiyi Wang
5b45a3e1b5
Kernel/Timer: use unordered_map for callback recording
2018-10-22 21:32:34 -04:00
Weiyi Wang
8fb3d8ff38
kernel/process: move current process to kernel instance
...
Two functional change:
QueryProcessMemory uses the process passed from handle instead current_process
Thread::Stop() uses TLS from owner_process instead of current_process
2018-10-22 21:32:34 -04:00
Weiyi Wang
d9342622b0
kennel/process: move process list to kernel instance
2018-10-22 21:32:34 -04:00
Weiyi Wang
4238754d8c
kernel/process: move next_process_id to kernel instance
2018-10-22 09:30:48 -04:00
Lioncash
930abb4b5e
svc: Correct vma_map boundary check within QueryProcessMemory
...
This should be using the process instance retrieved within the function,
and not g_current_process, otherwise this is potentially comparing
iterators from unrelated vma_map instances (which is undefined
behavior).
2018-10-21 22:00:12 -04:00
Weiyi Wang
6f1759c5bd
Merge pull request #4341 from wwylele/kernel-global
...
Kernel: make a kernel instance and remove object ID counter from global state
2018-10-21 18:53:36 -04:00
Zak Kurka
92f8b71137
Make ApplyIPS static and private
2018-10-21 10:42:23 -05:00
Zak Kurka
05c1816504
Stay in bounds
2018-10-21 07:48:54 -05:00
Zak Kurka
1c62bc06cf
Add rle record support
2018-10-21 07:48:29 -05:00
Zak Kurka
d8284dfacc
Log invalid IPS attempt
2018-10-21 07:47:27 -05:00
Zak Kurka
d0b54e9939
Check for EOF
2018-10-20 23:25:16 -05:00
Zak Kurka
2778801dc5
Updated based on review
2018-10-20 19:45:16 -05:00
Zak Kurka
2a5b56bb1d
Be more intentional with check
2018-10-20 18:17:54 -05:00
Zak Kurka
261dc33507
Merge branch 'master' of github.com:citra-emu/citra into ips-patches
2018-10-20 18:11:38 -05:00
Zak Kurka
bf50bb06f1
Minor style changes and use memcpy
2018-10-20 18:10:32 -05:00
Weiyi Wang
11729eafe1
Merge pull request #4315 from FearlessTobi/port-1332
...
WebService: Backport review comments from yuzu-emu/yuzu#1332
2018-10-20 18:05:06 -04:00
Zak Kurka
2496ecbaf6
Added IPS patching
2018-10-20 13:09:05 -05:00
Weiyi Wang
65ec8de31e
web_service: hide dependencies to private
2018-10-20 10:47:17 -04:00
fearlessTobi
9901b289b6
Review comments -part 4
2018-10-20 10:35:55 -04:00
fearlessTobi
b0aed19823
Address a bunch of review comments
2018-10-20 10:35:55 -04:00
Weiyi Wang
18caa787d2
Merge pull request #4197 from B3n30/spsc_queue_wait
...
threadsafe_queue: Add PopWait and use it where possible
2018-10-19 19:36:37 -04:00
Weiyi Wang
751ebe55e9
Kernel: pass ref down to Object and wrap ID counter into kernel state
2018-10-18 21:41:36 -04:00
Weiyi Wang
87426b29ff
kernel: pass ref to shared memory
2018-10-18 21:41:36 -04:00
Weiyi Wang
2a411bb501
Kernel: wrap resource limit state into kernel state; pass ref to resource limit
2018-10-18 21:41:36 -04:00
Weiyi Wang
13c26b4371
Kernel: pass ref to session pair
2018-10-18 21:41:36 -04:00
Weiyi Wang
1213a298df
Kernel: pass ref to port
2018-10-18 21:41:36 -04:00
Weiyi Wang
c141657d83
Kernel: pass ref to timer
2018-10-18 21:41:36 -04:00
Weiyi Wang
247249d5d3
Kernel: pass ref to sempahore
2018-10-18 21:41:36 -04:00
Weiyi Wang
181646679c
ServiceManager: pass down core reference
2018-10-18 21:41:36 -04:00
Weiyi Wang
d940293d32
Kernel: pass ref to thread
2018-10-18 21:41:36 -04:00
Weiyi Wang
9565091fc2
kernel: pass ref in Process
2018-10-18 21:41:36 -04:00
Weiyi Wang
213b259cf1
kernel: pass ref in CodeSet
2018-10-18 21:41:36 -04:00
Weiyi Wang
7449ba85a6
Kernel: pass ref in Mutex
2018-10-18 21:41:36 -04:00
Weiyi Wang
eec11a94cb
Kernel: pass Kernel ref in Event
2018-10-18 21:41:36 -04:00
Weiyi Wang
734be98966
Kernel: pass Kernel reference into AddressArbiter
2018-10-18 21:41:00 -04:00
Weiyi Wang
f446fd1fe5
Kernel: add KernelSystem class
2018-10-18 21:41:00 -04:00
Weiyi Wang
1de63f9b16
Merge pull request #4328 from B3n30/remove_current_module
...
remove GetCurrentModule() functions in HLE Services
2018-10-18 21:39:24 -04:00
Weiyi Wang
ad232efbf0
apply fixes
2018-10-17 18:35:16 +02:00
B3n30
be3bd18c42
Load keys from new3DS native firm
2018-10-17 17:44:54 +02:00
B3n30
15c9db0883
Load keys from the o3DS save mode native firm
2018-10-17 17:44:52 +02:00
B3n30
1849e8b09c
HW::AES: add generator_constant
2018-10-17 16:07:11 +02:00
Ben
f48157c6ea
Load AES keys stored in boot9.bin ( #4335 )
...
* Load AES keys stored in boot9.bin
2018-10-17 10:13:55 +02:00
Ben
b01b94d843
FileSys::Ticket::Load: Return error if signature type does not match ( #4339 )
...
* FileSys::Ticket::Load: Return error if signature type does not match
* fixup! FileSys::Ticket::Load: Return error if signature type does not match
2018-10-15 11:26:35 -04:00
Pengfei Zhu
0df32275a7
Merge pull request #4282 from zhaowenlan1779/frame-advance
...
core, citra_qt: add frame advancing to framelimiter
2018-10-15 21:25:41 +08:00
B3n30
eb3af0f16a
Add GetModule() helper functions, for HID, CAM, and CFG
2018-10-12 11:50:50 +02:00
B3n30
1b1de23a98
Fixup: Remove unneeded GetUsername
2018-10-11 20:05:45 +02:00
B3n30
9d53136f20
remove GetCurrentModule() functions in HLE Services
2018-10-11 19:23:14 +02:00
Weiyi Wang
0962ab8da9
Merge pull request #4305 from wwylele/fs-global
...
FS/archive: wrap states into ArchiveManager class
2018-10-11 13:04:02 -04:00
Weiyi Wang
9adc407112
Merge pull request #4304 from B3n30/std_optional
...
Replace boost::optional with std::optional where possible
2018-10-11 12:40:00 -04:00
B3n30
e267377111
More fixes
2018-10-09 10:26:44 +02:00
B3n30
ad8b9c0429
Adressed review comments
2018-10-08 23:28:54 +02:00
Sebastian Valle
f405134913
Merge pull request #4306 from Subv/apt_jump
...
Services/APT: Better implementation of PrepareToDoApplicationJump and DoApplicationJump.
2018-10-08 15:44:38 -05:00
Ben
d99b1f581f
NWM_UDS: Signal bind_node_event in Unbind ( #4321 )
2018-10-08 15:44:14 -05:00
Weiyi Wang
756a3d404a
Merge pull request #4283 from valentinvanelslande/seed-db
...
Implement SeedDB & Seed Crypto
2018-10-08 14:18:42 -04:00
Weiyi Wang
0b7b9a51d6
Merge pull request #4299 from B3n30/uds
...
NWM_UDS: Fix some issues, cleanups, better PacketHandling
2018-10-07 13:56:59 -04:00
Subv
8ec2a9817c
Services/APT: Better implementation of PrepareToDoApplicationJump and DoApplicationJump.
...
The real console can't launch an Application directly from within another Application so it has to go through the Home Menu. We do not have such limitation and can directly launch the requested title.
2018-10-06 17:08:24 -05:00
Valentin Vanelslande
7b6c5cd988
fix reply header
2018-10-06 16:59:57 -05:00
Weiyi Wang
389d3d630e
fs/archive: wrap states into archive manager
2018-10-06 01:23:03 -04:00
Weiyi Wang
7678327bf2
fs/archive: move file and directory classes to their own files
2018-10-06 01:23:03 -04:00
Valentin Vanelslande
dcd6e7f99f
movie: fix some checks
...
Fixes invalid movie error
2018-10-05 17:20:14 -05:00
Weiyi Wang
b163502744
Core: pass down Core::System reference to all services ( #4272 )
...
* Core: pass down Core::System reference to all services
This has to be done at once due to unified interface used by HLE/LLE switcher
* apt: eliminate Core::System::GetInstance
* gpu_gsp: eliminate Core::System::GetInstance in service
* hid: eliminate Core::System::GetInstance
* nwm: eliminate Core::System::GetInstance
* err_f: eliminate Core::System::GetInstance
2018-10-05 10:59:43 -04:00
B3n30
2306af3600
Handle cases when std::optional does not contain a value
2018-10-05 16:51:33 +02:00
Pengfei Zhu
2a90426cb8
Merge pull request #4267 from zhaowenlan1779/movie
...
movie: Add clock init time to CTM header
2018-10-05 08:20:33 -05:00
B3n30
d37a2270d6
Replace boost::optional with std::optional where possible
2018-10-05 13:51:09 +02:00
B3n30
7efe60ed23
Use SPSCQueue::PopWait in Scripting
2018-10-05 11:25:23 +02:00
Pengfei Zhu
87e16c80ac
Merge pull request #4229 from zhaowenlan1779/open-folder
...
citra_qt, core: game list "Open XXX Location" improvements
2018-10-05 00:46:43 -05:00
Weiyi Wang
eb494c574d
Merge pull request #4244 from wwylele/swap-enum
...
common/swap: add swap template for enum
2018-10-04 14:51:49 -04:00
B3n30
458346d1e8
Adressed feedback
2018-10-04 12:34:51 +02:00
B3n30
38f136048e
Cleanup NWM_UDS::SendTo
2018-10-04 00:00:49 +02:00
Weiyi Wang
ea53b0f795
Merge pull request #4298 from Subv/am_titles
...
Services/AM: Implemented BeginImportProgramTemporarily, EndImportProgramWithoutCommit and CommitImportPrograms.
2018-10-03 17:41:40 -04:00
B3n30
7e7f17c78d
Add filter to PacketHandling; Fix some issues with Disconnect
2018-10-03 23:07:31 +02:00
Weiyi Wang
cfa52e2b7b
Merge pull request #4296 from B3n30/service_getter
...
Give frontend access to the hle service interfaces
2018-10-03 15:58:27 -04:00
Subv
0f6f7cfd95
Services/AM: Implemented BeginImportProgramTemporarily, EndImportProgramWithoutCommit and CommitImportPrograms.
...
These functions are pretty much identical to BeginImportProgram and EndImportProgram.
We don't need to do anything special in EndImportProgramWithoutCommit and CommitImportPrograms because we don't need to implement the two-phase title installation that the 3DS uses to prevent corruption of the title.db.
2018-10-03 14:48:39 -05:00
B3n30
544eb25c99
fixup! Give frontend access to the hle service interfaces
2018-10-03 20:08:01 +02:00
B3n30
d3694a930e
Give frontend access to the hle service interfaces
2018-10-03 19:44:23 +02:00
Sebastian Valle
3790ccc7b2
Merge pull request #4287 from Subv/am_subfile
...
Services/AM: Support using FS subfiles with the CIA-related service functions.
2018-10-03 10:13:46 -05:00
Subv
5165b63512
Services/AM: Support using FS subfiles with the CIA-related service functions.
...
FS subfiles are created with File::OpenSubFile, they have a start offset that must be added to all read/write operations.
The implementation in this commit is done using a new FileBackend that wraps the FS::File along with the start offset.
2018-10-03 09:57:05 -05:00
bunnei
2d116607fe
Merge pull request #4288 from Subv/am_system_mutex
...
Services/AM: Implement the GetSystemUpdaterMutex function.
2018-10-02 11:14:04 -04:00
Valentin Vanelslande
b067b5aa5a
Implement SeedDB & Seed Crypto
2018-10-02 10:12:40 -05:00
Subv
7aa97198a3
Services/AM: Implement the GetSystemUpdaterMutex function.
...
This function just returns a Mutex.
2018-10-02 09:07:00 -05:00
NarcolepticK
32aecd42a2
LLE Mapped Buffer: Corrected behavior
2018-10-01 21:07:25 -04:00
zhupengfei
8cf1132b2e
ncch_container: choose the first id as extdata id when extended save data access is used
2018-10-02 08:15:10 +08:00
zhupengfei
cb775eb1ba
core, citra_qt: add frame advancing to framelimiter
...
Frame advancing is a commonly used TAS feature which basically means running the game frame by frame. TASers use this feature to press exact buttons at the exact frames. This commit added frame advancing to the framelimiter and two actions to the Movie menu. The default hotkey is `\` for advancing frames, and `Ctrl+A` for toggling frame advancing. The `Advance Frame` hotkey would automatically enable frame advancing if not already enabled.
2018-10-02 07:28:58 +08:00
Weiyi Wang
fceec34945
Merge pull request #4278 from wwylele/cfg-ptm-direct-fs
...
cfg, ptm: access FS via backend directly
2018-10-01 18:32:43 -04:00
Weiyi Wang
0e77cd385a
Merge pull request #4277 from wwylele/cecd-direct-fs
...
cecd: access FS via backend directly
2018-10-01 18:26:51 -04:00
Weiyi Wang
fb720c00b7
Merge pull request #4273 from wwylele/apt-direct-fs
...
APT: access FS via backend directly
2018-10-01 14:24:06 -04:00
Weiyi Wang
5fb3137bdc
Merge pull request #4181 from wwylele/cia-crypto
...
Add encrypted CIA support
2018-10-01 14:23:35 -04:00
NarcolepticK
51d53a6281
LLE Mapped Buffer: addressed comments
2018-09-30 23:23:21 -04:00
NarcolepticK
19291ba465
LLE Mapped Buffer: Add unmapping, zero-size, and multiple page handling
2018-09-30 22:34:13 -04:00
bunnei
9f972b9f5c
Merge pull request #4276 from MerryMage/jit_breakpoints
...
arm_dynarmic: Pass breakpoints to gdbstub
2018-09-30 21:42:00 -04:00
bunnei
27203c0d47
Merge pull request #4274 from wwylele/http-direct-fs
...
http_c: access FS via backend directly
2018-09-30 21:37:07 -04:00
zhupengfei
bbf391abb9
citra_qt, core: game list "Open XXX Location" improvements
2018-10-01 08:42:22 +08:00
MerryMage
b4d9d9661a
arm_dynarmic: Pass breakpoints to gdbstub
...
Allow gdbstub to handle execution breakpoints
2018-09-30 19:40:49 +01:00
zhupengfei
9d142f981d
movie: fix default value in StartPlayback
2018-09-30 14:26:38 +08:00
Weiyi Wang
4a30a502a0
Merge pull request #4211 from wwylele/web-cleanup
...
web_service: stop using std::future + callback style async
2018-09-29 23:02:27 -04:00
Weiyi Wang
edc6e419b0
Merge pull request #4232 from wwylele/multi-region
...
loader, cfg: choose region based on language if multiple regions available
2018-09-29 23:01:36 -04:00
Weiyi Wang
f5a3ec18c2
Merge pull request #4072 from B3n30/httpc3
...
Service::HTTP_C: Implement Client Cert opening and closing
2018-09-29 22:53:49 -04:00
Lioncash
d64094a0d2
kernel/object: Remove unnecessary std::move from DynamicObjectCast()
...
boost::static_pointer_cast for boost::intrusive_ptr (what SharedPtr is),
takes its parameter by const reference. Given that, it means that this
std::move doesn't actually do anything other than obscure what the
function's actual behavior is, so we can remove this. To clarify, this
would only do something if the parameter was either taking its argument
by value, by non-const ref, or by rvalue-reference.
2018-09-29 23:14:10 +02:00
Weiyi Wang
bcb5d438a9
cfg: access FS via backend directly
2018-09-28 17:32:05 -04:00
Weiyi Wang
2757eff122
ptm: access FS via backend directly
2018-09-28 17:21:45 -04:00
Weiyi Wang
b03332d09b
fs: remove ArchiveFactory_ExtSaveData::Initialize
...
This is unnecessary as any open archive would create the full path for themselves
2018-09-28 17:08:39 -04:00
Weiyi Wang
bb252ecab3
cecd: access FS via backend directly
2018-09-28 17:03:24 -04:00
Weiyi Wang
0bc98cdca4
http_c: access FS via backend directly
2018-09-28 14:25:19 -04:00
Weiyi Wang
94b273ac20
APT: access FS via backend directly
2018-09-28 14:08:30 -04:00
zhupengfei
ae5c658997
movie: Add clock init time to CTM header
...
This adds a clock init time field to the CTM header. The clock settings would be overridden when playing a movie. And when recording a movie, if the clock is set to System Time, it would be set to fixed init time at the current moment as well. In this way this keeps consistency with the RNG even if the user does just no setting.
2018-09-27 22:18:10 +08:00
Weiyi Wang
7c97e8df62
Merge pull request #4256 from wwylele/country-list
...
archive_ncch: add open source country list archive
2018-09-27 10:09:37 -04:00
Weiyi Wang
892ca2a94a
Merge pull request #4209 from zhaowenlan1779/play-coin
...
service/ptm, citra_qt: Add Play Coins setting
2018-09-27 10:09:02 -04:00
Weiyi Wang
08bfba5d8e
Merge pull request #4005 from NarcolepticK/stub-cecd
...
service/cecd: Implement some functions
2018-09-27 10:08:14 -04:00
Weiyi Wang
f05740a5fd
Merge pull request #4224 from FearlessTobi/port-1310
...
Port #734 and #1310 from yuzu: Changes to Thread-related enums
2018-09-25 23:07:43 -04:00
EverOddish
15d44f0450
Review changes for enable/disable scripting
2018-09-23 20:13:28 -04:00
EverOddish
fce7afb8dc
Added CMake option to enable/disable scripting support
2018-09-23 19:16:18 -04:00
Weiyi Wang
9668852c0d
Service/AM: handle encrypted CIA
2018-09-23 13:05:55 -04:00
Weiyi Wang
df77491938
FileSys/cia: add ticket parsing
2018-09-23 13:05:55 -04:00
Weiyi Wang
b70e2bce58
HW/AES: add common key loading and selecting
2018-09-23 13:00:07 -04:00
Pengfei Zhu
6b538a49ac
Merge pull request #4246 from FearlessTobi/port-1346
...
Port yuzu-emu/yuzu#1346 : "svc_wrap: Convert the PARAM macro into a function"
2018-09-23 13:10:11 +08:00
Weiyi Wang
20e42592ff
Merge pull request #4249 from FearlessTobi/port-760
...
Port yuzu-emu/yuzu#760 : "file_util: Use an enum class for GetUserPath()"
2018-09-22 23:42:59 -04:00
Weiyi Wang
1123580738
archive_ncch: add open source country list archive
2018-09-22 16:11:57 -04:00
Lioncash
d2cd4a464d
svc_wrap: Convert the PARAM macro into a function
...
This can just be a regular function, getting rid of the need to also
explicitly undef the define at the end of the file. Given FuncReturn()
was already converted into a function, it's #undef can also be removed.
2018-09-22 21:20:22 +02:00
Lioncash
b3221c3180
file_util: Use an enum class for GetUserPath()
...
Instead of using an unsigned int as a parameter and expecting a user to
always pass in the correct values, we can just convert the enum into an
enum class and use that type as the parameter type instead, which makes
the interface more type safe.
We also get rid of the bookkeeping "NUM_" element in the enum by just
using an unordered map. This function is generally low-frequency in
terms of calls (and I'd hope so, considering otherwise would mean we're
slamming the disk with IO all the time) so I'd consider this acceptable
in this case.
2018-09-22 21:18:56 +02:00
Lioncash
46da908a00
service: Use nested namespace specifiers where applicable
...
There were a few places where nested namespace specifiers weren't being
used where they could be within the service code. This amends that to
make the namespacing a tiny bit more compact.
2018-09-22 16:14:10 +02:00
Weiyi Wang
41d53cee1f
nwm/uds_data: specify endianness for enum
2018-09-22 00:28:44 -04:00
Weiyi Wang
e0336403ee
nwm/uds_connection: specify endiannes for enum
2018-09-22 00:28:44 -04:00
Weiyi Wang
16b36b6025
service/cro: specify endianness for enum
2018-09-22 00:28:44 -04:00
Weiyi Wang
18e94897c4
hle/swkbd: specify endianness for enum and other members
2018-09-22 00:28:44 -04:00
Weiyi Wang
39feb0610b
filesys/archive_selfncch: specify endiannes for enum
2018-09-22 00:28:44 -04:00
Weiyi Wang
9564b4b292
filesys/archive_ncch: specify endianness for enum
...
NCCHArchivePath::media_type is unchanged because its underlying type is unclear
2018-09-22 00:28:44 -04:00
Weiyi Wang
d1a576eb14
Merge pull request #4113 from namkazt/soc_recv_from
...
fix soc service - RecvFrom - SendTo
2018-09-21 12:33:23 -04:00