114 Commits

Author SHA1 Message Date
Unknown W. Brackets
8851fc1685 Remove savedIdRegister/MIPS_CALL_ID.
We've never trusted it anyway, simpler without dealing with this stuff.
2014-06-22 11:29:47 -07:00
Unknown W. Brackets
b9ede6aade Add a class to create helper threads from HLE.
This should be usable from sceIo as well.
2014-05-22 23:38:21 -07:00
Unknown W. Brackets
a843cbd580 Shrink the very common sceKernelThread.h include. 2014-03-15 11:44:02 -07:00
lioncash
b9886942a7 Fix some vertical alignments in misc Core source files. 2014-03-03 11:16:53 -05:00
Henrik Rydgård
e5e17fbc6e More include cleanup. Hoping for very slightly faster compile times.. 2013-12-30 10:49:05 +01:00
Henrik Rydgård
00c32ddadb Mostly get rid of including "Globals.h" 2013-12-30 10:17:11 +01:00
Unknown W. Brackets
e73d43c434 Correct sceKernelTlspl func names, etc.
This is mostly pedantic but it's nice to have the right names.
2013-12-02 23:40:16 -08:00
Unknown W. Brackets
26f5922174 Return the correct value for fcr0/fir.
This is what the PSP actually returns, it's read only.
2013-11-14 23:39:08 -08:00
Unknown W. Brackets
04ec987448 Initialize thread regs with 0xDEADBEEF.
Also initialize the float regs to NaN.
2013-10-29 21:39:24 -07:00
Unknown W. Brackets
b928f50353 Cleanup sceKernelRegisterExitCallback() per tests. 2013-09-29 01:10:07 -07:00
Unknown W. Brackets
a7ec139b5a Savestate the exit callback, reporting.
Seems like LoadExecForUser_362A956B() uses it, so we need to save it.
I have no confidence that function works correctly, so let's report it.
2013-09-29 00:19:54 -07:00
Unknown W. Brackets
64b75ed3ff Decentralize callback registration.
Callbacks are always tied to THEIR thread, and the registration was all
based on the current thread which is just not the right way.
2013-09-09 00:21:15 -07:00
Unknown W. Brackets
6d8213b0c5 Always specify retval when resuming a thread. 2013-09-08 12:02:18 -07:00
Unknown W. Brackets
4c828cd9a0 Remove __KernelTriggerWait(), no longer used. 2013-09-08 11:58:40 -07:00
Unknown W. Brackets
d8d8d3b0ec Use a different wait type for async io. 2013-09-07 11:04:42 -07:00
Unknown W. Brackets
2a7e9a5afc Cleanup sceKernelCreateCallback().
And tweak sceKernelReferCallbackStatus().
2013-09-03 22:18:15 -07:00
Unknown W. Brackets
b20bb3b609 Refactor down the begin/end callback stuff. 2013-09-03 01:21:52 -07:00
Unknown W. Brackets
1bf974aff6 Implement VPL/FPL callback handlers.
Smells like time to refactor, there are less differences than I expected.
2013-09-03 01:21:51 -07:00
Unknown W. Brackets
252bf04c64 sceKernelDelaySysClockThread() cleanup.
It doesn't wait either of course.
2013-08-27 23:55:35 -07:00
Unknown W. Brackets
fa57e23305 Implement volatile memory lock waiting. 2013-08-26 01:04:37 -07:00
Unknown W. Brackets
846178a588 Optimize thread switching a bit.
~2.5% improvement in Zettai Hero Project (while multithreading.)
2013-08-15 01:26:16 -07:00
Unknown W. Brackets
7ac67a8931 Add a function to walk the stack, not yet perfect.
Could use improvements, but with a decent symbol table does very well so
far in the games I tested it in.
2013-08-12 01:54:14 -07:00
Unknown W. Brackets
4a4f07df8e Add waiting/resuming to TLS funcs.
Nice and simple, no callbacks or timeouts.
2013-07-31 00:22:36 -07:00
Unknown W. Brackets
81f7103e0b Use *_le for the sceKernel* funcs. 2013-07-25 08:04:34 -07:00
Unknown W. Brackets
88ce95470c This one is worth reporting. 2013-07-07 18:10:32 -07:00
Kingcom
82c242f237 Added "Wait type" and "Priority" columns to thread list 2013-07-06 21:40:41 +02:00
Unknown W. Brackets
0c41d4e952 Don't allow release wait for HLE delays.
Although, presumably the thread would stop waiting, I guess the HLE func
in most cases probably checks and re-waits?

