Added support for FourScore and added test for rcProAmII

This commit is contained in:
Sergio Martin 2024-01-21 16:35:02 +01:00
parent dae6c91a5a
commit 6b2b52eae6
6 changed files with 13 additions and 9 deletions

4
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "extern/QuickNES_Core"] [submodule "source/quickNES/QuickNES_Core"]
path = source/quickNES/QuickNES_Core path = source/quickNES/QuickNES_Core
url = https://github.com/libretro/QuickNES_Core.git url = git@github.com:SergioMartin86/QuickNES_Core.git

View File

@ -29,7 +29,7 @@ public:
bool isValid = true; bool isValid = true;
// Converting input into a stream for parsing // Converting input into a stream for parsing
std::stringstream ss(input); std::istringstream ss(input);
// Start separator // Start separator
if (ss.get() != '|') isValid = false; if (ss.get() != '|') isValid = false;
@ -46,6 +46,10 @@ public:
// End separator // End separator
if (ss.get() != '|') isValid = false; if (ss.get() != '|') isValid = false;
// If its not the end of the stream, then extra values remain and its invalid
ss.get();
if (ss.eof() == false) isValid = false;
// Returning valid flag // Returning valid flag
return isValid; return isValid;
}; };
@ -60,7 +64,7 @@ public:
private: private:
static bool parseJoyPadInput(uint8_t& code, std::stringstream& ss) static bool parseJoyPadInput(uint8_t& code, std::istringstream& ss)
{ {
// Currently read character // Currently read character
char c; char c;
@ -111,7 +115,7 @@ public:
return true; return true;
} }
static bool parseControllerInputs(const controller_t type, port_t& port, std::stringstream& ss) static bool parseControllerInputs(const controller_t type, port_t& port, std::istringstream& ss)
{ {
// Parse valid flag // Parse valid flag
bool isValid = true; bool isValid = true;
@ -172,7 +176,7 @@ public:
return isValid; return isValid;
} }
static bool parseConsoleInputs(bool& reset, bool& power, std::stringstream& ss) static bool parseConsoleInputs(bool& reset, bool& power, std::istringstream& ss)
{ {
// Parse valid flag // Parse valid flag
bool isValid = true; bool isValid = true;

@ -1 +1 @@
Subproject commit 058d66516ed3f1260b69e5b71cd454eb7e9234a3 Subproject commit cedf1f63cc904a2737d26cd1ed006915ecadac22

View File

@ -20,6 +20,7 @@ protectedTestSet = [
'ninjaGaiden2.pacifist.test', 'ninjaGaiden2.pacifist.test',
'novaTheSquirrel.anyPercent.test', 'novaTheSquirrel.anyPercent.test',
'princeOfPersia.anyPercent.test', 'princeOfPersia.anyPercent.test',
'rcProAmII.race1.test',
'saintSeiyaKanketsuHen.anyPercent.test', 'saintSeiyaKanketsuHen.anyPercent.test',
'saintSeiyaOugonDensetsu.anyPercent.test', 'saintSeiyaOugonDensetsu.anyPercent.test',
'saiyuukiWorld.anyPercent.test', 'saiyuukiWorld.anyPercent.test',

View File

@ -329,7 +329,6 @@
|..|........|........|........|........| |..|........|........|........|........|
|..|........|........|........|........| |..|........|........|........|........|
|..|........|........|........|........| |..|........|........|........|........|
|..|........|........|........|........|
|..|........|........|........|....S...| |..|........|........|........|....S...|
|..|........|........|........|........| |..|........|........|........|........|
|..|........|........|........|....S...| |..|........|........|........|....S...|

View File

@ -2,7 +2,7 @@
"Rom File": "roms/R.C. Pro-Am II (U) [!].nes", "Rom File": "roms/R.C. Pro-Am II (U) [!].nes",
"Expected ROM SHA1": "8C68582BDAA32FBC8C7CD858991D4E00D3B1569C", "Expected ROM SHA1": "8C68582BDAA32FBC8C7CD858991D4E00D3B1569C",
"Initial State File": "", "Initial State File": "",
"Sequence File": "rcProAmII.anyPercent.sol", "Sequence File": "rcProAmII.race1.sol",
"Disable State Blocks": [ ], "Disable State Blocks": [ ],
"Controller 1 Type": "FourScore1", "Controller 1 Type": "FourScore1",
"Controller 2 Type": "FourScore2" "Controller 2 Type": "FourScore2"