Recent Projects Rollup

Posted December 13, 2012 8:50 PM Categories: Coding4Fun | MJPEG | Kinect

A few things I’ve worked on or written have gone up in the past couple of months, so here’s a quick list of what they are and where you can get them:

Kinect Service v1.6

DownloadThe Coding4Fun Kinect Service allows you to stream Kinect color, depth, skeleton, and audio from one PC to another PC or a Windows Phone via sockets.  This new release now includes Windows Runtime Components written in C++ which target x86, x64 and ARM.  Now you can stream Kinect data to a Windows Store app!

Maelstrom

eb2a8836-cf09-473e-a2a4-25640aaf5781For //build/ 2012, us Coding4Fun folks wanted to showcase what Windows 8 can offer developers.  There are a lot of projects showing off great things like contracts and Live Tiles, but we wanted to show off some of the lesser known features.  This project focuses on one of those: stereoscopic 3D with DirectX 11.1.  Imagine ridiculously over-engineered 3D pong, and that’s Maelstrom!

MJPEG Decoder v1.2

The latest release of my MJPEG Decoder contains a Windows Runtime component to allow you to read MJPEG data from an IP camera and display the stream in a Windows Store application.  You’ll also find libraries to read MJPEG streams for WPF, WinForms, Silverlight, XNA and Windows Phone,

Code Snippets for Windows Store Apps

Posted September 11, 2012 10:37 AM Categories: Windows 8 | Channel 9 | C# | C/C++ | Visual Basic | JavaScript

Code Snippets for Windows Store AppsIf you're writing (or plan to write) a Windows Store app, check out our Windows Store App snippets project!  In partnership with the Visual Studio team, we have created a collection of around 60 IntelliSense Code Snippets for common Windows Store app programming tasks. The snippets are available for Visual Basic, C#, C++, and JavaScript developers.

For more details, please see:

With the Windows Store now open for submissions, use these snippets to get a jump start on your project.

After installing, just right-click and select Insert Snippet, and select the snippet from the list. Then press Tab to jump between fields.  Here's an example:

image

Give them a try and let us know what you think!

Pinball 2000 Software Update with Windows 7 x64

Posted August 24, 2012 9:20 AM Categories: Gaming | General | Hardware | Pinball

Warning: pb2kThis is a pretty off-topic post about pinball, but maybe it'll help someone searching for the information.

Backstory: My dad was a coin-op operator.  I'm the son of a coin-op operator.  As you might imagine, I have a just a tiny bit of love for video games and pinballs.  When my dad passed away in 2008, I decided to keep my favorite pins from the route:  Funhouse, Addams Family, Theatre of Magic, Tales of the Arabian Nights, and Revenge from Mars.

After sitting in storage for a couple of years, the software update sitting on Revenge from Mars would no longer checksum properly.  The game was running fine, but obviously something was wrong.  After lots of other work on the machine, it was time to update the firmware again to version 1.5.

Finding the software and ROM images was easy.  Everything is available at PlanetaryPinball.com.  Anyone can just grab the Pinball 2000 Update Manager and the appropriate software update for the machine to be updated.  However, trying to install and run the Pinball 2000 Update Manager was a different story.  The installer choked when running on my Windows 7 x64 machine.  Not surprising since this application and installer was written 13 years ago.  Luckily, I was able to install the app in a Windows XP x86 virtual machine and copy the installed files over to my laptop.

Unfortunately, this didn't immediately get me much further since the GUI updater requires some OCX files to be registered, and that's a circle of hell I didn't want to enter.  Exploring a bit further, I found the fupdate.exe command line application that actually does the flashing.  The Pinball 2000 Update Manager is just a pretty GUI wrapper.  Even more interesting, the source code for the fupdate.exe is included in the package.  It's a win32 command line app compiled against a very old version of Cygwin.  I have ripped out the important files into a separate archive.  If you're just interested in updating a Pinball 2000 machine from a modern computer and OS, you can download fupdate here.

