diff --git a/src/emu.h b/src/emu.h index 5034195..bff6129 100644 --- a/src/emu.h +++ b/src/emu.h @@ -2,25 +2,29 @@ #include #include -#include "processing_unit.h" -class Emu { +#include "processing-unit.h" +#include "ruc/singleton.h" + +class Emu : ruc::Singleton { public: -void WriteRAM(int location, int length); -void WriteVRAM(int location, int length); -void WriteROM(int location, int length); + Emu(s) {} + + void WriteRAM(int location, int length); + void WriteVRAM(int location, int length); + void WriteROM(int location, int length); -void ReadRAM(int location, int length); -void ReadVRAM(int location, int length); -void ReadROM(int location, int length); + void ReadRAM(int location, int length); + void ReadVRAM(int location, int length); + void ReadROM(int location, int length); private: -float m_frequency; -int m_cycle = 0; + float m_frequency; + int m_cycle = 0; -uint8_t m_ram[1024]; -uint8_t m_vram[1024]; -uint8_t m_rom[1024]; + uint8_t m_ram[1024]; + uint8_t m_vram[1024]; + uint8_t m_rom[1024]; -std::vector m_processing_units; -}; \ No newline at end of file + std::vector m_processing_units; +}; diff --git a/src/processingunit.cpp b/src/processing-unit.cpp similarity index 100% rename from src/processingunit.cpp rename to src/processing-unit.cpp diff --git a/src/processingunit.h b/src/processing-unit.h similarity index 100% rename from src/processingunit.h rename to src/processing-unit.h