void Start() { // create mobo = new Mobo(); disassembler = new Disassembler(mobo.cpu); // setup view moboView.Setup(mobo); cpuView.Setup(mobo.cpu); mmuView.Setup(mobo.mmu); disassemblyView.Setup(disassembler); // load default rom string filename = string.Format("{0}/App/Resources/Roms/{1}.gb", Application.dataPath, romName); if (!File.Exists(filename)) { Debug.LogErrorFormat("{0} not found", filename); return; } byte[] rom = File.ReadAllBytes(filename); mobo.LoadRom(rom); }
void Start() { // limit to 60 fps Application.targetFrameRate = 60; // create mobo = new Mobo(); // setup view foreach (var view in views) { view.Setup(mobo); } // load default rom string filename = string.Format("{0}/App/Resources/Roms/{1}.gb", Application.dataPath, romName); if (!File.Exists(filename)) { Debug.LogErrorFormat("{0} not found", filename); return; } byte[] rom = File.ReadAllBytes(filename); mobo.LoadRom(rom); }