2015-08-23 11:45:13 -04:00
|
|
|
#include <thread>
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
2015-07-04 22:21:14 -04:00
|
|
|
extern "C" {
|
2015-08-23 11:45:13 -04:00
|
|
|
void __stdcall InitializeEmu(char* homeFolder, void*, void*);
|
2015-07-14 21:52:08 -04:00
|
|
|
void __stdcall LoadROM(char* filename);
|
2015-07-04 22:21:14 -04:00
|
|
|
void __stdcall Run();
|
2015-08-23 11:45:13 -04:00
|
|
|
void __stdcall Stop();
|
2015-07-04 22:21:14 -04:00
|
|
|
}
|
|
|
|
|
2015-07-14 21:52:08 -04:00
|
|
|
int main(int argc, char* argv[])
|
2015-07-04 22:21:14 -04:00
|
|
|
{
|
2015-08-23 11:45:13 -04:00
|
|
|
using namespace std;
|
|
|
|
vector<char*> testRoms{
|
|
|
|
"..\\Games\\Super Dodge Ball (USA).nes",
|
|
|
|
"..\\Games\\Super Mario Bros. (USA).nes",
|
|
|
|
"..\\Games\\Mega Man 2 (USA).nes",
|
|
|
|
"..\\Games\\Mega Man 3 (USA).nes",
|
|
|
|
"..\\Games\\Mega Man 4 (USA).nes",
|
|
|
|
"..\\Games\\MMC5\\Just Breed (J) [!].nes"
|
|
|
|
};
|
|
|
|
|
|
|
|
InitializeEmu("C:\\Windows\\Temp\\Mesen", nullptr, nullptr);
|
|
|
|
LoadROM(testRoms[0]);
|
|
|
|
thread testThread([testRoms] {
|
|
|
|
for(int i = 1; i < testRoms.size(); i++) {
|
|
|
|
std::this_thread::sleep_for(std::chrono::duration<int, std::milli>(5000));
|
|
|
|
LoadROM(testRoms[i]);
|
|
|
|
}
|
|
|
|
Stop();
|
|
|
|
});
|
2015-07-04 22:21:14 -04:00
|
|
|
Run();
|
2015-08-23 11:45:13 -04:00
|
|
|
testThread.join();
|
2015-07-04 22:21:14 -04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|