nesemu/cpu/memory.h

39 lines
878 B
C

//
// 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 system A reference to the system
* @param addr The address to get
* @return The value of the byte at the given address.
*/
byte mem_get_byte(System *system, address addr);
/**
* Gets a word from a system's memory.
*
* @param system A reference to the system
* @param addr The address to get
* @return The value of the word at the given address.
*/
word mem_get_word(System *system, address addr);
/**
* Sets a byte in a system's memory.
*
* @param system A reference to the system
* @param addr The address to set
* @param value The value to set
*/
void mem_set_byte(System *system, address addr, byte value);
#endif //NESEMULATOR_MEMORY_H