mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
25 lines
No EOL
524 B
C++
25 lines
No EOL
524 B
C++
#pragma once
|
|
#include "pch.h"
|
|
#include "NES/BaseMapper.h"
|
|
|
|
class CpRom : public BaseMapper
|
|
{
|
|
protected:
|
|
uint16_t GetPrgPageSize() override { return 0x8000; }
|
|
uint16_t GetChrPageSize() override { return 0x1000; }
|
|
uint32_t GetChrRamSize() override { return 0x4000; }
|
|
|
|
void InitMapper() override
|
|
{
|
|
SelectPrgPage(0, 0);
|
|
SelectChrPage(0, 0);
|
|
SetMirroringType(MirroringType::Vertical);
|
|
}
|
|
|
|
void WriteRegister(uint16_t addr, uint8_t value) override
|
|
{
|
|
if(addr >= 0x8000) {
|
|
SelectChrPage(1, value & 0x03);
|
|
}
|
|
}
|
|
}; |