Exemple #1
0
        /// <summary>
        /// The poke.
        /// </summary>
        /// <param name="Addr">The addr.</param>
        /// <param name="Data">The data.</param>
        /// <param name="size">The size in bits.</param>
        /// <remarks></remarks>
        //[DllImport("RthDLL.dll", CharSet = CharSet.Ansi)]
        public static void Poke(uint Addr, uint Data, int size)
        {
            if (!_IsConnected)
            {
                return;
            }
            // Calculate the offset

            switch (connectedDebugType)
            {
            case debugType.RthDLL:
                uint Ptr = BaseAddress + (Addr - VirtMatgOffset);

                // Init connection
                uint con = console.OpenConnection(null);

                // Poke
                uint   Out   = 0;
                byte[] Bytes = BitConverter.GetBytes(Data);
                console.DebugTarget.SetMemory(Ptr, (uint)(size / 8), Bytes, out Out);

                // Close connection
                console.CloseConnection(con);
                break;

            case debugType.YeloDebug:
                switch (size)
                {
                case 1:
                    xboxDebug.SetMemory(Addr, (Byte)Data);
                    break;

                case 2:
                    xboxDebug.SetMemory(Addr, (UInt16)Data);
                    break;

                case 4:
                    xboxDebug.SetMemory(Addr, (UInt32)Data);
                    break;
                }
                break;
            }
        }
Exemple #2
0
 public void Disconnect()
 {
     try
     {
         SendTextCommand("bye");
         console.CloseConnection(consoleConnection);
         Connected = false;
     }
     catch (Exception ex)
     {
         throw new Exception("XboxDevConsole: Could not disconnect from console.\n\n" + ex.Message);
     }
 }
Exemple #3
0
        public void Disconnect()
        {
            if (!IsConnected)
            {
                return;
            }

            if (xbCon != null)
            {
                xbCon.CloseConnection(connectioncode);
            }

            xboxMgr     = null;
            dbgXbox     = null;
            xbCon       = null;
            IsConnected = false;
        }