// // Created by william on 10/15/23. // #include "../include/mapper.h" #include "../include/system.h" #ifndef NESEMULATOR_MEMORY_H #define NESEMULATOR_MEMORY_H /** * Gets a byte from a system's memory. * * @param addr The address to get * @return The value of the byte at the given address. */ byte mem_get_byte(address addr); /** * Gets a pointer to a byte in the memory. * Should not be used by the CPU, because the PPU will not be triggered if reading some addresses. * * @param addr The address to get a pointer to * @return A pointer to the byte in memory */ byte* mem_get_ptr(address addr); /** * Gets a word from a system's memory. * * @param addr The address to get * @return The value of the word at the given address. */ word mem_get_word(address addr); /** * Sets a byte in a system's memory. * * @param addr The address to set * @param data The data to set */ void mem_set_byte(address addr, byte data); #endif //NESEMULATOR_MEMORY_H