Commit graph

5222 commits

Author SHA1 Message Date
James Benton
80dbfeb5eb LRESULT WndProc 2015-08-02 15:33:24 +01:00
James Benton
44f1f37082 enum class is not fit for this purpose. 2015-08-02 15:27:11 +01:00
James Benton
f9ab0223f6 Add GX2SetVertexUniformReg stub. 2015-08-02 15:27:11 +01:00
James Benton
c59c2df75a Add GX2SetPixelTexture stub. 2015-08-02 15:27:11 +01:00
James Benton
2e04cd9242 Add GX2ClearBuffersEx stub. 2015-08-02 15:27:10 +01: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
e58b793dfa Merge pull request #28 from zhuowei/master
coreinit: implement OSConsoleWrite
2015-08-02 02:47:12 +01:00
Zhuowei Zhang
1e707c784b zlib: fix typo in free wrapper 2015-08-01 18:35:07 -07:00
Zhuowei Zhang
f85db148bf coreinit: implement OSConsoleWrite 2015-08-01 17:32:22 -07:00
James Benton
4c81f1f486 Make locking in Processor more explicit. 2015-08-01 17:56:54 +01:00
James Benton
ba4f83fff1 Fix OSCheckAlarms not corretly setting next interrupt timer. 2015-08-01 17:53:42 +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
Brett Lawson
34dd040c75 Fix bug in handling of zlib alloc/free.
Note that while we now use game-memory for internal zlib
allocations, the data stored in that memory is big-endian
and unreadable by the game.
2015-08-01 11:43:22 -03:00
Brett Lawson
c6ffb1c617 Added platform-specific headers and made OSTicksToCalendarTime thread-safe. 2015-08-01 10:52:23 -03:00
James Benton
882edddb5c Use CoreCount constant instead of value 3.
"Future-proof" ;)
2015-08-01 12:31:13 +01:00
James Benton
d8562579e9 Fix interrupts not setting core->currentFiber.
Closes #27.
2015-08-01 12:30:53 +01:00
James Benton
9a4dcb2703 Cleanup initial thread creation. 2015-08-01 12:22:53 +01:00
James Benton
f4482ae37b Add OSSprintfFromSystem which will sprintf into a buffer allocated from system memory. 2015-08-01 12:22:19 +01:00
James Benton
daafcf5ec6 Add CHECK_OFFSET and CHECK_SIZE for OSCalendarTime. 2015-08-01 11:29:51 +01:00
James
34c618305c Merge pull request #26 from zhuowei/ticks-to-calendar-time
coreinit: implement OSTicksToCalendarTime
2015-08-01 11:23:41 +01:00
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
824b2f7660 Update sln version to VS2015 release. 2015-08-01 01:14:37 +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
bcef82ee0f Fix wiiu project to be dependant on its external libraries. 2015-07-29 23:02:46 -04:00
Brett Lawson
27f0cadf54 Improve argument logging. 2015-07-29 22:17:38 -04:00