Skip to content

Commit

Permalink
Sas Hack for Motorstorm and Gripshift in-game
Browse files Browse the repository at this point in the history
  • Loading branch information
sum2012 committed Jul 20, 2014
1 parent b03460c commit 8eb3d04
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ static ConfigSetting soundSettings[] = {
ConfigSetting("VolumeSFX", &g_Config.iSFXVolume, 7),
ConfigSetting("AudioLatency", &g_Config.IaudioLatency, 1),
ConfigSetting("SoundSpeedHack", &g_Config.bSoundSpeedHack, false),
ConfigSetting("SasHack", &g_Config.bSasHack, false),

ConfigSetting(false),
};
Expand Down
1 change: 1 addition & 0 deletions Core/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ struct Config {

// Sound
bool bEnableSound;
bool bSasHack;
int IaudioLatency; // 0 = low , 1 = medium(default) , 2 = high
int iSFXVolume;
int iBGMVolume;
Expand Down
4 changes: 3 additions & 1 deletion Core/HLE/sceSas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

#include "Core/HLE/sceSas.h"
#include "Core/HLE/sceKernel.h"
#include "Core/Config.h"

enum {
ERROR_SAS_INVALID_GRAIN = 0x80420001,
Expand Down Expand Up @@ -104,7 +105,8 @@ u32 sceSasInit(u32 core, u32 grainSize, u32 maxVoices, u32 outputMode, u32 sampl
return ERROR_SAS_INVALID_SAMPLE_RATE;
}
INFO_LOG(SCESAS, "sceSasInit(%08x, %i, %i, %i, %i)", core, grainSize, maxVoices, outputMode, sampleRate);

if (g_Config.bSasHack)
return -1;
sas->SetGrainSize(grainSize);
// Seems like maxVoices is actually ignored for all intents and purposes.
sas->maxVoices = PSP_SAS_VOICES_MAX;
Expand Down
1 change: 1 addition & 0 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ void GameSettingsScreen::CreateViews() {

audioSettings->Add(new ItemHeader(a->T("Audio hacks")));
audioSettings->Add(new CheckBox(&g_Config.bSoundSpeedHack, a->T("Sound speed hack (DOA etc.)")));
audioSettings->Add(new CheckBox(&g_Config.bSasHack, a->T("Motorstorm and Gripshift hack (No Sound)")));

// Control
ViewGroup *controlsSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
Expand Down

0 comments on commit 8eb3d04

Please sign in to comment.