Commit Graph

70 Commits

Author SHA1 Message Date
Exzap
524188bb7a Refactor more GX2 code to use LatteReg.h 2023-09-14 20:52:40 +02:00
Exzap
a17111e6b0 TitleManager: Improvements for .wua conversion
- Print more detailed paths in confirmation dialogue
- Prefer the title right clicked by the user
- When sourcing titles from other .wua files, use the correct subpath
Fix include path
2023-08-03 20:31:12 +02:00
Exzap
0d96255bae nn_olv: More work on post API 2023-08-03 20:31:12 +02:00
Exzap
2200cc0ddf
Initial support for title switching + better Wii U menu compatibility (#907) 2023-07-21 13:54:07 +02:00
Rambo6Glaz
ea86c77088
Fix UTC offset calculation (#890) 2023-07-05 20:20:01 +02:00
Rambo6Glaz
b0ae008a89
Fix NEX DataStore uploads (nlibcurl) and stub Miiverse PostApp (#888) 2023-07-05 18:59:33 +02:00
Exzap
9499870cc9 Debugging: Add minimalist PPC profiler 2023-06-25 08:40:52 +02:00
Exzap
45072fccb2 Remove remnants of frame profiler code 2023-06-25 08:40:52 +02:00
Rambo6Glaz
a8d157d310
nn_olv: Added community related API (#873)
- Initialize
- Download communities (self-made / favorites / officials)
- Upload communities (create subcommunity)
- Upload favorite status (Add/Delete favorite to a subcommunity)

Enough for support of Mario Kart 8 tournaments
2023-06-24 14:51:41 +02:00
Squall Leonhart
1beec40445
Fix logging related crash in KPADGetUnifiedWpadStatus (#875) 2023-06-22 04:11:31 +02:00
Maschell
fd3b5b7f27
coreinit: Fix FSGetMountSource and FSAppendFile implementation (#863)
Fixes SD access in SSBU
2023-06-17 13:51:55 +02:00
Chris Purnell
f0ef8f3cc2
Fix some out of bound array access. (#862) 2023-06-16 20:15:43 +02:00
Exzap
633e5c0e05 Fix incorrect return values in OSAtomic 2023-06-15 22:36:45 +02:00
Exzap
808d1bb424 Add debug asserts for invalid MEMPTR
Also fixed some corruptions this uncovered
2023-06-15 22:36:35 +02:00
Exzap
7886b594a2 nsysnet: Implement inet_ntop 2023-06-15 22:36:25 +02:00
Maschell
f1ebfa9941
coreinit: Implement several FSA functions and fix some bugs (#844) 2023-06-15 21:05:16 +02:00
Maschell
6073ab3ec6
coreinit: Refactor FS functions to be more accurate (#842) 2023-06-04 11:13:45 +02:00
Crementif
d903b2cf12
Remove deprecated logging system and expose developer logging window (#825) 2023-05-20 02:46:12 +02:00
why-keith
e58a84629f
Migrate coreinitMemLog_printf to new logging (#799) 2023-04-25 18:09:00 +02:00
why-keith
caa57a3cfd
Logging migration (forceLogDebug_printf) (#780)
* script changes - no arguments

* script changes with 2 arguments

* script changes with > 2 arguments

* script conversions with 1 argument - pt. 1

* script conversions with 1 argument - pt. 2

* script conversions with 1 argument - pt. 3

* script conversions with 1 argument - pt. 4

* script conversions with 1 argument - pt. 5

Pointer format hunting

* Fixed pointer format

* script conversions with 1 argument - final

* fixed conversion in non utf-8 file

* fixed conversion with capital letter

* actually fixed conversion with capital letter

* fixed another capital lettering issue

* Added conversions with LR removed

* removed LR from logs

* Converted logs that previously contained LR

* converted log that originally specified string length

* fixed log with commas in main text

* fixed multi-line log

* Fixed more logs with commas in main text

* Fixed unformatted pointer

* added conversion with float value

* converted lines with double parameters

* converted missed line

* corrected argument formatting

Co-authored-by: Crementif <26669564+Crementif@users.noreply.github.com>

* Fixed misspellings of "unhandled"

unhandeled -> unhandled

Co-authored-by: Crementif <26669564+Crementif@users.noreply.github.com>

---------

Co-authored-by: Crementif <26669564+Crementif@users.noreply.github.com>
2023-04-25 08:43:31 +02:00
Exzap
41f2c27229 Remove dependency on boost::dll and boost::range 2023-04-16 11:51:25 +02:00
why-keith
80953fe603
Migrate saveLog_printf to new logging (#768) 2023-04-16 00:31:53 +02:00
why-keith
27a5671056
Migrate inputLog_printf to new logging (#767) 2023-04-16 00:18:11 +02:00
why-keith
a519b01b58
Migrate socketLog_printf to new logging (#766) 2023-04-16 00:08:22 +02:00
why-keith
9c6e3fb144
Migrate nfpLog_printf to new logging (#769) 2023-04-15 15:19:00 +02:00
why-keith
a640bd079c
Migrate sndApiLog_printf to new logging (#762) 2023-04-13 14:18:45 +02:00
why-keith
486e228f72
Migrate gx2Log_printf to new logging (#761) 2023-04-13 14:13:54 +02:00
why-keith
4be57f4896
Migrate force_log_printf to new logging (#714) 2023-04-12 16:31:34 +02:00
Exzap
80b1c50b50 coreinit: Fix thread scheduler not resetting quantum
When a thread was force-rescheduled (e.g. via OSYieldThread) the next time it resumed it would not reset the time slice duration (remainingCycles) back to ppcThreadQuantum. As a consequence threads were often immediately rescheduled and only on the next turn they would get their full time slice.

Aside from (very slightly) improving performance, this also fixes the OSDisableInterrupts warning spam in the log for TPHD.
2023-02-22 13:37:14 +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
859dc78e90 coreinit: Dont yield uninterruptible threads in spinlock 2023-01-27 09:57:10 +00:00
Exzap
387b712959 Logging: Add TextureReadback logtype and clean up code 2023-01-27 09:57:10 +00:00
Exzap
4b5014c16a coreinit: Fix memory mapping API
Fixes Unity based games freezing on boot
2023-01-27 09:57:10 +00:00
Tillsunset
4491560b32
Add check for backwards delete (#564) 2022-12-09 18:01:08 +01:00
Exzap
2c81d240a5
Make codebase more CPU-agnostic + MacOS disclaimer (#559) 2022-12-07 01:48:24 +01:00
SSimco
b1c70588fe
Enable online features for Unix (#486) 2022-11-15 17:03:46 +01:00
bslhq
be287a1f4e
ImGui: match all begin()/end() (#470) 2022-11-09 02:45:40 +01:00
Adrian Graber
d4e14d2b05
Implement proper microphone support (#251) 2022-11-03 00:24:34 +01:00
GaryOderNichts
d303a7f502
coreinit: Implement OSGetSystemTick (#415) 2022-10-26 14:06:16 +02:00
gurrgur
76c75f767b
Use portable format specifiers (#411)
Fixes #387
2022-10-25 20:38:29 +02:00
Exzap
028b3f7992
Make controller button code thread-safe (#405)
* Refactor spinlock to meet Lockable requirements
* Input: Refactor button code and make it thread-safe
2022-10-23 15:47:42 +02:00
SSimco
d6ba61cf64
Add support for non portable mode (#356) 2022-10-12 08:03:26 +02:00
Tillsunset
0c9fb3143f
memory optimization, using posix_memalign (#350) 2022-10-09 10:43:45 +02:00
Tillsunset
638e9e1f87
Workaround for the h264 video crash on macOS (#348) 2022-10-09 08:45:26 +02:00
Narr the Reg
3767257220
nfp: Fix corruption, correct structs and use write counters (#310) 2022-09-29 13:00:46 +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
Crementif
510d80038d
[coreinit] Add OSIsDebuggerPresent 2022-09-19 21:41:01 +02:00
Exzap
12b6830546
GX2: Add crash workaround for FFL uninitialized texture (#264)
When a game tries to generate Miis without the FFL files being dumped (<mlc>/sys/title/0005001b/10056000/content/) it will cause it to create and use a texture with invalid parameters.
This workaround catches and replaces bad texture parameters to avoid crashing further down the line.

Resolves crashes in Sonic Lost World, Super Mario 3D World and probably a few others.

We had this workaround in pre-2.0 Cemu already but it was dropped during refactoring.
2022-09-17 16:32:46 +02:00
Herman Semenov
03f5967408
Fix incorrect streamout buffer index in GS + refactor various code (#258) 2022-09-17 03:45:18 +02:00