Commit Graph

4020 Commits

Author SHA1 Message Date
Henrik Rydgard
a5be0976bd Remove preprocessor hacks to choose JIT implementation.
Opens up for having multiple JIT implementations available at runtime,
which could be use for experimenting with new JIT compiler types or for
unit testing one JIT on another architecture.

Very few of the newly virtual calls are on any sort of critical path so
hopefully there will not be a performance loss.
2016-05-01 11:39:53 +02:00
Henrik Rydgard
4645473dab Remove unused code 2016-05-01 11:35:16 +02:00
Unknown W. Brackets
bc03aa11f2 Log module id as hex, clearer. 2016-04-18 20:19:27 -07:00
Unknown W. Brackets
5a74826372 Use new logging in utility module load/unload. 2016-04-18 20:17:49 -07:00
Unknown W. Brackets
f9ba0d7321 Correct dependency handling when loading modules.
Should help #8700.
2016-04-18 20:08:27 -07:00
sum2012
5e20ba1811 Temporarily disable PMP video for non-windows 2016-04-13 20:06:51 +08:00
Henrik Rydgard
4197148dc4 Add some paranoid checks hoping to fix crashes reported in Google Play developer console. 2016-04-09 18:27:35 +02:00
Henrik Rydgard
727058fc27 Remove an entry from GPUStats that didn't really belong. 2016-04-02 11:06:05 +02:00
Henrik Rydgard
ad0da06f65 Forgot to remove these from the debug string. 2016-04-02 10:36:51 +02:00
Henrik Rydgard
5ef608fa50 GPU stats: Have each backend format its own string. 2016-03-31 10:17:02 +02:00
Henrik Rydgard
004c8b0fca Make debug stats more compact. 2016-03-31 09:47:25 +02:00
Unknown W. Brackets
3976e840a1 Fix some old savestates. 2016-03-20 23:03:48 -07:00
Unknown W. Brackets
ef1dc583a2 Fix various minor warnings. 2016-03-20 14:17:51 -07:00
Henrik Rydgård
2b46ae59a0 Merge pull request #8601 from hrydgard/vulkan
Vulkan rendering backend. Early Work-In-Progress
2016-03-20 21:08:58 +01:00
Henrik Rydgard
f7113bb2e3 Use separate pushbuffers for UBO/Index/Vertex. This will make decoding directly into the pushbuffers easier, plus other benefits later.
(For example, we'll often be able to avoid rebinding the vertex and
index buffers at new offsets by just keep counting upwards between draws,
if the vertex format is the same but other state changed)
2016-03-20 19:31:02 +01:00
Henrik Rydgard
e45c24b75f Show how much pushbuffer space is used each frame.
Optimizing this number (by avoiding redundant UBO uploads etc) will probably help performance.
2016-03-20 19:31:02 +01:00
Henrik Rydgård
b3402ef1fb Merge pull request #8560 from unknownbrackets/prescale-uv
Enable UV prescaling by default
2016-03-20 18:10:19 +01:00
Henrik Rydgård
538d801f17 Merge pull request #8588 from sum2012/net-minor
Add sceNetIfhandle staff
2016-03-20 18:07:24 +01:00
Henrik Rydgard
b137bf1af4 Oops 2016-03-13 18:42:26 +01:00
Henrik Rydgard
c8457d39ed Fix a bunch of compiler warnings, delete some unused code 2016-03-13 15:17:31 +01:00
Unknown W. Brackets
da03b80c97 Standardize on just one mutex implementation. 2016-03-06 14:49:15 -08:00
Henrik Rydgard
082d839965 Fix minor issues in ISOFileSystem 2016-03-06 14:28:10 +01:00
sum2012
1df833cc16 Small fix and change log format 2016-02-21 13:18:03 +08:00
sum2012
5894e8f18f Add save status support 2016-02-21 07:33:06 +08:00
Henrik Rydgard
e954768a84 sceAtrac: Work-around crash with older versions of FFMPEG when free-ing.
Better leaking than dead, although there has to be a better way.
2016-02-14 17:19:32 +01:00
sum2012
29f24a600e Add sceNetIfhandle staff
Used in Yu-Gi-Oh 5Ds Tag Force 4
2016-02-13 20:27:07 +08:00
Unknown W. Brackets
8bea240c25 Atrac: Specify endianness for reset info. 2016-02-10 21:02:41 -08:00
zhyk
fa6fe85dc3 Fix audio lag in Qt without SDL. 2016-02-10 23:34:38 +08:00
Henrik Rydgard
35b6c7341b Fix a bunch of memory leaks, after enabling file+line-number memory leak tracking for the MS Debug CRT.
Few of these were serious, most were on-exit, but good to have a cleaner memory report after running.
2016-02-10 15:36:10 +01:00
Unknown W. Brackets
0ea8cc9753 Minor const cleanup. 2016-02-07 14:07:21 -08:00
Unknown W. Brackets
e75af43f0a Handle floats and sign extension in HLE logs.
In some cases, we were previously logging sign-extended error codes.  This
handles that better using type_traits.
2016-02-06 19:53:56 -08:00
Unknown W. Brackets
666f1898c6 Fix crash loading old savestates.
Oops.  Forgot that this could be saved as -1 when loading an old
savestate, and then resaving it.

