Commit Graph

3926 Commits

Author SHA1 Message Date
Unknown W. Brackets
5009dcab7a Add reporting for sceKernelDevkitVersion() calls.
We currently default to 1.50 as the reported version, but we more or less
emulate a 6.60 system.  It may be better to return 6.60, but let's see
what would actually be impacted by that first.
2016-06-26 20:52:48 -07:00
Unknown W. Brackets
80d72acaec Psmf: Correct default stream.
Fixes Jeanne d'Arc, others.
2016-06-07 20:41:13 -07:00
Henrik Rydgård
ce8d2bef57 Merge pull request #8803 from unknownbrackets/mpeg
Reject invalid MPEG puts for certain lib versions
2016-06-05 13:44:38 +02:00
Unknown W. Brackets
bda1956f90 Psmf: Enable error check on player create.
Reporting makes it look like this should be safe.
2016-06-04 18:17:38 -07:00
Unknown W. Brackets
cf2796de41 Psmf: Allow each struct to have its own stream.
Some games will create a clone, and then set a different stream on it,
e.g. one for the video, another for the audio stream.
2016-06-04 18:17:37 -07:00
Unknown W. Brackets
b13c68a373 Psmf: Correct get video/audio info errors.
This actually grabs from the currently specified stream, and fails if it's
the wrong type.  Additionally, return stream-specific info... unlikely to
matter, hard to imagine a video with a mono and stereo stream.

Also reduces log verbosity.
2016-06-04 18:17:37 -07:00
Unknown W. Brackets
185ad781f3 Psmf: Add better error handling for SetPsmf.
Checked on different devkit versions in case of changes.
2016-06-04 18:17:36 -07:00
Unknown W. Brackets
04dcaeae1d Mpeg: Move, rather than resetting, packetsAvail.
When we've got garbage data, this has to stay incorrect.  Without this,
Megaman X gets confused when playing its video (because it enqueues
garbage packets.)

See #3318.
2016-06-04 18:16:23 -07:00
Unknown W. Brackets
4ee39f82e4 Mpeg: Validate added packets.
Older libraries only, but this will cause it to reject packets that don't
make sense.  So far, this seems to mirror the behavior of various garbage
packets sent to the real firmware.
2016-06-04 18:16:22 -07:00
Unknown W. Brackets
41f2999a2b Mpeg: Write into the ringbuffer using actual ring.
This mimics behavior with clamped sizes and wrap around, and also makes it
easier to implement the garbage data handling the PSP has.
2016-06-04 18:16:21 -07:00
Unknown W. Brackets
6d14c17f26 Mpeg: Treat negative available packets as zero. 2016-06-04 18:16:19 -07:00
Unknown W. Brackets
deffb246ae Mpeg: Require less memory for older lib versions.
It seems it started requiring 64k at 1.05.
2016-06-04 18:16:18 -07:00
Henrik Rydgård
606856c9ad Merge pull request #8791 from unknownbrackets/delay
Minor sysclock delay accuracy improvements
2016-05-31 21:08:00 +02:00
Unknown W. Brackets
91887ad85c Psmf: Correct errors in current stream num. 2016-05-31 09:55:51 -07:00
Unknown W. Brackets
0a00777403 Psmf: Only write current type/channel if valid.
And improve error handling in general.
2016-05-31 09:55:51 -07:00
Unknown W. Brackets
7ad07ca82e Psmf: Handle stream specification per tests.
These seem buggy, but generally sane.
2016-05-31 09:55:50 -07:00
Unknown W. Brackets
cca9a73105 Psmf: Start at stream 0 when not specified. 2016-05-31 09:55:49 -07:00
Unknown W. Brackets
510db2051d Psmf: Detect PCM streams from private stream info.
This logic comes from Jpcsp.  Let's report though and see if there's more.
2016-05-31 09:55:49 -07:00
Unknown W. Brackets
74239c199d Psmf: Allow AUDIO type when specifying streams. 2016-05-31 09:55:48 -07:00
Unknown W. Brackets
5f7c95f249 Psmf: Count PCM as an AUDIO stream as well. 2016-05-31 09:55:47 -07:00
Unknown W. Brackets
9df727f94f Psmf: Stop pretending streamMap is a vector. 2016-05-31 09:55:47 -07:00
Unknown W. Brackets
8df298f622 Thread: Auto-resume dispatch for worse threads.
Seems this doesn't happen when you start a better priority thread, pretty
reproducibly.
2016-05-31 09:55:20 -07:00
Unknown W. Brackets
197f3393df Thread: Better/minor accuracy for sysclock delay.
Certain negative values shouldn't cause a delay, could help if a game has
a bug.
2016-05-31 09:55:19 -07:00
Unknown W. Brackets
baac12b327 Log args for dispatch/interrupt early-fail. 2016-05-31 09:55:18 -07:00
Unknown W. Brackets
d0d570c6ac ThreadEvent: Delete threads after handler runs.
It should actually run on the thread itself, it seems, but that's probably
not as important as the thread still existing.  This allows the handler to
get the thread name or etc.
2016-05-30 13:00:23 -07:00
Unknown W. Brackets
21ba67e1d7 Module: Add legacy save state stub fixup.
Forgot this, when we don't have the stub info.  Stub info is better, since
we might handle things differently.
2016-05-30 02:11:28 -07:00
Unknown W. Brackets
65820d6184 Thread: Use a short delay for 0us delays after all.
It seems the behavior varies.  Should help #6924 and #6981.
2016-05-29 22:04:47 -07:00
Unknown W. Brackets
1a3fc9cdeb Module: Avoid writing missing stubs on reimport.
In case they were manually linked, or something.
2016-05-29 08:29:51 -07:00
Unknown W. Brackets
9b706975ad Module: Reimport stubs on load state. 2016-05-29 08:27:19 -07:00
Unknown W. Brackets
47f16ed97b Module: Refactor stub imports to dedicated func. 2016-05-29 08:07:01 -07:00
Unknown W. Brackets
12b907ed60 Put syscalls back where they were supposed to be.
Oops, didn't mean to move this.  Might've broken save states.
2016-05-29 07:31:22 -07:00
Unknown W. Brackets
4fc12cdd29 ThreadEvent: Handle getting scheduled off a thread. 2016-05-29 00:59:52 -07:00
Unknown W. Brackets
97cce6ccfe ThreadEvent: Trigger handlers for start/exit too.
Start isn't in the right place or on the right thread, and exit isn't on
the right thread either.  But these don't seem very particular about what
thread they run on.
2016-05-28 21:19:28 -07:00
Unknown W. Brackets
c6cd614f2b Thread: Allow mipscalls to be scheduled in a row.
Should be fine to just use the stack to save these things, likely that's
what happens in real firmware.  This fixes issues when a second mipscall
is scheduled in the same HLE syscall.
2016-05-28 21:18:03 -07:00
Unknown W. Brackets
ceb36fc81d ThreadEvent: Allow an exit event handler on self. 2016-05-28 21:17:54 -07:00
Unknown W. Brackets
be1cde15ba ThreadEvent: Initial support for create/delete. 2016-05-28 21:17:36 -07:00
Unknown W. Brackets
e9916bdf0b ThreadEvent: Add management functions.
Currently never being triggered, though.
2016-05-28 21:17:16 -07:00
Unknown W. Brackets
04576189b4 Callbacks: Fix delete when multiple for a thread.
Oops, this was deleting all after the deleted one.
2016-05-28 21:15:25 -07:00
Unknown W. Brackets
a1fbcc3d93 Avoid directly calling osm from Core/GPU code.
This allows UI to handle the message however it wants to, and reduces
cross linkage issues.
2016-05-27 22:05:30 -07:00
Unknown W. Brackets
f0cc975865 Hook some funcs in Me and My Katamari.
One is a very hardcoded screenshot download / vfpu convert to 565, and the
other is some very weird check to make sure render is clear or has
happened or something.

