Commit Graph

71 Commits

Author SHA1 Message Date
Unknown W. Brackets 4da08f4f6e Restore thread if there's no interrupt handler set.
If dispatch is disabled and we don't do this, it'll just hang, never
switching back to a thread that can re-enable dispatch.

Fixes #5172.
2014-01-21 22:47:18 -08:00
Unknown W. Brackets d24668c9c3 Eat some cycles in suspend/resume interrupt funcs.
These are really common, hope this doesn't have ill effects...
2014-01-19 12:44:52 -08:00
Unknown W. Brackets 13bf4d83fa Add memchecks for common HLE copy operations.
Better to catch some than miss everything.
2013-12-14 14:56:05 -08: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 859d14d3f5 Correct sceKernelIsCpuIntrSuspended().
It takes a param.  Verified by tests, it just returns what the param
means, not anything about the current state.
2013-11-04 08:03:51 -08:00
Unknown W. Brackets 9ebaf7b68b Fill registers with 0xDEADBEEF after most syscalls.
Some, like sceMpegRingbufferPut(), we don't, since... it's complicated.
But most we do, like a real PSP does.
2013-10-30 00:47:04 -07:00
Henrik Rydgard 5bdb9e976b Track copies of framebuffers in ram created through sceDmacMemcpy, so that we can display them.
Fixes MotoGP while also, in effect, committing #3859.
Removes the horrifying ramDisplayFramebufferPtr hack.
2013-09-21 18:53:55 +02:00
Unknown W. Brackets 50e9e45d65 Check version in each DoState() func.
They bail on PointerWrap error or bad version.
2013-09-14 20:23:03 -07:00
Henrik Rydgard 8c88dff5a4 More log categories, use them (and existing ones). Improve log config. 2013-09-07 22:02:55 +02:00
Henrik Rydgard 324cde5a79 Let's actually use the log category mechanism. A first step. 2013-09-07 21:19:21 +02:00
Unknown W. Brackets 15a0f39fa1 Return yet more errors while inside interrupts. 2013-08-28 23:15:13 -07:00
Unknown W. Brackets 130f664030 Oops, disabling a subintr did not work. 2013-08-27 23:55:34 -07:00
Unknown W. Brackets cf9f92e12f Reschedule after resuming interrupts. 2013-08-25 22:38:45 -07:00
Unknown W. Brackets 8d7eb265be Log context switch time, shorten logging a bit.
This is really useful for seeing why games are slow or hanging.
2013-08-25 10:25:49 -07:00
Unknown W. Brackets e0f05ec382 Oops, lost these two lines editing.
They were important, darn.
2013-06-03 00:23:56 -07:00
Unknown W. Brackets 9139b037c5 Fix crash on ARM in sceKernelMemcpy().
Happened with unaligned addresses only.  Fixes #1889.
2013-06-02 23:40:31 -07:00
Unknown W. Brackets cdacdee030 Match syscall names to nids ot be safe.
Don't want any more mistakes like the sceVaudio one.
2013-05-19 22:12:39 -07:00
Unknown W. Brackets 1f2480fff3 Add a bounds check for interrupts. 2013-05-18 10:21:21 -07:00
Henrik Rydgard 5fc8de091d Make some logging VERBOSE 2013-05-09 11:18:38 +02:00
Unknown W. Brackets a68798225a Give ThreadManForUser_8DAFF657 and friends a name.
Calling allocate on the same thread gives the same ptr, but on a different
one it waits or returns a new ptr.

Let's call it thread local storage for now.
2013-04-14 13:02:01 -07:00
Unknown W. Brackets fe97fd6fc5 Add better savestate error handling.
Aborts when it can't load.
2013-04-13 01:39:17 -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 42b925a440 Initial stab at implementing some new memory funcs.
Borrowed from JPCSP, kept simple.  Need to do tests.
2013-04-07 20:57:53 -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 e6f3c7991c Don't wait on LwMutexes with dispatch disabled. 2013-04-06 17:04:17 -07:00
Henrik Rydgard 84d292010a Oops, sceKernelCheckThreadStack was already implemented. Let's hope both copies are the same. 2013-03-23 14:41:13 +01:00
Henrik Rydgard 6a4ae5bb51 Implement sceKernelCheckThreadStack 2013-03-23 14:26:54 +01:00
Unknown W. Brackets 913dca69ef Turn down logging for things that can be inferred.
If you see a thread switch for a vblank wait, you know what happened.
2013-03-10 22:56:24 -07:00
Unknown W. Brackets 62ab4b7f51 More signed compare warnings. 2013-03-02 15:34:16 -08:00
Unknown W. Brackets 37dffb6210 Implement sceKernelReferLwMutexStatus() and ByID(). 2013-02-24 22:50:48 -08:00
Unknown W. Brackets de7ada1982 Fix some x64 type warnings. 2013-02-24 10:39:06 -08:00
Unknown W. Brackets 51d5b84108 Fix some misc HLE warnings. 2013-02-18 09:04:43 -08:00
Unknown W. Brackets 112c1e9e23 Automatically delete pointers when savestating. 2013-02-04 08:28:22 -08:00
Unknown W. Brackets 07a5dca98e Expand out some savestate code saving non-pod. 2013-02-04 08:26:59 -08:00
Florent Castelli 8004d360dd Interrupt handler reorganization for easier GE interrupt support 2013-02-04 03:10:01 +01:00
Unknown W. Brackets 2fa0cf040d Fix alarm test by not interrupting when disabled.
vblank was interrupting/rescheduling when interrupts were disabled.
That's bad.
2013-02-03 13:48:19 -08:00
Unknown W. Brackets 21cfd087e1 Move Action out of Common, don't use savedV0.
Compiler error was annoying me anyway.
2013-01-06 15:56:13 -08:00
Unknown W. Brackets 4a713309a3 Make some libc-like funcs behave more like hw. 2013-01-02 00:35:31 -08:00
Henrik Rydgård 95c4e0b9c4 Quick build fix for gcc 2012-12-28 23:33:00 +01:00
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 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 db787d266d Require interrupt handlers to be registered.
This allows it to be save stated sanely.
2012-12-28 13:55:25 -08:00
Unknown W. Brackets 036f0f3ad9 Properly clear interrupt state on shutdown. 2012-12-23 22:08:53 -08:00
Henrik Rydgård ce214b3943 Assorted warning fixes 2012-12-23 09:44:43 +01:00
Florent Castelli c33eafd430 Warning fixes 2012-12-21 23:02:35 +01:00
Unknown W. Brackets 12fb91b7b5 Don't run interrupts while they're suspended. 2012-12-20 22:49:48 -08:00
Unknown W. Brackets 4fb6c8c0ac Reschedule after interrupts run.
It'll reschedule anyway, so this will just give us a message.

Hardware seems to reschedule, not just go back to the original
thread, but there may be more to it than that.
2012-12-20 21:59:10 -08:00
Unknown W. Brackets 9034cfbfd3 Defer HLE interrupts, vblank only when enabled.
Based on tests, vblank doesn't queue up (makes sense) while
interrupts are disabled.

I'm not 100% sure about the GPU stuff but it seems to only come
from HLE via sceGe, so this should fix those return values.
2012-12-20 21:54:40 -08:00
Unknown W. Brackets 529818c9cd Handle interrupt return values. 2012-12-20 20:07:54 -08:00