Ejemplo n.º 1
0
 public Boolean ConnectTarget()
 {
     if (!IsConnected)
     {
         try
         {
             xboxMgr        = new XboxManager();
             xbCon          = xboxMgr.OpenConsole(DeviceIdent);
             dbgXbox        = xbCon.DebugTarget;
             connectioncode = xbCon.OpenConnection(null);
             IsConnected    = true;
         }
         catch
         {
             xbCon   = null;
             xboxMgr = null;
             dbgXbox = null;
             return(false);
         }
         try
         {
             XboxType = xbCon.ConsoleType.ToString();
         }
         catch
         {
             XboxType = "Can't get";
         }
     }
     return(IsConnected);
 }
Ejemplo n.º 2
0
        /// <summary>
        ///     Open a connection to the XBox Console
        /// </summary>
        /// <returns>true if the connection was successful.</returns>
        public bool Connect()
        {
            if (!IsConnected)
            {
                try
                {
                    _xboxManager        = new XboxManager();
                    _xboxConsole        = _xboxManager.OpenConsole(DeviceIdent);
                    _xboxDebugTarget    = _xboxConsole.DebugTarget;
                    _xboxConnectionCode = _xboxConsole.OpenConnection(null);
                }
                catch
                {
                    _xboxManager     = null;
                    _xboxConsole     = null;
                    _xboxDebugTarget = null;
                    return(false);
                }

                try
                {
                    XboxType = _xboxConsole.ConsoleType.ToString();
                }
                catch
                {
                    XboxType = "Unable to get.";
                }

                IsConnected = true;
            }
            return(true);
        }
Ejemplo n.º 3
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;
            }
        }
Ejemplo n.º 4
0
        public void Connect()
        {
            if (Connected)
            {
                throw new Exception("XboxDevConsole: Already connected to console.\n");
            }

            try
            {
                consoleConnection = console.OpenConnection(null);
                Connected         = true;
            }
            catch (Exception ex)
            {
                throw new Exception("XboxDevConsole: Console not found.\n\n" + ex.Message);
            }
        }
Ejemplo n.º 5
0
 public Boolean Connection()
 {
     if (!activeConnection)
     {
         xboxMgr = new XDevkit.XboxManager();
         xbCon   = xboxMgr.OpenConsole(xboxMgr.DefaultConsole);
         try
         {
             xbConnection = xbCon.OpenConnection(null);
         }
         catch (Exception)
         {
         }
         string text;
         string text2;
         if (xbCon.DebugTarget.IsDebuggerConnected(out text, out text2))
         {
             activeConnection = true;
         }
         xbCon.DebugTarget.ConnectAsDebugger("XboxLib", XboxDebugConnectFlags.Force);
         if (!xbCon.DebugTarget.IsDebuggerConnected(out text, out text2))
         {
         }
         activeConnection = true;
     }
     else
     {
         string text;
         string text2;
         if (xbCon.DebugTarget.IsDebuggerConnected(out text, out text2))
         {
         }
         activeConnection = false;
     }
     return(activeConnection);
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Open a connection to the XBox Console
        /// </summary>
        /// <returns>true if the connection was successful.</returns>
        public bool Connect()
        {
            if (!IsConnected)
            {
                try
                {
                    _xboxManager = new XboxManager();
                    _xboxConsole = _xboxManager.OpenConsole(DeviceIdent);
                    _xboxDebugTarget = _xboxConsole.DebugTarget;
                    _xboxConnectionCode = _xboxConsole.OpenConnection(null);
                }
                catch
                {
                    _xboxManager = null;
                    _xboxConsole = null;
                    _xboxDebugTarget = null;
                    return false;
                }

                try { XboxType = _xboxConsole.ConsoleType.ToString(); }
                catch { XboxType = "Unable to get."; }

                IsConnected = true;
            }
            return true;
        }