GarbAGE (Garbage Accurate GameBoy Emulator)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
708 B

#pragma once
#include <cstdint>
#include <vector>
#include <unordered_map>
#include "processing-unit.h"
#include "ruc/singleton.h"
class Emu final : public ruc::Singleton<Emu> {
public:
Emu(s) {}
void init(unsigned int frequency);
void update();
void addProcessingUnit(ProcessingUnit* processing_unit);
void addMemorySpace(const char* name, int size);
void writeMemory(const char* memory_space, unsigned int location, uint8_t value);
uint8_t readMemory(const char* memory_space, unsigned int location);
private:
unsigned int m_frequency;
unsigned int m_cycle = 0;
std::vector<ProcessingUnit*> m_processing_units;
std::unordered_map<const char*, std::vector<uint8_t>> m_memory_spaces;
};