Integration with Media Center

posted by Jabo Help Comments8
Windows Media Center is a great platform for providing a usable media experience on top of a standard Windows PC. In this guide we will figure out how to add Jnes to Media Center so you can play your favorite games from your couch. The Media Center team provides basically two points of integration:

  • Native .NET assemblies that are loaded into Media Center
  • External Applications that are launched from Online Media Program Library
For Jnes we will use the second option and add games individually to Media Center using the Application Registration utility it provides. This guide is low level, there may be third-party tools that can help you.

1. Configure Jnes to be launched
Since you want to dive right into the games configure Jnes up front

  • turn off the intro dialog
  • configure input devices
  • in options -> video turn on go full screen
  • anything else you want like filters

2. Find the thumbnail for your game
Locate the image you want to use for the game. Use google image seach or your favorite image searching tool.

3. Create Shortcut

Create a shortcut called using the name of the game you are adding, for this example we will use "Batman Return of the Joker", the contents of this shortcut would be:

C:\Jnes\Jnes.exe -exitonclose -relaunchmce "C:\NESROMS\Batman - Return of the Joker (U).zip"

Keep in mind that the paths shown above are unlikely to be the same on your system and you'll want to change them.

4. Create Media Center Entry Point XML
Technical reference

Create an XML file "Batman Return of the Joker.xml" with the following contents.

  title="Batman Return of the Joker"
  description="NES, 1991"
    run=".\Batman Return of the Joker.lnk"
    title="Batman Return of the Joker"
    description="NES, 1991"
    imageUrl=".\Batman Return of the Joker.jpg"
    <category category="Services\Games"/>
    <category category="More Programs"/>

Each game that you want to add will require a customized XML file, specifically the paths, names, and id fields need to be changed. The id field is a guid, and you'll need a toolto generate them.

5. Register App

So in your directory hypothetically you have the following files now.
  • Batman Return of the Joker.jpg
  • Batman Return of the Joker.lnk
  • Batman Return of the Joker.xml
Now run the following command from this directory to install:

%WINDIR%\ehome\RegisterMCEApp.exe /allusers "Batman Return of the Joker.xml"

If you want to uninstall use this:

%WINDIR%\ehome\RegisterMCEApp.exe /u /allusers "Batman Return of the Joker.xml"

Figuring out how to do this was painful so I decided to write up a guide on how to do this. Despite having this guide, it still requires a fair amount of technical skill. Here's how it should look when you are done!

Comments are shown below

James 1209986532000 #1

This is perfect. I was looking around for about an hour trying to find a way to do just this. Now I'm going to have to get all OCD and spend days setting up my ROMs. I'm guessing there is no way to get these under a heading of "games" from the first screen is there? Also, do you have a list of tested Emulators that this works with?


Frustratered 1283023106000 #2

I cannot figure this out. I have created all the correct files put them in the media center programs folder and i can get it to go through the center on my pc but wont show up in my xbox 360. also when i start it on my pc jnes.exe crashes. error: unable to create surface lpDDSPrimary.


Pete 1293569877000 #3

love the jnes launch from MCE. works spectaculous with a logitech rumblepad and or xbox 360 controller- 2 problems though... 1) i can't seem to get a menu strip for games and place the emulator shortcuts in there (extras library is getting a bit crowded) 2) no way to exit jnes except pulling out the actual keyboard and doing an ALT-F4 exit (inconvenient when usually only remote and controller is around)
anyone have any ideas?


Jabo 1293789224000 #4

1) i can't seem to get a menu strip for games and place the emulator shortcuts in there (extras library is getting a bit crowded)

Yer same here I haven't played around with this in ages unfortunately, but I'd like very much to put it under games as well, I know there is a way I just haven't figured it out.
2) no way to exit jnes except pulling out the actual keyboard and doing an ALT-F4 exit

This is kind of a sad situation unfortunately, Jnes allows you to exit the currently playing game by simply hitting the back key on the keyboard, there is a button on your MCE remote for this, but I can't seem to find a way to make the remote button work with Jnes, perhaps I'll try looking at that again sometime, it would be worthwhile as picking up a keyboard is a bit lame, but the whole experience is still pretty cool.

reply updated 1293789282000

Pete 1293997102000 #5

it is VERY cool. and in no way do the short comings detract from the coolness. they're just inconvenient thats all. congrats on the good work!


Mike 1296431282000 #6

it works fine on the pc, doesnt show up at all on 360. pretty sure it has to be a url value and not a run value. if anyone has any ideas on maybe figuring out how to use this on a 360 that would be awesome. from my limited experience it seems like you would need to port it to java or flash though.


Matt 1323951977000 #7

Does anyone else have to set their config settings(controller settings, not display user tips at start, set netplay directory) EVERY time they start up JNES. Is there a reason this isn't saving for me?


Jabo 1324020212000 #8

Jnes stores it's configuration data in the same directory as the executable in a file called Jnes.ini. I have not seen a situation where it was unable to do this. Although if Jnes is installed in Program Files, Windows redirects Jnes.ini to the VirtualStore in more recent versions of Windows unless you run it as an Administrator).

One easy way to figure out why this isn't working is to use Process Monitor from sysinternals, it will give you a log of all the file activity in the Jnes directory, this should help you troubleshoot what is wrong if you are technically savvy.

Alternatively, just run Jnes as an Administrator, that might help. Let me know if you find anything interesting.

reply updated 1324025169000

Add comment

Please be respectful and post comments relevant to the article.