Mesen-X/Core/Mapper385.h
negativeExponent 4f6903c784 Add Mappers 385
2022-06-22 00:41:45 +08:00

25 lines
559 B
C++

#pragma once
#include "stdafx.h"
#include "BaseMapper.h"
class Mapper385 : public BaseMapper
{
protected:
virtual uint16_t GetPRGPageSize() override { return 0x4000; }
virtual uint16_t GetCHRPageSize() override { return 0x2000; }
void InitMapper() override
{
SelectPRGPage(0, 0);
SelectPRGPage(1, 0);
SelectCHRPage(0, 0);
}
void WriteRegister(uint16_t addr, uint8_t value) override
{
SelectPRGPage(0, (addr >> 1));
SelectPRGPage(1, (addr >> 1));
SetMirroringType(addr & 0x01 ? MirroringType::Horizontal : MirroringType::Vertical);
}
};