Unknown W. Brackets
4b39e39455
Start save stating the filesystem state.
...
Plus minor fixes and at least an attempt to make states the same
on both 32 and 64 bit.
2012-12-28 13:55:27 -08:00
Unknown W. Brackets
b81899876f
Don't leak MipsCall objects.
2012-12-28 13:55:26 -08:00
Unknown W. Brackets
a8c9c31e16
Add a registry for actions so they can be stated.
...
Also add late loaders to ensure things are hooked up properly.
2012-12-28 13:55:26 -08:00
Unknown W. Brackets
f5dd7f03e8
Change threadqueue and currentThread to be SceUIDs.
...
hmm, kind of a big change. Tried to add some checks to be safe.
2012-12-28 13:55:25 -08:00
Unknown W. Brackets
595759ef78
Implement a factory for kernel objects.
...
Couldn't think of a better way to do this, maybe there's some fancy
one I don't know about.
Also finished up a couple left over kernel objects.
Maybe a quarter the way there?
2012-12-28 13:55:22 -08:00
Unknown W. Brackets
23db819e90
No longer need this forward decl.
2012-12-24 01:42:33 -08:00
Unknown W. Brackets
49d4c45670
Make sure threading state is cleared on shutdown.
2012-12-23 21:49:44 -08:00
Unknown W. Brackets
9ba0ed46fd
Always create CoreTiming timers during kernel init.
2012-12-23 21:27:26 -08:00
Henrik Rydgård
862a11e7be
Clear some state between runs. Tabs fixing.
2012-12-23 11:16:32 +01:00
Unknown W. Brackets
66e942c545
Fix some "might be null" warnings.
2012-12-21 16:25:05 -08:00
Florent Castelli
c33eafd430
Warning fixes
2012-12-21 23:02:35 +01:00
Henrik Rydgard
4efb66fdb6
Fix hw transform and audio on android, misc
2012-12-21 12:57:43 +01:00
Unknown W. Brackets
5a501bb5ff
Fix minor typo.
2012-12-21 01:03:46 -08:00
Henrik Rydgard
8104a4af5b
Prettify logging of context switches
2012-12-20 15:23:15 +01:00
Henrik Rydgard
fbc825a73d
Buildfix
2012-12-19 18:35:20 +01:00
Henrik Rydgard
90e87ead84
Fix a relative path issue - apparently paths starting with '/' are still relative.
2012-12-18 14:13:35 +01:00
Unknown W. Brackets
35a38ac6b9
Ensure interrupts don't run on real threads.
...
If a thread waits on a sema, and an interrupt (such as an alarm) happens,
and the interrupt signals or deletes the sema, it needs to return the
value correctly.
For callbacks, it's injected, since they run on thread. But interrupts
aren't supposed to run on thread anyway, so this switches to idle.
2012-12-18 01:49:53 -08:00
Henrik Rydgard
ab35c7f612
Merge branch 'master' into mediaengine
2012-12-18 00:05:09 +01:00
Henrik Rydgard
5a11d4d9c5
Implement sceKernelGetThreadmanIdList (partially)
2012-12-17 22:21:17 +01:00
Henrik Rydgard
bc214dcf37
Merge branch 'master' into mediaengine
...
Conflicts:
Common/LogManager.cpp
Core/CMakeLists.txt
Core/Core.vcxproj
Core/Core.vcxproj.filters
Core/CoreParameter.h
Core/HLE/sceAudio.cpp
Core/HLE/sceKernel.cpp
Core/HLE/sceKernelThread.cpp
Core/HLE/sceMpeg.cpp
android/jni/Android.mk
2012-12-17 18:48:32 +01:00
Sacha
a1781b854a
Symbian support for project.
...
New UNUSABLE_MMAP code path for platforms that cannot use the required flags (Xbox 360, Symbian). Falls back to malloc() instead.
N1 define for compilers (GCCE) that don't like to assume (int)-1 will safely cast to (char)-1.
Miscellaneous space->tab fixes.
2012-12-13 13:15:20 +10:00
Unknown W. Brackets
955247b939
Minor opt: skip the deferred resched in idle.
...
This will probably be called most the frequently, e.g. to switch
between idle0 and idle1.
2012-12-09 22:50:57 -08:00
Unknown W. Brackets
36fb1a8392
Don't resume sleeping/etc. threads after cbs.
...
This could happen in a few cases, including the cb affecting its
own wait status.
2012-12-09 21:40:03 -08:00
Unknown W. Brackets
a218dcc0f0
Ignore deleted callbacks early in the chain.
...
This also ensures they won't prevent future callbacks from running.
2012-12-09 21:39:56 -08:00
Unknown W. Brackets
b02224615f
Run all pending callbacks in a row before resume.
...
Tested with multiple callbacks.
2012-12-09 21:39:48 -08:00
Unknown W. Brackets
e6e9ed1f45
Fix no return value in sceKernelDeleteThread().
...
Still need to test these funcs thoroughly.
2012-12-09 16:57:52 -08:00
Unknown W. Brackets
a1a4a02759
While running callbacks, defer wait info.
...
This way if a thread is resumed while running callbacks, it'll
actually resume.
2012-12-09 16:56:47 -08:00
Unknown W. Brackets
f145bafc7a
Wrap a few of the sceKernel*Thread funcs.
2012-12-09 01:04:54 -08:00
Unknown W. Brackets
5e8aa4c071
Implement deferred rescheduling/callbacks.
...
This way most HLE functions can be wrapped normally. Hurray, sanity.
2012-12-09 01:04:53 -08:00
Unknown W. Brackets
92e519c24b
Don't always reschedule after running callbacks.
...
When not waiting, usually only local callbacks are called.
Some functions are unique though.
2012-12-09 01:04:53 -08:00
Unknown W. Brackets
7044fafe84
Always run callbacks when rescheduling.
...
Not just when rescheduling because of a *CB() func.
2012-12-09 01:04:52 -08:00
Unknown W. Brackets
fda41752e8
Simplify the API for HLE funcs to do callbacks.
...
__KernelWaitCurThread() already (ultimately) calls __KernelCheckCallbacks.
2012-12-09 01:04:52 -08:00
Unknown W. Brackets
ff7e1d7be9
Fix running threads in processing callbacks state.
...
ActionAfterMipsCall was setting it back when it saved it.
2012-12-09 01:04:51 -08:00
Unknown W. Brackets
9cd47e210b
Callbacks: Don't trust s0 to retain the call id.
...
Patapon 2 at least was not during a call, preventing injection.
Hardware doesn't have to deal with injection so not a problem.
2012-12-09 01:04:51 -08:00
Unknown W. Brackets
771cf39811
Don't reschedule in sceKernelCheckCallback().
2012-12-09 01:04:50 -08:00
Unknown W. Brackets
3f43ab5bb5
Callbacks are always fired on their own thread.
...
At least, as far as I can tell. It does make sense too.
2012-12-09 01:04:50 -08:00
Unknown W. Brackets
15c05dc08c
Implement sceKernelTerminateThread(), not fully.
...
It's mostly correct but needs some tests and TLC.
This allows threads to be restarted.
2012-12-07 00:46:19 -08:00
Unknown W. Brackets
6fd71f5b27
Fix failed free issues with thread stacks.
2012-12-07 00:46:19 -08:00
Unknown W. Brackets
8bae2e0964
Cancel wakeup events when a thread ends.
2012-12-07 00:46:19 -08:00
Unknown W. Brackets
aea9b16a04
Add ctrl waits when there are no buffers yet.
2012-12-02 17:03:13 -08:00
Unknown W. Brackets
16c29a52a8
Improve debugging for bad callback ids.
2012-12-01 23:29:24 -08:00
Unknown W. Brackets
4abcb6a8ac
Fix sceUmdWaitDriveStatCB() so it fires right away.
...
This makes Crisis Core actually show loading again.
2012-12-01 23:29:23 -08:00
Unknown W. Brackets
c00f3dcdd8
Implement sceUmdCancelWaitDriveStat().
2012-12-01 23:29:22 -08:00
Unknown W. Brackets
a2ee736793
Process events when idle or switching threads.
...
Fixes hrydgard/ppsspp#104 , so things execute more accurately.
2012-11-30 23:09:14 -08:00
Unknown W. Brackets
998104e2eb
Consider threads still waiting until they wake.
...
This seems to match the actual behavior of timeouts much better.
2012-11-30 23:04:24 -08:00
Ced2911
6db4ea2ad1
less Memory::GetPointer
2012-11-27 10:18:36 +01:00
Unknown W. Brackets
fa9b9840d0
Implement LwMutex locking and unlocking.
2012-11-21 00:21:25 -08:00
Unknown W. Brackets
b71d998a20
Broadcast a threadend event to wake mutexes.
2012-11-20 02:20:16 -08:00
Unknown W. Brackets
619a9906de
Remove threads from semaphores when they timeout.
...
This makes wait tests *almost* pass. There's some timing
related issues left, though.
2012-11-20 02:20:15 -08:00
Unknown W. Brackets
4d71e32193
Update the value when mutexes timeout.
2012-11-20 02:20:14 -08:00