Wednesday, April 28, 2010

New blog

I am moving all my blogging activity to a new roof, where I will discuss more than just managed code on mobile devices. Please follow me on the Smiling Smith.

Thursday, March 25, 2010

XNA 4.0, the WP7 emulator and the GPU

After giving a first go at writing a brainless Silverlight application for the Windows Phone 7 emulator, I turned towards XNA 4.0. My curiosity about this platform was itching me so I decided to have a go and scratch. XNA is a platform that enables (hopefully) quicker and easier development of managed code games for XBOX, PC, the Zune and now the Windows Phone 7.

Although this is a managed environment with lots of abstracted features such as the device GPU and bitmap rendering (you really don't care how the bits are painted, nor how the frame buffer is laid out), it still has all sorts of interesting "low-level" stuff that managed to draw my attention. One of issues that drew my attention is the requirement of taming the GC in order to get a smooth experience.

A few years back I had the very interesting experience of running a .NET CF 1.1 game on a Pocket PC 2003 device. This game (1945) is still available with full source code from CodeProject and struck me for being fast (I have this speed bias against managed code, so it was enlightening). Naturally I decided that my first experiment with XNA 4.0 would be to write a port of this game.

Unfortunately my three-year-old laptop worked against me. The NVidia Ge Force Go 7700 with 1 GB of dedicated RAM still seems quite appropriate for Windows 7 (after all, I get a 4.7 performance index for games and 4.8 for Aero) but fails miserably when it comes to driving the WP7 emulator. If you read the CTP release notes, you get the impression that the major requirement is DirectX 10 support. It's not. I have DirectX11 installed and still it does not work. Apparently your graphics driver must support the Windows Device Driver Model (WDDM) 1.1 and DDI (whatever that is) version 10. Unfortunately my driver supports only DDI 9Ex and WDDM 1.0. Apparently there is no updated NVidia driver that supports the required features (and that does not BSOD).

Dead in the water? No, I turned to my Zune 120 and XNA Studio 3.0 and started to write the Zune version of 1945. After all, this is also a sandboxed mobile device, so it's fair game.

I will post the code and my experiences writing in the forthcoming posts.

Monday, March 22, 2010

MIX10 Hi-res videos are back online

Apparently the MIX10 videos are being such a huge success that the servers had problems delivering them to all who were interested in them. The problem was such that the site was closed altogether and only the low-res videos were made available a few hours later. Today I found out that the high resolution videos are back online (thankfully). Now, let's go back and finish downloading them all...

Wednesday, March 17, 2010

WP7 Calculator


This is my first foray into Windows Phone 7 development and Silverlight. I have to say that although this is an extremely simple project, it was also very easy to write. In all, I must have invested a couple of hours figuring out how to use the Grid to place the buttons and then it was a simple matter of ripping some of my old native code.


Using VS2010 Express was a bit of a mixed experience because although it does look nice (very nice indeed), the whole experience feels a bit sluggish. The code editor is not as responsive as VS2008 (which is a tad slower than VS2005's).


I'm sharing this code here because this is the start of a (hopefully short) learning experience. Although I'm not new to mobile development, this Silverlight stuff is very new to me (has some similarities to the ASP.NET development experience). I expect to publish here often to share my experiences with this new platform in the hope that it will help some of you that are in the same path.


Let the journey begin!
Source code: Wp7Calc1.zip (101 Kb)

Tuesday, March 16, 2010

VS2010 pre-order offer

Want to save some money on the upcoming VS2010? Here's an offer from Microsoft:

"Microsoft Visual Studio 2010 Professional will launch on April 12 but you can beat the rush and secure your copy today by pre-ordering at the affordable estimated retail price of £484.99.

If you use a previous version of Visual Studio or any other development tool then you are eligible for this upgrade. Along with all the great new features in Visual Studio 2010 (see www.microsoft.com/visualstudio) Visual Studio 2010 Professional includes a 12-month MSDN Essentials subscription which gives you access to core Microsoft platforms: Windows 7 Ultimate, Windows Server 2008 R2 Enterprise, and Microsoft SQL Server 2008 R2 Datacenter.

So visit http://www.microsoft.com/visualstudio/en-gb/pre-order-visual-studio-2010 to check out all the new features and sign up for this great offer."

Petzold on WP7S

I leaned how to write my first Windows application using straight C and the API from a venerable book written by Chales Petzold. The teacher is back with a preview of the upcoming book on Windows Phone 7 Series programming. Go get your preview copy now!