mirror of
https://github.com/libretro/Mesen.git
synced 2024-12-14 04:48:42 +00:00
850102bbdc
Movies: Rewrote format to support all IO devices and console types Netplay: Now supports all IO devices and console types
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
#include <deque>
|
|
#include "INotificationListener.h"
|
|
#include "../Utilities/AutoResetEvent.h"
|
|
|
|
class VirtualFile;
|
|
|
|
class RecordedRomTest : public INotificationListener
|
|
{
|
|
private:
|
|
bool _recording;
|
|
bool _runningTest;
|
|
int _badFrameCount;
|
|
bool _recordingFromMovie;
|
|
|
|
uint8_t _previousHash[16];
|
|
std::deque<uint8_t*> _screenshotHashes;
|
|
std::deque<uint8_t> _repetitionCount;
|
|
uint8_t _currentCount;
|
|
|
|
//Used when making a test out of an existing movie/test
|
|
vector<uint8_t> _movieData;
|
|
stringstream _romStream;
|
|
|
|
string _filename;
|
|
ofstream _file;
|
|
|
|
AutoResetEvent _signal;
|
|
|
|
private:
|
|
void Reset();
|
|
void ValidateFrame(uint16_t* ppuFrameBuffer);
|
|
void SaveFrame(uint16_t* ppuFrameBuffer);
|
|
void Save();
|
|
|
|
public:
|
|
RecordedRomTest();
|
|
virtual ~RecordedRomTest();
|
|
|
|
void ProcessNotification(ConsoleNotificationType type, void* parameter) override;
|
|
void Record(string filename, bool reset);
|
|
void RecordFromMovie(string testFilename, VirtualFile movieFile);
|
|
void RecordFromTest(string newTestFilename, string existingTestFilename);
|
|
int32_t Run(string filename);
|
|
void Stop();
|
|
}; |