Commit Graph

4450 Commits

Author SHA1 Message Date
James Benton
b2d18768bd Move ownership of rendering to graphics backends. 2019-10-19 16:07:31 +01:00
James Benton
edbe2b55f3 decaf-qt: Initial version of Qt based decaf debugger. 2019-10-19 16:07:31 +01:00
James Benton
80f349d006 cmake: Disable cotire pch for libgpu as glbinding is sensitive to include order. 2019-10-19 16:07:31 +01:00
James
3755998167 cafe/loader: Fix R_PPC_GHS_REL16_HA. 2019-10-01 20:24:24 +01:00
James Benton
7160b51c3e cmake: Add missing Windows libraries. 2019-09-26 17:18:46 +01:00
James Benton
061f08be58 common-sdl: Add missing includes. 2019-09-26 17:18:46 +01:00
James Benton
675f0d872b cpu: Remove deprecated fmt internal convert_to_int specialisation for be2_val. 2019-09-26 17:18:46 +01:00
James Benton
3715c7e450 decaf-qt: Initialise decaf at time of game starting.
So things like log config options actually take affect.
2019-09-26 17:18:46 +01:00
James Benton
6d66f262d0 Update spdlog to 1.4.0 2019-09-26 17:18:46 +01:00
James Benton
35a68cc802 Update fmt to 6.0.0 2019-09-26 17:18:46 +01:00
James Benton
bd017cca92 decaf/debug: Check for valid address before add / remove breakpoints. 2019-09-26 17:18:46 +01:00
James Benton
feef9195f4 decaf/debug_api: Verify pm4 capture state before performing action. 2019-09-26 17:18:46 +01:00
James Benton
2129f1c0d0 cafe: Remove leftover pragma opt. 2019-09-26 17:18:46 +01:00
James Benton
99c6ae7d2c cpu: Improvements to disassembly. 2019-09-26 17:18:46 +01:00
James Benton
a9f658baae decaf: Optimise debug API readMemory and writeMemory to check validity per page. 2019-09-26 17:18:46 +01:00
James Benton
4804c12508 decaf: Add debug API isValidVirtualAddress and getMemoryPageSize 2019-09-26 17:18:46 +01:00
James Benton
5d445a4675 cpu: Fix disassembleBranchInfo 2019-09-26 17:18:46 +01:00
James Benton
a31b09da46 debugui: Prevent a buggy stack from causing infinite loop.
I have solved the halting problem.
2019-09-26 17:18:46 +01:00
James Benton
82e07bbaa6 debugger: Fix usage of return value from decaf::debug::findClosestSymbol. 2019-09-26 17:18:46 +01:00
James Benton
1d22e2e038 cafe/kernel: Fix use of getCurrent*Id from non-ppc cores (such as for debugger). 2019-09-26 17:18:46 +01:00
Ash Logan
5cf43d3807 common/assert: Use abort instead of __builtin_trap on POSIX platforms 2019-09-13 18:09:14 +01:00
Dorian Fevrier
ceedfafb6b Check vulkan extensions are available when creating device
Before this commit, decaf was crashing, raising an ErrorExtensionNotPresent exception. This commit logs missing extensions before letting decaf quitting.
2019-06-24 09:44:09 +01:00
snickerbockers
bdc2ac3bda Vulkan: pass vkGetDeviceProcAddr to vk::DispatchLoaderDynamic::init
Otherwise, debug builds will fail this assert in the init function:
assert(!!device == !!getDeviceProcAddr);
2019-06-21 09:02:45 +01:00
snickerbockers
b70ac1f8ef vfs: fix makeFolder failure on GNU/Linux
SAVEInitSaveDir wants to create a directory hierarchy under usr/save/...
on Linux the create_directory call will fail because it only lets you create one directory at a time, so use create_directories instead.
This was not a problem on Windows because the /std:c++latest compiler option causes create_directory to behave the same as create_directories.

