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