Commit Graph

4450 Commits

Author SHA1 Message Date
Brett Lawson
3629728c8c Moved HLE module initialisation to kernel. 2016-06-06 02:21:23 -07:00
Brett Lawson
0027d65f56 Move utils/ to decaf-common project.
This also moved wfunc_ptr.h and wfunc_call.h to the
ppctypes folder instead of common.
2016-06-06 02:13:12 -07:00
Brett Lawson
44aa89353a Add ability to join PPC CPU (wait for it to shutdown). 2016-06-06 01:30:32 -07:00
Brett Lawson
fef5eea2e5 Move all Core registers to their own structure. 2016-06-06 01:30:30 -07:00
Brett Lawson
624b97ca51 Move hardwaretests to its own project. 2016-06-06 01:30:30 -07:00
Brett Lawson
28006a098e Moved fuzztests to their its own project.
Fuzztests rely on decaf-cpu only, and does not care about
decaf itself.
2016-06-06 01:30:29 -07:00
Brett Lawson
78742b1b25 Move cpu to its own project. 2016-06-05 03:36:52 -07:00
Brett Lawson
e7b643e8e6 Moved mem.h/mem.cpp to cpu module. 2016-06-05 01:36:53 -07:00
Brett Lawson
8bb7cea74b Major fixups to debugger management.
This mostly fixes the debugger to work again.  There is still
a lot of work to be done here, but it works and you can step
through code again.  Additionally, this fix doesn't change the
existing code behaviour if the debugger is disabled.
2016-06-04 03:28:05 -07:00
Brett Lawson
94a0dc603f Store entry poitnt function object before calling it. 2016-06-04 03:28:01 -07:00
Brett Lawson
fe463c44d0 Store CIA/NIA on the stack instead of in C++.
This is a prerequisite change for debuggers being able to
identify the location of non-running threads.
2016-06-04 03:25:17 -07:00
Brett Lawson
17683c12a9 Added support for active thread list in the scheduler. 2016-06-04 03:25:17 -07:00
Brett Lawson
f592f246eb Implement cpu breakpoints. 2016-06-04 03:25:17 -07:00
Brett Lawson
97d2c4e30d Fix cpu::update_rounding_mode to be core specific. 2016-06-04 03:25:17 -07:00
Brett Lawson
fa1a003c6e Implemented interrupt masking to replace interrupt enabling.
This is a prerequisite change for implementing effective breakpoint
facilities inside the CPU.
2016-06-04 03:25:17 -07:00
Brett Lawson
31b4f7f281 Make sure to reset the reserve state when loading a context. 2016-06-03 03:20:27 -07:00
James Benton
f338e6ff62 coreinit: Wake all cores on exit if we have any thread waiting on join or suspend queue. 2016-06-03 02:35:33 +01:00
James Benton
52f8177194 Fix missing include in fuzztests.cpp 2016-06-03 02:48:53 +01:00
James Benton
268aa1e925 coreinit: Remove extern of static function unqueueThreadNoLock. 2016-06-03 02:48:51 +01:00
James Benton
bfcf8f6671 coreinit: Fix SortedQueue build on gcc. 2016-06-03 02:48:49 +01:00
James Benton
ea693c916d cmake: Update CMakeLists.txt 2016-06-03 02:48:47 +01:00
James Benton
9dae3db7f8 coreinit: Document some OSFastMutex/OSFastCondition members. 2016-06-03 03:15:55 +01:00
James Benton
b6ebce9b0b coreinit: Fix thread priority check in queueThreadNoLock. 2016-06-03 02:37:14 +01:00
James Benton
d394caad88 coreinit: Calculate actual thread priority. 2016-06-03 02:37:09 +01:00
Brett Lawson
6044bb47e3 Fix error in SortedQueue that sorts it in reverse order. 2016-06-03 02:34:07 -07:00
Brett Lawson
6a560ce695 Added some more error-checking assertions throughout. 2016-06-03 02:34:07 -07:00
Brett Lawson
efe45cf666 Fix issue where threads could be queued multiple times. 2016-06-03 02:34:07 -07:00
Brett Lawson
1f214b1bea Fix issue causing sorted queue inserts to loose items.
If the item we are inserting before was the head of the queue
the head of the queue was never updated to point to the new
item we just added at the head.
2016-06-03 02:34:06 -07:00
Brett Lawson
23b78299a1 Check to make sure scheduler is enabled during interrupts.
If it is not enabled, it means we interrupted someone who
was doing something 'critical' and is an error.
2016-06-03 02:34:06 -07:00
Brett Lawson
181a75817b Erase SortedQueue::insert and add some assertions. 2016-06-03 02:34:06 -07:00
Brett Lawson
0400e28bbe Added NatVis file which convertes BE to LE for special types.
Currently covers be_val (size 1, 2, 4), be_ptr and be_wfunc_ptr.
2016-06-03 02:34:06 -07:00
Brett Lawson
aaf93a1a2a Send the correct argv to new threads that start. 2016-06-03 02:34:06 -07:00
Brett Lawson
558feead7a Fix issue with queues where the link wasn't cleared. 2016-06-03 02:34:06 -07:00
Brett Lawson
77cbdb4cfe Add some assertions to our internal queue functions. 2016-06-03 02:34:05 -07:00
Brett Lawson
29347b6c78 Add lots of assertions to the scheduler. 2016-06-03 02:34:05 -07:00
Brett Lawson
2b98f7dbbe Add our own assertion header so we can have them in release mode. 2016-06-03 02:34:05 -07:00
Brett Lawson
af7f528d76 Throw an error if a non-ready thread is in a run queue. 2016-06-03 02:34:05 -07:00
raven02
2e205f08fe CF: add KILL instruction 2016-06-03 11:09:05 +08:00
James Benton
57964fce87 coreinit: Temporarily use basePriority for scheduling until we add priority calculations. 2016-06-03 02:32:29 +01:00
James Benton
49c1d7d724 Fix gfdtool build. 2016-06-02 22:40:53 +01:00
Brett Lawson
039d20ba7c Fix typo in alarm locking. 2016-06-02 17:21:08 -07:00
Brett Lawson
c6e606ad61 Launch game entirely under the default thread 0 context. 2016-06-02 17:21:08 -07:00
Brett Lawson
8f83688eda Fix wfunc_call to properly allocate stack space for arguments. 2016-06-02 17:21:08 -07:00
James Benton
632474c904 Try path before path/data for the base game path. 2016-06-03 01:20:44 +01:00
James Benton
1e0100beac coreinit: Fix leak of file and directory handles. 2016-06-03 01:20:44 +01:00
Brett Lawson
fee078d80d Fix an issue with reentrant interrupts occuring. 2016-06-02 04:01:22 -07:00
Brett Lawson
21fad5a203 Fix UninteruptibleSpinLock from permanently disabling interrupts. 2016-06-02 04:01:16 -07:00
James Benton
22414fcd4a gx2: Remove incorrect IndexType command from GX2DrawEx. 2016-06-02 21:50:07 +01:00
Brett Lawson
95ad7e0429 Disable the scheduler while handling interrupts. 2016-06-02 13:02:48 -07:00
Brett Lawson
51d965abc3 Send GPU flip message via an interrupt. 2016-06-02 13:02:48 -07:00