22 #ifndef SYSTEMROMBANKS_H
23 #define SYSTEMROMBANKS_H
29 #include "sidplayfp/c64/CPU/opcodes.h"
46 void setVal(uint_least16_t address, uint8_t val) {
rom[address & (N-1)]=val; }
51 uint8_t
getVal(uint_least16_t address)
const {
return rom[address & (N-1)]; }
56 void*
getPtr(uint_least16_t address)
const {
return (
void*)&
rom[address & (N-1)]; }
62 void set(
const uint8_t* source) {
if (source) memcpy(
rom, source, N); }
67 void poke(uint_least16_t address SID_UNUSED, uint8_t value SID_UNUSED) {}
69 uint8_t
peek(uint_least16_t address) {
return rom[address & (N-1)]; }
78 uint8_t resetVectorLo;
79 uint8_t resetVectorHi;
82 void set(
const uint8_t* kernal)
159 resetVectorLo =
getVal(0xfffc);
160 resetVectorHi =
getVal(0xfffd);
166 setVal(0xfffc, resetVectorLo);
167 setVal(0xfffd, resetVectorHi);
177 setVal(0xfffc, endian_16lo8(addr));
178 setVal(0xfffd, endian_16hi8(addr));
192 void set(
const uint8_t* basic)
197 memcpy(trap,
getPtr(0xa7ae), 3);
199 memcpy(subTune,
getPtr(0xbf53), 11);
205 memcpy(
getPtr(0xa7ae), trap, 3);
207 memcpy(
getPtr(0xbf53), subTune, 11);
218 setVal(0xa7af, endian_16lo8(addr));
219 setVal(0xa7b0, endian_16hi8(addr));
222 void setSubtune(uint8_t tune)