How to develop homebrew for the Xbox One (Part 1)

Discussion in 'Xbox One - Tutorials' started by wiired24, May 10, 2017.

  1. wiired24
    OP

    wiired24 GBAtemp Fan

    Member
    446
    339
    Sep 3, 2013
    United States
    Dev_Home
    This tutorial will be a multi part series. It will assume no prior knowledge of programming or prior development. It will cover getting all of the necessary tools, Working with C#/XAML and the Visual Designer, Creating APPX Packages that you can distribute over the internet for others to use your software easily, and more. This tutorial is for everyone interested in making their own homebrew software for Xbox One.

    [​IMG]

    In the past few weeks we have witnessed a large amount of homebrew become available for the Xbox One. Yet while there is a growing amount of homebrew becoming available there is very little to no good documentation on how to create homebrew for the Xbox One. This series intends to change that. Buckle up your seatbelt this is gonna be a long ride. :)


    Part 1 Section A: Getting Started -

    [​IMG]

    Before you can start making homebrew for the Xbox One you are going to need a few things. You will need an Xbox One (Duh Right?) Windows 10 PC with developer mode activated, and Visual Studio 2017.

    First Download Visual Studio 2017 Community Edition here
    https://www.visualstudio.com/downloads/

    Once you have it downloaded you will see an Installer that looks like this.
    [​IMG]

    Of course yours won't have anything selected just yet. The only thing you will need is Universal Windows Development at the top left. Feel free to include other workloads as well.

    We will now activate developer mode on your Windows 10 PC. You need Developer mode activated in order to deploy homebrew to your Xbox One.

    Go to Settings -> Update and Security -> For Developers

    You will now see a menu that looks like this

    [​IMG]

    Select Developer Mode to enable it. It's that simple :)


    Once finished with that we are now going to proceed to the next step. Go ahead and open up Visual Studio. Once opened click

    File -> New -> Project

    You will now see a menu that looks like this

    [​IMG]

    Make sure that you choose "Windows Universal" under Visual C#. You will then select to create a blank application.


    Part 1 Section B: Commence countdown to fun and awesome times :D

    [​IMG]


    The first thing you are going to want to is to enable your Computer to talk to your Xbox One. To do this on the top menu select

    Debug -> Properties (At the Bottom)

    Make sure that your Xbox One is in developer mode. (If you need info on setting that up just look here
    https://gbatemp.net/threads/how-to-activate-and-share-dev-mode-on-xbox-one-up-to-3-devices.468161/

    Take Note of the I.P. Address at the top of your screen on the Xbox One. It will look something like 192.168.3.44

    Once you are at the Properties Menu it should look like this

    [​IMG]

    Enter in your Xbox One I.P. Address in the "Remote Machine" Field.
    Once done make sure "Universal Unencrypted Protocol" is selected on Authentication Mode.
    Go ahead and close out of the properties window.

    You are now ready to build and deploy your very first homebrew application to the Xbox One
    Congrats you have made it this far. :toot:

    On the right hand side you should see a file called mainpage.xaml go ahead and double click it.
    Visual Studio will now load the designer. It should look like this

    [​IMG]

    For now don't worry about all of the code in the middle. That's all XAML stuff and we'll get to it later on.
    First at the top where it says "Phone" and scale go ahead and click that and navigate down the list to "Xbox" 1920x1080.

    Note: If you need to zoom in there is a tiny box on the middle of the screen towards the left that will say 7.25%. Change that to 25 or 33% for a better view

    Once done go to the left hand side where it says "All XAML Controls" and you will see a drop down list of all the various Widgets and Items that you can place into your Homebrew Application.
    You are looking for the one that says "Textblock" go ahead and drag and drop that into the application.

    It should now look like this

    [​IMG]

    Remember how a moment ago I said just ignore the code stuff in the middle we will get to it later. Well now is later.

    If you examine the XAML Code you will notice that when you dragged and dropped the Textblock into the designer you had code in XAML that got created automatically for you. There now exists a Textblock segement of code in XAML. Upon Closer examination you can see all of the atrributes of that textblock listed just like this.

    [​IMG]

    Notice we have the height and the width defined as well as the Text that is contained within. Go ahead and change the Text= " " to whatever you like.

    You are now ready to launch your very first Xbox One homebrew Application. Once finished go ahead and save your project. Now go up to the top and set it to x64 and Release/Debug (Up to you on that one but either will do) Now select Debug and start with or without debugging.

    If you have followed all of the steps correctly you will now see your project build and deploy on your Xbox One Console. Congrats on building your first homebrew for the Xbox. :D


    That's the end of Part 1. There is still much more to come. In Part 2 we will be covering how to apply Backgrounds, Colors, Fonts, we will be going over XAML more and we may even get into C# a little. If you have any questions at all comment below or message me.

     
    Last edited by wiired24, May 10, 2017


  2. ElijahZAwesome

    ElijahZAwesome GBATemp's official... uh... uhhhhhhhhhhhh

    Member
    564
    229
    Jul 12, 2016
    United States
    Narnia
    This is a great tutorial so far! I know how to do this but I'm sure many newcomers will benefit from this.
     
    wiired24 likes this.
  3. CeeDee

    CeeDee the Eevee

    Member
    3,665
    4,968
    May 4, 2014
    United States
    It isn't homebrew, though. It's just developing an application.

    There's nothing really "homebrew" about it. That's like saying apps not on a phone's appstore are homebrew.
     
  4. wiired24
    OP

    wiired24 GBAtemp Fan

    Member
    446
    339
    Sep 3, 2013
    United States
    Dev_Home
    It falls right under the definition

    "Homebrew is a term frequently applied to video games or other software produced by consumers to target proprietary hardware platforms (usually with hardware restrictions) not typically user-programmable or that use proprietary storage methods."

    I get that there exists this mindset that a device has to be "Hacked" for it to be considered "legitmate homebrew" but that's complete BS. If you make it from home and it's unofficial software then its home brew. Hence the name HOME-BREW

    So I contend to respectfully disagree but you have the right to your own opinion
     
    Last edited by wiired24, May 10, 2017
    lexarvn and Duckling like this.
  5. DavidRO99

    DavidRO99 Official depressed pikachu

    Member
    935
    249
    Jun 11, 2016
    Korea, North
    your back-door
    Now if only I had imagination to make an app xD, thats the problem with me, I have the tools and the knawledge(I know I spelt it wrong) but I dont have creativity
     
    wiired24 likes this.
  6. lisreal2401

    lisreal2401 GBAtemp Fan

    Member
    389
    124
    Jun 4, 2013
    United States
    It actually is. Running unsigned code on a device is by definition homebrew.
     
    wiired24 likes this.
  7. wiired24
    OP

    wiired24 GBAtemp Fan

    Member
    446
    339
    Sep 3, 2013
    United States
    Dev_Home
    Exactly! Saying it's not homebrew just because it's not running on top of an exploit is like saying Open Source software really isn't open source If it's running on a proprietary machine. You can only take purism to a certain extent. We still call a bird a bird regardless of what color it is.
     
    Last edited by wiired24, May 10, 2017
  8. dominater01

    dominater01 GBAtemp Regular

    Member
    162
    70
    Mar 13, 2009
    United States
    i got visual studio 2017 installed and have successfully deployed a uwp app to my xbox one but now im wondering how do i get the appx file?
     
  9. ElijahZAwesome

    ElijahZAwesome GBATemp's official... uh... uhhhhhhhhhhhh

    Member
    564
    229
    Jul 12, 2016
    United States
    Narnia
    I'm sure there's a "compile" or "build into distributable package" option somewhere but let @wiired24 confirm
     
  10. wiired24
    OP

    wiired24 GBAtemp Fan

    Member
    446
    339
    Sep 3, 2013
    United States
    Dev_Home
    That's actually a whole nother tutorial honestly. I will be covering that in a future part of the series. There is a tool you need to download. It's the same tool I use

    You can get the tool here.

    Just follow the instructions. If you have questions just comment or P.M. me. Again I'll cover this in depth in a later tutorial in the Homebrew Series.

     
    Last edited by wiired24, May 12, 2017
  11. dominater01

    dominater01 GBAtemp Regular

    Member
    162
    70
    Mar 13, 2009
    United States
    have you tried to create a appx with visual studio? i goto store then create app package then it asks if yes or no pick no then hit next pick the info you want then hit create the problem im having tho is

    1>------ Build started: Project: Space Invaders, Configuration: Debug x64 ------
    1>C:\Users\Dominater01\Desktop\Space-Invaders-Mobile-master\Space Invaders\obj\x64\Debug\MainPage.g.cs(29,26,29,30): error CS1061: 'MainPage' does not contain a definition for 'grid' and no extension method 'grid' accepting a first argument of type 'MainPage' could be found (are you missing a using directive or an assembly reference?)
    1>C:\Users\Dominater01\Desktop\Space-Invaders-Mobile-master\Space Invaders\obj\x64\Debug\MainPage.g.cs(34,26,34,32): error CS1061: 'MainPage' does not contain a definition for 'canvas' and no extension method 'canvas' accepting a first argument of type 'MainPage' could be found (are you missing a using directive or an assembly reference?)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    ========== Package: 0 succeeded, 1 failed ===========

    if this still doesnt help nevermind i tried to help
     
  12. ElijahZAwesome

    ElijahZAwesome GBATemp's official... uh... uhhhhhhhhhhhh

    Member
    564
    229
    Jul 12, 2016
    United States
    Narnia
    Seems like a problem with the code, not how your doing it. You'd have to fix the main page files to fix it.
     
  13. dominater01

    dominater01 GBAtemp Regular

    Member
    162
    70
    Mar 13, 2009
    United States
    tried with psx-box and it gave me a appxbundle :)

    edit: tried installing on xbox one and works perfect

    the noob knows more then the master :rofl2:
     
    Last edited by dominater01, May 12, 2017
  14. wiired24
    OP

    wiired24 GBAtemp Fan

    Member
    446
    339
    Sep 3, 2013
    United States
    Dev_Home
    I just have a different way of packaging UWP apps. But hey if doing it in Visual Studio works for you then by all means do it that way. :D
     
  15. dominater01

    dominater01 GBAtemp Regular

    Member
    162
    70
    Mar 13, 2009
    United States
    well i figured if you didnt know about it i might as well show you what i found

    also do you know whats wrong in the error posted?
     
    wiired24 likes this.
  16. wiired24
    OP

    wiired24 GBAtemp Fan

    Member
    446
    339
    Sep 3, 2013
    United States
    Dev_Home
    Thanks for letting everyone know :)
    Also, Not sure tbh. I'll have to check it out when I get back on to my computer. On my phone and not home atm.
     
  17. dominater01

    dominater01 GBAtemp Regular

    Member
    162
    70
    Mar 13, 2009
    United States
    ok

    i only have this problem when creating a appx package with that game, it works fine with the tut posted so i dont get why its picky but maybe if we can fix it i can learn how to fix it in the future

    everything worked when i tested it except no controls, is that hard to add? you did it for chip8 but i hope it wasnt that hard or time consuming i just wanted to help if i could
     
    Last edited by dominater01, May 12, 2017
  18. wiired24
    OP

    wiired24 GBAtemp Fan

    Member
    446
    339
    Sep 3, 2013
    United States
    Dev_Home
    There is a game pad class in the API. It's something I'll probably cover at length later on. And CHIP8 was weird with how I had to implement controls basically you'd have a switch like this

    Switch {

    (Case)

    Gamepad.LeftThumbstickUp: = 'A'

    }

    Basically I'd have to test the game and see what keyboard keys did what as each keyboard key would trigger a specific call once I found that out it was a matter of mapping the corresponding action with that of the gamepad. So for instance if the w button shoots then I had to set gamepad.buttonB = 'w' CHIP8 would then read in the W char when B Is pressed and would execute the corresponding call just as If you had pressed it on the keyboard
     
    Last edited by wiired24, May 12, 2017
  19. dominater01

    dominater01 GBAtemp Regular

    Member
    162
    70
    Mar 13, 2009
    United States
    the game shows the controls and its got left, right and space to shoot
     
  20. wiired24
    OP

    wiired24 GBAtemp Fan

    Member
    446
    339
    Sep 3, 2013
    United States
    Dev_Home
    I'd have to look over the games code myself to understand the design. Also just by looking at your error it seems like your having a definition error. You may be missing a necessary file for the appx conversion. Generally speaking when you have a definition error it means your missing something as a method or function gets used but there is no declaration of what it is so the compiler gives a definition error.