Monday, April 22, 2013

Automatically close crashed "not responding" applications

My HT-PC is pretty much a stand alone windows box with no input other than my remote control. On occasion  XBMC or some other application will crash, leaving me without a way to End Task. I have to jump on the Remote Desktop Application to kill the application.

This is less than ideal.

I found a free solution that works brilliantly: Restart on Crash
http://w-shadow.com/blog/2009/03/04/restart-on-crash/

Restart on Crash is tiny app sits in the system tray, monitoring specific applications. It will then either close or restart any application that has crashed or is not responding for a certain period of time.

Monday, April 15, 2013

MAME from XBMC (via RomCollectionBrowser or AdvancedLauncher)

To get MAME 0.148u3 to launch from commandline, you need the following syntax

D:\mame0148b_64bit\mame64.exe -inipath D:\mame0148b_64bit\ "%rom%"


In the mame.ini file, you HAVE to specify the exact path for all the directories!
e.g.

rompath                   D:\mame0148b_64bit\ROMS
hashpath                  D:\mame0148b_64bit\hash
samplepath                D:\mame0148b_64bit\samples
...


In order to use it with the XBox 360 Controller, you would need to map the keys in the cfg\default.cfg

<mameconfig version="10">
    <system name="default">
        <input>
            <port type="P1_BUTTON7">
                <newseq type="standard">
                    KEYCODE_C
                </newseq>
            </port>
            <port type="P1_BUTTON8">
                <newseq type="standard">
                    KEYCODE_V
                </newseq>
            </port>
            <port type="P1_START">
                <newseq type="standard">
                    JOYCODE_1_BUTTON8
                </newseq>
            </port>
            <port type="P1_SELECT">
                <newseq type="standard">
                    JOYCODE_1_BUTTON7
                </newseq>
            </port>
            <port type="START1">
  <newseq type="standard">
                    JOYCODE_1_BUTTON8
                </newseq>
     </port>
     <port type="COIN1">
  <newseq type="standard">
                    JOYCODE_1_BUTTON7
                </newseq>
            </port>
        </input>
    </system>
</mameconfig>

Project 64 1.6 - Escape key does not close emulator

PilotWings 64 does not work correctly on Project 64 2.0, but works well enough 1.6

While version 2.0 allows you to remap shortcut keys (like escape to close), 1.6 does not offer this.

I launch Project 64 from XBMC, and I need to be able to hit the escape button on my remote to close the app. The simplest way to accomplish this is to do the following:
  1. Create an AutoIT file that will remap Escape to ALT + F4 (to close the emulator)
  2. Launch this AutoIT file when you launch Project 64

My AutoIT file to close looks like this:

HotKeySet("{ESCAPE}","replace")

Func replace()
   If WinActive("[CLASS:Project64 Version 1.6]") Then
   Send("!{F4}")
   Exit
   Else
   HotKeySet("{ESCAPE}")
   Send("{ESCAPE}")
   HotKeySet("{ESCAPE}","replace")
   EndIf   
EndFunc
while 1
 Sleep(10)
WEnd



I converted this from an au3 -> exe.
Then I created a batch file that launches the project64Closer.exe and Project 64


@echo off
start D:\project64Closer.exe
"D:\Games\Project64 1.6\Project64.exe" %1


and finally, the RomCollectionBrowser file looks like this


<RomCollection id="1" name="Nintendo 64">
      <emulatorCmd>D:\AutoIT_scripts\project64launcher.bat</emulatorCmd>
      <emulatorParams>%ROM%</emulatorParams>
...
Note: Only downside I have experienced with this is that I have to rename the ROM files so that they do not contain any spaces (I replace them with underscores)

Saturday, April 13, 2013

Project 64 command line - launch from front end

When using Project 64 with a front end like RomCollectionBrowser or Advanced Launcher for XBMC (or another front end like Hyperspin), you need to specify the command line format

There is a slight difference depending on the version you use

For 1.6, it's project64.exe %ROM%

For 2.0, it's project64.exe "%ROM%"

the difference is in the quotes!

otherwise you get an Attempt to open file failed error

Remote Desktop Full Screen without Break key

To toggle Fullscreen on Remote Desktop, you need to use CTRL + ALT + BREAK

My laptop keyboard doesn't have a break key;
and turns out neither does the onscreen keyboard in Windows 7

Here's the solution:

-Start "Remote Desktop Connection".
-Click on "Options".
-Click on the "Display" tab.
-On "Display configuation" settings, you can change the "Remote Desktop Connection" display by moving the slider from "Small to Large".
-By moving the "Slider" all the way to large, the display settings will automatically set to "Full Screen".