Newer
Older
#include <fstream>
#include <iostream>
#include <memory>
ComponentManager::ComponentManager() :
memory(MEMORY_RANGE, 0)
{
ee = std::make_unique<EmotionEngine>(this);
}
void ComponentManager::read_bios()
{
/* Yes it's hardcoded for now, don't bite me, I'll change it eventually */
std::ifstream reader;
reader.open("/home/emufan/Desktop/gcnemu/build/bin/bios.bin", std::ios::in | std::ios::binary);
if (!reader.is_open())
exit(1);
reader.seekg(0);
reader.read((char*)(memory.data() + BIOS.start), 4 * 1024 * 1024);