Commit graph

4506 commits

Author SHA1 Message Date
Zhuowei Zhang
8b64dddc1f coreinit: implement OSTicksToCalendarTime 2015-08-01 00:20:36 -07: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
e062e33cb6 Temp hack, limit MEM2 free size to 994MB.
Maybe we are too conservative with our RAM if we have this much free!
2015-08-01 01:15:14 +01:00
James Benton
06b3c5f4c4 Re-enable OSSleepTicks.
Fixes #8.
2015-08-01 01:14:13 +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
ecebe35668 Fix parameters above grp10.
@Brett19 might want to clean this up, hacked it in for now...
2015-08-01 01:12:22 +01:00
James Benton
9489e932f2 Line endings. 2015-08-01 01:11:55 +01:00
James Benton
0a78a5a3fd Make thread priority signed value. 2015-08-01 01:11:36 +01:00
James Benton
36c80d8def Fix bug in OSAppendQueue. 2015-08-01 01:11:15 +01:00
James Benton
e132f864d0 Add helper OSTimeToChrono to conver OSTime to std::chrono::time_point. 2015-08-01 01:10:14 +01:00
James Benton
4c1e766da3 Fix bad overwrite of zalloc and zfree. 2015-08-01 01:09:12 +01:00
James Benton
bd80f1f01b Fake some async file system operations.
Fallsback to synchronous API and immediately calls the callbacks.
2015-08-01 01:03:57 +01:00
James Benton
000f63b65e Change system time to use std::chrono. 2015-07-31 20:43:29 +01:00
James Benton
f8b563d51f Change signed shift to unsigned.
Close #21.
2015-07-30 21:59:27 +01:00
aspico
ed89c1c51c factorial 2015-07-30 21:59:22 +01:00
aspico
a651b9e72b added branching test, and fixed and tests 2015-07-30 21:59:17 +01:00
aspico
0ec7b4a58b corrected a few tests, and corrected carry computation 2015-07-30 21:59:12 +01:00
aspico
fa876d28fd changed to hex constants for logical and tests 2015-07-30 21:59:07 +01:00
aspico
47b299a22a new tests for addition and logical and 2015-07-30 21:59:01 +01:00
Your Name
2474303639 Corrected overflow test 2015-07-30 21:58:56 +01:00
Your Name
c4596faf34 Adding tests for additions overflow/carrying 2015-07-30 21:58:49 +01:00
James Benton
eeaa87226a Make fibers create/destroy on thread entry/exit.
Closes #20.
2015-07-30 21:46:36 +01:00
James Benton
68df5e3eb7 Make code loading use max_codesize value from cos.xml. 2015-07-30 20:00:44 +01:00
James Benton
008b61aaac Cleanup dynload. 2015-07-30 20:00:39 +01:00
James Benton
76d37f68f5 Remove unnecessary HeapHandle. 2015-07-30 20:00:11 +01:00
Brett Lawson
27f0cadf54 Improve argument logging. 2015-07-29 22:17:38 -04:00
Brett Lawson
0ddd8d092b Cleaned up ppc type conversion headers. 2015-07-29 21:42:24 -04:00
Brett Lawson
a3c9932ae9 Update wfunc_ptr to support direct calling. 2015-07-29 19:24:06 -03:00
James Benton
a9cb6f32ed Fix uninitialised state->lr on new thread. 2015-07-29 22:34:08 +01:00
James Benton
98e18bdb80 Remove unused fiber member from ThreadState. 2015-07-29 22:33:44 +01:00
James Benton
b8aaf9c0b8 Store lr/nia in x64 stack rather than ppc.
Because its simpler!
2015-07-29 22:02:57 +01:00
Brett Lawson
f6a905c54d Fix wfunc_ptr stack storage to be correcter. 2015-07-29 17:36:27 -03:00
James Benton
7789f5c687 Implement zalloc and zfree callbacks. Fixes #17. 2015-07-29 21:32:58 +01:00
James Benton
68e2864a84 Brett pls \o/ 2015-07-29 21:32:58 +01:00
James Benton
8c80d6e494 Remove wfunc_ptr operator().
It's complicated...
2015-07-29 21:32:57 +01:00
James Benton
a4031ef835 Add support for void return type to ppcinvoke 2015-07-29 21:32:57 +01: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
Brett Lawson
87dec62bfa Update coreinit to use partial variadic function stuff. 2015-07-28 23:00:34 -04:00
Brett Lawson
781c0df8f7 Improved vararg function logging. 2015-07-28 22:55:09 -04:00
Brett Lawson
d7e6a328e6 Fix coreinit using 64-bits size_t instead of 32-bits. 2015-07-28 22:41:08 -04:00
Brett Lawson
381e9587b4 Improved C++ variadic function handling. 2015-07-29 15:24:27 -03:00
Brett Lawson
35651e5613 Improved CPP<->PPC calling system. 2015-07-29 15:24:27 -03:00
zhuowei
9a28c0e6c0 main: fix crash when log level not specified
For some reason the default value isn't being picked up by docopt; manually check if value is not specified and default to trace
2015-07-28 19:10:12 -07:00
James
1a7eee67d5 Merge pull request #19 from zhuowei/log-config-and-coreinit-stubs
Log config
2015-07-28 17:40:12 -07:00
James Benton
4c629b0e4b Skip unimplemented OSSleepTicks. 2015-07-29 01:05:12 +01:00
James Benton
fec9a5d1ce Fake FSReadFileASync with synchronous read.
This will all go very wrong if a game checks the async read status!
2015-07-29 00:57:46 +01:00
zhuowei
6d318424a1 interpreter: jit_fallback should use 64-bit mov for thread state
The threadState pointer may not fit in a 32-bit register
2015-07-28 16:34:15 -07:00
Zhuowei Zhang
35832e8b25 main: add command line parameters to enable async logging and change log
verbosity
2015-07-27 20:35:48 -07:00
James Benton
862f98cdf0 Implement COSWarn. 2015-07-26 23:58:38 +01:00
James Benton
b9928bce6b Implement FSGetPosFile 2015-07-26 23:58:26 +01:00