示例#1
0
 void LoadMemory()
 {
     lcdc = mmu.rb(Address.Lcdc);
     stat = mmu.rb(Address.Stat);
     wy   = (short)mmu.rb(Address.Scy);
     wx   = (short)mmu.rb(Address.Scx);
     ly   = mmu.rb(Address.Ly);
     lyc  = mmu.rb(Address.Lyc);
     irr  = mmu.rb(Address.Irr);
 }
示例#2
0
文件: MmuView.cs 项目: bmjoy/GB4Unity
        public void Refresh()
        {
            byte upper = StringUtil.HexToByte(page.text);

            page.text = string.Format("{0:X2}", upper);

            foreach (var input in inputs)
            {
                byte   lower   = (byte)input.transform.GetSiblingIndex();
                ushort address = (ushort)(upper << 8 | lower);
                input.text = string.Format("{0:X2}", mmu.rb(address));
            }
        }
示例#3
0
        public void Refresh()
        {
            if (!gameObject.activeInHierarchy)
            {
                return;
            }

            byte upper = StringUtil.HexToByte(page.text);

            page.text = string.Format("{0:X2}", upper);

            foreach (var input in inputs)
            {
                byte   lower   = (byte)input.transform.GetSiblingIndex();
                ushort address = (ushort)(upper << 8 | lower);
                input.text = string.Format("{0:X2}", mmu.rb(address));
            }

            bios.gameObject.SetActive(mmu.biosActive);
        }
示例#4
0
文件: Cpu.cs 项目: bmjoy/GB4Unity
        public void ExecNextOpcode()
        {
            byte opcode = mmu.rb(pc++);

            ExecOpcode(opcode);
        }
示例#5
0
        string GetByte(ushort address)
        {
            byte value = mmu.rb(address);

            return(String.Format("{0:X2}", value));
        }