xboxscene.org forums

Pages: [1] 2 3 4

Author Topic: Getting Started With Official Sdk Coding  (Read 705 times)

dstruktiv

  • Archived User
  • Full Member
  • *
  • Posts: 204
Getting Started With Official Sdk Coding
« on: January 07, 2010, 11:21:00 PM »

Download the leaked sdk from a torrent site (It isn't hard to find).

Be aware the leaked version is quite outdated (Pre NXE) but for all intents and purposes it's fully functional and supported.

You will need to get a hold of Visual Studio 2005 SP1, install this first then install the SDK.

Browse to directory where you installed the SDK and check out source\samples\ for a wealth of information and coding examples. Please note that as far as I'm aware the SDK that was leaked to torrent sites does not include any documentation other than the samples.

When compiling the samples or any of your own code please set the release configurations to Release_LTCG NOT Debug or a lot of programs won't run on a retail console.

Here's a basic layout of a program:

CODE
#include "stdafx.h"
#include
#include

 VOID __cdecl main()
{

// Do some shit here

}


Chances are you don't have a dev box so you have no way of debugging, I suggest you write a simple logging function for this, I have written the one below...

CODE
void debugLog(char* output)
{
    ofstream writeLog;

    writeLog.open("game:\\debug.log",ofstream::app);
    if (writeLog.is_open())
    {
      writeLog.write(output,strlen(output));
      writeLog.write("\n",1);
    }
    writeLog.close();
}


CODE
debugLog("Executable not found on specified path:");


This will create a debug.log in the same directory as the .xex you're running. Extremely useful for figuring out how far your codes getting etc. and where it's getting caught up. You could call the function before and after every variable you set etc. if need be.

Of course chances are whatever you're coding is going to need to access files and directories elsewhere on the Xbox so we can use the following code for that (This is a very convoluted way of doing it, you can strip out a lot of the code if you want but this works - Taken from here with the addition if returning the result so you can check if a mount or unmount was successful - returns S_OK if successful)...

CODE
/*
    
    List of physical drive
    
    "\\Device\\Flash"
    "\\Device\\Mu1"
    "\\Device\\Mu0"
    "\\Device\\Cdrom0"
    "\\Device\\Harddisk0\\Partition0"
    "\\Device\\Harddisk0\\Partition1"
    "\\Device\\Harddisk0\\Partition2"
    "\\Device\\Harddisk0\\Partition3"
    "\\Device\\Mass0"
    "\\Device\\Mass1"
    "\\Device\\Mass2"
    
    */
    
    #define DEVICE_NAND_FLASH 0
    #define DEVICE_MEMORY_UNIT0 1
    #define DEVICE_MEMORY_UNIT1 2
    #define DEVICE_CDROM0 3
    #define DEVICE_HARDISK0_PART0 4
    #define DEVICE_HARDISK0_PART1 5
    #define DEVICE_HARDISK0_PART2 6
    #define DEVICE_HARDISK0_PART3 7
    #define DEVICE_USB0 8
    #define DEVICE_USB1 9
    #define DEVICE_USB2 10
    
    typedef struct _STRING {
        USHORT Length;
        USHORT MaximumLength;
        PCHAR Buffer;
    } STRING;
    
    extern "C" int __stdcall ObCreateSymbolicLink( STRING*, STRING*);
    extern "C" int __stdcall ObDeleteSymbolicLink( STRING* );
    
    HRESULT Monter( int periphPhys, char* lettreLecteur )
     {
         char lecteurCible[16];
         sprintf_s( lecteurCible,"\\??\\%s", lettreLecteur );
    
         char * periphOriginal;
         switch( periphPhys )
         {
         case DEVICE_NAND_FLASH:
             periphOriginal = "\\Device\\Flash";
         break;
         case DEVICE_MEMORY_UNIT0:
             periphOriginal = "\\Device\\Mu0";
         break;
         case DEVICE_MEMORY_UNIT1:
             periphOriginal = "\\Device\\Mu1";
         break;
         case DEVICE_CDROM0:
             periphOriginal = "\\Device\\Cdrom0";
         break;
         case DEVICE_HARDISK0_PART0:
             periphOriginal = "\\Device\\Harddisk0\\Partition0";
         break;
         case DEVICE_HARDISK0_PART1:
             periphOriginal = "\\Device\\Harddisk0\\Partition1";
         break;
         case DEVICE_HARDISK0_PART2:
             periphOriginal = "\\Device\\Harddisk0\\Partition2";
         break;
         case DEVICE_HARDISK0_PART3:
             periphOriginal = "\\Device\\Harddisk0\\Partition3";
         break;
         case DEVICE_USB0:
             periphOriginal = "\\Device\\Mass0";
         break;
         case DEVICE_USB1:
             periphOriginal = "\\Device\\Mass1";
         break;
         case DEVICE_USB2:
             periphOriginal = "\\Device\\Mass2";
         break;
    
         STRING PeriphOriginal = { strlen( periphOriginal ), strlen( periphOriginal ) + 1, periphOriginal };
         STRING LienSymbolique = { strlen( lecteurCible ), strlen( lecteurCible ) + 1, lecteurCible };
       return ( HRESULT )   ObCreateSymbolicLink( &LienSymbolique, &PeriphOriginal );
     }
    
    HRESULT Demonter( char* lettreLecteur )
    {
        char lecteurCible[16];
        sprintf_s( lecteurCible,"\\??\\%s", lettreLecteur );
    
        STRING LienSymbolique = { strlen(lecteurCible), strlen(lecteurCible) + 1, lecteurCible };
      return ( HRESULT )  ObDeleteSymbolicLink( &LienSymbolique );
    }
    
    Monter(DEVICE_HARDISK0_PART1, "hdd1:");
 
    // Function to launch new executable from code
    XLaunchNewImage("hdd1:\\xexalancer.xex", NULL);


Right so now you can mount whatever hardware you need to, launch new executables from code and have a way of debugging your application.

So how do we output to the screen?

There are a number of frameworks included in the sample code, if you just want debugging text output on the screen I suggest you look at the ATGConsole framework. If you want a pretty GUI like XexLoader or Snes360 than you want to build an XUI.

The best place to start learning about XUI is by compiling and running the XuiTutorial sample (Remember set release configurations to Release_LTCG NOT Debug)

The 3 basics of XUI are:

1: Create your GUI in the Xbox UI Authoring tool (New Document) - File -> Export to binary when done.

2: Create a skin in the Xbox UI Authoring tool (New Skin) - I suggest for now you skip this step and use the default skin included in the XuiTutorial - To date all publicly released apps are using the default skin (Grey controls, green highlighted etc).

3: Load these files in code and start manipulating them. You will see how everything is done in the XuiTutorial sample.

That's all the basics for now, remember most of this is trial and error, you need at least a basic understanding of c++ and OO to do this. Knowledge of Directx9 is also an advantage (Windows/Xbox 360 implementation are extremely similar).

To speed things up you may like to create a QuickBoot container that boots usb:\dev\default.xex (as an example) so you can launch straight in to whatever you're coding without going through XexLoader. You may also like to get a usb extension cable that permanently stays plugged in to your 360 so there's no mechanical wear on the ports when you move your usb stick between Xbox and PC so often.

I'll attempt to answer any questions.

This post has been edited by dstruktiv: Jan 8 2010, 07:26 AM
Logged

dharrison

  • Archived User
  • Full Member
  • *
  • Posts: 232
Getting Started With Official Sdk Coding
« Reply #1 on: January 07, 2010, 11:48:00 PM »

This is very helpful. Thanks.
Logged

lei

  • Archived User
  • Newbie
  • *
  • Posts: 24
Getting Started With Official Sdk Coding
« Reply #2 on: January 08, 2010, 12:15:00 PM »

good job...it took me days to figure that out.... wish you were a week earlier smile.gif

Not many are willing to talk about coding practices...most sdk coders or teams think they are so brilliant and unique that they dont want to share the code, which would be the best way to increase the homebrew dev process. I have written a little socket server just for testing purpose. I read (@xbh) that networking is encrypted so no success to call the server from within e.g. telnet.   sad.gif

Maybe one day the code can be used to play around with networking...when the xnsp.cfgFlags = XNET_STARTUP_BYPASS_SECURITY is working on retail consoles. But if thats the case i think it will be easy for a good c++ developer to port any existing ftp server like filezilla server....



CODE

VOID Initialize( VOID )
{
    // Initialize the console
    HRESULT hr = g_console.Create( "game:\\Media\\Fonts\\Arial_12.xpr", 0xff0000ff, 0xffffffff );
    if( FAILED( hr ) )
    {
        ATG::FatalError( "Console initialization failed.\n" );
    }

    g_console.Format( "*** INITIALIZING ***\n" );

    // Start up the SNL with default initialization parameters
    XNetStartupParams xnsp;
    memset(&xnsp, 0, sizeof(xnsp));
    xnsp.cfgSizeOfStruct = sizeof(XNetStartupParams);
    xnsp.cfgFlags = XNET_STARTUP_BYPASS_SECURITY;
    

    if( XNetStartup( &xnsp ) != 0 )
    {
        ATG::FatalError( "XNetStartup failed.\n" );
    }
    
    // Start up Winsock
    WORD wVersion = MAKEWORD( 2, 2 );   // request version 2.2 of Winsock
    WSADATA wsaData;

    INT err = WSAStartup( wVersion, &wsaData );
    if( err != 0 )
    {
        ATG::FatalError( "WSAStartup failed, error %d.\n", err );
    }else
    {
        g_console.Format( "*** WSA SUCCESS ***\n" );
    }
    //ATG::FatalError( "Last  error %d.\n", WSAGetLastError() );

    // Verify that we got the right version of Winsock
    if( wsaData.wVersion != wVersion )
    {
        ATG::FatalError( "Failed to get proper version of Winsock, got %d.%d.\n",
                         LOBYTE( wsaData.wVersion ), HIBYTE( wsaData.wVersion ) );
    }

    // Initialize the socket
    g_socket = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP );
    if( g_socket == INVALID_SOCKET )
    {
        ATG::FatalError( "Failed to create socket, error %d.\n", WSAGetLastError() );
    }
    g_console.Format( "*** SOCKET CREATED  ***\n" );

    // Bind the socket
    SOCKADDR_IN sa;
    sa.sin_family = AF_INET;           // IP family
    sa.sin_addr.s_addr = ADDR_ANY;        // Use the only IP that's available to us
    sa.sin_port = htons( PORT_NUM );  // Port (should be 1000)
    
    g_console.Format( "*** BEFORE BIND  ***\n" );
    if( bind( g_socket, ( const sockaddr* )&sa, sizeof( sa ) ) != 0 )
    {
        ATG::FatalError( "Failed to bind socket, error %d.\n", WSAGetLastError() );
    }
    g_console.Format( "*** NOW AFTER BIND  ***\n" );

    g_console.Format( "*** BEFORE LISTEN ***\n" );
    if( listen(g_socket,3) != 0 )
        {
        ATG::FatalError( "Failed to bind socket, error %d.\n", WSAGetLastError() );
    }
    g_console.Format( "*** AFTER LISTEN ***\n" );

    g_console.Format( "*** BEFORE CONNECT INITIALIZE ***\n" );
    while(c_socket==SOCKET_ERROR)
    {
        g_console.Format( "*** WAITING FOR CONNECTION ***\n" );
        c_socket=accept(g_socket,NULL,NULL);
    }

    g_console.Format( "*** OUTTA WHILE ***\n" );
    return;
}


P.S: One nice thing is, you totally demistify the working of xexloader. The team around this is crying like babies because of the leaked code...which is totally ridiculous as its just some c++ code with no magic idea behind one could make money of. I never get that....
Logged

rkkman

  • Archived User
  • Newbie
  • *
  • Posts: 8
Getting Started With Official Sdk Coding
« Reply #3 on: January 08, 2010, 01:44:00 PM »

Thank you dstruktiv and lei.  This is exactly what I am talking about.  People helping people.  I wonder with this little push how many people can get down and dirty and do some coding?
Logged

FutabaGP

  • Archived User
  • Newbie
  • *
  • Posts: 23
Getting Started With Official Sdk Coding
« Reply #4 on: January 08, 2010, 02:59:00 PM »

Its pretty newbie question, but how can i convert float to string? I am just practicing with c++ and sdk by coding simple calculator... for xbox360. laugh.gif
Logged

dstruktiv

  • Archived User
  • Full Member
  • *
  • Posts: 204
Getting Started With Official Sdk Coding
« Reply #5 on: January 08, 2010, 03:55:00 PM »

QUOTE(lei @ Jan 9 2010, 08:15 AM) View Post

P.S: One nice thing is, you totally demistify the working of xexloader. The team around this is crying like babies because of the leaked code...which is totally ridiculous as its just some c++ code with no magic idea behind one could make money of. I never get that....


Where do people get these crazy ideas from lol. There are one or two people coding XexLoader... They don't complain, they don't cry and they're damn nice guys. They also don't post on forums... So anyone you've heard "complaining" doesn't actually write any of the code. Remember that some of these guys have figured out this shit from scratch i.e. Mounting drives etc. and it's up to them if they want to make their hard work public.

Now that Ski-lleR posted publicly how to mount/unmount storage and launch new executables (Which he probably figured out for himself as his code is drastically different from the FreeXex drive mounting) it wouldn't be hard for an experienced c++ coder to write something equivalent to XexLoader or Viper360. There's no black magic going on here, all the hard stuff has been taken care of by the real geniuses in the scene so now people like me can start learning to code.

See here's some code... I'm not crying... Except when I get mocked for my shit code cause c++ and types confuse me (Look at my usb launching stuff lol oh well it works)  unsure.gif

CODE

/*
QuickBoot v1.1 Xbox 360
Coded by Dstruktiv
I was going to snip out a couple of bits of code, namely the simplified drive mounting code as it wasn't mine, but I see someone has kindly already taken the source of this off our "private" ftp and it's now on pastebin as of 24/12/09 and some Spanish Xbox hacking site so may as well make it easy to find... Captain we have a leak.
*/
#include "stdafx.h"
#include
#include
#include
#include
#include
#include "xfilecache.h"
#include

using std::string;
using std::ifstream;
using std::ofstream;

typedef struct _STRING {
    USHORT Length;
    USHORT MaximumLength;
    PCHAR Buffer;
} STRING, *PSTRING;

extern "C" int __stdcall ObCreateSymbolicLink( STRING*, STRING*);
extern "C" int __stdcall ObDeleteSymbolicLink( STRING* );

HRESULT Map( CHAR* szDrive, CHAR* szDevice )
{
    CHAR * szSourceDevice;
    CHAR szDestinationDrive[16];

    szSourceDevice = szDevice;

    sprintf_s( szDestinationDrive,"\\??\\%s", szDrive );

    STRING DeviceName =
    {
        strlen(szSourceDevice),
        strlen(szSourceDevice) + 1,
        szSourceDevice
    };

    STRING LinkName =
    {
        strlen(szDestinationDrive),
        strlen(szDestinationDrive) + 1,
        szDestinationDrive
    };

    return ( HRESULT )ObCreateSymbolicLink( &LinkName, &DeviceName );
}

HRESULT unMap( CHAR* szDrive )
{
    CHAR szDestinationDrive[16];
    sprintf_s( szDestinationDrive,"\\??\\%s", szDrive );

    STRING LinkName =
    {
        strlen(szDestinationDrive),
        strlen(szDestinationDrive) + 1,
        szDestinationDrive
    };

    return ( HRESULT )ObDeleteSymbolicLink( &LinkName );
}

void launchX(char* xfile)
{
    XFlushUtilityDrive();
    XFileCacheInit(XFILECACHE_CLEAR_ALL,0,XFILECACHE_DEFAULT_THREAD,0,1);
    XFileCacheShutdown();
    XFlushUtilityDrive();
    XLaunchNewImage(xfile,0);
}

bool FileExists(char* strFilename) {
  struct stat stFileInfo;
  bool returnValue;
  int intStat;

  intStat = stat(strFilename,&stFileInfo);
  if(intStat == 0) {
    returnValue = true;
  } else {

    returnValue = false;
  }
  
  return(returnValue);
}

void debugLog(char* output)
{
    unMap("usb:");

    if (Map("usb:","\\Device\\Mass0") == S_OK )
    {
        ofstream writeLog;

        writeLog.open("usb:\\debug.log",ofstream::app);
        if (writeLog.is_open())
        {
          writeLog.write(output,strlen(output));
          writeLog.write("\n",1);
        }
        writeLog.close();
    }
}

 VOID __cdecl main()
{
    char path[512];

    if (FileExists("game:\\config.ini"))
    {
        ifstream config;
        config.open ("game:\\config.ini");
        if (config.is_open())
        {
            config.getline (path,512);
            config.close();
        }
    }
    else
    {
        debugLog("Config not found");
        debugLog("game:\\config.ini");
    }

    string pathstr = path;
    string pathstr1 = path;
    string pathstr2 = path;

    if(pathstr.substr(0,3) == "usb")
    {
        pathstr.insert(3,"0");
        pathstr1.insert(3,"1");
        pathstr2.insert(3,"2");

        char *a;
        char *b;
        char *c;

        a=&pathstr[0];
        b=&pathstr1[0];
        c=&pathstr2[0];
        
        Map("usb0:","\\Device\\Mass0");
        Map("usb1:","\\Device\\Mass1");
        Map("usb2:","\\Device\\Mass2");

        if(FileExists(a))
        {    
            launchX(a);
        }
        else if (FileExists(b))
        {            
            launchX(b);
        }
        else if (FileExists(c))
        {            
            launchX(c);
        }
        else
        {
            debugLog("Executable not found on any usb device at specified path:");
            debugLog(path);
        }
    }
    else if (FileExists(path))
    {
        Map("hdd:","\\Device\\Harddisk0\\Partition1");
        Map("dvd:","\\Device\\Cdrom0");
        launchX(path);
    }
    else
    {
        debugLog("Executable not found at specified path:");
        debugLog(path);
    }
}


CODE

/*
QuickBoot v1.1 PC Tool (Visual C#)
Coded by Dstruktiv
Big thanks to DJ Shepherd for X360.dll
*/

using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using X360.STFS;
using X360.Other;
using X360.IO;

namespace QuickBoot
{
    public partial class QuickBoot : Form
    {
        public QuickBoot()
        {
            InitializeComponent();
        }

        CreateContents xsession = new CreateContents();
        bool imageUpdated = false;
        string processDir = (System.Environment.CurrentDirectory); //Work around for Windows XP

        private void Form1_Load(object sender, EventArgs e)
        {
            System.Windows.Forms.ToolTip ToolTip1 = new System.Windows.Forms.ToolTip();
            System.Windows.Forms.ToolTip ToolTip2 = new System.Windows.Forms.ToolTip();
            System.Windows.Forms.ToolTip ToolTip3 = new System.Windows.Forms.ToolTip();
            System.Windows.Forms.ToolTip ToolTip4 = new System.Windows.Forms.ToolTip();
            System.Windows.Forms.ToolTip ToolTip5 = new System.Windows.Forms.ToolTip();

            ToolTip1.SetToolTip(this.txtTitle, "Application name that will show in NXE");
            ToolTip2.SetToolTip(this.txtDescription, "Application description that will show in NXE");
            ToolTip3.SetToolTip(this.txtPath, "Path relative to your Xbox 360 - \"usb:\\\",\"hdd:\\\",\"dvd:\\\" are supported drives. Example: hdd:\\Games\\tekken6\\default.xex");
            ToolTip4.SetToolTip(this.imgDash, "Click here to add custom image that will show in NXE. Must be 16KB or less and exactly 64x64 resolution");
            ToolTip5.SetToolTip(this.comboBox1, "An Xbox 360 Game will show up under the Xbox 360 Games menu item in the NXE dash, likewise a Game Demo will show up under Game Demos");

            comboBox1.SelectedIndex = 0;

            DJsIO xIO = new DJsIO("xbox\\default.xex", DJFileMode.Open, EndianType.BigEndian);
            string xPath = "xbox\\default.xex";
            xPath = xIO.FileNameShort;
            if (!xsession.AddFile(xIO, xPath))
            {
                xIO.Close();
                return;
            }
        }

        byte[] ToHex(string xIn)
        {
            for (int i = 0; i < (xIn.Length % 2); i++)
                xIn = "0" + xIn;
            List xReturn = new List();
            for (int i = 0; i < (xIn.Length / 2); i++)
                xReturn.Add(Convert.ToByte(xIn.Substring(i * 2, 2), 16));
            return xReturn.ToArray();
        }

        private void btnBuild_Click(object sender, EventArgs e)
        {
            if (txtTitle.Text == "")
            {
                MessageBox.Show("Please fill in the title.", "Error");
            }
            else if (txtDescription.Text == "")
            {
                MessageBox.Show("Please fill in the description.", "Error");
            }
            else if (txtPath.Text == "")
            {
                MessageBox.Show("Please fill in the path.", "Error");
            }
            else
            {
                xsession.STFSType = STFSType.Type0;
                xsession.HeaderData.Description = txtDescription.Text;
                xsession.HeaderData.Title_Display = txtTitle.Text;
                PackageType xVal;
                if (comboBox1.SelectedIndex == 0)
                {
                    xVal = PackageType.GamesOnDemand;
                }
                else
                {
                    xVal = PackageType.GameDemo;
                }
                xsession.HeaderData.TitleID = ((uint)3235813785);
                xsession.HeaderData.ThisType = xVal;
                xsession.HeaderData.Publisher = "F586558";
                xsession.HeaderData.Title_Package = "QuickBoot Launcher";
                xsession.HeaderData.SeriesID = ToHex("00000000000000000000");
                xsession.HeaderData.SeasonID = ToHex("00000000000000000000");
                xsession.HeaderData.DeviceID = ToHex("0000000000000000000000000000000000000000");
                xsession.HeaderData.IDTransfer = TransferLock.AllowTransfer;

                if (!imageUpdated)
                {
                    Byte[] defaultImage = (Byte[])new ImageConverter().ConvertTo(imgDash.Image, typeof(Byte[]));
                    xsession.HeaderData.PackageImageBinary = defaultImage;
                    xsession.HeaderData.ContentImageBinary = defaultImage;
                }

                DJsIO zIO = new DJsIO(processDir + "\\xbox\\config.ini", DJFileMode.Open, EndianType.BigEndian);
                string zPath = processDir + "\\xbox\\config.ini";
                zPath = zIO.FileNameShort;
                if (!xsession.AddFile(zIO, zPath))
                {
                    zIO.Close();
                    return;
                }

                DJsIO xIO = new DJsIO(DJFileMode.Create, "Select save location...", "", EndianType.BigEndian);
                if (!xIO.Accessed)
                    return;
                LogRecord rec = new LogRecord();
                RSAParams xParams;
                xParams = new RSAParams(StrongSigned.LIVE);
                STFSPackage xy = new STFSPackage(xsession, xParams, xIO, rec);
                if (!xy.ParseSuccess)
                {
                    MessageBox.Show("Error");
                    this.Close();
                }

                txtTitle.Text = "";
                txtDescription.Text = "";
                txtPath.Text = "";

                zIO.Close();
                xsession.DeleteFile(zPath);

                if (comboBox1.SelectedIndex == 0)
                {
                    toolStripStatusLabel1.Text = "Container built, copy to: Content\\0000000000000000\\C0DE9999\\00007000";
                } else{
                    toolStripStatusLabel1.Text = "Container built, copy to: Content\\0000000000000000\\C0DE9999\\00080000";
                }
            }
        }

        private void imgDash_Click(object sender, EventArgs e)
        {
            DJsIO xIO = new DJsIO(DJFileMode.Open, "Open a PNG", "PNG File|*.png", EndianType.BigEndian);
            if (!xIO.Accessed)
                return;
            if (xIO.Length > 0x4000)
            {
                MessageBox.Show("Error: Image is too big");
                return;
            }
            byte[] x = xIO.ReadStream();
            try { Image y = x.BytesToImage(); imgDash.Image = y; }
            catch (Exception z) { MessageBox.Show(z.Message); return; }
            xsession.HeaderData.PackageImageBinary = x;
            xsession.HeaderData.ContentImageBinary = x;
        }

        private void txtPath_Leave(object sender, EventArgs e)
        {
            using (StreamWriter config = new StreamWriter(processDir + "\\xbox\\config.ini"))
            {
                config.WriteLine(txtPath.Text);
            }
        }

        private void imgDash_LoadCompleted(object sender, AsyncCompletedEventArgs e)
        {
            imageUpdated = true;
        }
    }
}

Logged

welly_59

  • Archived User
  • Jr. Member
  • *
  • Posts: 57
Getting Started With Official Sdk Coding
« Reply #6 on: January 08, 2010, 04:13:00 PM »

a question for both lei and dstruktiv:
how much coding experience do you have? i havent done any in years but am thinking of getting involved again now that i'll have something to get my teeth into

This post has been edited by welly_59: Jan 9 2010, 12:14 AM
Logged

dstruktiv

  • Archived User
  • Full Member
  • *
  • Posts: 204
Getting Started With Official Sdk Coding
« Reply #7 on: January 08, 2010, 04:24:00 PM »

Started fucking with visual basic in high school, then Blitz3D, then BlitzBasic (Wrote a complete asteroids type game), then ported my BlitzBasic game to XNA and had it running on the 360, well partly. Then have just started really getting in to c# and learning c++ in the last month. And I've been doing html/php since about 16. I'm 20 now.

I'm self taught and I think that shows lol would love to do proper c++ courses but not sure if I'll ever get around to it  tongue.gif
Logged

kittonkicker

  • Archived User
  • Newbie
  • *
  • Posts: 13
Getting Started With Official Sdk Coding
« Reply #8 on: January 08, 2010, 04:58:00 PM »

QUOTE(lei @ Jan 8 2010, 07:15 PM) *

good job...it took me days to figure that out.... wish you were a week earlier (IMG:style_emoticons/default/smile.gif)

Not many are willing to talk about coding practices...most sdk coders or teams think they are so brilliant and unique that they dont want to share the code, which would be the best way to increase the homebrew dev process. I have written a little socket server just for testing purpose. I read (@xbh) that networking is encrypted so no success to call the server from within e.g. telnet.   (IMG:style_emoticons/default/sad.gif)

Maybe one day the code can be used to play around with networking...when the xnsp.cfgFlags = XNET_STARTUP_BYPASS_SECURITY is working on retail consoles. But if thats the case i think it will be easy for a good c++ developer to port any existing ftp server like filezilla server....


I've found the same problem (tried to setup a basic socket server this evening...).

Weirdly the 360's Media Center xex is able to send/recv unencrypted network communications. I beleive it's something worth investigating, but I don't even know which xex is the Media Center!

Examples (captured in Wireshark):
153   0.201104   192.168.1.11   192.168.1.2   RTSP   DESCRIBE rtsp://192.168.1.2:8554/McxDMS/Mcx1-KIKI-PC/?mediaid=9ba470f8-b54a-4a14-886b-655251282050 RTSP/1.0
541   0.658909   192.168.1.11   192.168.1.2   RTSP   SETUP rtsp://192.168.1.2:8554/McxDMS/Mcx1-KIKI-PC/video RTSP/1.0
547   0.662790   192.168.1.11   192.168.1.2   RTSP   PLAY rtsp://192.168.1.2:8554/McxDMS/Mcx1-KIKI-PC/?mediaid=ddb5d0f4-e414-46cd-98ab-d2ecca64c2b8 RTSP/1.0

This post has been edited by kittonkicker: Jan 9 2010, 01:01 AM
Logged

dstruktiv

  • Archived User
  • Full Member
  • *
  • Posts: 204
Getting Started With Official Sdk Coding
« Reply #9 on: January 08, 2010, 05:14:00 PM »

You're not going to get unencrypted network traffic from within an Xex unless you a ) Patch the kernel/HV b ) Port a tcp stack to talk directly to hardware. There's some very smart people looking in to it and it's a bit outside the scope of this thread tongue.gif
Logged

rkkman

  • Archived User
  • Newbie
  • *
  • Posts: 8
Getting Started With Official Sdk Coding
« Reply #10 on: January 08, 2010, 05:47:00 PM »

I must really be getting old or I just suck.  Even with the code left here you would think I would figure out how to get it work so I understand it better.  But no working the C# app and just cant get it to work..  I think I am missing something...
Logged

dstruktiv

  • Archived User
  • Full Member
  • *
  • Posts: 204
Getting Started With Official Sdk Coding
« Reply #11 on: January 08, 2010, 06:20:00 PM »

QUOTE(rkkman @ Jan 9 2010, 01:47 PM) View Post

I must really be getting old or I just suck.  Even with the code left here you would think I would figure out how to get it work so I understand it better.  But no working the C# app and just cant get it to work..  I think I am missing something...


What are you trying to get working? That c# quickboot code obviously needs a gui built in the designer and the events mapped to controls. Also requires x360.dll to be added to your project. And the x360.dll that quickboot uses is slightly modified to do the hyrbid games on demand containers.

The c++ quickboot code should compile fine as it is and run.
Logged

rkkman

  • Archived User
  • Newbie
  • *
  • Posts: 8
Getting Started With Official Sdk Coding
« Reply #12 on: January 08, 2010, 06:34:00 PM »

Yeah I did the reference for x360 was building the GUI and but was getting errors regarding InitializeComponent.  Ok I will go try messing with the C++ one.
Logged

Zanzang

  • Archived User
  • Jr. Member
  • *
  • Posts: 84
Getting Started With Official Sdk Coding
« Reply #13 on: January 09, 2010, 02:28:00 AM »

Thanks for the help! smile.gif

The Release_LTCG build tip saved me from having a frustrating evening.  
Up until the XuiDolphin sample all the low level ones I've messed with only required Release.
Logged

lei

  • Archived User
  • Newbie
  • *
  • Posts: 24
Getting Started With Official Sdk Coding
« Reply #14 on: January 09, 2010, 10:21:00 AM »

HINT: for those reading the topic and are interested in using the debug technique...

u have to

CODE

#include
using namespace std;



as the debugLog() method described in this topic  utilizes the ofstream class
Logged
Pages: [1] 2 3 4