Commit Graph

64 Commits

Author SHA1 Message Date
capitalistspz
8508c62540
Various smaller code improvements (#1343) 2024-09-17 02:00:26 +02:00
Exzap
1234e2c118
Preparations for 2.1 (#1306) 2024-08-26 11:43:38 +02:00
Exzap
e02cc42d67 COS: Implement PPC va_list, va_arg and update related functions 2024-08-13 01:00:56 +02:00
Exzap
47f1dcf996 debugger: Add symbol support to PPC stack traces
Also moved the declaration to precompiled.h instead of redefining it wherever it is used
2024-07-26 06:03:00 +02:00
Exzap
da8fd5b7c7 nn_save: Refactor and modernize code 2024-05-29 00:07:37 +02:00
GaryOderNichts
964d2acb44 Filestream_unix: Include cstdarg 2024-05-18 20:47:09 +02:00
Exzap
a16c37f0c5 coreinit: Rework thread creation
New implementation is much closer to console behavior. For example we didn't align the stack which would cause crashes in the Miiverse applet
2024-05-04 07:05:59 +02:00
Exzap
379950d185 coreinit+nn_save: Cleanup some legacy code 2024-05-01 05:06:50 +02:00
Exzap
1c73dc9e1b Implement proc_ui.rpl + stub SYSSwitchToEManual() to avoid softlocks
- Full reimplementation of proc_ui.rpl with all 19 exports
- Foreground/Background messages now go to the coreinit system message queue as they should (instead of using a hack where proc_ui receives them directly)
- Add missing coreinit API needed by proc_ui: OSGetPFID(), OSGetUPID(), OSGetTitleID(), __OSCreateThreadType()
- Use big-endian types in OSMessage
- Flesh out the stubs for OSDriver_Register and OSDriver_Unregister a bit more since we need to call it from proc_ui. Similiar small tweaks to other coreinit API
- Stub sysapp SYSSwitchToEManual() and _SYSSwitchToEManual() in such a way that they will trigger the expected background/foreground transition, avoiding softlocks in games that call these functions
2024-04-30 23:29:15 +02:00
goeiecool9999
ccabd93159
Linux: Exit on SIGTERM (#1116) 2024-03-11 02:13:53 +01:00
goeiecool9999
e1435066ee
OpenGL: Fix crash related to wxWidgets handling of vsync (#1112) 2024-03-11 00:57:31 +01:00
GaryOderNichts
4405116324
GDBStub: Support watchpoints on linux (#1030)
* GDBStub: Support watchpoints on linux
* GDBStub: Use `TCP_NODELAY`
2023-12-23 15:25:01 -08:00
Exzap
df282ab230 Latte: Clean up OpenGL relics in shared render code 2023-12-13 12:45:20 +01:00
Exzap
b0a7fd4e07 Set default alignment for SysAllocator to cache-line size
Avoids memory corruptions when the memory is cleared via DCZeroRange. Seen in BotW with AX AUX buffers.
2023-10-18 10:49:59 +02:00
Exzap
0d71885c88 nn_fp: Full rework of friend service 2023-10-17 05:26:30 +02:00
Exzap
757d458161 Compatibility with fmtlib 10.1.x 2023-10-02 18:53:00 +02:00
Exzap
8bb7ce098c
Bump CI clang version to 15 + workaround for unsafe fiber optimizations (#982) 2023-09-29 17:17:28 +02:00
Exzap
abce406ee8 Refactor more wstring instances to utf8-encoded string 2023-09-29 06:48:10 +02:00
Exzap
5ad57bb0c9 Add support for games in NUS format (.app)
Requires title.tmd and title.tik in same directory
2023-09-29 06:48:10 +02:00
Exzap
4d6b72b353 Latte: Very minor refactor + optimization 2023-09-29 06:48:10 +02:00
Exzap
0d96255bae nn_olv: More work on post API 2023-08-03 20:31:12 +02:00
Exzap
808d1bb424 Add debug asserts for invalid MEMPTR
Also fixed some corruptions this uncovered
2023-06-15 22:36:35 +02:00
Maschell
f1ebfa9941
coreinit: Implement several FSA functions and fix some bugs (#844) 2023-06-15 21:05:16 +02:00
Exzap
072c18a6e3 Improve exception logging on posix
Fix compile errors
2023-04-06 07:33:41 +02:00
Exzap
e803c6be47 Use attribute for AES-NI instead of -maes option 2023-03-13 05:34:53 +01:00
Crementif
6d75776b28
Add GDB stub for debugging (#657)
* Implement GDB stub debugger

Can be enabled by using the "--enable-gdbstub" option (and the debugger GUI, although that's untested) which'll pause any game you launch at start-up. Will start at port 1337 although it'll eventually be user-editable. The code is a bit weirdly sorted and also just needs a general cleanup, so expect that eventually too. And uses egyptian braces but formatting was easier to do at the end, so that's also something to do.

It has been tested to work with IDA Pro, Clion and the standalone interface for now, but I plan on writing some instructions in the PR to follow for people who want to use this. Memory breakpoints aren't possible yet, only execution breakpoints.

This code was aimed to be decoupled from the existing debugger to be able to be ported to the Wii U for an equal debugging experience. That's also why it uses the Cafe OS's thread sleep and resuming functions whenever possible instead of using recompiler/interpreter controls.

* Add memory writing and floating point registers support

* Reformat code a bit

* Format code to adhere to Cemu's coding style

* Rework GDB Stub settings in GUI

* Small styling fixes

* Rework execution breakpoints

Should work better in some edge cases now. But this should also allow for adding access breakpoints since it's now more separated.

* Implement access breakpoints

* Fix some issues with breakpoints

* Fix includes for Linux

* Fix unnecessary include

* Tweaks for Linux compatibility

* Use std::thread instead of std::jthread to fix MacOS support

* Enable GDB read/write breakpoints on x86 only

* Fix compilation for GCC compilers at least

The thread type varies on some platforms, so supporting this is hell... but let's get it to compile on MacOS first.

* Disable them for MacOS due to lack of ptrace

---------

Co-authored-by: Exzap <13877693+Exzap@users.noreply.github.com>
2023-02-19 15:41:49 +01:00
Exzap
f3ff919be2
Code clean up + replace some wstring instances with utf8 (#640) 2023-01-29 13:53:31 +01:00
Exzap
387b712959 Logging: Add TextureReadback logtype and clean up code 2023-01-27 09:57:10 +00:00
Tillsunset
058d11b49b
Optimized timer code for macOS (#576) 2022-12-15 10:28:44 +01:00
Elijah
5a143c7b4b
Linux/MacOS: Use faster clock_gettime() for tick_cached() (#563) 2022-12-08 17:08:15 +01:00
Exzap
2c81d240a5
Make codebase more CPU-agnostic + MacOS disclaimer (#559) 2022-12-07 01:48:24 +01:00
goeiecool9999
e9d10a9581
Linux+OpenGL: Implement GUI vsync setting (#477) 2022-11-13 08:29:25 +01:00
Tillsunset
5adb1e9618
Add commit hash to build name on build check workflow (#463) 2022-11-07 02:47:59 +01:00
goeiecool9999
9df1325d14
Linux: Resolve backtrace symbols directly from .symtab instead of .dynsym (#385) 2022-10-20 13:12:16 +02:00
Exzap
f65dbe8437 Fix encoding error in input profile filenames
- Controller profile filenames now encode unicode characters correctly
- Removed dependency on boost::filesystem. There is still an indirect dependency on it from another boost module it seems
- Refactored some code to use FileStream instead of ifstream/ofstream
2022-10-12 14:27:01 +02:00
SSimco
d6ba61cf64
Add support for non portable mode (#356) 2022-10-12 08:03:26 +02:00
goeiecool9999
431c5a101f
Linux: Print demangled symbols on backtrace (#312) 2022-10-10 02:35:04 +02:00
Tillsunset
3fb4b5e26c
MacOS+Linux: Use CLOCK_MONOTONIC_RAW over CLOCK_MONOTONIC (#313)
On MacOS this fixes the framerate being too high due to discontinuities in the timer that drives the emulated vsync. It also fixes behavior of the GetTickCount() wrapper.
2022-09-29 11:36:27 +02:00
goeiecool9999
6ecc4be0da
Posix/Linux: Add setting to disable coredumps 2022-09-27 13:58:50 +02:00
Exzap
3bceb39966
Remove PUBLIC_RELEASE flag and tie asserts to debug config (#287)
Removes the -DPUBLIC_RELEASE flag. Cemu's debug asserts are now only enabled if the build configuration is Debug. Similarly, on Windows the console is only shown for Debug builds.
2022-09-24 08:43:27 +02:00
Herman Semenov
03f5967408
Fix incorrect streamout buffer index in GS + refactor various code (#258) 2022-09-17 03:45:18 +02:00
Maximilian Downey Twiss
4a3d02db55
Properly list files in CMakeLists instead of using GLOB (#249) 2022-09-17 03:24:57 +02:00
Exzap
680beaaf21 Rename path _utf8Wrapper to _utf8ToPath for better clarity 2022-09-09 23:49:38 +02:00
Exzap
168ecf8825 FSC: Use utf8 path strings instead of wchar
Also introduced helper function _utf8ToPath() to convert a utf8-encoded string to fs::path
2022-09-09 23:49:38 +02:00
SSimco
cf598e38c1
Linux: Find case-insensitive file/folder path if not found (#196) 2022-09-09 20:16:46 +02:00
goeiecool9999
045a059742
fix for when file open is successful but the path isn't a file (#220)
FSC and indirectly coreinit relies on FileStream open failing for directories
2022-09-09 16:10:12 +02:00
Timothy Redaelli
f032088902
Use _Exit instead of exit under Linux (#204)
The best ExitProcess alternative for Linux is _Exit since it doesn't
call exit handlers.
2022-09-08 17:05:31 +02:00
Tom Lally
6cdb6eed17
Cleanup udiv128 (#206) 2022-09-08 02:12:53 +02:00
goeiecool9999
e20bfd00ec
Separate filestream.h into OS specific implementation files (#190) 2022-09-07 02:42:25 +02:00
Andrea Pappacoda
8c617a39b7
style: use std::enable_if & co instead of boost:: (#153) 2022-09-02 21:06:05 +02:00