Fixes #8531.
2016-01-30 21:39:25 -08:00
Henrik Rydgård
194e9eddec Merge pull request #8503 from unknownbrackets/hle-minor
Minor logging adjustments, not used yet
2016-01-27 12:29:43 +01:00
Unknown W. Brackets
65a5c92c7e Io: Change some logging flags.
Not used yet, just prep work.
2016-01-24 22:52:19 -08:00
Unknown W. Brackets
3a64388eee Support 64-bit args/return in new HLE logging.
Pulls in a new header, unfortunately, but this is a mostly clean way to do
it.
2016-01-24 22:22:23 -08:00
Unknown W. Brackets
f1896abf74 Atrac: Move buffer offset only if needed.
Hmm, need to manage this buffer smarter, though, when streaming.  Right
now it's only getting it right enough to ask for the right amount of data,
really...

Fixes #8498.
2016-01-24 09:09:07 -08:00
sum2012
bbeaf67cd6 Support port offset by @ANR2ME
Useful of adhoc of non-windows
2016-01-24 16:52:39 +08:00
daniel229
d032c3895b Replace function in Omerta Chinmoku No Okite The Legacy 2016-01-24 11:58:20 +08:00
daniel229
0ab6c544b7 Replace function in unENDing Bloody Call 2016-01-24 11:55:56 +08:00
daniel229
80952d5e06 Replace function in ATV Offroad Fury Pro (US) demo 2016-01-24 11:53:46 +08:00
Henrik Rydgard
e866d83547 Temporarily revert "Mpeg: Return errors when no audio is available."
This reverts commit c03f6c23ed.

