No native Japanese text in Windows Phone 7 … yet

The first preview version of the Windows Phone 7 SDK is out and it doesn’t support Japanese (or non-Latin) text in the English ROM. This is a huge disappointment.

image

One of the major advantages the iPhone has over almost every other smartphone platform (and the major reason I bought mine in the first place – I needed Japanese language support) is the built in support for non-Latin languages and their input methods. This allows Apple to provide one single worldwide firmware edition.

Previous versions of Windows Mobile have required users to hack in Japanese fonts using the registry and rely on some awful third party hacks to get Japanese IMEs working. I seriously hope that before WP7 is finished, Microsoft just install worldwide fonts and IMEs like they started to do with Vista. There is no excuse. We are unlikely to get low-level access to the registry this time around to hack the support in ourselves to non-Japanese ROMs.

One of their slides is supposed to imply that the Metro theme “Celebrates Typography”

image

— more like it totally ignores it. I suppose screens of square boxes fits the “Authentically Digital” principle.

XNA2.0 Dependency checking

After a lot of trial and error using Process Monitor and Virtual PC, I have finally sussed out exactly what XNA2.0 games on Windows need to run. The requirements are slightly different to XNA 1 games.

Direct X runtimes

There are four files that need to be installed in the system32 folder for XNA to initialise properly. They are:

  • xinput1_3.dll
  • x3daudio1_3.dll
  • d3dx9_31.dll, and
  • xactengine2_9.dll

The first three can be placed alongside the application exe and then load fine, but xactengine2_9.dll does not load this way for some reason, and has to be present in the system directory. Distributing these files alongside the application breaks the DirectX EULA, so they have to be installed using dxsetup.exe.

To check the presence in your XNA game, just put this code in Program.cs before game.Run() is called:

bool HasAllPrereqs = true;
// check all the required files, if any missing, return false
if (!System.IO.File.Exists(System.Environment.SystemDirectory 
    + "\\xactengine2_9.dll")) HasAllPrereqs = false;
if (!System.IO.File.Exists(System.Environment.SystemDirectory 
    + "\\d3dx9_31.dll")) HasAllPrereqs = false;
if (!System.IO.File.Exists(System.Environment.SystemDirectory 
    + "\\x3daudio1_2.dll")) HasAllPrereqs = false;
if (!System.IO.File.Exists(System.Environment.SystemDirectory 
    + "\\xinput1_3.dll")) HasAllPrereqs = false;

If HasAllPrereqs is false after those lines, exit the application before it crashes horribly when XNA tries to initialise.

Visual C++ 2005 SP1 runtimes

Even a fresh Vista install doesn’t have these. They are provided when updating Visual Studio 2005 to SP1, or installing SP1 of the .Net Framework 2.0. However, Vista comes with SP0 of .Net 2.0, meaning 99% of machines you come across will be lacking what XNA 2.0 needs. There is a 2.5MB standalone installer on the MS download site here which installs what you need even on .Net 2.0 SP0 machines. .Net 3.5 installs Net 2.0 SP1.

So if any of the following are installed, we safely have the right Visual C++ 2005 runtimes:

  • .NET Framework 2.0 SP1
  • .NET Framework 3.5
  • Visual C++ 2005 SP1 Redistributable

By looking up the product codes in the registry, we can also check at runtime if we have the runtimes (again, before game.Run()):

[DllImport("msi.dll")]
public static extern Int32 MsiQueryProductState(string szProduct);

…goes before the main application entry point, and

bool vccOK = false;
// check for VC++ 2005 SP1 redist (very rare in the wild)
if (MsiQueryProductState(
"{7299052b-02a4-4627-81f2-1818da5d550d}") == 5) vccOK = true;
// check for .NET Framework 2.0 SP1
if (MsiQueryProductState(
"{2FC099BD-AC9B-33EB-809C-D332E1B27C40}") == 5) vccOK = true;
// check for .NET Framework 3.5 (includes 2.0 SP1)
if (MsiQueryProductState(
"{B508B3F1-A24A-32C0-B310-85786919EF28}") == 5) vccOK = true;

If vccOK is still false, exit the application before you call game.Run().

Free pro Microsoft tools for students

image

Wow. Microsoft has just launched “DreamSpark” – a programme that lets higher education students download pro Microsoft development tools – not the cut-down Express versions of Visual Studio, but the full Professional editions. UK Microsoft student champ Ed Dunhill sums it up the best on his blog here.

