Commit graph

170 commits

Author SHA1 Message Date
Jean-Philip Desjardins
301c03ed30 Add some checks on SIF transfers to catch potential errors. 2017-01-29 21:13:11 -05:00
Jean-Philip Desjardins
815aeaac7d Break infinite loop if SemaReleaseSingleThread fails. 2017-01-29 21:13:11 -05:00
Jean-Philip Desjardins
226305c650 Generate and service IPU interrupts. 2017-01-06 19:18:00 -05:00
Jean-Philip Desjardins
15c847ab62 Release waiting threads when semaphore is deleted. 2017-01-06 19:18:00 -05:00
Jean-Philip Desjardins
15f0048c8f Add generic semaphore thread release function. 2017-01-06 19:18:00 -05:00
Jean-Philip Desjardins
96a7abf8bc Cleanup. 2017-01-06 19:18:00 -05:00
Jean-Philip Desjardins
525da09643 Use GetStructPtr to obtain thread context. 2017-01-06 19:17:59 -05:00
Jean-Philip Desjardins
b55b63b499 Add description for SetSyscall. 2016-12-11 16:32:54 -05:00
Jean-Philip Desjardins
d5ad9d0dcd Fix thread context structure layout to match the real thing. 2016-11-26 20:29:51 -05:00
Jean-Philip Desjardins
18c89807eb Reset thread state whenever it goes in dormant mode. 2016-11-26 20:29:51 -05:00
Jean-Philip Desjardins
bd031cd339 Cleanup. 2016-11-26 20:29:51 -05:00
Jean-Philip Desjardins
43ce1be72f Adjust initial thread SP/FP value. 2016-11-26 20:29:51 -05:00
Jean-Philip Desjardins
10c29ecaa9 Add check to make sure we don't go below the thread's stack base. 2016-11-26 20:29:51 -05:00
Jean-Philip Desjardins
5daa79ce6d Reset speed hack when it doesn't apply anymore. 2016-11-19 17:28:09 -05:00
Jean-Philip Desjardins
f167cdc60e Document speed hack. 2016-11-19 17:28:09 -05:00
Jean-Philip Desjardins
fd2a251540 Only force to check pending interrupts when they can be serviced. 2016-11-19 17:28:09 -05:00
Jean-Philip Desjardins
e5a0d26645 Add support for iEnableIntc and iDisableIntc. 2016-10-11 23:12:48 -04:00
Jean-Philip Desjardins
efec8dfdf9 Add support for iSuspendThread. 2016-10-11 23:12:00 -04:00
Jean-Philip Desjardins
a1013c7b2f Add interrupt variants for EnableDmac and DisableDmac. 2016-09-06 18:12:40 -04:00
Jean-Philip Desjardins
0e86cecfd7 Load patch description file from assets on Android. 2016-07-18 22:08:47 -04:00
Jean-Philip Desjardins
451b14cbc7 Use GetStructPtr to obtain Deci2Handler. 2016-07-10 22:47:26 -04:00
Jean-Philip Desjardins
7bdad6f93b Use GetStructPtr in ReferSemaStatus. 2016-06-02 22:00:41 -04:00
Jean-Philip Desjardins
ee8cd02bf2 Make sure SifDmaStat doesn't report transfer completion immediately. 2016-05-28 21:09:18 -04:00
Jean-Philip Desjardins
fb1e456734 Reset some of the kernel's state when ExecPS2 is called. 2016-05-08 17:44:02 -04:00
Jean-Philip Desjardins
884d7c47a9 Fix SleepThread return values. 2016-01-23 22:11:52 -05:00
Jean-Philip Desjardins
c801956344 Fix WakeupThread return values. 2016-01-23 22:11:51 -05:00
Jean-Philip Desjardins
2830a9b87b Fill in more thread information in ReferThreadStatus. 2016-01-23 22:11:51 -05:00
Jean-Philip Desjardins
c63431ab52 Improved handling of LoadExecPS2 system call.
- Executable path will now be taken in consideration.
- Fixed issue with UT's incomplete path.
- Use GetStructPtr to obtain proper pointers.
2015-12-05 19:24:44 -05:00
Jean-Philip Desjardins
da09a088df Use address translation when getting struct pointer in PS2OS. 2015-12-05 19:24:43 -05:00
Jean-Philip Desjardins
f103aac3ac Documented some of the address translation stuff. 2015-12-05 19:24:43 -05:00
Jean-Philip Desjardins
0d94c7603f Disable interrupts in EE kernel interrupt handler.
Needed by some games that check interrupt context by looking at IE bit of SR.
2015-11-04 01:04:35 -05:00
Jean-Philip Desjardins
c43b75def4 Use enum instead of constant value. 2015-11-04 01:04:32 -05:00
Jean-Philip Desjardins
bf69c7bf16 Added automatic tag for iPollSema. 2015-11-04 01:04:30 -05:00
Jean-Philip Desjardins
8d8d3cab04 Added alternative way of detecting when autotest is complete.
If no living thread is found to be running, "OnRequestExit" is called.
2015-10-27 00:26:40 -04:00
Jean-Philip Desjardins
adaba0b192 Fixed using NULL as integer errors/warnings. 2015-10-23 23:18:32 -04:00
Jean-Philip Desjardins
38e29edf28 Removed useless check. 2015-08-19 22:01:20 -04:00
Jean-Philip Desjardins
e4b0af6859 Fixed edge cases in EE SuspendThread and ResumeThread. 2015-08-19 21:59:46 -04:00
Jean-Philip Desjardins
a7c54150ff Reverted change to initial's thread priority. 2015-08-16 02:42:47 -04:00
Jean-Philip Desjardins
1045cc63ff Fixed return values for SuspendThread and ResumeThread. 2015-08-16 01:06:38 -04:00
Jean-Philip Desjardins
6138dd77ac Changed the way the thread ready queue is handled. 2015-08-09 00:03:42 -04:00
Jean-Philip Desjardins
ce640005b8 Migrated current thread id to OsVariableWrapper. 2015-08-08 23:36:00 -04:00
Jean-Philip Desjardins
5b6867050d Changed way idle thread is detected. 2015-08-06 01:39:20 -04:00
Jean-Philip Desjardins
97dc26d707 Use OsStructManager to handle threads in EE kernel. 2015-08-06 01:20:04 -04:00
Jean-Philip Desjardins
ec7074e87a Removed all mentions to thread quota. 2015-08-04 01:16:43 -04:00
Jean-Philip Desjardins
dc02fe8620 DMAC handlers are now handled using a linked list. 2015-07-26 01:11:43 -04:00
Jean-Philip Desjardins
33abecc37c Changed the way INTC handlers are managed in PS2OS. 2015-07-25 20:13:59 -04:00
Jean-Philip Desjardins
9b17a67670 Added DiskUtils.
Includes disk image creation routines, SYSTEM.CNF parser and "TryGetDiskId" helper.
2015-07-22 00:30:06 -04:00
Jean-Philip Desjardins
ed36cdb51f Make sure thread priority is reset on Terminate and Exit. 2015-07-12 00:01:51 -04:00
Jean-Philip Desjardins
be6a8769a5 Make sure current priority and initial priority are two separate things. 2015-07-12 00:00:35 -04:00
Jean-Philip Desjardins
804c96accd Fixed some of TerminateThread's behavior. 2015-07-04 22:35:53 -04:00