This caused trouble as seen in #8464, but is probably right - needs other fixes though so
it will have to wait until after 1.2.0.
2016-01-23 17:08:01 +01:00
Unknown W. Brackets
bc48509f33 Add a bit more safety to func replacements.
In case somehow the replacement changes.
2016-01-21 22:17:25 -08:00
Unknown W. Brackets
1b72d3a67a Atrac: Correct remaining frame count for streaming.
This makes more sense, I think this is the right value.
2016-01-18 22:05:01 -08:00
Unknown W. Brackets
600df17eb6 Atrac: Correct loop read pos with offset.
In case it doesn't loop from the start.
2016-01-18 18:11:25 -08:00
Unknown W. Brackets
3466fb1755 Atrac: Adjust loop/nonloop remaining full values.
These are tricky, but it seems like this is right.
2016-01-18 18:00:48 -08:00
Unknown W. Brackets
e2f2c1af90 Atrac: Mark the leading frame consumed on loop.
This is the frame we skip samples from.  Might need smarter logic.
2016-01-18 18:00:48 -08:00
Unknown W. Brackets
3130b7a489 Atrac: Correct stream offset after non-loop end. 2016-01-18 18:00:47 -08:00
Unknown W. Brackets
036c965cf5 Atrac: Correct stream write offset after seek. 2016-01-18 18:00:46 -08:00
Unknown W. Brackets
4c25072328 Atrac: Never ask for more bytes than filesize. 2016-01-18 18:00:46 -08:00
Unknown W. Brackets
59523f1327 Atrac: Fix logging of new atrac ID. 2016-01-17 20:10:11 -08:00
Henrik Rydgård
2e2904c796 Merge pull request #8442 from unknownbrackets/atrac-remaining
Atrac: Correct remaining values when looping
2016-01-17 22:40:08 +01:00
Unknown W. Brackets
face527d7e Atrac: Correct remaining values when looping.
Otherwise it was going negative, which was wrong.
2016-01-17 13:22:12 -08:00
Unknown W. Brackets
f60aef2e16 Add a more specific interface for video frames.
Since we know more about them.  No functional change yet.
2016-01-17 12:57:26 -08:00
Unknown W. Brackets
63aa4291eb Atrac: Fix savestates.
Darn, totally forgot.  This should populate acceptable values for old
streamed atrac as well.
2016-01-17 10:05:15 -08:00
Henrik Rydgard
3ba911bf07 Replace some calls to fopen with File::OpenCFile (utf8). 2016-01-17 15:59:20 +01:00
Henrik Rydgård
b2140d73e7 Merge pull request #8435 from unknownbrackets/atrac-stream
Calculate stream data info a bit more accurately
2016-01-17 10:30:09 +01:00
Henrik Rydgård
93490f5329 Merge pull request #8436 from unknownbrackets/atrac-lowlevel
Simplify lowlevel atrac decoding a lot
2016-01-17 10:26:59 +01:00
Unknown W. Brackets
74d40115a0 Mpeg: Initialize esBuffer to safer values.
Makes the audio work properly in Dan Ball Senki W (#4786.)
2016-01-17 00:31:22 -08:00
Unknown W. Brackets
c03f6c23ed Mpeg: Return errors when no audio is available.
Before, we were only returning an error once, in an effort to log only
once.  This meant sometimes games would not realize they needed to add
packets.
2016-01-17 00:22:46 -08:00
Unknown W. Brackets
849df69690 Atrac: Simplify lowlevel init more. 2016-01-16 23:12:12 -08:00
Unknown W. Brackets
a686ca69fd Atrac: Simplify lowlevel decoding.
No need for all these variables that just spin and do nothing.
2016-01-16 23:03:22 -08:00
Unknown W. Brackets
a4d875cd2a Atrac: Stop generating headers in lowlevel. 2016-01-16 22:46:24 -08:00
Unknown W. Brackets
45e6f9e9b7 Atrac: Fix lowlevel jointStereo usage.
Seems this value is supposed to be (channels << 3) form the lowlevel code,
which is believable.  FFmpeg skips it anyway.

Also, need to set the flag so it gets used.
2016-01-16 22:35:39 -08:00
Unknown W. Brackets
4e20b61d3a Atrac: Fix some confusing variable use in lowlevel. 2016-01-16 22:35:13 -08:00
Unknown W. Brackets
53e990e116 Atrac: Fix a leak from an unused var. 2016-01-16 22:34:45 -08:00
Unknown W. Brackets
a2417b4779 Atrac: Ensure correct fileoffset when adding data.
If we looped, especially in the middle or toward the end, this ensures the
data ends up in the correct place in our larger buffer.
2016-01-16 18:36:22 -08:00
Unknown W. Brackets
e41a1f476f Atrac: Simulate ringbuffer for writable bytes.
Ringbuffer is not actually read from PSP RAM, and there are a couple
inaccuracies, but this should be a lot better than before.
2016-01-16 18:34:44 -08:00
Unknown W. Brackets
23523a2fdc Atrac: Add missing output channels for AA3.
Although, default was 2 so this shouldn't change anything.
2016-01-16 18:10:57 -08:00
Unknown W. Brackets
d3ee48a770 Atrac: Make buffer init functions more consistent. 2016-01-16 18:10:35 -08:00
Henrik Rydgård
067095e2b4 Merge pull request #8410 from latot/mini
little changes
2016-01-17 00:44:07 +01:00
Unknown W. Brackets
cf9cb798fc Atrac: Remove unused variables, cleanup some names. 2016-01-16 14:47:07 -08:00
Unknown W. Brackets
aac603534a Reset failedDecode when the game sets new data.
Should not last forever.
2016-01-16 14:01:12 -08:00
Unknown W. Brackets
d97dfac594 Atrac: Log bad data more consistently.
Let's always give the HLE func in the actual error.
2016-01-16 13:59:38 -08:00
Unknown W. Brackets
7c07922076 Atrac: Clean up some logging. 2016-01-16 13:44:54 -08:00
latot
e82620c572 remove
remove
2016-01-16 09:32:39 -03:00
Unknown W. Brackets
d3da6d8c6e Atrac: Validate second buffer on reset position. 2016-01-12 00:19:35 -08:00
Unknown W. Brackets
a317b10777 Atrac: Keep track of the set second buffer.
Not actually used yet, but this way our context/etc. can be right.
2016-01-12 00:19:34 -08:00
Unknown W. Brackets
40bd31f50b Atrac: Request second buffer data.
It's not used, but at least we ask for it properly.
2016-01-12 00:19:33 -08:00
Unknown W. Brackets
397094651c Atrac: Skip copying to data_buf when unused. 2016-01-12 00:19:33 -08:00
Unknown W. Brackets
b29e856055 Atrac: Remove some unused calculations.
Halfway buffers now always calculate writableBytes realtime.
2016-01-12 00:19:32 -08:00
latot
53ac6d98d8 Little things
back 1

other little change, join 2 in 1
2016-01-09 20:44:02 -03:00
Henrik Rydgard
e11d0a7e1c Minor GPU interface cleanup 2016-01-06 23:49:02 +01:00
daniel229
1e984b48ef update functions 2016-01-04 09:08:52 +08:00
daniel229
de8503f83b Replace function in Shinigami to Shoujo 2016-01-03 22:35:46 +08:00
daniel229
05612bbc25 Replace function in Little Busters! Converted Edition 2016-01-03 22:28:38 +08:00
daniel229
3b461a00cc Replace function in ATV Offroad Fury Blazin' Trails 2016-01-03 22:20:50 +08:00
daniel229
107fa1c09a Replace function in ATV Offroad Fury Pro 2016-01-03 22:13:42 +08:00
Unknown W. Brackets
18dbaac3c7 Fix savestate compat with older versions. 2016-01-02 18:50:59 -08:00
daniel229
ed12bb9c89 Fix flickering in SD Gundam G Generation Portable 2016-01-03 09:56:40 +08:00
Unknown W. Brackets
4fac4d364e Atrac: Read non-streamed data from PSP RAM.
This should fix games that don't actually read into the RAM right away,
which is probably "incorrect" but works on the PSP, should should work in
PPSSPP.
2016-01-02 13:20:17 -08:00
Unknown W. Brackets
f0551b4591 Atrac: Add a flag to use PSP RAM (not yet used.) 2016-01-02 13:20:17 -08:00
Unknown W. Brackets
d0c7cc85de Atrac: Update writableBytes/offset on adding data.
It should go in these places, even if GetStreamDataInfo is not called.
2016-01-02 13:20:16 -08:00
Unknown W. Brackets
2df6d7700e Atrac: Refactor out some common validation.
This seems to be happening a lot.
2016-01-02 13:20:15 -08:00
Unknown W. Brackets
1b6dbd45e7 Atrac: Get stream info right for half/full buffers.
Improve it a bit for streamed buffers, but it's still not quite right.
2016-01-02 13:20:15 -08:00
Unknown W. Brackets
e60dc24d29 Atrac: Update some comments/docs on buffers. 2016-01-02 13:20:14 -08:00
Unknown W. Brackets
959015f823 Atrac: Correct typo. 2016-01-02 13:16:22 -08:00
Unknown W. Brackets
96d5e10549 Atrac: Seek ahead only one frame at end.
If it had a partial ending frame, it should go ahead one frame, not one
frame plus the partial ending.
2016-01-02 11:13:48 -08:00
Unknown W. Brackets
85ff5eb68a Atrac: Adjust reads a bit earlier when skipping.
The frames we initially get may not start at 0, depending on how many
frames we're skipping.  Of course...
2016-01-02 11:13:09 -08:00
Unknown W. Brackets
6fe5fe07a4 Atrac: Revert broken seeking fix.
This wasn't the right solution to getting the right packets.
2016-01-02 11:12:35 -08:00
daniel229
678ca9301a Fix tutorial videoes in Tony Hawk P8 2016-01-02 13:33:22 +08:00
Unknown W. Brackets
182d281750 Atrac: Move currentSample on finish.
This seems to be what happens, and allows remaining frames to calculate
properly in some cases where it wasn't before.
2016-01-01 11:34:56 -08:00
Unknown W. Brackets
f88a82e0a6 Atrac: Respect null output even in fail workaround. 2016-01-01 11:34:33 -08:00
Unknown W. Brackets
dafb15d96e Atrac: Clamp packets to valid data.
In case we don't have full valid data yet, return only the part of the
data that is valid.  This allows FFmpeg to decode data it already has, as
necessary.
2016-01-01 11:33:48 -08:00
Unknown W. Brackets
cdca0492a4 Atrac: Update fileoffset handling per tests.
This accounts for the extra offset value.
2016-01-01 11:33:19 -08:00
Unknown W. Brackets
55e450fb1e Atrac: Fix a typo in loop handling. 2016-01-01 10:41:21 -08:00
Unknown W. Brackets
2eb960a3ce Atrac: remove double-read. 2016-01-01 10:24:52 -08:00
Unknown W. Brackets
448e18fba9 Atrac: Backfill buffer when seeking anywhere.
This corrects the output of sample data when seeking to arbitrary
locations.  Otherwise, it's off for a frame or two.
2016-01-01 10:24:18 -08:00
Unknown W. Brackets
7b217af59e Net: don't double-delete thread on shutdown.
Prevents spurious logging / reporting.
2015-12-31 11:19:28 -08:00
Unknown W. Brackets
abede77059 Clean up some logging in sceDisplay. 2015-12-30 17:37:14 -08:00
Unknown W. Brackets
9327749f16 Allow setting the display off.
Final Fantasy Tactics does this to avoid some brief flicker.
2015-12-30 17:29:20 -08:00
Henrik Rydgård
f7c6a98d5c Merge pull request #8337 from unknownbrackets/minor
Fix glCopyImageSubData even more
2015-12-30 21:56:55 +01:00
Unknown W. Brackets
f982e777e5 Stop logging alphatested draws for debug stats.
Measured a small perf hit here, and we're not really using these stats
much anymore.
2015-12-30 10:24:54 -08:00
Henrik Rydgård
290958060f Merge pull request #8314 from unknownbrackets/remaster
Identify remasters based on UMD_DATA hash
2015-12-29 22:09:49 +01:00
Yoshi Sugawara
746ccfc215 changed order of freeing codex context pointer for older versions of ffmpeg 2015-12-29 13:30:15 -05:00
Yoshi Sugawara
08cc02d11e removed spacing around pCodecCtx conditional check, added else clause to log that it was NULL when it was not expected to be 2015-12-29 10:54:43 -05:00
Yoshi Sugawara
4d2313ed9f fixed indenting from soft spaces to hard tabs 2015-12-29 04:23:41 -05:00
Yoshi Sugawara
73c04e59fa [iOS]: prevent crashing (EXC_BAD_ACCESS) when releasing FFMPEG context by adding NULL check on codec context pointer 2015-12-28 21:43:11 -05:00
Unknown W. Brackets
a8d918b50a Automatically mount exdata/ for remasters.
Using memstick/exdata/GAMEID/.
2015-12-28 14:13:05 -08:00
Unknown W. Brackets
ddcfed1b5e Jit: Invalidate on dmac copy as well. 2015-12-27 22:06:05 -08:00
Unknown W. Brackets
51016eb1c5 Jit: Invalidate after module loads.
Just to be safe, let's invalidate the entire range.
2015-12-27 22:05:53 -08:00
Unknown W. Brackets
3687be42bc Jit: Invalidate blocks after IO reads.
Fixes #7617.
2015-12-27 21:58:29 -08:00
Henrik Rydgård
27c6770c74 Merge pull request #8297 from unknownbrackets/warnings
Warnings fixes
2015-12-24 23:14:10 +01:00
Unknown W. Brackets
f3df6b307f Use a FileLoader for PBPs.
Improves consistency, caching, etc.
2015-12-24 12:21:40 -08:00
Unknown W. Brackets
a53f0360f3 Use a less leak prone interface for PBP reading. 2015-12-24 10:20:27 -08:00
Unknown W. Brackets
d6cd3bd5ad Remove some unused variables. 2015-12-23 15:22:28 -08:00
Unknown W. Brackets
103b959d50 Fix a type comparison warning. 2015-12-23 15:22:13 -08:00
Unknown W. Brackets
edf3bf4a8e Silence some unused result warnings. 2015-12-19 19:58:32 -08:00
Henrik Rydgård
a2e09eada7 Merge pull request #8216 from unknownbrackets/sas-thread
Move SAS mixing to a thread
2015-12-06 18:59:09 +01:00
Unknown W. Brackets
f759a2a3fd Sas: Sync result when mix calling thread returns. 2015-11-25 18:44:43 -08:00
Unknown W. Brackets
546590106f Sas: Fail to mix when dispatch disabled. 2015-11-25 18:44:42 -08:00
Unknown W. Brackets
23441d12fb Sas: Estimate time taken for mixing.
Tests seem to show it's not affected by mhz.
2015-11-25 18:44:34 -08:00
Unknown W. Brackets
5a6c8b513c Sas: Drain thread before reading/writing SAS state.
This should be the safest option, but I'm pretty sure some operations give
a BUSY operation or have different behavior, actually.
2015-11-25 18:44:32 -08:00
Unknown W. Brackets
fc8acc781e Sas: Add config for SAS thread. 2015-11-25 18:44:31 -08:00
Unknown W. Brackets
0394319e89 Sas: Drain thread on savestate. 2015-11-25 18:44:30 -08:00
Unknown W. Brackets
6290ac6cbd Sas: Process SAS on a separate thread.
Remaining issues:
 * Need a config setting.
 * Locking for voices / config?
 * Locking for atrac interop?
2015-11-25 18:44:30 -08:00
Unknown W. Brackets
7bfe100b0f Fix some unused variable warnings.
The CheckAlpha one looks like it will matter.
2015-11-25 16:11:53 -08:00
Henrik Rydgard
9825dad340 Zero deleted objects in the kernel object pool
Just doing this to narrow down the possible causes of our crashes in WaitSema/SignalSema that I can't reproduce and only have Android auto-reports of... The crash comments do mention the GTA games though.
2015-11-25 14:24:32 +01:00
Henrik Rydgard
7dd631b7f2 Some code reformatting of the kernel object pool
Also deletes an unused [] operator
2015-11-25 13:00:29 +01:00
Unknown W. Brackets
8c337850fc Disallow thread termination in interrupts.
But only for certain SDK versions, as per testing.
2015-11-15 11:38:59 -08:00
Henrik Rydgård
99b7741b96 Merge pull request #8194 from unknownbrackets/atrac-remaining
Atrac: Correct outputs of sceAtracGetSoundSample()
2015-11-09 18:46:46 +01:00
Unknown W. Brackets
c22c181148 Sas: Automatically unpause voice on unset ATRAC3.
Thie fixes voices in Sol Trigger after skipping a cutscene, and matches
tests.
2015-11-09 08:25:35 -08:00
Unknown W. Brackets
5374e6a8fc Sas: Add validation for ATRAC3 voices. 2015-11-09 08:25:28 -08:00
Unknown W. Brackets
c1d59f263a Atrac: Ignore the loopNum value for SAS streams.
It seems like this is ignored, and games overwrite it with the voice
number and expect it not to change.
2015-11-09 08:23:45 -08:00
Unknown W. Brackets
21fd209f0e Atrac: Correct outputs of sceAtracGetSoundSample().
Without these being correct (especially without loopEnd vs. endSample
being correct), Toukiden Kiwami doesn't play background music.
2015-11-08 19:55:28 -08:00
Unknown W. Brackets
a3f7598020 Atrac: Use fileoffset for curOff context value.
This doesn't match my tests so far, but Sol Trigger works correctly this
way.  Since this value is primarily only used for SAS, changing it back
for now until more thoroughly testing SAS makes sense.
2015-11-08 12:24:30 -08:00
Unknown W. Brackets
ac524eee1b Atrac: Also read loop count from context RAM.
Observed the Sol Trigger demo's library writing values here, although in
the cases I saw it wasn't changing it from 0.
2015-11-08 12:22:12 -08:00
Unknown W. Brackets
a0604c6de3 Atrac: DRY a tiny bit of the code down. 2015-11-08 09:04:11 -08:00
Unknown W. Brackets
28a957694a Atrac: Apply second FACT as loop offset.
It seems like, when these values are different, the difference indicates
some kind of delta in other sample values?

Mostly trying to match values coming out of firmware structs here.

Fixes music looping in Kurohyo 2.
2015-11-08 08:26:41 -08:00
Unknown W. Brackets
27043b5fa5 Atrac: Do not output remain on ending decode.
It's not supposed to output 0, or -1, or anything.  It leaves the original
value in place.  This is probably why some games "liked" different values.
2015-11-08 08:20:09 -08:00
Unknown W. Brackets
9da62c1efc Atrac: Use end codes for remaining when streaming. 2015-11-07 23:30:09 -08:00
Unknown W. Brackets
959887d407 Atrac: Correct remaining frames return value.
Streaming buffers still not correct in some cases, primarily looping.
2015-11-07 23:30:09 -08:00
Unknown W. Brackets
e28fa3c426 Atrac: Correct transition to fully loaded.
Normally it won't go over of course, oops.
2015-11-07 23:30:05 -08:00
Unknown W. Brackets
61e530df91 Atrac: Check more buffer states in GetRemainFrame. 2015-11-07 23:30:04 -08:00
Unknown W. Brackets
a932b0858c Atrac: Make sure NO_DATA is always set.
This way we can move away from data_buf, which eventually we'll stop using
entirely, in preference for PSP RAM.
2015-11-07 23:29:59 -08:00
Unknown W. Brackets
3f3700cb45 Atrac: Allow games to update buffer state.
Because they can and do.  This primarily only happens with low level and
SAS streams, I think.
2015-11-07 23:29:59 -08:00
Unknown W. Brackets
91de8e46c1 Atrac: Fix an internal typo. 2015-11-07 23:29:58 -08:00
Unknown W. Brackets
26a81f5179 Atrac: Simplify USE_FFMPEG checks.
Maybe we should just remove the option, but this way the behavior is a lot
more similar.
2015-11-07 23:29:58 -08:00
Unknown W. Brackets
9ebc9f695e Atrac: Clean up logging in sceAtracGetRemainFrame. 2015-11-07 23:29:57 -08:00
Unknown W. Brackets
3afc86e9b8 Atrac: correct offsetting logic in resetting.
Probably not super important exactly, but got the numbers backwards when I
reduced the test data.  Oops.
2015-11-06 23:19:21 -08:00
Unknown W. Brackets
696cb6649e Atrac: Match PSP on reset of streaming data.
This attempts to match the sizes and positions requested by the PSP
firmware APIs.  The two functions have to match: if they don't, it will
start reading incorrect data.
2015-11-05 23:23:59 -08:00
Unknown W. Brackets
4511407506 Atrac: Add reschedule when resetting play pos.
This matches tests, although the actual delay is more variable.
2015-11-05 23:23:55 -08:00
Unknown W. Brackets
a2c4f7760a Atrac: Add range check when resetting play pos. 2015-11-05 23:23:50 -08:00
Unknown W. Brackets
91e5916f66 Atrac: Fix sample range check to match output.
It allows some negative values, actually.
2015-11-05 23:23:45 -08:00
tpunix
6672534f49 bugfix of scefont
charCode should be limit to 16bit
see issue #8131
2015-11-01 21:11:31 +08:00
Henrik Rydgard
b998131581 Move the symbol map to the heap, deallocate it when no game is running. 2015-10-31 23:01:19 +01:00
Unknown W. Brackets
a13683e777 Add some param validation for sas functions. 2015-10-31 09:20:14 -07:00
Henrik Rydgård
9cdd23c089 Merge pull request #8105 from unknownbrackets/atrac-parsing
Improve atrac parsing and differentiate streaming from data
2015-10-31 13:00:15 +01:00
Henrik Rydgård
5ebb5d5630 Merge pull request #8116 from hrydgard/reverb
Implement sceSas' reverb effect, guessing that the reverb is the same as the one in PSX's SPU
2015-10-29 11:13:04 +01:00
Sacha
bbc4f64999 MIPS: Fix build so we can compile this again. 2015-10-29 02:46:43 +00:00
Henrik Rydgard
22f71f1e9a Show simple info about currently playing audio in on-screen Debug Statistics 2015-10-28 21:20:20 +01:00
Henrik Rydgard
85c8f7d3c2 Hook up SasReverb. It sounds more like a buzzsaw than a reverb at the moment, needs debugging.
Added a bit of code that only enables it when a reverbed sound is active. This will need to be turned off later but useful right now for hearing when it's used..
2015-10-27 12:36:30 +01:00
Unknown W. Brackets
85fac290c9 Atrac: Calc NO DATA status when loading old state. 2015-10-25 18:00:13 -07:00
Unknown W. Brackets
2b58af3db5 Atrac: Handle loop samples more correctly.
They need to be offset same as currentSamples.  Starting to really think
it'd be better to offset currentSamples instead...
2015-10-25 17:04:27 -07:00
Unknown W. Brackets
278d6b3690 Atrac: Set 0 read offset when fully loaded. 2015-10-25 17:04:27 -07:00
Unknown W. Brackets
85a699912d Atrac: Correct streamed bytes field in context. 2015-10-25 17:04:26 -07:00
Unknown W. Brackets
5cc13c45f4 Atrac: Try to handle endSample more consistently.
Maybe we should offset currentSample by the firstSampleOffset instead?
2015-10-25 17:04:25 -07:00
Unknown W. Brackets
e51891e9cd Atrac: Keep track of PSP-like buffer status.
This isn't correct yet, but tracking this much fixes looping of certain
audio.
2015-10-25 17:04:25 -07:00
Unknown W. Brackets
7e05d0db4b Atrac: Correct decode data when there's an offset. 2015-10-25 17:04:24 -07:00
Unknown W. Brackets
e90f88a687 Atrac: Parse size and fact offset more correctly. 2015-10-25 17:04:24 -07:00
Unknown W. Brackets
2e5f8d687f Atrac: Validate loop end and return an error. 2015-10-25 17:04:23 -07:00
Unknown W. Brackets
9ea765a347 Atrac: Calculate total samples based on data chunk.
Not on the entire RIFF size, which will be (slightly) inflated.
2015-10-25 17:04:22 -07:00
Unknown W. Brackets
ac56eff31c Atrac: Parse the smpl chunk more correctly.
Returns the same errors as the PSP.
2015-10-25 17:04:22 -07:00
Unknown W. Brackets
596ecdc431 Atrac: Allow data to extend outside RIFF size.
This seems technically incorrect, but it's allowed on the PSP, possibly
intentionally due to data shipped truncated by accident?
2015-10-25 17:04:21 -07:00
Unknown W. Brackets
522a1743f4 Atrac: Return an error if there's no data chunk. 2015-10-25 17:04:20 -07:00
Unknown W. Brackets
62629827ea Kernel: Clean up event flag logging, style. 2015-10-25 09:08:38 -07:00
Unknown W. Brackets
043891014d Add a simpler way to force on HLE logging. 2015-10-25 09:05:16 -07:00
Unknown W. Brackets
d43247b8b8 Kernel: Act on wait clear for flags after callback. 2015-10-25 08:28:07 -07:00
Henrik Rydgard
488aec1df4 Typo fix 2015-10-25 00:54:00 +02:00
Unknown W. Brackets
f725453ae6 Sas: Report when revert is enabled. 2015-10-24 13:53:57 -07:00
Unknown W. Brackets
9591db2daa Cleanup RETURN() in __KernelWaitCurThread().
This hasn't been needed for a while.
2015-10-24 13:11:07 -07:00
Unknown W. Brackets
f7fa0a06d4 Atrac: Reset the fileoffset only when adding data.
Otherwise, it's only a seek.  For example, a seek to 0, as commonly seen.
2015-10-24 10:37:14 -07:00
Unknown W. Brackets
23c27d61df Improve an error return value. 2015-10-18 13:02:05 -07:00
Unknown W. Brackets
cb99c9fc4a Prevent a warning when loading some utility mods. 2015-10-18 12:53:18 -07:00
Unknown W. Brackets
d0a9813844 Account for uneven sized chunks by rounding up.
Chunks have an extra pad byte if the size is uneven.  This probably isn't
happening, but just to be safe.
2015-10-18 12:50:40 -07:00
Unknown W. Brackets
8fa843bbc3 Atrac: attempt to power through bad frames. 2015-10-17 16:20:27 -07:00
Unknown W. Brackets
d30508ac43 Buildfix for Symbian/Blackberry/etc. 2015-10-17 16:20:27 -07:00
Unknown W. Brackets
60378dd59d Atrac: Hack to make seeking in GTA work. 2015-10-17 16:20:26 -07:00
Unknown W. Brackets
7d32876610 Atrac: Cleanup FFmpeg context ptr management. 2015-10-17 16:20:25 -07:00
Unknown W. Brackets
b47458eabb Atrac: fix loading certain savestates.
Some worked with it that high, but others not.
2015-10-17 16:20:24 -07:00
Unknown W. Brackets
5177f16c8d Atrac: Use constants for the states, more clarity. 2015-10-17 16:20:23 -07:00