metaforce/Runtime/MP1/CNESEmulator.hpp

37 lines
942 B
C++
Raw Normal View History

2016-12-14 22:56:59 +00:00
#ifndef __URDE_CNESEMULATOR_HPP__
#define __URDE_CNESEMULATOR_HPP__
2016-12-31 00:51:51 +00:00
#include "RetroTypes.hpp"
#include "zeus/CColor.hpp"
2016-12-31 00:51:51 +00:00
2016-12-14 22:56:59 +00:00
namespace urde
{
2016-12-30 06:37:01 +00:00
class CFinalInput;
2016-12-14 22:56:59 +00:00
namespace MP1
{
class CNESEmulator
{
2016-12-31 00:51:51 +00:00
bool x20_wantsQuit = false;
u8 x21_saveState[18];
bool x34_wantsLoad = false;
bool x38_stateLoaded = false;
u8 x39_loadState[18];
2018-01-14 06:44:22 +00:00
static void DescrambleROM(u8* dataIn, u8* dataOut, u32 dataOutLen = 0x20000, u8 descrambleInit = 0xe9,
u32 descramble2Len = 0x1FFFC, u32 descramble2Magic = 0xA663);
2016-12-30 06:37:01 +00:00
public:
void ProcessUserInput(const CFinalInput& input, int);
2016-12-31 00:51:51 +00:00
void Update();
void Draw(const zeus::CColor& mulColor, bool filtering);
void LoadState(const u8* state);
const u8* GetSaveState() const { return x21_saveState; }
bool WantsQuit() const { return x20_wantsQuit; }
bool WantsLoad() const { return x34_wantsLoad; }
2016-12-14 22:56:59 +00:00
};
}
}
#endif // __URDE_CNESEMULATOR_HPP__