Running this command line tool on the Windows 7 x64 laptop worked just fine.  Here's the command line to start the update process:

fupdate -p\pin2000_50070_0150_07252000_B_10000000\50070 -fpin2000_50070_0150_ COM1
  • The –p switch denotes where the software update files are.
  • The –f switch specifies a file prefix for each file in the update.  For Revenge from Mars, every ROM image is prefaced with the above string.
  • The command's final switch is the COM port to use for the update.

The USB to serial adapter I used on my laptop installed itself as COM17.  Trying to run the above command with the COM17 switch failed.  I was able to go into the properties of the COM adapter and force it on to COM1 which worked just fine.  You can do this by going into Device Manager, right-clicking on the port you're using and selecting Properties.  In the dialog that pops up, hit the Advanced button on the Port Settings tab, then select a new COM port from the drop-down as shown:

image

When you run the above fupdate.exe program, the update process runs, and you should see output in the console window as shown, along with a progress bar on the pinball's monitor:

bootdata.rom:    0 blocks of   64 (   0) sent, total bytes remaining 4980724
im_flsh0.rom:    0 blocks of 1201 (  64) sent, total bytes remaining 4947956
im_flsh0.rom:   64 blocks of 1201 ( 128) sent, total bytes remaining 4915188

...

      sf.rom: 1920 blocks of 2048 (9600) sent, total bytes remaining 65536
      sf.rom: 1984 blocks of 2048 (9664) sent, total bytes remaining 32768
************: 9728 blocks of 9728 (9728) sent, total bytes remaining 0
Update complete - total blocks 9728 (4980724 bytes)

That's it!  Once the update completes (about 15-20 minutes in my setup), the newly flashed software will be verified, and the pinball is ready to be played!

Visual Studio Live! - Redmond

Posted July 11, 2012 8:50 AM Categories: Async | C# | VSLive Redmond | Events

imageI will be presenting a session at Visual Studio Live! in New York this August 6-10 hosted on the Microsoft Campus.  The conference is a full 5 day event and there’s still time to register!

T13 - Writing Asynchronous Code Using .NET 4.5 and C# 5.0
Date: Tuesday, August 7, 2012
Time: 2:30 PM – 3:45 PM 
Level: Introductory

A variety of new features were added to the .NET 4.5 Framework, including support for easily writing asynchronous code. This session will introduce the concepts of asynchronous programming, .NET Tasks, how to ensure your UI remains responsive, and how to do all of this properly in your own applications using the new async and await keywords. If you’re looking for ways to provide a better, smoother experience for your users, don’t miss this session!

Get more information on the conference at:

Hope to see you all there!

TechEd North America 2012

Posted June 7, 2012 8:42 AM Categories: Coding4Fun | Events | Kinect | TechEd

http://northamerica.msteched.com/p/tena2011/resources/techEdHeaderLogo.jpgI'm off to TechEd North America later this week where we'll be showing off the Project Detroit car and our BoxingBots project previously demonstrated at SXSW in March. 

09615539-1a33-49f7-b438-ca1b9543d712 IMG_0296[5] 

Dan Fernandez and I will also be giving a talk on Kinect goodness.  Here are the details:

Coding4Fun: Build Fun, Cool, Commercial Applications Using the Kinect for Windows SDK

Session Code: DEV330
Speaker(s): Brian Peek, Dan Fernandez
Tuesday, June 12 at 5:00 PM - 6:15 PM in S320A

Come to this must-see session to find out how you can use the Kinect for Windows SDK to build commercial applications! Learn how the RGB and depth cameras work, how to use and fine-tune skeletal tracking, how to read an audio stream from the Kinect microphone array and even how to send Kinect data over the network including to your Windows Phone

This same session will be given at TechEd Europe in two weeks, with Clint Rutkas playing the part of me.  I will not be at the Europe conference.

So, if you're attending either TechEd this year, please stop by the Coding4Fun areas or our session and say hello!