Thursday, July 18, 2013

MAME Tempest mouse input patch

I love the classic arcade game Tempest, as well as its later incarnations and derivations from Llamasoft (Tempest 2000, Space Giraffe). I noticed that the mouse input in the current version of mame (0.149) had a bug in it, where moving too quickly to the right or left resulted in motion in the opposite direction. This is apparently due to the fact that Tempest uses only 4 signed bits of resolution for spinner deltas, and MAME was supplying higher values causing overflow. I made a quick and dirty patch to fix this, by hardcoding the max incoming adjust mouse delta values. Worth a shot if this is bothering you too.

--- src\emu\ioport.c.orig       2013-02-11 14:23:02.000000000 -0500
+++ src\emu\ioport.c    2013-07-18 16:16:08.000000000 -0400
@@ -4376,6 +4376,12 @@
                m_accum = 0;

        // apply the delta to the accumulated value
+
+#define MYMAXDELTA 32000
+        if( delta > MYMAXDELTA )
+                delta = MYMAXDELTA;
+        if( delta < -MYMAXDELTA )
+                delta = -MYMAXDELTA;
        m_accum += delta;

        // if our last movement was due to a digital input, and if this control
@@ -4435,6 +4441,9 @@
        // apply standard analog settings
        value = apply_settings(value);

+       if ( value == 0 )
+               return; // do nothing
+
        // remap the value if needed
        if (m_field.remap_table() != NULL)
                value = m_field.remap_table()[value];

Friday, March 9, 2012

AutoCorrect for Thunderbird 0.0.7.0

This is an update for Thunderbird 4.0+ of a useful autocorrect tool created by Frank DiLecce, useful for automatic correction of commonly misspelled words on the fly (i.e. "teh" -> "the"). It comes with a db of common typos that can be modified/enhanced by the user.

When Thunderbird started keeping installed xpi files packed by default, it was necessary to add
<em:unpack>
 to the install.rdf file. Otherwise, this is the same as the original:

http://www.mediafire.com/?t8c18bjhdzzx728

Thursday, November 5, 2009

Custom Firefox Search Engine


There are many great search engine add-ons for Firefox (youtube, wikipedia, amazon, etc.), and it is relatively easy to add your own. I was recently interested in creating an engine that would search for lyrics while excluding sites that require Javascript in order to view them, and giving preference to sites that organize lyrics nicely, by album and artist. Firefox search engines are specified in XML using the OpenSearch Description documents. I created one (lyrics.xml) as follows ("good_lyrics_site" and "bad_lyrics_site" names used for anonymity:


<?xml version="1.0" encoding="UTF-8" ?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
 <ShortName>Lyrics Search</ShortName>
 <Description>Search lyrics, avoiding nasty javascript websites </Description>
 <InputEncoding>UTF-8</InputEncoding> 
 <Url type="text/html" template="http://www.google.com/search?as_q={searchTerms}+lyrics&as_oq=good_lyrics_site&as_eq=bad_lyrics_site" />
 <Image width="16" height="16">http://www.good_lyrics_site.com/favicon.ico</Image>
 <Developer>Philip Kilinskas</Developer> 
 <moz:SearchForm>http://www.google.com/</moz:SearchForm>
</OpenSearchDescription>

and an html file to load it:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
<link rel="search" type="application/opensearchdescription+xml" title="Lyrics Search" href="lyrics.xml" /> 
</html>


For some reason, opening the html from File->Open in Firefox didn't allow me to add the search engine, but placing it on a web server did. Once you've loaded the html, pull down the search menu in the upper right corner of Firefox, and add the "Lyrics Search" search engine.






Tuesday, September 22, 2009

Updated Gnusto Plugin for Firefox 3.5

As a big fan of the Infocom games from the 80s, I was very excited to see a Z5 interpreter created as an add-on for Firefox. Unfortunately, it hasn't been updated in a long time. I've updated it to work with Firefox 3.5, but paging functionality is still buggy, so if it prints out more than a screenful of information, you'll need to scroll back manually to read it all.

Updated version here:

http://www.megaupload.com/?d=X8TBN5E0

Monday, July 27, 2009

Cookie Button in the Status Bar for FF 3.5

Greetings. Currently this blog only exists as a convenient centralized place for me to dump stuff intended for public use. I've been holding off upgrading from Firefox 3.0 to Firefox 3.5 because some of my favorite addons were not available for the new version. Often it is a very trivial matter to get them working again; 90% of the time the old addon is compatible with the latest version of Firefox, but the author has not explicitly put this information in the plugin. So the first thing to try is to grab the XPI file, unzip it, and edit the file install.rdf, which contains "minVersion" and "maxVersion" fields. This is an update of "Cookie Button in the Status Bar 0.9", which now has a maxVersion of 3.5.*. It seems to be working fine for me under FF 3.5, but I haven't tested it extensively. Until I find out the best way to attach links to posts, here's a megaupload link:

http://www.megaupload.com/?d=VAF40UOJ