The screenshot func detects downloads for the "Royal Album".  The render
check detects downloads for post-rename (no idea why it checks here.)

Fixes #7695.
2016-05-20 22:30:25 -07:00
Unknown W. Brackets
842e450965 Display: Correct default brightness, add reporting.
Not sure if any games use hold/resume in a way that ought to work.
Display didn't seem to react to them being called.
2016-05-16 22:33:50 -07:00
Unknown W. Brackets
d0dc03f359 Display: Wait for vblank when setting mode.
Some games call this even when not needed, and it turns out to have an
important behavior.
2016-05-16 22:02:21 -07:00
Unknown W. Brackets
9ed604f9c8 Display: Return 1 during the vsync period.
Timing is based on manual tests, where the vsync signal is near the end of
the vblank.  Curiously, it stops right before the vblank stops, reliably.
2016-05-15 23:46:46 -07:00
Unknown W. Brackets
597824eec6 Display: Add validation/report to set mode.
This seems to be involved in using the video out cable, but fails for
anything but these fixed parameters in normal situations.
2016-05-15 22:16:31 -07:00
Unknown W. Brackets
5e8e2d5e56 Display: Allow only immediate address changes.
It seems you must latch a change to stride/fmt first, which basically
makes sense.  Otherwise it would revert, I suppose.
2016-05-15 16:42:25 -07:00
Unknown W. Brackets
249a85b7e0 Display: Validate framebuf parameters. 2016-05-15 16:38:00 -07:00
Unknown W. Brackets
44cee09adc Dsiplay: Initialize the framebuf params better. 2016-05-15 16:29:58 -07:00
Unknown W. Brackets
958d7f0944 Display: Record bufw/fmt even when display is off.
These are returned by sceDisplayGetFrameBuf().
2016-05-15 15:55:04 -07:00
Unknown W. Brackets
26e9acee4b Display: Skip transitions between off/on in FPS.
We're just trying to detect frequent flips, so off/on doesn't play into
it.
2016-05-15 15:54:04 -07:00
Henrik Rydgard
6e44e97ffa Refactor prep: Split JitInterface into MIPSFrontendInterface and JitInterface 2016-05-09 19:41:39 +02:00