#ifndef __NES_H__ #define __NES_H__ #include #include #include #include "cpu.h" #include "mapper.h" typedef struct nes_emu_t nes_emu_t; /* nes_init * Initializes the nes_emu struct. * [in/out] nes_emu** nes - The return pointer. Expects NULL. */ void nes_init(nes_emu_t** nes); /* nes_kill * Kills the nes_emu struct. * [in] nes_emu* nes - The emulated NES. */ void nes_kill(nes_emu_t* nes); /* nes_start * Starts the NES emulation. * [in] nes_emu* nes - The emulated NES. */ void nes_start(nes_emu_t* nes); /* nes_step * Steps the NES emulation. * [in] nes_emu* nes - The emulated NES. */ void nes_step(nes_emu_t* nes); /* nes_stop * Stops the NES emulation. * [in] nes_emu* nes - The emulated NES. */ void nes_stop(nes_emu_t* nes); /* nes_reset * Resets the NES emulation. * [in] nes_emu* nes - The emulated NES. */ void nes_reset(nes_emu_t* nes); /* nes_running * Checks if the NES emulation is running. * [in] nes_emu* nes - The emulated NES. * Returns: The running status of the NES emulation. */ int nes_running(nes_emu_t* nes); /* nes_get_cpu * Get the cpu. * [in] nes_emu* nes - The emulated NES. * Returns: Pointer to the emulated cpu. */ cpu6502_t* nes_get_cpu(nes_emu_t* nes); /* nes_get_mapper * Get the mapper. * [in] nes_emu* nes - The emulated NES. * Returns: Pointer to the memory mapper. */ mapper_t* nes_get_mapper(nes_emu_t* nes); void nes_load_rom(nes_emu_t* nes); #endif