Esempio n. 1
0
        private void Init(GbModel model)
        {
            if (model != GbModel.DMG)
            {
                throw new ArgumentOutOfRangeException("Currently only supports DMG model.");
            }
            registerAF     = 0x01b0;
            registerBC     = 0x0013;
            registerDE     = 0x00d8;
            registerHL     = 0x014d;
            stackPointer   = 0xfffe;
            programCounter = 0x0010;

            FetchInstruction = new Action(FetchInstructionImpl);
        }
Esempio n. 2
0
 public GbCpu(GbModel model, IMemory memory)
 {
     this.memory = memory;
     Init(model);
     steps.Enqueue(FetchInstruction);
 }