Commit graph

601 commits

Author SHA1 Message Date
Vitor K 6cfb8e02a8
clang format (#7017) 2023-09-27 13:42:19 -03:00
GPUCode d1c16bad78
code: Remove save state compatibility checks (#6980) 2023-09-16 15:22:10 -07:00
Steveice10 04aeecabcf
arm: Do not try to access null page table. (#6930) 2023-08-27 17:26:31 +02:00
SachinVin 8eb89c260d core: fix warnings 2023-06-17 21:23:58 +05:30
Steveice10 b45c7188c7
chore: Fix some compiler warnings. (#6578) 2023-05-30 12:36:12 -07:00
Vitor K 34de77d429
Various miscelaneous changes (#6496) 2023-05-03 17:24:10 +02:00
SachinVin 41f13456c0
Chore: Enable warnings as errors on MSVC (#6456)
* tests: add Sanity test for SplitFilename83

fix test

fix test

* disable `C4715:not all control paths return a value` for nihstro includes

nihstro: no warn

* Chore: Enable warnings as errors on msvc + fix warnings

fixes

some more warnings

clang-format

* more fixes

* Externals: Add target_compile_options `/W0` nihstro-headers and ...

Revert "disable `C4715:not all control paths return a value` for nihstro includes"
This reverts commit 606d79b55d.

* src\citra\config.cpp: ReadSetting: simplify type casting

* settings.cpp: Get*Name: remove superflous logs
2023-05-01 22:38:58 +03:00
SachinVin 8d19483b7e
externals: bump dynarmic to 6.4.6 (#6423) 2023-04-09 21:03:48 +02:00
Steveice10 a8848cce43 build: Update to support multi-arch builds. 2023-01-07 01:09:32 -08:00
GPUCode 48ee112ceb
Add per game configuration options (#6187)
* common: Move settings to common from core.

- Removes a dependency on core and input_common from common.

* code: Wrap settings values

* Port from yuzu to allow per game settings

* citra_qt: Initial per-game settings dialog

* citra_qt: Use new API for read/save of config values

* citra_qt: Per game audio settings

* citra_qt: Per game graphics settings

* citra_qt: Per game system settings

* citra_qt: Per game general settings

* citra_qt: Document and run clang format

* citra_qt: Make icon smaller and centered

* citra_qt: Remove version number

* Not sure how to extract that, can always add it back later

* citra_qt: Wrap UISettings

* citra_qt: Fix unthottled fps setting

* citra_qt: Remove margin in emulation tab

* citra_qt: Implement some suggestions

* Bring back speed switch hotkey

* Allow configuration when game is running

* Rename/adjust UI stuff

* citra_qt: Fix build with separate windows

* citra_qt: Address feedback

* citra_qt: Log per-game settings before launching games

* citra_qt: Add shader cache options

* Also fix android build

* citra_qt: Add DLC menu option

* citra_qt: Run clang-format

* citra_qt: Adjust for time offset

* citra_qt: Implement suggestions

* Run clang-format

Co-authored-by: bunnei <bunneidev@gmail.com>
2022-12-08 13:27:25 +02:00
Merry 6da59d581e arm_tick_counts: Thumb implementation 2022-11-22 22:52:37 +00:00
Merry 9c0fad21db arm_tick_counts: Implement ARM cycle counting 2022-11-22 22:52:37 +00:00
Merry 0f250bed89 arm_tick_counts: Skeleton implementation 2022-11-22 22:52:37 +00:00
Merry f298278f37 arm/dynarmic: Initial implementation for instruction tick counts 2022-11-22 22:52:37 +00:00
Tobias 1ddea27ac8
code: Cleanup and warning fixes from the Vulkan PR (#6163)
Co-authored-by: emufan4568 <geoster3d@gmail.com>
Co-authored-by: Kyle Kienapfel <Docteh@users.noreply.github.com>
2022-11-04 23:32:57 +01:00
SachinVin e74b2575d7 clang format 2022-10-23 13:19:33 +05:30
SachinVin fbe06234b1 Core: Port Exclusive memory impl from yuzu
core\arm\dynarmic\arm_dynarmic.cpp: fix build

core\arm\dynarmic\arm_dynarmic.cpp: Fixes

CPP 20
2022-10-23 13:19:33 +05:30
James Rowe 9f4501aceb Perf: Remove more breakpoint checking in the interpreter. Move filtering earlier in the logging chain 2021-07-24 23:36:56 +05:30
FearlessTobi da908a9ed1 core: Remove unnecessary enum casts in log calls
Follows the video core PR. fmt doesn't require casts for enum classes
anymore, so we can remove quite a few casts.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2020-12-29 06:39:21 +01:00
xperia64 1128f5f8ee Silence some noisy switch case warning 2020-09-06 16:22:48 -04:00
Ben 39463f1f6d
ArmInterface: return ref instead of copy for GetTimer (#5227)
* ArmInterface: return ref instead of copy for GetTimer

* ArmInterface: add const ref GetTimer

* ArmInterface: return raw pointer instead of shared_ptr in GetTimer

* remove more unnecessary shared_ptr usage

* Fix save states

* fix unit tests
2020-04-22 07:44:58 +02:00
Hamish Milne 9cd669db84 Merge branch 'master' into feature/savestates-2 2020-04-16 19:03:49 +01:00
Sebastian Valle 9ae37da292
Kernel/Process: Fixed scheduling multiple processes in the SysCore using Dynarmic (#5193)
* Kernel/Process: Notify the CPUs that a new pagetable has been set every time the process they're executing changes.

Previously the page table would only be changed when the current CPU's page table was changed, this lead to stale JIT states and the PC going to 0 when context-switching a different core inside the ThreadManager::SwitchContext function because the JIT for a new pagetable is only constructed upon receiving the change notification.

* Kernel/Process: Use the relevant CPU's last process to determine when to switch its current process.

Previously it was checking the kernel's current_process variable, which gets overwritten every time a CPU runs its slice. The rescheduling happens after all CPUs have run their slice so the code was effectively only checking the last CPU's process.
2020-04-15 14:35:19 +02:00
Hamish Milne 915c426dc9 Merge remote-tracking branch 'upstream/master' into feature/savestates-2 2020-04-12 22:26:24 +01:00
Hamish Milne 7988978661 Fix VFP registers serialization (0 fps when loading etc.) 2020-04-10 19:36:38 +01:00
MerryMage 8b7b6e9f74 arm_dynarmic: Remove dependence on interpreter 2020-04-07 19:07:59 +01:00
MerryMage e04590a06d externals: Update dynarmic to b58048a 2020-04-06 17:31:30 +01:00
Hamish Milne 92640fc29c Code review actions (plus hopefully fix the linux CI) 2020-03-31 17:54:28 +01:00
Hamish Milne 04aa351c40 Code review - general gardening 2020-03-29 16:14:36 +01:00
Hamish Milne 8f059ae398
Apply suggestions from code review
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-03-29 11:39:46 +01:00
Hamish Milne da3ab3d56e Merge branch 'master' into feature/savestates-2 2020-03-07 21:23:08 +00:00
Ben 55ec7031cc
Core timing 2.0 (#4913)
* Core::Timing: Add multiple timer, one for each core

* revert clang-format; work on tests for CoreTiming

* Kernel:: Add support for multiple cores, asserts in HandleSyncRequest because Thread->status == WaitIPC

* Add some TRACE_LOGs

* fix tests

* make some adjustments to qt-debugger, cheats and gdbstub(probably still broken)

* Make ARM_Interface::id private, rework ARM_Interface ctor

* ReRename TimingManager to Timing for smaler diff

* addressed review comments
2020-02-21 19:31:32 +01:00
Hamish Milne 246ae84a52 Pretty sure ARM/Thread serialization works now 2020-02-13 17:42:12 +08:00
Hamish Milne 35c3ca995c Fixed a bug (??) in arm_dynarmic where PageTableChanged could reset the CPU context 2020-02-13 17:42:10 +08:00
Hamish Milne 8abc5525be Added Signals; more runtime fixes 2020-02-13 17:42:09 +08:00
Hamish Milne 96432589bd Use shared_ptr for PageTable 2020-02-13 17:42:04 +08:00
Hamish Milne 65d96bf6c1 Changed u8* to MemoryRef 2020-02-13 17:42:00 +08:00
Hamish Milne 7b846ffa98 clang-format fixes 2020-02-13 17:39:15 +08:00
Hamish Milne f557d26b40 Added CPU, mutex, process, thread, timer 2020-02-13 17:38:16 +08:00
Jack Harper b065ac6995 Fixing some compiler warnings 2019-07-23 23:10:17 +01:00
Weiyi Wang 24d2d6aa23 interpreter: silent sign warnings 2019-07-14 14:36:56 -04:00
Tobias 623b0621ab
Port various minor changes from yuzu PRs (#4725)
* common/thread: Remove unused functions

Many of these functions are carried over from Dolphin (where they aren't
used anymore). Given these have no use (and we really shouldn't be
screwing around with OS-specific thread scheduler handling from the
emulator, these can be removed.

The function for setting the thread name is left, however, since it can
have debugging utility usages.

* input_common/sdl: Use a type alias to shorten declaration of GetPollers

Just makes the definitions a little bit more tidy.

* input_common/sdl: Correct return values within implementations of GetPollers()

In both cases, we weren't actually returning anything, which is
undefined behavior.

* yuzu/debugger/graphics_surface: Fill in missing surface format listings

Fills in the missing surface types that were marked as unknown. The
order corresponds with the TextureFormat enum within
video_core/texture.h.

We also don't need to all of these strings as translatable (only the
first string, as it's an English word).

* yuzu/debugger/graphics_surface: Clean up connection overload deduction

We can utilize qOverload with the signal connections to make the
function deducing a little less ugly.

* yuzu/debugger/graphics_surface: Tidy up SaveSurface

- Use QStringLiteral where applicable.

- Use const where applicable

- Remove unnecessary precondition check (we already assert the pixbuf
  being non null)

* yuzu/debugger/graphics_surface: Display error messages for file I/O errors

* core: Add missing override specifiers where applicable

Applies the override specifier where applicable. In the case of
destructors that are  defaulted in their definition, they can
simply be removed.

This also removes the unnecessary inclusions being done in audin_u and
audrec_u, given their close proximity.

* kernel/thread: Make parameter of GetWaitObjectIndex() const qualified

The pointed to member is never actually modified, so it can be made
const.

* kernel/thread: Avoid sign conversion within GetCommandBufferAddress()

Previously this was performing a u64 + int sign conversion. When dealing
with addresses, we should generally be keeping the arithmetic in the
same signedness type.

This also gets rid of the static lifetime of the constant, as there's no
need to make a trivial type like this potentially live for the entire
duration of the program.

* kernel/codeset: Make CodeSet's memory data member a regular std::vector

The use of a shared_ptr is an implementation detail of the VMManager
itself when mapping memory. Because of that, we shouldn't require all
users of the CodeSet to have to allocate the shared_ptr ahead of time.
It's intended that CodeSet simply pass in the required direct data, and
that the memory manager takes care of it from that point on.

This means we just do the shared pointer allocation in a single place,
when loading modules, as opposed to in each loader.

* kernel/wait_object: Make ShouldWait() take thread members by pointer-to-const

Given this is intended as a querying function, it doesn't make sense to
allow the implementer to modify the state of the given thread.
2019-05-01 14:28:49 +02: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
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
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
Weiyi Wang e87dc17da2 Pass system into arm interpreter; fix tests 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 8c618c3fc3 Memory: move PageTable functions into class 2018-12-05 20:16:42 -05:00
bunnei 7f727177bf
Merge pull request #4431 from wwylele/no-v2p
Memory: remove VirtualToPhysicalAddress
2018-11-16 23:28:33 -08:00
Weiyi Wang 248106d972 Skyeye: unstub cp15 virtual to physical address 2018-11-13 11:24:46 -05:00