<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Frozentux &#187; Joystick</title>
	<atom:link href="http://www.frozentux.net/tag/joystick/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.frozentux.net</link>
	<description>Yet another site</description>
	<lastBuildDate>Thu, 13 Oct 2011 19:37:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mednafen configuration for Logitech Precision</title>
		<link>http://www.frozentux.net/2008/10/mednafen-configuration-for-logitech-precision/</link>
		<comments>http://www.frozentux.net/2008/10/mednafen-configuration-for-logitech-precision/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 06:57:00 +0000</pubDate>
		<dc:creator>Oskar Andreasson</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Joystick]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://fs1/fs1/?p=193</guid>
		<description><![CDATA[As I&#8217;ve already stated partially, I got an HTPC at home running MythTV on ubuntu. One of the things I&#8217;ve wanted to do for a long time was to get some games running on it. Supertuxkart was simple and was installed in less than 3-4 minutes once I understood the basics of the MythGames plugin [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve already stated partially, I got an HTPC at home running MythTV on ubuntu. One of the things I&#8217;ve wanted to do for a long time was to get some games running on it. Supertuxkart was simple and was installed in less than 3-4 minutes once I understood the basics of the MythGames plugin (typing with a on-screen keyboard and a remote control is slow).</p>
<p>Anyways, I did have some problems getting a NES emulator, or any emulator at all as a matter of fact, running on it, and I also had some problems getting input from the right devices to them properly. I finally decided on mednafen as it seemed the easiest to understand.</p>
<p>Let&#8217;s understand the structure. NES and other games are usually downloaded in some image file. Mednafen is installed as a binary. MythGames needs to know about the binary used to launch a NES image, and where the NES images are located. I downloaded mednafen using apt-get install mednafen. Secondly, MythGames needs to know where you will put the images, personally I put them in /var/games/nes/. This is entered into the mythtv configuration using the Setup -> Game Settings -> Game Players. Choose New Game Player and enter</p>
<p>Player name: <span style="font-weight: bold;">mednafen </span>(for example)<br />Type: <span style="font-weight: bold;">Other</span><br />command: <span style="font-weight: bold;">mednafen -nes.stretch 1 -fs 1 -vdriver 0 %s</span><br />Rom Path: <span style="font-weight: bold;">/var/games/nes</span></p>
<p>Having a keyboard around when doing this is prefered, using the on-screen keyboard takes ages.</p>
<p>Once this is done, go to Setup -> Game Settings -> Scan for games. This will scan the /var/games/nes directory for all images and add them to the list. To start a game, go to Games. Then get into the &#8220;All Games&#8221; -> &#8220;mednafen&#8221; and you should find all the games from /var/games/nes there.</p>
<p>Click one, and the game should hopefully start. The first time mednafen is run, it creates a directory ~/.mednafen/ containing a basic configuration. The following is an example to get my Logitech Precision gamepad running with it:</p>
<p>nes.input.port1.gamepad.a joystick 42190af389429475 00000002<br />nes.input.port1.gamepad.rapid_a joystick 42190af389429475 00000003<br />nes.input.port1.gamepad.b joystick 42190af389429475 00000000<br />nes.input.port1.gamepad.rapid_b joystick 42190af389429475 00000001<br />nes.input.port1.gamepad.select joystick 42190af389429475 00000008<br />nes.input.port1.gamepad.start joystick 42190af389429475 00000009<br />nes.input.port1.gamepad.up joystick 42190af389429475 0000c001<br />nes.input.port1.gamepad.down joystick 42190af389429475 00008001<br />nes.input.port1.gamepad.left joystick 42190af389429475 0000c000<br />nes.input.port1.gamepad.right joystick 42190af389429475 00008000</p>
<p>nes.input.port2.gamepad.a joystick 42190af389429476 00000002<br />nes.input.port2.gamepad.rapid_a joystick 42190af389429476 00000003<br />nes.input.port2.gamepad.b joystick 42190af389429476 00000000<br />nes.input.port2.gamepad.rapid_b joystick 42190af389429476 00000001<br />nes.input.port2.gamepad.select joystick 42190af389429476 00000008<br />nes.input.port2.gamepad.start joystick 42190af389429476 00000009<br />nes.input.port2.gamepad.up joystick 42190af389429476 0000c001<br />nes.input.port2.gamepad.down joystick 42190af389429476 00008001<br />nes.input.port2.gamepad.left joystick 42190af389429476 0000c000<br />nes.input.port2.gamepad.right joystick 42190af389429476 00008000</p>
<p>command.exit joystick 42190af389429475 00000006&amp;joystick 42190af389429475 00000007<br />command.exit joystick 42190af389429476 00000006&amp;joystick 42190af389429476 00000007</p>
<p>Unfortunately, the above changes around a bit from device to device and atm i&#8217;m not even sure the i&#8217;d will survive from disconnect/connect of the gamepads.</p>
<p>The proper way of doing this is to:</p>
<p>1. Start a game.<br />2. Press Alt+Shift+1<br />3. Push the correct buttons asked for on screen to do specified command. (First time you push a button adds it to the command, second time you push the same button marks it &#8220;final&#8221; for the command sequence. Peculiar, I know. So, to make the game use button 2 and 3 in conjunction to be button A, you&#8217;d first press button 2 once, then button 3 twice.<br />4. hit esc on the keyboard to leave mednafen. The config should now be saved.</p>
<p>I haven&#8217;t found a way to create the &#8220;command.exit&#8221; commands yet. I&#8217;ll have to work some more on that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frozentux.net/2008/10/mednafen-configuration-for-logitech-precision/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

