Datasheet

(called x86, by the way). People using the 64-bit operating systems of Windows had the same problem in
the past with Managed DirectX, which is available only for 32 bit, too. Using a 64-bit operating system does
not mean you cannot use 32-bit applications anymore; quite the contrary. Almost all applications that exist
today are written for 32-bit operating systems, but they run fine in the 32-bit mode of Windows XP x64
or Windows Vista x64.
Why do I even bring this up if you can run 32-bit and 64-bit applications on 64-bit operating systems?
Well, you cannot use 64-bit assemblies (dlls) from 32-bit applications or vice versa. The reason for that is
that a Windows process has to be run either in 64 bit or 32 bit; emulating 32 bit from 64 bit would be too
slow and is not even supported. Now how do you get XNA working in 64-bit mode? You don’t, it is just
not supported. Instead, you have to make sure that the .NET Framework and your application run in 32-
bit mode; then Windows will start the whole process in 32-bit mode and you can load the XNA dlls just
fine. If you don’t do that, your game cannot even be started on any x64-bit platform.
In Visual Studio 2005, you can just select x86 platform instead of All CPUs in the Project Properties Build
screen. In XNA Game Studio Express there is no such option and if you want the same setting you have
to add a line to your .csproj file in each PropertyGroup section:
<PlatformTarget>x86</PlatformTarget>
I also wrote a little tool that converts XNA Game Studio Express projects to Visual Studio 2005 projects
and back, and it handles the x64-bit issue. The newest version of the tool also supports Visual Studio
2008. You can download it from my blog at
http://exdream.no-ip.info/blog/2007/07/19/
XnaProjectChangerToolWithVS2008Support.aspx
.
Configuring Your Xbox 360
To connect your Xbox 360 to your PC, you have to install the XNA Framework on your Xbox 360 first via
the Xbox Live Service. Unlike the Windows platform, the download of the XNA Framework for the Xbox
360 is not free. You will have to join the “Creator’s Club” subscription on the Xbox 360 through the Xbox
Live Marketplace for $99 a year or $49 for four months. Microsoft does this to have a little control over
the developers. Console development is usually very closed off and there is no open source thinking as
in the Windows or Linux world. We can all just hope this is going to change.
First of all, make sure your PC and the Xbox 360 are connected to the same network. You don’t have to
connect the Xbox 360 directly to your PC; just plug it into the same network (router or modem). It is
important that you always have access to the Internet from the console and not just to your PC because
XNA requires an Xbox Live connection on your console. Once you have installed the XNA Framework
on the Xbox 360, which also includes a custom version of the .NET 2.0 Compact Framework to make it
run on the console, you can start the XNA Game Launcher (see Figure 1-8).
In the XNA Game Launcher you can now start your game projects or copy over XNA games from your
friends or the Internet and start them on your console. Before you can connect to the PC, you will have
to make an encryption key first by clicking Settings and then “Create Encryption Key.” You will now see
the encryption key; don’t close this window. On your PC, open XNA Game Studio Express and go to
ToolsOptions and scroll down. You will see the new XNA Game Studio option. Here you can add your
Xbox 360 and enter your encryption key; then just click Add (see Figure 1-9).
13
Chapter 1: Introducing XNA
61286c01.qxd:WroxPro 1/21/08 3:44 PM Page 13