Mesen/Core/Mapper216.h

30 lines
662 B
C
Raw Normal View History

2016-09-05 18:00:51 +00:00
#pragma once
#include "stdafx.h"
#include "BaseMapper.h"
class Mapper216 : public BaseMapper
{
protected:
2016-12-18 04:14:47 +00:00
uint16_t GetPRGPageSize() override { return 0x8000; }
uint16_t GetCHRPageSize() override { return 0x2000; }
bool AllowRegisterRead() override { return true; }
2016-09-05 18:00:51 +00:00
2016-12-18 04:14:47 +00:00
void InitMapper() override
2016-09-05 18:00:51 +00:00
{
WriteRegister(0x8000, 0);
AddRegisterRange(0x5000, 0x5000);
RemoveRegisterRange(0x8000, 0xFFFF, MemoryOperation::Read);
}
2016-12-18 04:14:47 +00:00
uint8_t ReadRegister(uint16_t addr) override
2016-09-05 18:00:51 +00:00
{
//For Videopoker Bonza?
return 0;
}
2016-12-18 04:14:47 +00:00
void WriteRegister(uint16_t addr, uint8_t value) override
2016-09-05 18:00:51 +00:00
{
SelectPRGPage(0, addr & 0x01);
SelectCHRPage(0, (addr & 0x0E) >> 1);
}
};