Fixes breakage in Jeanne d' Arc, which constantly releases from wait the
main thread, but calls things like sceMpegCreate which do block.
2013-06-08 23:39:49 -07:00
Unknown W. Brackets
32a557803b Reporting in sceKernelChangeCurrentThreadAttr(). 2013-06-06 00:08:24 -07:00
Unknown W. Brackets
e16cd7d9d9 Validate params in sceKernelChangeThreadPriority(). 2013-06-05 23:04:42 -07:00
Unknown W. Brackets
f397f83b4f Buildfix for Mac / iOS. 2013-05-26 19:02:40 -07:00
Unknown W. Brackets
0d828554bc Add a wait type for modules to handle return right. 2013-05-26 10:54:11 -07:00
Unknown W. Brackets
c34854ead3 Use a custom RA for module funcs. Not used yet.
But it will be.
2013-05-26 10:28:08 -07:00
Unknown W. Brackets
a779645152 Wrap sceKernelGetThreadExitStatus().
So it's usable internally too.
2013-05-26 10:17:59 -07:00
Unknown W. Brackets
e6795b1a41 Initial attempt at a suspend/resume thread impl. 2013-05-26 01:01:29 -07:00
Unknown W. Brackets
084ad5aa53 Wrap the sleep/wakeup HLE funcs. 2013-05-25 20:43:19 -07:00
Unknown W. Brackets
0fb5877d75 Implement sceKernelExtendThreadStack().
Fixes #1833.  Implemented using fake nids instead of callbacks since
it's simpler to get them (and waits and recursion) right.
2013-05-18 20:21:28 -07:00
nachume
2181b76c42 ISO that replaced EBOOT.BIN is playable.
implement LoadExecForUer_362A956B() and sceKernelRegisterExitCallback.
Add some ERROR define on kernel.h. I was referring to the jpcsp.
2013-05-04 20:34:33 +09:00
Unknown W. Brackets
d131588a6d Validate sceKernelStartThread() args better. 2013-04-28 00:34:49 -07:00
JimLee168
3ce26e03df Add part sceKernelExtendThreadStack content
Fixes NPJH50624
2013-04-19 22:22:35 +08:00
Unknown W. Brackets
efd71e2444 Make sceKernelNotifyCallback() error if invalid cb.
Which makes Numblast clearly happy.
2013-04-14 23:45:46 -07:00
Henrik Rydgård
b5b13c6ab5 Merge pull request #1251 from unknownbrackets/module-minor
Cleanup sceKernelGetModuleIdByAddress()
2013-04-11 00:45:42 -07:00
Unknown W. Brackets
5aceceecd3 Remove global module id var hacks.
Nothing needs them anymore.
2013-04-10 21:16:31 -07:00
Unknown W. Brackets
1f1560a9d6 Don't mark sceKernelExitThread() as an error.
Also, add some reporting and make the sceKernelCreateThread log message
shorter.
2013-04-09 23:23:10 -07:00
Unknown W. Brackets
5e14cab945 Don't save vregs for threads that don't use them. 2013-04-07 11:47:00 -07:00
Unknown W. Brackets
65ac7389d7 Don't get stuck on idle when interrupts run.
This was happening when the dispatch thread was disabled.
2013-04-06 17:04:20 -07:00
Unknown W. Brackets
fb26941a27 Implement sceGeListSync(). 2013-04-06 02:30:38 -07:00
Unknown W. Brackets
c57954a72e Implement sceGeDrawSync(). 2013-04-06 02:30:37 -07:00
Unknown W. Brackets
fe60677f75 Make mutexes handle callbacks better + before.
Mutex and semaphores (but NOT lwmutexes) call callbacks before attempting
the lock, but only if it would not generate errors.

Have not yet tested other wait types.
2013-03-30 16:12:38 -07:00
Unknown W. Brackets
eace0e75c1 sceKernelWaitSemaCB() should run callbacks first.
Patapon 2 gets back to the menu with this.
2013-03-30 16:12:38 -07:00
Unknown W. Brackets
d2abdf17be Add a waittype registry to handle callbacks right. 2013-03-30 16:12:37 -07:00