Mesen-X/Core/Henggedianzi177.h

24 lines
585 B
C
Raw Normal View History

2016-07-17 14:29:47 -04:00
#pragma once
#include "stdafx.h"
#include "BaseMapper.h"
class Henggedianzi177 : public BaseMapper
{
protected:
virtual uint16_t GetPRGPageSize() { return 0x8000; }
virtual uint16_t GetCHRPageSize() { return 0x2000; }
virtual uint16_t RegisterStartAddress() { return 0x8000; }
virtual uint16_t RegisterEndAddress() { return 0xFFFF; }
void InitMapper()
{
SelectPRGPage(0, 0);
SelectCHRPage(0, 0);
}
void WriteRegister(uint16_t addr, uint8_t value)
{
SelectPRGPage(0, value);
SetMirroringType(value & 0x20 ? MirroringType::Horizontal : MirroringType::Vertical);
}
};