nesemu/cpu/memory.h

39 lines
878 B
C
Raw Normal View History

2023-11-26 12:11:49 -05:00
//
// Created by william on 10/15/23.
//
#include "../include/mapper.h"
2024-01-06 14:27:09 -05:00
#include "../include/system.h"
2023-11-26 12:11:49 -05:00
#ifndef NESEMULATOR_MEMORY_H
#define NESEMULATOR_MEMORY_H
2024-01-06 14:27:09 -05:00
/**
* 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);
2023-11-26 12:11:49 -05:00
#endif //NESEMULATOR_MEMORY_H