mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
29 lines
No EOL
712 B
C++
29 lines
No EOL
712 B
C++
#pragma once
|
|
#include "pch.h"
|
|
#include "NES/BaseMapper.h"
|
|
|
|
class Kaiser7013B : public BaseMapper
|
|
{
|
|
protected:
|
|
uint16_t GetPrgPageSize() override { return 0x4000; }
|
|
uint16_t GetChrPageSize() override { return 0x2000; }
|
|
uint16_t RegisterStartAddress() override { return 0x6000; }
|
|
uint16_t RegisterEndAddress() override { return 0xFFFF; }
|
|
|
|
void InitMapper() override
|
|
{
|
|
SelectPrgPage(0, 0);
|
|
SelectPrgPage(1, -1);
|
|
SelectChrPage(0, 0);
|
|
SetMirroringType(MirroringType::Vertical);
|
|
}
|
|
|
|
void WriteRegister(uint16_t addr, uint8_t value) override
|
|
{
|
|
if(addr < 0x8000) {
|
|
SelectPrgPage(0, value);
|
|
} else {
|
|
SetMirroringType(value & 0x01 ? MirroringType::Horizontal : MirroringType::Vertical);
|
|
}
|
|
}
|
|
}; |