Initial commit
This commit is contained in:
30
src/pse/system.cpp
Normal file
30
src/pse/system.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
#include "system.h"
|
||||
|
||||
System::System() = default;
|
||||
|
||||
System::~System() = default;
|
||||
|
||||
bool System::Initialize()
|
||||
{
|
||||
if (!m_cpu.Initialize(&m_bus))
|
||||
return false;
|
||||
|
||||
if (!m_bus.Initialize(this, &m_dma, nullptr))
|
||||
return false;
|
||||
|
||||
if (!m_dma.Initialize(&m_bus, nullptr))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void System::Reset()
|
||||
{
|
||||
m_cpu.Reset();
|
||||
m_bus.Reset();
|
||||
}
|
||||
|
||||
void System::RunFrame()
|
||||
{
|
||||
m_cpu.Execute();
|
||||
}
|
||||
Reference in New Issue
Block a user