mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #15838 from sum2012/Atrac_hack
Add atrac looping hack for 4 games
This commit is contained in:
commit
f8325631bc
4 changed files with 31 additions and 0 deletions
|
@ -96,6 +96,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
|
|||
CheckSetting(iniFile, gameID, "MaliDepthStencilBugWorkaround", &flags_.MaliDepthStencilBugWorkaround);
|
||||
CheckSetting(iniFile, gameID, "ZZT3SelectHack", &flags_.ZZT3SelectHack);
|
||||
CheckSetting(iniFile, gameID, "AllowLargeFBTextureOffsets", &flags_.AllowLargeFBTextureOffsets);
|
||||
CheckSetting(iniFile, gameID, "AtracLoopHack", &flags_.AtracLoopHack);
|
||||
}
|
||||
|
||||
void Compatibility::CheckSetting(IniFile &iniFile, const std::string &gameID, const char *option, bool *flag) {
|
||||
|
|
|
@ -86,6 +86,7 @@ struct CompatFlags {
|
|||
bool MaliDepthStencilBugWorkaround;
|
||||
bool ZZT3SelectHack;
|
||||
bool AllowLargeFBTextureOffsets;
|
||||
bool AtracLoopHack;
|
||||
};
|
||||
|
||||
class IniFile;
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "Core/HLE/sceUtility.h"
|
||||
#include "Core/HLE/sceKernelMemory.h"
|
||||
#include "Core/HLE/sceAtrac.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
// Notes about sceAtrac buffer management
|
||||
//
|
||||
|
@ -1170,6 +1171,11 @@ static u32 sceAtracAddStreamData(int atracID, u32 bytesToAdd) {
|
|||
atrac->first_.offset += bytesToAdd;
|
||||
atrac->bufferValidBytes_ += bytesToAdd;
|
||||
|
||||
if (PSP_CoreParameter().compat.flags().AtracLoopHack && atrac->bufferState_ == ATRAC_STATUS_STREAMED_LOOP_FROM_END && atrac->RemainingFrames() > 2) {
|
||||
atrac->loopNum_++;
|
||||
atrac->SeekToSample(atrac->loopStartSample_ - atrac->FirstOffsetExtra() - atrac->firstSampleOffset_);
|
||||
}
|
||||
|
||||
return hleLogSuccessI(ME, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1240,3 +1240,26 @@ LBSW10345 = true # Some modded version found in our report logs
|
|||
ULES00928 = true
|
||||
ULUS10312 = true
|
||||
ULKS46154 = true
|
||||
|
||||
[AtracLoopHack]
|
||||
#Atrac looped incorrectly see #7601 #13773 #11586 #10139 #12083
|
||||
|
||||
#Coded Arms: Contagion
|
||||
ULUS10184 = true
|
||||
ULJM05243 = true
|
||||
ULKS46139 = true
|
||||
|
||||
#Gripshift
|
||||
ULUS10040 = true
|
||||
ULES00177 = true
|
||||
ULKS46040 = true
|
||||
ULJM05089 = true
|
||||
|
||||
#Jackass the Game
|
||||
ULUS10303 = true
|
||||
ULES00897 = true
|
||||
|
||||
#Shrek smash
|
||||
ULUS10194 = true
|
||||
ULES00618 = true
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue