Jump to content


Photo

Compiling My First .xbe


  • Please log in to reply
26 replies to this topic

#1 ressurectionx

ressurectionx

    X-S Knowledgebase

  • Dev/Contributor
  • PipPipPipPipPipPipPipPip
  • 4,214 posts
  • Xbox Version:v1.0
  • 360 version:none

Posted 07 March 2008 - 10:24 AM

Does anybody post here anymore?

I've got everything up now. XDK Dashboard - check, Visual Studio .NET 2003 - check, XDK 5933 - check....

So... I have a version of MAME binaries I was trying to compile first. I figured I'd start with compiling because I can teach myself all the coding I want, but if I can't compile a build and upload it then it's worthless to me. Ummmmmm.... yeah. Over 7,000 errors and nearly 1,000 warnings. Not good. Maybe a little to advanced for me to start out with. I figure since it's binaries of a well known version of MAME already being used on the XBox, this shouldn't be happening, but I know so little about it at this point that I couldn't even begin to speculate why.

So, I decided to get back to basics. Using the XDK help provided with XDK 5933 I found a help item which gives instructions to take a crappy little source in their help files that you can compile into an .xbe and get to run on your XBox. I figured what better way to start teaching myself how to do this, right?

Well... the instructions are different than the actual menu options available. At one point it actually tells you to use an option named "Build xxxxx .xbe". Ain't no such thing, at least I don't see it anywhere.

I've been at this for about 4 days now and I'm getting frustrated enough to give up. I can't seem to find any decent documentation for programming and compiling for the XBox and all of the help threads in the stickied thread above are apparently closed for business now that it's 2008 and almost 5 years after most of those posts. The only one that is still alive is http://www.xbdev.net/ and they don't tell me anything about compiling.

Anybody have any input on how to compile or any good links to XDK programming that I can use to get started? I can give exact examples of the problems I'm having when I'm at home, but I'd like to see first if anybody is still here that knows anything about XBox development. Doesn't look like anyone hardly posts here anymore.

Thanks ahead of time,
~Rx

#2 korn_16_f_t_l

korn_16_f_t_l

    X-S Member

  • Members
  • Pip
  • 102 posts
  • Xbox Version:v1.6
  • 360 version:unknown

Posted 07 March 2008 - 11:56 AM

would love to help u out on this one but im not quite that far yet im workin on my primary xbox right now
but i do plan to be at the XDK stage eventually if u get to frustrated put it down and go on to ure
2nd project or somthing itll come to ya outta no where that how i figure out most things

#3 ressurectionx

ressurectionx

    X-S Knowledgebase

  • Dev/Contributor
  • PipPipPipPipPipPipPipPip
  • 4,214 posts
  • Xbox Version:v1.0
  • 360 version:none

Posted 07 March 2008 - 12:12 PM

Cool man. Looking forward to hearing what you have to say about it when you get set up. I can always go back to my PSX compatibility list in the mean time. I haven't given up yet, but it's just getting real frustrating. It's been about 8 years since I coded anything. Everything is so much different today. Better, I'm sure.... but without somebody to point you in the right direction it's a little overwhelming.

#4 ressurectionx

ressurectionx

    X-S Knowledgebase

  • Dev/Contributor
  • PipPipPipPipPipPipPipPip
  • 4,214 posts
  • Xbox Version:v1.0
  • 360 version:none

Posted 08 March 2008 - 01:01 AM

Maybe I'm not using the right part of the program. Here's the helpfile for XBE Step by Step.

There is not a single instruction that I can follow correctly because my options given to me are different than what the instructions are telling me. I can open up an XBox game, but I have to open an XBox project first, and then specify XBox game. Under "Writing some code" I can eventually open the "Vertices.cpp", but I have to follow different instructions given. By the time I get to the part where it tells me to link a library those commands don't even exist.

"Select Project / Link from the Visual C++ IDE menu and add "d3d8d.lib" to the Object/Library Modules."

There is no "Link" option under "Project"

I can't even compile a BS help file. Anybody around here who can help? I saw about 50 views on this topic. Love to hear what you have to say.


QUOTE
XBE Step by Step
Once you have properly installed the Xbox SDK, you can start developing Xbox titles. The steps below will take you through the process of creating and running an XBE.

Set up the Development Environment
As long as you have properly installed the Xbox SDK on your development system and used the recovery CD to image your target machine, there is nothing further to install. Make sure that you have set your target system's machine name (per the XDK Launcher topic) so that your development system can find your target system on the network.

Create the Xbox Game Project
Launch the Visual C++ IDE on your development system and create a new Xbox Game project. Select File / New / Projects / Xbox Game from the Visual C++ IDE menu. Enter "first" for the Project Name, enter "C:\first" for the Location, select OK, and then click OK again. You now have a new Xbox Game project.

Write Some Code
You will need some source code to compile. To save time, just add the Vertices tutorial source to your project by selecting Project / Add to Project / Files. Navigate to the "\Samples\Xbox\Graphics\Tutorials\Tut02_Vertices" directory (under the Xbox SDK directory) and select "Vertices.cpp". Click OK to add the file to your project.

The Vertices tutorial relies on d3d8d.lib. To make sure that library gets linked into your program, you'll need to change the project settings. Select Project / Link from the Visual C++ IDE menu and add "d3d8d.lib" to the Object/Library Modules. Before you click OK to accept the changes, you'll need to edit a few more settings.

Click the Xbox Image tab of the Project Settings dialog box. Select Title Info for the Category. Enter "0x00000001" for Title ID, enter "My First XBE" for Title Name, and enter "Joe Publisher" for Publisher Name.

That's it. You can now click OK and accept these project settings.

Build the XBE
Select Build / Build first.xbe from the Visual C++ IDE menu to build your XBE. You should have 0 errors and 0 warnings.

Copy the XBE to the Target System
Assuming the machine name of your target system is "xdk-target", you can copy your XBE to the target system by opening a Windows command prompt and issuing the following commands:

xbmkdir -x xdk-target xE:\first
xbcp C:\first\Debug\first.xbe xE:\first
xbreboot

The call to XbReboot is optional—if the XDK Launcher is running on the target system, you don't need to do a remote reboot.

Launch the XBE
On the target system, navigate to your newly created XBE ("My First XBE (FIRST)") in the XDK Launcher and select it by pressing the A button on the controller. You should see a colorful triangle. You have just created your first Xbox executable.




#5 ressurectionx

ressurectionx

    X-S Knowledgebase

  • Dev/Contributor
  • PipPipPipPipPipPipPipPip
  • 4,214 posts
  • Xbox Version:v1.0
  • 360 version:none

Posted 08 March 2008 - 10:25 AM

Okay..... new question.

Did anybody here ever post about anything other than getting XDK on their XBox? I have gone through 24 pages of the development scene (all the way back to June of '05) and 2/3rds of the posts are about XDK. Was this forum ever used for actual developing of games or porting or is it just people who got as far as I have and quit?

If there is somewhere else that I would be better off going please let me know.


Semi-useful links I've found so far for my own future reference:

Development FAQ:
http://forums.xbox-s...howtopic=559728

Faq about getting the XDK to work:
http://forums.xbox-s...howtopic=517226

Where to get started programming for the XBox:
http://forums.xbox-s...showtopic=45477

Help My Project Builds....but, Black Screen:
http://forums.xbox-s...howtopic=440552

Need a little explanations and Help: (Regarding debug screenshots)
http://forums.xbox-s...howtopic=439141

How do I launch a Game from XDK Launcher? An error occured loading an XBOX .exe:
http://forums.xbox-s...howtopic=431764


Other Cool XBox things:
Sleep Timer in XBMC
http://forums.xbox-s...howtopic=441349

Edited by ressurectionx, 08 March 2008 - 10:27 AM.


#6 openxdkman

openxdkman

    X-S Genius

  • Moderator
  • PipPipPipPip
  • 823 posts
  • Xbox Version:unk
  • 360 version:unknown

Posted 08 March 2008 - 11:47 AM

Coders who used to have fun with xbox1 are now playing with ps3's and 360's. It's normal...

I still have things to do with xbox1 myself, but I'm on openxdk side. I can't help with (dark) xdk side.

#7 ressurectionx

ressurectionx

    X-S Knowledgebase

  • Dev/Contributor
  • PipPipPipPipPipPipPipPip
  • 4,214 posts
  • Xbox Version:v1.0
  • 360 version:none

Posted 08 March 2008 - 01:35 PM

Thanks for the reply openxdkman. I was starting to think it was a ghost town in here....

I'm pretty much ob'd to the Dark Side at this particular moment in time, but if I ever do see the light I'll look you up and hopefully you'll still be around to lend a few helpful words of advice cool.gif



Got to page 28 and found a few more worthwhile reads....

Compiling Oxdk With Visual C++"
http://forums.xbox-s...howtopic=399456

Creating A Game, Help!:
http://forums.xbox-s...howtopic=399234

XDI (XBOX Debug Installer) Released, yay! (Supposedly this works on v1.6 XBoxes on the 3rd page on.)
http://forums.xbox-s...howtopic=392292

Need Help: Changing from Vectors to lists, polymorphism problems:
http://forums.xbox-s...howtopic=395058

Let XDK Boot Software from the F Drive:
http://forums.xbox-s...howtopic=392586


#8 ekszbox

ekszbox

    X-S Member

  • Members
  • Pip
  • 132 posts

Posted 08 March 2008 - 09:04 PM

QUOTE(ressurectionx @ Mar 8 2008, 02:37 AM) View Post


"Select Project / Link from the Visual C++ IDE menu and add "d3d8d.lib" to the Object/Library Modules."

There is no "Link" option under "Project"


Click the project in the 'Solution Explorer' (On the right of the IDE)
Project -> 'projectname' Properties -> Linker -> Input

By the way the d3d8d.lib should be included by default.


Your compile problems with arcades are possibly due to files like xbapp/xbfont/xbinput etc. not being found, if that's the case then try the following:

Note: While there may be better ways to fix this, here is how I've managed tacked said problem before.


Add this directory:
Microsoft Xbox SDK\Samples\Xbox\Common\Include

To here:
Project -> 'projectname' C/C++ -> General -> Additional Include Directories
(Remember to first click the project in the 'Solution Explorer' or make sure it's already selected)


If that doesn't fix it, then try this afterwards:

-Remove all the common include files from the project (using solution explorer)
Don't forget to make a note of all the ones you removed.

-Right click the folder in solution explorer that the common files were in
-Click add -> add existing item
-Add all the cpp/h files from here:
Microsoft Xbox SDK\Samples\Xbox\Common\Include
Microsoft Xbox SDK\Samples\Xbox\Common\Src




KM





#9 solarx

solarx

    X-S Enthusiast

  • Members
  • 8 posts

Posted 13 March 2008 - 04:56 AM

My problem is I can't get remote debugging to work. I have XDK 5933 and I think I have it all installed correctly.. I'm using a font hack to run PBL which loads my debug bios which in turn runs the XDK dash. I can compile the XDK samples inside Visual Studio .NET and it even gets as far as deploying it to the Xbox (after setting up the Xbox in the Xbox neighborhood) but then it hangs and eventually gives an error that it cannot start the program. I can go to the Xbox and start it manually on the debug dash but then when I try to attach to the process from Visual Studio I get an error that it cannot attach.

Everything works in Xbox neighborhood, I can even launch titles remotely, but not from Visual Studio, and I cannot attach to it to debug at all.

I have tried a bunch of different debug BIOS's but the result is the same every time. Is there some debug server I don't have installed correctly or something like that?

Thanks in advance for any help.


#10 ressurectionx

ressurectionx

    X-S Knowledgebase

  • Dev/Contributor
  • PipPipPipPipPipPipPipPip
  • 4,214 posts
  • Xbox Version:v1.0
  • 360 version:none

Posted 13 March 2008 - 06:14 AM

Hey ekzsbox,

As always, thanks for the help man. I'll give that a shot when I have more than a few minutes to devote to it. Probably on Sunday....

Hey solarx,

Looks like you're a few steps ahead of me there. I'll let you know what I know when I get to that point. Maybe ekzsbox has had similar problems at some point or can give you some advice. Good luck... and let us know what you did to fix it if you figure it out before I get to that point.

Maybe you can give me a step-by-step on compiling the XDK samples since you've gotten that far cool.gif

~Rx

#11 solarx

solarx

    X-S Enthusiast

  • Members
  • 8 posts

Posted 13 March 2008 - 12:43 PM

PC installation:

I'm using the 5933 XDK. I have Vista on this PC so to avoid any problems with that I installed Windows XP SP2 inside VMware, but if you have an XP PC that would be just as good. The readme states that you need either 'Visual Studio .NET Professional' (2002, .NET 1.0) or 'Visual Studio .NET 2003 Professional' (.NET 1.1). Now being that I was experimenting with this stuff I figured I'd try using VS 2005 or VS 2008 but the installer doesn't recognize them. I tried VS 2003 next and it worked, however I was having the remote debug problem. Thinking that it might be because I was using 2003 I uninstalled everything and installed VS 2002. I also applied a service pack to it, and immediately after I found out that the XDK will not install anymore, it needs the original unpatched version, so don't install any service packs. So anyhow, after uninstalling everything again I reinstalled VS 2002, installed the XDK, then ran the shortcut that said something like ..setup xbox shell extension.. and that created the Xbox neighborhood icon for me. At that point I could add my xbox by typing its IP address (name didn't work). After successfully setting all this up, start VS 2002 and open "C:\Program Files\Microosft Xbox SDK\Samples\Xbox\Graphics\Tutorials\Tut01_CreateDevice\createdevice.sln". You should be able to just hit F5 and see it build (it will say it's out of date first). See screenshot linked at bottom.. I would recommend using VS 2002 because when I was doing it with VS 2003 it prompted me to upgrade every sample I opened, so I guess it was meant to be used with 2002.

Xbox installation:

I basically used the chart in here: http://www.hydras-wo...oxretailtodebug
My XDK came with 2 files.. XDKSetup5933.exe ( this is what I installed on the PC ) and XDKRecovery5933External.exe ( this is what I had to unpack with winrar and it contains the Xbox files )

IPB Image


#12 ressurectionx

ressurectionx

    X-S Knowledgebase

  • Dev/Contributor
  • PipPipPipPipPipPipPipPip
  • 4,214 posts
  • Xbox Version:v1.0
  • 360 version:none

Posted 13 March 2008 - 03:19 PM

Cool. Thanks for the explanation. I don't have time to reply now, but I will tonight. I am using 2003 myself with service pack 1. I found out that if you use the command prompt in the directory it's in and type the name of the .exe file with an "/s" after it, it will install the XDK with a service pack. Everything I've read says to use 2003, so I would try it with that. Who knows though? Maybe you were able to do it because you had 2002 instead. The instructions for XDK don't match up with the options available to you in the tool bar, so maybe XDK's help files were written for 2002 and that would be easier.

Gotta run. Talk to you later. We'll figure this all out.

~Rx

#13 ekszbox

ekszbox

    X-S Member

  • Members
  • Pip
  • 132 posts

Posted 14 March 2008 - 06:07 AM

To solarx,
I've had that problem before, i think it might be a connection issue.
See if you can still connect to the xbox via Xbox Neighborhood, if not check out the debug dashboard/PC network settings.
If that's not the issue, maybe it's your debug BIOS or the XDKRecovery files.

I think RX had issues using the files from 'XDKRecovery5933External', if all else fails maybe try 'Complex BiOS Retail To Debug 4627' instead.


KM

#14 solarx

solarx

    X-S Enthusiast

  • Members
  • 8 posts

Posted 14 March 2008 - 07:53 AM

ekszbox:

I installed 'COMPLEX BiOS Retail to Debug 4627' like you're saying on my Xbox (this package did not come with the PC portion of the XDK). I converted the provided BIOS to BFM by unpacking and repacking it using xbtool and loaded it with PBL after carefully copying the necessary Xdk dash files to C and E (while maintaining my current font exploit/evox). The XDK dash looks different but I can still manage it with the 5933 XDK Xbox Neighborhood. Unfortunately everything is the same including the problem with remote debugging.

The thing is, even though Visual Studio is having problems starting the application, I can right click the .xbe in Xbox Neighborhood and select 'Launch' and this works fine, I can see it running on my Xbox. I can even go to Processes... on the menu inside Visual Studio and see the xbe running on the xbox (after selectin Xbox Consoles transport). When I try to 'Attach' to the process I get an error that it cannot attach, no further details. I can actually sit there and refresh Xbox Neighborhood while Visual Studio is "copying files to the xbox" and see it working, so I think the connection is ok.

I think my problem is either with the 5933 XDK on the PC or with the way I'm booting my Xbox. Unfortunately I don't have a modchip so I'm trying to do this with a softmod. I don't remember exactly which but I'm using a font exploit which in the end runs PBL metoo and I can add the debug BIOS as an AltRomfile so that when I boot with the tray open it comes up to the XDK dash, otherwise it goes to Evox.


#15 ressurectionx

ressurectionx

    X-S Knowledgebase

  • Dev/Contributor
  • PipPipPipPipPipPipPipPip
  • 4,214 posts
  • Xbox Version:v1.0
  • 360 version:none

Posted 14 March 2008 - 08:33 AM

I've got mine on a softmodded 1.0 myself. I chose not to do the dual boot though. I have this XBox set up exactly the same way as the one I use for all of my emulators. It's Krazies Ndure exploit with XBMC as the dashboard. When I want to run the XDK all I have to do is run the default.xbe from the C:\ Drive and it boots right up through the PBL.

Not sure if it works any better than yours though at this point, since I haven't yet been able to compile a single .xbe yet to test it.

Sounds like we've all got the same software though pretty much. Don't imagine that the software is the problem.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users