1#pragma once
2#include "mapper.hpp"
3
4
5class Mapper3 : public Mapper
6{
7 u8 regs[1];
8 bool vertical_mirroring;
9 bool PRG_size_16k;
10 void apply();
11
12 public:
13 Mapper3(u8* rom) : Mapper(rom)
14 {
15 PRG_size_16k = rom[4] == 1;
16 vertical_mirroring = rom[6] & 0x01;
17 regs[0] = 0;
18 apply();
19 }
20
21 u8 write(u16 addr, u8 v);
22 u8 chr_write(u16 addr, u8 v);
23};
24
25