public void Poke(ushort address, byte value)
        {
            ushort memLoc;

            try
            {
                memLoc = (ushort)(address - MemoryLocation);
            }
            catch (Exception)
            {
                return;
            }

            if (memLoc >= 51000)
            {
                return;
            }

            if (InvokeRequired)
            {
                var pcb = new PokeCallBack(PokeAddress);
                Invoke(pcb, new object[] { memLoc, value });
            }
            else
            {
                PokeAddress(address, value);
            }
        }
示例#2
0
 private void ThreadPoke(ushort Addr, byte value)
 {
     if (b32Screen1.InvokeRequired)
     {
         PokeCallBack pcb = new PokeCallBack(Poke);
         this.Invoke(pcb, new object[] { Addr, value });
     }
     else
     {
         Poke(Addr, value);
     }
 }
示例#3
0
        public void Poke(ushort address, byte value)
        {
            ushort memLoc;

            try
            {
                memLoc = (ushort)(address - _memoryLocation);
            }
            catch (Exception)
            {
                return;
            }

            if (memLoc > (3999 + 3))
            {
                return;
            }

            //if (memLoc == 4000)
            //{
            //    if (value == 1)
            //        ShowCursor();
            //    else HideCursor();

            //    Poke((ushort) (address - 1), Peek((ushort) (address - 1)));
            //    return;
            //}

            if (memLoc == 4000)
            {
                if (value == 1)
                {
                    _cursorThread.Enabled = true;
                    _cursorOn             = true;
                }
                if (value == 0)
                {
                    _cursorThread.Enabled = false;
                    _cursorOn             = false;
                }
                Poke(MemoryLocation, Peek(MemoryLocation));
                return;
            }
            if (InvokeRequired)
            {
                var pcb = new PokeCallBack(PokeAddress);
                Invoke(pcb, memLoc, value);
            }
            else
            {
                PokeAddress(memLoc, value);
            }
        }
示例#4
0
 public void ThreadPoke(ushort Addr, byte value)
 {
     if (this.InvokeRequired)
     {
         PokeCallBack pcb = new PokeCallBack(Poke);
         this.Invoke(pcb, new object[] { Addr, value });
     }
     else
     {
         Poke(Addr, value);
     }
 }
示例#5
0
 private void ThreadPoke(ushort Addr, byte value)
 {
     if (reallySimpleScreen1.InvokeRequired)
     {
         PokeCallBack pcb = new PokeCallBack(Poke);
         Invoke(pcb, new object[] { Addr, value });
     }
     else
     {
         Poke(Addr, value);
     }
 }