21 #ifndef EXTRASIDBANK_H
22 #define EXTRASIDBANK_H
25 #include "sidplayfp/sidemu.h"
37 static const int MAPPER_SIZE = 8;
45 Bank *mapper[MAPPER_SIZE];
50 static unsigned int mapperIndex(
int address) {
return address >> 5 & (MAPPER_SIZE - 1); }
61 void resetSIDMapper(
Bank *bank)
63 for (
int i = 0; i < MAPPER_SIZE; i++)
75 mapper[mapperIndex(address)] = sid;
78 uint8_t
peek(uint_least16_t addr)
80 return mapper[mapperIndex(addr)]->
peek(addr);
83 void poke(uint_least16_t addr, uint8_t data)
85 mapper[mapperIndex(addr)]->
poke(addr, data);