Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public void Setup(Mobo _)
 {
     mobo = _;
 }
Пример #4
0
 public override void Setup(Mobo _)
 {
     base.Setup(_);
     disassembler = new Disassembler(_.cpu);
 }
Пример #5
0
 public override void Setup(Mobo _)
 {
     base.Setup(_);
     cpu = _.cpu;
 }
Пример #6
0
 public override void Setup(Mobo _)
 {
     base.Setup(_);
     mmu = mobo.mmu;
 }
Пример #7
0
 public virtual void Setup(Mobo _)
 {
     mobo = _;
 }