Commit Graph

21 Commits

Author SHA1 Message Date
James Benton
534c1fe87d Fix cores not waking on interrupt. 2015-10-07 17:29:04 +01:00
Brett Lawson
b19b88c205 Added significantly more debugging stuff. 2015-09-02 11:24:37 -03:00
Brett Lawson
0b76f7c7a1 Added the beginnings of debugger support. 2015-08-27 20:45:20 -04:00
Brett Lawson
8fd5547669 Initial pass of setting up a Win32 window for GL drawing.
This also initialises Core#1 with a primary context for drawing,
and Core#0, Core#2 with secondary context's sharing display lists
with Core#1.
2015-08-02 10:49:59 -03:00
James Benton
4c81f1f486 Make locking in Processor more explicit. 2015-08-01 17:56:54 +01:00
Brett Lawson
8d4bfa9393 Added names to threads to assist when debugging. 2015-08-01 13:25:09 -03:00
Brett Lawson
2ab624a262 Fixed race between fiber switch and delete.
Made FiberDeleteList core specific to guarentee that the
fiber switch occurs prior to deletion of the fiber.
Without this, fibers get destroyed while still executing,
corrupting their stack and crashing.
2015-08-01 13:19:01 -03:00
Brett Lawson
8ace143174 Fix race-condition with fiber and fiber-delete lists. 2015-08-01 12:37:07 -03:00
James Benton
d8562579e9 Fix interrupts not setting core->currentFiber.
Closes #27.
2015-08-01 12:30:53 +01:00
James Benton
2051b7c029 Fix deletion of fibers.
If you delete a fiber whilst its active, ExitThread is called.
So we must delete the fiber after we switch back to primary fiber.
2015-08-01 01:56:24 +01:00
James Benton
225328c307 First pass at interrupts and alarms.
Will probably be refactored/recoded, but progress is being made!

Closes #12.
2015-08-01 01:14:00 +01:00
James Benton
eeaa87226a Make fibers create/destroy on thread entry/exit.
Closes #20.
2015-07-30 21:46:36 +01:00
Brett Lawson
0ddd8d092b Cleaned up ppc type conversion headers. 2015-07-29 21:42:24 -04:00
Brett Lawson
a6ba1d6015 Update interpreter loop to be cia/nia based, use ppctypes for entrypoint setup. 2015-07-29 17:27:24 -03:00
James Benton
19ab2184d7 Add Memory Heap locking 2015-07-26 14:00:36 +01:00
James Benton
8cc4746704 Add some extra logging to fiber scheduler. 2015-07-15 04:44:07 +01:00
James Benton
dd6a6be894 Fix thread scheduling. 2015-07-09 16:17:03 +01:00
James Benton
46e9209340 Move to exjam/spdlog and add WiiU coreID & threadID to log messages. 2015-07-09 16:17:01 +01:00
James Benton
690eb0636a Implement all the thread synchronisation objects for the new scheduler.
Event, fastmutex, messagequeue, mutex, condition, semaphore.
This also gets rid of the silly systemobject system, yay!
Add some stubs for Alarm, need interrupt support in our CPU to implement.
2015-07-08 22:10:35 +01:00
James Benton
0bb36ed6b1 Improve thread scheduling.
Now much closer in behaviour to WiiU.
2015-07-08 01:15:21 +01:00
James Benton
b96e3f803c Create a new processor threading system using fibers.
There is now only 3 host threads, and WiiU game threads are now running
as fibers within the host threads.
2015-07-06 01:16:39 +01:00