nesemu/cpu/memory.c

21 lines
550 B
C

//
// Created by william on 10/15/23.
//
#include "memory.h"
#include "ram.h"
byte mem_get_byte(Mapper *mapper, address addr) {
address redirected_addr = mapper->redirect_addr(addr);
return ram_get_byte(redirected_addr);
}
word mem_get_word(Mapper *mapper, address addr) {
address redirected_addr = mapper->redirect_addr(addr);
return ram_get_word(redirected_addr);
}
void mem_set_byte(Mapper *mapper, address addr, byte byte) {
address redirected_addr = mapper->redirect_addr(addr);
ram_set_byte(redirected_addr, byte);
}