Mesen/Core/Mapper233.h

35 lines
520 B
C
Raw Normal View History

2016-08-12 23:54:03 +00:00
#pragma once
#include "stdafx.h"
#include "Mapper226.h"
class Mapper233 : public Mapper226
{
private:
uint8_t _reset;
protected:
2016-12-18 04:14:47 +00:00
void Reset(bool softReset) override
2016-08-12 23:54:03 +00:00
{
Mapper226::Reset(softReset);
if(softReset) {
_reset = _reset ^ 0x01;
UpdatePrg();
} else {
_reset = 0;
}
}
2016-12-18 04:14:47 +00:00
void StreamState(bool saving) override
2016-08-12 23:54:03 +00:00
{
Mapper226::StreamState(saving);
Stream(_reset);
}
2016-12-18 04:14:47 +00:00
uint8_t GetPrgPage() override
2016-08-12 23:54:03 +00:00
{
return (_registers[0] & 0x1F) | (_reset << 5) | ((_registers[1] & 0x01) << 6);
}
};