Added Super Chase Criminal Termination to MAME
This commit is contained in:
parent
30939c6989
commit
0129d59241
@ -1158,6 +1158,16 @@ AlternativeMinForceRightSuperGT=0
|
|||||||
AlternativeMaxForceRightSuperGT=100
|
AlternativeMaxForceRightSuperGT=100
|
||||||
EnableForceSpringEffectSuperGT=0
|
EnableForceSpringEffectSuperGT=0
|
||||||
ForceSpringStrengthSuperGT=80
|
ForceSpringStrengthSuperGT=80
|
||||||
|
PowerModeSuperChase=0
|
||||||
|
FeedbackLengthSuperChase=500
|
||||||
|
MinForceSuperChase=0
|
||||||
|
MaxForceSuperChase=40
|
||||||
|
AlternativeMinForceLeftSuperChase=0
|
||||||
|
AlternativeMaxForceLeftSuperChase=-40
|
||||||
|
AlternativeMinForceRightSuperChase=0
|
||||||
|
AlternativeMaxForceRightSuperChase=40
|
||||||
|
EnableForceSpringEffectSuperChase=0
|
||||||
|
ForceSpringStrengthSuperChase=80
|
||||||
|
|
||||||
[MAME 64bit Outputs]
|
[MAME 64bit Outputs]
|
||||||
GameId=22
|
GameId=22
|
||||||
@ -1568,6 +1578,16 @@ AlternativeMinForceRightSuperGT=0
|
|||||||
AlternativeMaxForceRightSuperGT=100
|
AlternativeMaxForceRightSuperGT=100
|
||||||
EnableForceSpringEffectSuperGT=0
|
EnableForceSpringEffectSuperGT=0
|
||||||
ForceSpringStrengthSuperGT=80
|
ForceSpringStrengthSuperGT=80
|
||||||
|
PowerModeSuperChase=0
|
||||||
|
FeedbackLengthSuperChase=500
|
||||||
|
MinForceSuperChase=0
|
||||||
|
MaxForceSuperChase=40
|
||||||
|
AlternativeMinForceLeftSuperChase=0
|
||||||
|
AlternativeMaxForceLeftSuperChase=-40
|
||||||
|
AlternativeMinForceRightSuperChase=0
|
||||||
|
AlternativeMaxForceRightSuperChase=40
|
||||||
|
EnableForceSpringEffectSuperChase=0
|
||||||
|
ForceSpringStrengthSuperChase=80
|
||||||
|
|
||||||
; ***********************************************************************************************************************************
|
; ***********************************************************************************************************************************
|
||||||
; ************************************************* Test cases are established below ************************************************
|
; ************************************************* Test cases are established below ************************************************
|
||||||
|
@ -566,6 +566,17 @@ static int configFeedbackLengthSuperGTMAME = GetPrivateProfileInt(TEXT("Settings
|
|||||||
static int EnableForceSpringEffectSuperGTMAME = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableForceSpringEffectSuperGT"), 0, settingsFilename);
|
static int EnableForceSpringEffectSuperGTMAME = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableForceSpringEffectSuperGT"), 0, settingsFilename);
|
||||||
static int ForceSpringStrengthSuperGTMAME = GetPrivateProfileInt(TEXT("Settings"), TEXT("ForceSpringStrengthSuperGT"), 0, settingsFilename);
|
static int ForceSpringStrengthSuperGTMAME = GetPrivateProfileInt(TEXT("Settings"), TEXT("ForceSpringStrengthSuperGT"), 0, settingsFilename);
|
||||||
|
|
||||||
|
static int configMinForceSuperChase = GetPrivateProfileInt(TEXT("Settings"), TEXT("MinForceSuperChase"), 0, settingsFilename);
|
||||||
|
static int configMaxForceSuperChase = GetPrivateProfileInt(TEXT("Settings"), TEXT("MaxForceSuperChase"), 100, settingsFilename);
|
||||||
|
static int configAlternativeMinForceLeftSuperChase = GetPrivateProfileInt(TEXT("Settings"), TEXT("AlternativeMinForceLeftSuperChase"), 0, settingsFilename);
|
||||||
|
static int configAlternativeMaxForceLeftSuperChase = GetPrivateProfileInt(TEXT("Settings"), TEXT("AlternativeMaxForceLeftSuperChase"), 100, settingsFilename);
|
||||||
|
static int configAlternativeMinForceRightSuperChase = GetPrivateProfileInt(TEXT("Settings"), TEXT("AlternativeMinForceRightSuperChase"), 0, settingsFilename);
|
||||||
|
static int configAlternativeMaxForceRightSuperChase = GetPrivateProfileInt(TEXT("Settings"), TEXT("AlternativeMaxForceRightSuperChase"), 100, settingsFilename);
|
||||||
|
static int PowerModeSuperChase = GetPrivateProfileInt(TEXT("Settings"), TEXT("PowerModeSuperChase"), 0, settingsFilename);
|
||||||
|
static int configFeedbackLengthSuperChase = GetPrivateProfileInt(TEXT("Settings"), TEXT("FeedbackLengthSuperChase"), 120, settingsFilename);
|
||||||
|
static int EnableForceSpringEffectSuperChase = GetPrivateProfileInt(TEXT("Settings"), TEXT("EnableForceSpringEffectSuperChase"), 0, settingsFilename);
|
||||||
|
static int ForceSpringStrengthSuperChase = GetPrivateProfileInt(TEXT("Settings"), TEXT("ForceSpringStrengthSuperChase"), 0, settingsFilename);
|
||||||
|
|
||||||
static bool init = false;
|
static bool init = false;
|
||||||
static bool initSpring = false;
|
static bool initSpring = false;
|
||||||
static bool EmuName = false;
|
static bool EmuName = false;
|
||||||
@ -1334,6 +1345,7 @@ std::string srallycdx("srallycdx");
|
|||||||
std::string spacegun("spacegun");
|
std::string spacegun("spacegun");
|
||||||
std::string spacegunu("spacegunu");
|
std::string spacegunu("spacegunu");
|
||||||
std::string spacegunj("spacegunj");
|
std::string spacegunj("spacegunj");
|
||||||
|
std::string superchs("superchs");
|
||||||
std::string stcc("stcc");
|
std::string stcc("stcc");
|
||||||
std::string stcca("stcca");
|
std::string stcca("stcca");
|
||||||
std::string stccb("stccb");
|
std::string stccb("stccb");
|
||||||
@ -1377,6 +1389,7 @@ std::string RaveRacerActive("RaveRacerActive");
|
|||||||
std::string AfterburnerActive("AfterburnerActive");
|
std::string AfterburnerActive("AfterburnerActive");
|
||||||
std::string OutrunActive("OutrunActive");
|
std::string OutrunActive("OutrunActive");
|
||||||
std::string PDriftActive("PDriftActive");
|
std::string PDriftActive("PDriftActive");
|
||||||
|
std::string SuperChaseActive("SuperChaseActive");
|
||||||
|
|
||||||
//Names of FFB Outputs
|
//Names of FFB Outputs
|
||||||
std::string RawDrive("RawDrive");
|
std::string RawDrive("RawDrive");
|
||||||
@ -1663,10 +1676,8 @@ void MAMESupermodel::FFBLoop(EffectConstants* constants, Helpers* helpers, Effec
|
|||||||
RunningFFB = "RacingFullValueActive2";
|
RunningFFB = "RacingFullValueActive2";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (romname == crusnwld || romname == crusnwld24 || romname == crusnwld23 || romname == crusnwld20 || romname == crusnwld19 || romname == crusnwld17 || romname == crusnwld13)
|
if (romname == crusnwld || romname == crusnwld24 || romname == crusnwld23 || romname == crusnwld20 || romname == crusnwld19 || romname == crusnwld17)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
configMinForce = configMinForceCrusnWld;
|
configMinForce = configMinForceCrusnWld;
|
||||||
configMaxForce = configMaxForceCrusnWld;
|
configMaxForce = configMaxForceCrusnWld;
|
||||||
configAlternativeMinForceLeft = configAlternativeMinForceLeftCrusnWld;
|
configAlternativeMinForceLeft = configAlternativeMinForceLeftCrusnWld;
|
||||||
@ -1681,6 +1692,22 @@ void MAMESupermodel::FFBLoop(EffectConstants* constants, Helpers* helpers, Effec
|
|||||||
RunningFFB = "RacingFullValueActive2";
|
RunningFFB = "RacingFullValueActive2";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (romname == superchs)
|
||||||
|
{
|
||||||
|
configMinForce = configMinForceSuperChase;
|
||||||
|
configMaxForce = configMaxForceSuperChase;
|
||||||
|
configAlternativeMinForceLeft = configAlternativeMinForceLeftSuperChase;
|
||||||
|
configAlternativeMaxForceLeft = configAlternativeMaxForceLeftSuperChase;
|
||||||
|
configAlternativeMinForceRight = configAlternativeMinForceRightSuperChase;
|
||||||
|
configAlternativeMaxForceRight = configAlternativeMaxForceRightSuperChase;
|
||||||
|
configFeedbackLength = configFeedbackLengthSuperChase;
|
||||||
|
PowerMode = PowerModeSuperChase;
|
||||||
|
EnableForceSpringEffect = EnableForceSpringEffectSuperChase;
|
||||||
|
ForceSpringStrength = ForceSpringStrengthSuperChase;
|
||||||
|
|
||||||
|
RunningFFB = "SuperChaseActive";
|
||||||
|
}
|
||||||
|
|
||||||
if (romname == offroadc || romname == offroadc4 || romname == offroadc3 || romname == offroadc1)
|
if (romname == offroadc || romname == offroadc4 || romname == offroadc3 || romname == offroadc1)
|
||||||
{
|
{
|
||||||
configMinForce = configMinForceOffRoadC;
|
configMinForce = configMinForceOffRoadC;
|
||||||
@ -3310,6 +3337,48 @@ void MAMESupermodel::FFBLoop(EffectConstants* constants, Helpers* helpers, Effec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (RunningFFB == SuperChaseActive)
|
||||||
|
{
|
||||||
|
if (Emulator == MAME)
|
||||||
|
{
|
||||||
|
if (!PatternFind)
|
||||||
|
{
|
||||||
|
aAddy2 = PatternScan("\xD2\x00\xFF\xFF\x00\x01\xE4", "xxxxxxx");
|
||||||
|
|
||||||
|
UINT8 CheckAddy2 = helpers->ReadByte((int)aAddy2 + 0x32, false);
|
||||||
|
if (CheckAddy2 == 0x04)
|
||||||
|
{
|
||||||
|
FFBAddress = (int)aAddy2 + 0x32;
|
||||||
|
PatternFind = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ff = helpers->ReadByte(FFBAddress, false);
|
||||||
|
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char*)ffs.c_str());
|
||||||
|
|
||||||
|
if (ff & 0x01)
|
||||||
|
{
|
||||||
|
double percentForce = 1.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ff & 0x02)
|
||||||
|
{
|
||||||
|
double percentForce = 1.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (RunningFFB == HardDrivinActive) //Hard Drivin
|
if (RunningFFB == HardDrivinActive) //Hard Drivin
|
||||||
{
|
{
|
||||||
if (Emulator == MAME)
|
if (Emulator == MAME)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user