This commit fixes NES and SNES vc games which were working on Windows but not Linux.
2019-05-07 12:00:24 +01:00
James Benton
5d23a4bf79 cafe: Remove erroneous StackArray constructor. 2019-05-03 16:50:08 +01:00
James Benton
f706d9c585 cafe/coreinit: Change OSDriver_Register to not always use callerModule.
On a real coreinit.rpl it will try acquire callerModule from LR regardless
of whether moduleHandle is set, however that makes it difficult for our HLE
functions to call this function.
2019-04-28 16:52:30 +01:00
James Benton
58fc9dc3f8 cafe: Improve StackObject.
Prevent copy / move.
No longer shifts around a stack frame.
2019-04-28 16:52:30 +01:00
James Benton
af7616100b cafe: Improve stack back chain handling when calling from HLE to user code. 2019-04-28 16:32:13 +01:00
James Benton
e4a6ba94ef Update VulkanSDK to 1.1.101.0 2019-03-29 14:28:33 +00:00
snickerbockers
85cc068d5d ios/mcp: if cos.xml doesn't have any permissions then grant full permissions 2019-02-20 11:03:29 +00:00
James Benton
7d3e1b4ff1 cafe/nn_boss: Add PlayLogUploadTaskSetting. 2019-02-20 11:03:29 +00:00
James Benton
864c72b509 cafe/nn_boss: Fix NetTaskSetting type info. 2019-02-20 11:03:29 +00:00
James Benton
07cfae9255 cafe/nn_boss: Implement PrivateTaskSetting functions. 2019-02-20 11:03:29 +00:00
James Benton
5d3e8b3eea cafe/nn_boss: Fix type info for RawUlTaskSetting. 2019-02-20 11:03:29 +00:00
James Benton
58676618be cafe/nn_boss: Add NbdlTaskSetting. 2019-02-20 11:03:29 +00:00
James Benton
fabd4d4ed8 cafe/coreinit: Print guest stack trace on OSPanic. 2019-02-15 18:47:17 +00:00
snickerbockers
6c546d74f1 Use a union for bitfields when DECAF_USE_STDLAYOUT_BITFIELD is defined
Previous behavior was to use a struct.  This was causing be2_array
instantiations to use be2_struct for be2_array_item_type instead of be2_val.
The upshot of this was that on Linux builds, byte order would be reversed for
bitfields wrapped in be2_array because be2_struct doesn't do endian reversal.
When DECAF_USE_STDLAYOUT_BITFIELD is not defined, bitfields were already unions,
which is why this behavior did not manifest on Windows.

This commit resolves several programs which were working on Windows but not
Linux and also addresses issue #537 on github.
2019-02-10 10:27:54 +00:00
CreeperMario
a799a8b531 libdecaf: Further correction of stop/join logic
* This resolves several issues that I found relating to threads being
joined multiple times (because decaf::waitForExit() calls
decaf::shutdown() which in some cases results in the shutdown code for
some modules being called multiple times).
* I also ensured that stop() functions do not try to join threads
automatically - that's for join() to do.
* At this point, decaf-cli exits correctly both on RPX exit and on
timeout.
2019-02-09 11:56:20 +00:00
CreeperMario
a8a747dd64 decaf-cli: timeoutMutex is now in scope of timeoutThread 2019-02-09 11:11:55 +00:00
CreeperMario
5ad2696715 libdecaf: Cafe kernel exit causes IOS hardware thread to stop
* This is performed by sending an IOS_Ioctl to /dev/ppc_app when the 
Cafe kernel exit() function is called.
* Some minor changes were made in order to accomodate this, for example 
there is a new MCP IPC enumeration holding possible ioctl commands for 
ppc_app.
2019-02-09 11:11:55 +00:00
CreeperMario
71671122a0 libdecaf: Separate thread stop/join code
* For IOS/Cafe Kernel code in which the join() function performs
shutdown routines, the shutdown code was moved into a separate stop()
function so that the join() function actualy waits for the processes to
exit normally.
* This includes the IOS kernel/hardware/alarm/worker threads and the
Cafe Kernel thread.
2019-02-09 11:11:53 +00:00
James Benton
5c040fdb88 cafe/nn_olv: Fix missing return value from UploadedPostData_Constructor.
Fixes #543.
2019-02-08 21:18:04 +00:00
James Benton
3dd8bd4113 cpu: Cleanup host exception handling. 2019-02-08 21:17:10 +00:00
James Benton
6b5008a0cc cpu: Cleanup alarm thread. 2019-02-08 12:00:55 +00:00
James Benton
1ddce615e8 cpu: Cleanup gJitMode and gJitVerifyAddress. 2019-02-08 11:59:02 +00:00
James Benton
947149982a Update libbinrec. 2019-02-08 10:50:25 +00:00
James Benton
80b587fcbf cafe/coreinit: Fix calls to unlock mutex when mutex is not held.
Good job TankTankTank devs.
2019-02-06 23:55:17 +00:00
James Benton
86d60ae4d6 cafe/coreinit: Fix OSJoinThread for detached threads. 2019-02-06 23:55:10 +00:00
James Benton
31d3790ec2 cafe/nn_olv: Fix DownloadedPostData calling wrong parent constructor. 2019-02-06 23:54:59 +00:00
James Benton
295f6adf91 cafe/coreinit: Remove check for tags in mutex/fastmutex/semaphore.
This is not in the real coreinit.rpl so we should not either :D
2019-02-06 23:52:02 +00:00