2011-01-03 04:28:36 +00:00
|
|
|
#include <gameboy/gameboy.hpp>
|
2010-12-28 01:53:15 +00:00
|
|
|
|
|
|
|
#define SYSTEM_CPP
|
|
|
|
namespace GameBoy {
|
|
|
|
|
|
|
|
System system;
|
|
|
|
|
|
|
|
void System::init(Interface *interface_) {
|
|
|
|
interface = interface_;
|
|
|
|
}
|
|
|
|
|
|
|
|
void System::power() {
|
2010-12-29 11:03:42 +00:00
|
|
|
bus.power();
|
|
|
|
cartridge.power();
|
2010-12-28 01:53:15 +00:00
|
|
|
cpu.power();
|
2010-12-29 11:03:42 +00:00
|
|
|
lcd.power();
|
2010-12-28 06:03:02 +00:00
|
|
|
scheduler.init();
|
2010-12-28 01:53:15 +00:00
|
|
|
}
|
|
|
|
|
2010-12-28 06:03:02 +00:00
|
|
|
void System::run() {
|
|
|
|
scheduler.enter();
|
2010-12-28 01:53:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|