Beispiel #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);
 }
Beispiel #2
0
        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));
            }
        }
Beispiel #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);
        }
Beispiel #4
0
        public void ExecNextOpcode()
        {
            byte opcode = mmu.rb(pc++);

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

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