You get access to:

  • Visual Studio 2008 Pro
  • The whole Expression suite
  • SQL Server 2005 Developer edition
  • Windows Server 2003 Standard (and hopefully soon 2008)
  • The best bit is a whole years XNA Creators Club subscription FREE! This costs £65 normally with no real free alternative to get games running on the Xbox.

This is evidently a battle against pirated versions of the above products and this is the perfect way to do it. To enroll in the programme, your University needs to provide a Single Sign On authentication system to verify you or you need a ISIC card or NUS Extra card. Unfortunately, Oxford Brookes doesnt have a SSO Auth system (and I doubt they ever will – Oxford Uni does though) so I have had to order an NUS Extra card for a tenner to get in. Your status as a higher education student needs to be verified once a year, so students leaving Uni soon should sign up quick. Other than the XNA Creators Club subscription, I don’t think the products have time limits.

Expect Adobe to follow suit soon with their products if they want to get students hooked – although the academic discounts on Adobe CS3 stuff are great (only £400 for the Master Suite, down from £2500…) students will still pirate. Give students free access to professional tools and they’ll get hooked on them and buy them when they are earning a living.

Taskbar invisible over Remote Desktop

I frequently use Remote Desktop (RDP/Terminal Services) to access my machines running Vista SP1 RTM. 90% of the time, after connecting, I get this annoying problem with the Start bar:

image

Only the Start button itself is visible.

  • This happens on all my Vista machines, both SP0 and SP1
  • This happens no matter what version of Remote Desktop I am using, the XP version or the “new” Vista one
  • It only appears to happen when the computer was originally using the Aero DWM composition engine and originally in a different resolution to what I am asking the Remote Desktop session to render
  • It happens wether or not the taskbar is at the top or bottom of the screen

So far the only way to get the taskbar back I have found is to click the lonely Start button, click Windows Security, choose Start Task Manager, kill the explorer.exe process and start it again in the Task Manager from File > Run.

Subsequent Remote Desktop connections are then fine, but logging back into the machine from the console then back into Remote Desktop makes it disappear again. A bit frustrating, to say the least.

Microsoft Inspiration Tour

IMAGE_113 Oxford Brookes hosted one leg of the Microsoft Inspiration Tour today, where Ed Dunhill and Busted-lookalike Ben Coley sent out the marketing message to Brookes students about the latest MS tech: Silverlight, Popfly, Windows Embedded, XNA etc. I had to leave halfway to get to work, but it was very interesting.

Unfortunately there was nothing new for people who already follow Microsoft news and tech such as myself, and the demos I had all seen before. This is the second time I have sat through the Fantastic Four Silver Surfer trailer on the Silverlight Fox movies demo site at a Microsoft event. Interestingly they had to bring a Xenon 360 devkit in for the XNA demos since they couldn’t definitely get an Xbox Live connection at the events they visit – which is required to run XNA stuff on a retail box. The presentation was a tiny bit out of date, for instance Silverlight 1.1 is now 2.0.

Around 70 people had signed up for the event, but just about 30 turned up. This isn’t the fault of the marketing or the presentation itself (although Wheatley campus no doubt had something to do with it), but because simply Oxford Brookes is not a Microsoft shop. They mentioned that all the technology they were showing has one thing in common – the .NET Framework powers all of it. However, try finding a computer in the Brookes computer labs even capable of running a simple .NET Framework app (seemingly none of them have any version of the runtime installed). Furthermore, despite having excellent fully-functional versions of Visual Studio now available completely free as Express editons, these are not on lab computers and no C# or .NET content is taught on any Brookes courses that I know of. Introductory programming classes are still taught in Pascal using Delphi – leaving students scrabbling around to try and find a free version of Delphi 6 every year. Brookes isn’t allergic to .NET though (my final year project uses it extensively for ASP.NET and XNA) and will let you use it when a programming language isn’t specified.

Maybe Microsoft should be giving an “Inspiration Tour” to the lecturers at the university instead, they could call it “Teach your students something relevant! Tour”. When the question “Who has heard of the .NET Framework?” was asked, 5 people put their hands up out of 30. These are meant to be computing students with an interest in technology – even my friend who is an Apple disciple knows about .NET.