Unknown W. Brackets
281685fd43
Fix minor scheduling issues in the vpl test.
2013-09-09 01:05:38 -07:00
Unknown W. Brackets
be468af52d
Refactor waiting thread removal.
2013-09-09 00:22:00 -07:00
Unknown W. Brackets
4bd391b098
Refactor waiting thread cleanup.
2013-09-09 00:22:00 -07:00
Unknown W. Brackets
1040123a97
Delete callbacks when their thread is deleted.
2013-09-09 00:22:00 -07:00
Unknown W. Brackets
4bba276696
Run callbacks in creation order, not notify order.
2013-09-09 00:21:59 -07:00
Unknown W. Brackets
87bd8d59e2
Clean up umd bad callback id errors, oops.
2013-09-09 00:21:53 -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
94e88943d8
Keep a single list of pending callbacks.
...
Doing it per type only meant that we'd incorrectly call a callback twice
if it was notified by e.g. scePowerRegisterCallback() and
sceKernelNotifyThread(), which isn't what's supposed to happen.
2013-09-09 00:21:14 -07:00
Unknown W. Brackets
d348b9d47a
Add callback handlers for msgpipes.
2013-09-08 15:06:36 -07:00
Unknown W. Brackets
9a2beffea5
Refactor and add a way to remove msgpipe waits.
2013-09-08 15:06:35 -07:00
Unknown W. Brackets
411468dbac
Adjust some helpers for msgpipes.
2013-09-08 15:06:35 -07:00
Unknown W. Brackets
f59d799a5b
Reorganize msgpipes code a bit to prep. for cbs.
...
No real changes.
2013-09-08 15:06:34 -07:00
Unknown W. Brackets
136d0b5c50
Split msgpipe handling logic from wait/resched.
...
This way I can reuse it for the callback stuff.
2013-09-08 15:06:34 -07:00
Henrik Rydgård
1fde96a95a
Merge pull request #3694 from unknownbrackets/atrac-minor
...
Improve sceAtrac error handling
2013-09-08 15:02:35 -07:00
Unknown W. Brackets
f1b62983b5
Add callback wait handlers for threadend as well.
2013-09-08 12:14:07 -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
8ae6694e1d
Use a waiting thread list in sceGe as well.
2013-09-08 11:57:44 -07:00
Unknown W. Brackets
5ec297c16c
Properly cancel waits in sceUmd.
2013-09-08 11:24:21 -07:00
Unknown W. Brackets
3fb2c8f654
Use a waitingThreads list for threadend.
...
The timeout wasn't being correctly written before, actually.
2013-09-08 11:15:09 -07:00
Unknown W. Brackets
b03be16fa6
Refactor thread end/delete a bit.
2013-09-08 10:50:55 -07:00
Unknown W. Brackets
b7c845d40b
Support a NULL out param for atrac3 decoding.
...
The PSP seems to silently accept it, maybe to skip data?
2013-09-08 09:56:38 -07:00
Unknown W. Brackets
f4bc5b1ec6
Return error in sceAtracDecodeData() on bad id.
...
Fixes #2428 .
2013-09-08 09:56:16 -07:00
Unknown W. Brackets
b7a2a92ebe
Improve sceAtracSetData() error handling.
2013-09-08 09:56:15 -07:00
Unknown W. Brackets
c3839a53e5
Fix some minor warnings.
2013-09-07 22:40:08 -07:00
Unknown W. Brackets
08b41df6a2
Change a few more log types.
2013-09-07 13:31:14 -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
1eb858602c
Add io async wait callback handlers.
2013-09-07 11:22:48 -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
f35b164d11
Refactor wait verification a bit in kernel waits.
2013-09-07 10:54:00 -07:00
Unknown W. Brackets
46b52ca552
Wake up waiting threads on file delete.
2013-09-07 10:53:59 -07:00
Unknown W. Brackets
cddfd2f3b2
Allow separate threads to wait on async io.
2013-09-07 10:53:59 -07:00
Henrik Rydgard
78d3ee3d6a
Misc cleanup, mostly logging code
2013-09-07 13:01:19 +02:00
Henrik Rydgard
7e37e183ed
Wrap more adhoc functions
2013-09-07 11:06:28 +02:00
Henrik Rydgard
3b323c4176
Add a bunch of empty adhoc functions
2013-09-07 01:53:51 +02:00
Henrik Rydgard
cc8e4cb8fe
Split out sceNetAdhoc* into a separate file from sceNet.
2013-09-07 00:55:42 +02:00
Unknown W. Brackets
a9a42b315c
Fix a bad comparison, duh.
2013-09-06 01:13:55 -07:00
Unknown W. Brackets
c93268fdd3
Fix some minor warnings.
2013-09-06 01:13:45 -07:00
Unknown W. Brackets
e6f6564a32
Dumb typo.
2013-09-05 23:10:29 -07:00
Unknown W. Brackets
6804f239b4
sceAudioOutputPannedBlocking() bad volume check.
2013-09-05 01:01:57 -07:00
Unknown W. Brackets
3ff6bc6060
Don't block a null enqueue if already empty.
2013-09-05 00:57:53 -07:00
Unknown W. Brackets
19c4c20f46
Correct sceAudioOutput2GetRestSample().
...
Should be samples, not bytes.
2013-09-05 00:50:20 -07:00
Lioncash
1583bcb499
Fix a null check in sceKernel.cpp
...
Since CreateByIDType() can return null, it seems odd that this would be after the statement "pool[i]->uid = i + handleOffset;"
2013-09-04 14:19:32 -04:00
Lioncash
02ec457cc9
Fix a null check
2013-09-04 14:07:52 -04:00
Henrik Rydgård
34f9947ad0
Merge pull request #3606 from unknownbrackets/callbacks
...
Wait func docs, sceKernelCreateCallback() cleanup, small refactor
2013-09-04 01:55:28 -07:00
Unknown W. Brackets
a8f100c94f
Add vblank wait callback handlers.
...
Turns out it's a deadline to wake up by, which makes sense.
sceDisplayWaitVblankStartMultiCB 10
-> Callback
sceDisplayWaitVblankStartMultiCB 2
+2 vblanks
<- Thread
+8 more vblanks
2013-09-03 23:35:39 -07:00
Unknown W. Brackets
7f1a6154b2
Check if vblank waits were released before waking.
2013-09-03 23:26:23 -07:00
Unknown W. Brackets
543df7ca7a
Refactor wait timeouts.
...
Also, make them not write the timeout ptr if the thread stopped waiting.
Feels safer.
2013-09-03 22:32:22 -07:00
Unknown W. Brackets
2a7e9a5afc
Cleanup sceKernelCreateCallback().
...
And tweak sceKernelReferCallbackStatus().
2013-09-03 22:18:15 -07:00
Unknown W. Brackets
e53e842b3b
Add some documentation to KernelWaitHelpers.
2013-09-03 22:16:24 -07:00
shenweip
f74aa2913e
Typo
2013-09-04 11:35:16 +08:00
shenweip
c05100e0e3
Add sceHeap,some games will call this.
...
e.g. Linear ModeSenritsu no Stratus
2013-09-04 11:05:14 +08:00
Unknown W. Brackets
4ac0f7a345
Handle it better when umd waits trigger during cbs.
2013-09-03 01:21:52 -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
3903f27dfd
Add handlers for callbacks during mbx waits.
2013-09-03 01:21:51 -07:00
Unknown W. Brackets
648dd5f154
Don't allow sceKernelWakeupThread() on cur thread.
...
I don't know why you wouldn't allow this, but the PSP firmware doesn't.
2013-09-03 01:21:50 -07:00
Unknown W. Brackets
722b878428
Fix sceKernelReferThreadRunStatus() layout.
...
Was missing size, so all fields were wrong.
2013-09-03 01:21:50 -07:00
Unknown W. Brackets
8bf1ef2616
Add handlers for delay and sleep callbacks.
2013-09-03 01:21:49 -07:00
Unknown W. Brackets
6e5426a528
Spend a lot less time calculating the hcount.
...
Tiny loss in precision, can't even notice. Cuts time significantly in
Valkyrie Profile.
2013-09-03 00:50:21 -07:00
Unknown W. Brackets
994e2b3e5c
Implement sceDisplayAdjustAccumulatedHcount().
...
And also make sure sceDisplayGetAccumulatedHcount() works right.
2013-09-03 00:50:20 -07:00
Unknown W. Brackets
db0c35a86d
Start the Hcount at the beginning of vblank.
2013-09-03 00:49:17 -07:00
Henrik Rydgard
9dcd67fc31
Pass the new sha1/md5 test.
2013-09-03 00:36:55 +02:00
Unknown W. Brackets
2a478c26ca
Fix mp3 bit rate info in sceMp3GetBitRate().
2013-09-01 17:22:19 -07:00
Unknown W. Brackets
fe1f4d53c6
Return an error on bad SAS sample rate.
...
Also reorder the types to fit the PSP's flag values.
2013-09-01 16:59:37 -07:00
Unknown W. Brackets
8998a1b303
Don't trash a list the GE interrupt handler needs.
...
Even after it's marked COMPLETED, the CPU needs it to start and finish the
interrupt. Fixes #2956 , where an existing completed list was not having
its interrupt run correctly.
2013-09-01 12:39:45 -07:00
Unknown W. Brackets
7349de55d1
Fix some initialization/sprintf warnings.
2013-09-01 01:15:07 -07:00
Unknown W. Brackets
a05c78f8fc
Keep unknown syscall reporting the same.
...
Oops.
2013-09-01 00:46:48 -07:00
Unknown W. Brackets
da0c9a86e5
Invalidate stubs/var imports when writing them.
2013-09-01 00:32:43 -07:00
Unknown W. Brackets
00412144c1
Get rid of the bad object errors on shutdown.
2013-08-31 18:45:05 -07:00
Unknown W. Brackets
842e972a36
Unresolve function imports, track in loader.
2013-08-31 18:45:05 -07:00
Unknown W. Brackets
dde39bd956
Optimize a bit by checking module names.
2013-08-31 17:45:17 -07:00
Unknown W. Brackets
33e001f017
Unexport var symbols when destroying modules.
...
The problem with a global list is that an unloaded module with unresolved
imports will get garbage written in. This should be safer, and hopefully
not slower.
Next up: func imports.
2013-08-31 17:31:30 -07:00
Unknown W. Brackets
9311d405e9
Centralize and track imports/exports.
...
So that we can "unresolve" them.
2013-08-31 17:00:08 -07:00
Henrik Rydgård
42ec8bc3ef
Merge pull request #3537 from unknownbrackets/utility-minor
...
Return wrong dialog type in screenshot/gamesharing
2013-08-31 14:44:35 -07:00
Unknown W. Brackets
08225cad23
Return wrong dialog type in screenshot/gamesharing.
...
Should at least reduce reports of these failing, and give us better info.
May also work more correctly.
2013-08-31 14:42:55 -07:00
Unknown W. Brackets
74a7376604
Add some reporting and fix some duplicates.
2013-08-31 13:55:51 -07:00
kaienfr
a8557ab839
Fix the crash of game "tiger x dragon"
2013-08-31 21:35:24 +02:00
Henrik Rydgard
67edc28aa5
Add reporting for some configurable systemparams that don't seem very interesting to keep
2013-08-30 23:06:21 +02:00
Henrik Rydgard
0d0b43818c
Warning fixes and stuff
2013-08-30 20:14:16 +02:00
Unknown W. Brackets
0d0d036522
Clean up MAC address conversion in HLE.
...
Not planning to implement net, but this fixes a potential crash / buffer
overflow, and implements a commonly reported unimplemented function.
2013-08-29 23:47:03 -07:00
papel
d22e555e4f
Fix volume and name of Latin American languages.
2013-08-29 13:25:29 -03:00
CPkmn
47ae4709ba
Update sceKernelModule.cpp
2013-08-29 01:26:54 -07:00
Unknown W. Brackets
15a0f39fa1
Return yet more errors while inside interrupts.
2013-08-28 23:15:13 -07:00
Unknown W. Brackets
686d893d5c
Return more correct errors inside interrupts.
2013-08-28 22:35:06 -07:00
Unknown W. Brackets
211c2bd955
Refuse a few more waits w/ dispatch/intr disabled.
2013-08-28 22:35:05 -07:00
Unknown W. Brackets
8f25829b06
Change sceAudioOutput* unreseved ch errors.
...
Tests show it should be this other error code.
2013-08-28 22:35:05 -07:00
Unknown W. Brackets
17a5a42a14
Disable some common waits inside interrupts.
2013-08-27 23:55:37 -07:00
Unknown W. Brackets
61fae4e920
Return proper errors while dispatch disabled.
...
In at least the majority of waits.
2013-08-27 23:55:37 -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
93b461774a
Disable common wait funcs while intr disabled.
...
Per PSP tests.
2013-08-27 23:55:35 -07:00
Unknown W. Brackets
130f664030
Oops, disabling a subintr did not work.
2013-08-27 23:55:34 -07:00
Unknown W. Brackets
9aaad39b46
Disable sceKernelDelayThread() w/intr disabled.
...
But automatically resume the dispatch thread if only it is disabled.
2013-08-27 23:55:34 -07:00
Unknown W. Brackets
1c51564896
Stop practicing thread necromancy.
2013-08-27 23:55:34 -07:00
Henrik Rydgard
a530d47fcd
Clamp bad audio pitches for safety.
2013-08-27 22:47:45 +02:00
Henrik Rydgard
6360fcb0ae
Add some stats to get some idea of much alpha tested drawing we do.
...
Turns out it's one hell of a lot and we really should fix this by
checking both vertices and textures to deduce when we can just skip
alpha testing safely, probably quite often.
I care about this because alpha testing drawing is very expensive
on some mobile chips.
2013-08-27 21:01:17 +02:00
Henrik Rydgård
5b553d3c45
Merge pull request #3435 from unknownbrackets/audio-minor
...
Clear the mixbuffer when all channels empty
2013-08-27 01:05:20 -07:00
Henrik Rydgård
dde75143ac
Merge pull request #3430 from unknownbrackets/framebuf-wait
...
Watch for consistently high flips, not spurts
2013-08-27 01:04:59 -07:00
Unknown W. Brackets
a0db57a5d3
Clear the mixbuffer when all channels empty.
2013-08-26 21:06:26 -07:00
Unknown W. Brackets
57d057d661
Watch for consistently high flips, not spurts.
2013-08-26 20:12:26 -07:00
the avenger
914392708c
iOS buildfix
2013-08-26 06:01:23 -07:00
Unknown W. Brackets
fa57e23305
Implement volatile memory lock waiting.
2013-08-26 01:04:37 -07:00
Unknown W. Brackets
ea2a92a2c8
Seems like these are just aliases.
2013-08-26 01:04:12 -07:00
Henrik Rydgård
3cc28652f9
Merge pull request #3403 from unknownbrackets/fpl
...
Improve the FPL implementation
2013-08-26 00:25:00 -07:00
Unknown W. Brackets
cf9f92e12f
Reschedule after resuming interrupts.
2013-08-25 22:38:45 -07:00
Unknown W. Brackets
354dbfec6c
Improve some reporting of options structs.
2013-08-25 16:43:47 -07:00
Unknown W. Brackets
d547d2b391
Implement sceKernelCancelMutex().
2013-08-25 16:38:49 -07:00
Unknown W. Brackets
18832f3ca7
Wrap sceKernelFreeFpl() and use better errors.
2013-08-25 16:38:49 -07:00
Unknown W. Brackets
6c6aa1b8ee
Wrap sceKernelAllocateFpl() and friends.
2013-08-25 16:38:49 -07:00
Unknown W. Brackets
61e240f482
Allocate fpl blocks in a ring, like the PSP.
2013-08-25 16:38:48 -07:00
Unknown W. Brackets
8d750d65e8
Properly remove timed out fpl waits from status.
2013-08-25 16:38:48 -07:00
Unknown W. Brackets
a947c95829
Clean up sceKernelReferFplStatus().
2013-08-25 16:38:47 -07:00
Unknown W. Brackets
fb95f07c5d
Implement cancel and delete for fpls.
2013-08-25 16:38:47 -07:00
Unknown W. Brackets
a2471b810c
Implement basic fpl waiting.
2013-08-25 16:38:46 -07:00
Unknown W. Brackets
107b464ace
Handle the fpl alignment option as well.
2013-08-25 16:38:46 -07:00
Unknown W. Brackets
0969261e3e
Fix error handling in sceKernelCreateFpl().
2013-08-25 15:14:21 -07:00
Unknown W. Brackets
f48b730828
Wrap sceKernelCreateFpl and fix refer status.
...
Just initial changes to make it test properly.
2013-08-25 15:14:20 -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
2d806b4820
When fps cap is hit, delay current thread only.
...
Fixes Jeanne d'Arc freezing. Unfortunately, small hit to perf in God of
War, but may improve audio quality anyway...
2013-08-25 09:46:21 -07:00
Henrik Rydgard
4121d5ae62
Fix division by zero in low latency audio mode
2013-08-25 13:03:57 +02:00
sum2012
8679fb4748
ThreadManForKernel_ceadeb47 should equal to sceKernelDelayThread
2013-08-25 14:45:44 +08:00
sum2012
d017011882
Add ThreadManForKernel and ModuleForKernel
...
Sample log:https://gist.github.com/sum2012/3bb5deb1a806ef18f5f3
2013-08-25 10:48:32 +08:00
Unknown W. Brackets
109ad17ac6
Use a typesafe struct for opcodes.
...
Also, correctly read delayslots using Read_Instruction on ARM.
2013-08-24 15:36:24 -07:00
Unknown W. Brackets
ec46fdd06c
Warning fixes in msgpipes.
2013-08-24 15:36:24 -07:00
Unknown W. Brackets
690c11e590
Oops, quick warning fix.
2013-08-24 11:33:32 -07:00
Henrik Rydgard
ee37d51c4b
Just some formatting/cleanup
2013-08-24 11:56:40 +02:00
Henrik Rydgard
507050e966
Add an option for the lower latency audio mode we had in an #ifdef before
2013-08-24 11:56:39 +02:00
Henrik Rydgard
dfb91d4532
Track number of GPU commands executed per call level.
...
This is to get an idea if it would be beneficial to compile and cache display lists. Looks like it would be for some games, for example in GTA it's often 20k/80k/20k commands per frame - that is 100k executed commands per frame that could potentially just be executed instead of interpreted. Likewise in Wipeout. Of course, this means yet another cache with invalidation issues etc..
2013-08-23 11:29:55 +02:00
Unknown W. Brackets
1ed8edb0d3
Avoid some dangerous hex constant widths.
2013-08-22 23:23:48 -07:00
Unknown W. Brackets
2ef650aa2d
Add a bunch of HLE functions for better reporting.
2013-08-22 23:04:55 -07:00
Unknown W. Brackets
fca0af8e70
Add some kernel-related HLE stubs for reporting.
2013-08-22 23:04:16 -07:00
CPkmn
b0d203454f
Update sceNet.cpp
2013-08-22 15:55:03 -07:00
Henrik Rydgard
c46b7fbe1b
Let's try doing all I/O on the thread if threading is enabled, no matter how short.
2013-08-21 20:50:45 +02:00
Unknown W. Brackets
19016ac7c4
Cut down on some kernel HLE reporting.
...
Not sure where these are coming from, hacked games?
2013-08-21 08:40:31 -07:00
Unknown W. Brackets
a217cefa11
Tone down some less needed reporting.
2013-08-21 08:40:29 -07:00
Unknown W. Brackets
72ce41f41c
Report a couple unhandled blocks.
2013-08-21 01:20:06 -07:00
Henrik Rydgard
25ab9edd8a
Revert "Revert "Stop lying about free memory in HLE.""
...
This reverts commit f13d6e4109
.
2013-08-20 01:17:52 +02:00
Henrik Rydgard
f13d6e4109
Revert "Stop lying about free memory in HLE."
...
This reverts commit 8191ea4d76
.
2013-08-20 00:58:02 +02:00
Henrik Rydgard
b186294132
UI tweaks. Change to cleaner background image.
2013-08-20 00:49:25 +02:00
Henrik Rydgard
6ca3b43b9a
Measure actual fps (frameskip+unthrottle included), show all three on one line if you choose "both" (which I probably should rename)
...
Also prevent annoying scrolls in key mapping dialog
2013-08-19 22:06:49 +02:00
Unknown W. Brackets
4f7f963274
Correct sceKernelReferMsgPipeStatus().
2013-08-18 18:45:43 -07:00
Unknown W. Brackets
a53c5d291c
Update result on non-buffer receive empty too.
2013-08-18 18:45:43 -07:00
Unknown W. Brackets
2d1b2bc769
Writing 0s on delete/cancel wasn't right after all.
2013-08-18 18:45:43 -07:00
Unknown W. Brackets
642e7b255e
Drain as much as possible before waiting.
2013-08-18 18:45:42 -07:00
Unknown W. Brackets
e6236a1d31
Fix sceKernelReceiveMsgPipe() with no buffer.
...
And simplify, reschedule correctly.
2013-08-18 18:45:42 -07:00
Unknown W. Brackets
b7ea35b71d
Add some error checking to msgpipe receives.
2013-08-18 18:38:14 -07:00
Unknown W. Brackets
e2f0dfe243
Wrap sceKernelReceiveMsgPipe() and friends.
2013-08-18 18:38:14 -07:00
Unknown W. Brackets
6750794c8a
Fix a weird sceKernelTrySendMsgPipe() edge case.
2013-08-18 18:38:12 -07:00
Unknown W. Brackets
769bac3acf
Fix send of 0 bytes, more error handling.
2013-08-18 18:38:12 -07:00