31 lines
554 B
C++
31 lines
554 B
C++
//
|
|
// Created by Selim Mustafaev on 11.08.2023.
|
|
//
|
|
|
|
#ifndef NES_NES_H
|
|
#define NES_NES_H
|
|
|
|
#include "Cpu.h"
|
|
#include "Cartridge.h"
|
|
#include <filesystem>
|
|
#include <optional>
|
|
|
|
namespace nes {
|
|
|
|
namespace fs = std::filesystem;
|
|
|
|
class Nes {
|
|
public:
|
|
Nes();
|
|
void runRom(const fs::path& path, std::optional<uint16_t> address = std::nullopt);
|
|
void reset(std::optional<uint16_t> address = std::nullopt);
|
|
|
|
private:
|
|
std::unique_ptr<Cpu> _cpu;
|
|
std::shared_ptr<Cartridge> _cartridge;
|
|
};
|
|
|
|
}
|
|
|
|
#endif //NES_NES_H
|