<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://channelf.se/veswiki/index.php?action=history&amp;feed=atom&amp;title=Homebrew%3ALights_Out</id>
		<title>Homebrew:Lights Out - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://channelf.se/veswiki/index.php?action=history&amp;feed=atom&amp;title=Homebrew%3ALights_Out"/>
		<link rel="alternate" type="text/html" href="http://channelf.se/veswiki/index.php?title=Homebrew:Lights_Out&amp;action=history"/>
		<updated>2026-04-18T20:48:41Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>http://channelf.se/veswiki/index.php?title=Homebrew:Lights_Out&amp;diff=290&amp;oldid=prev</id>
		<title>E5frog at 20:12, 20 November 2012</title>
		<link rel="alternate" type="text/html" href="http://channelf.se/veswiki/index.php?title=Homebrew:Lights_Out&amp;diff=290&amp;oldid=prev"/>
				<updated>2012-11-20T20:12:58Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 20:12, 20 November 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;div id=&amp;quot;col1&amp;quot; style=&amp;quot;width:437px; float: right&amp;quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;div style=&amp;quot;border: 1px solid #437; padding: 5px; margin: 5px 0; background: #FFE;&amp;quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{#ev:youtube|jKkv-74lZH0|425}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;''Playing some Lights Out .''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''[http://http://seanriddle.com/chanf.html Lights Out]''' is a homebrew game written by Sean Riddle. From the website:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''[http://http://seanriddle.com/chanf.html Lights Out]''' is a homebrew game written by Sean Riddle. From the website:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>E5frog</name></author>	</entry>

	<entry>
		<id>http://channelf.se/veswiki/index.php?title=Homebrew:Lights_Out&amp;diff=231&amp;oldid=prev</id>
		<title>E5frog at 11:03, 18 November 2012</title>
		<link rel="alternate" type="text/html" href="http://channelf.se/veswiki/index.php?title=Homebrew:Lights_Out&amp;diff=231&amp;oldid=prev"/>
				<updated>2012-11-18T11:03:01Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 11:03, 18 November 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''[http://&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;members.cox.net&lt;/del&gt;/seanriddle/chanf.html Lights Out]''' is a homebrew game written by Sean Riddle. From the website:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''[http://&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;http:/&lt;/ins&gt;/seanriddle&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.com&lt;/ins&gt;/chanf.html Lights Out]''' is a homebrew game written by Sean Riddle. From the website:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;blockquote&amp;gt;''There is a 5x5 grid of colored squares; you are trying to make them all green. You move the cursor around and push down to toggle the current square as well as the neighbors above, below, left and right. There are 64 patterns included, and after they are all played in random order, I invert red/green so that there are 64 more. I also added a few variations- game 2 uses a wrap-around grid, so that if you click on a square on the edge, the light on the opposite side will toggle as if you were playing on a torus. Note: not all of the 64 puzzles are solvable in this mode! Game 3 only lets you click on lights that are red. All the patterns are still solvable, but they usually take more clicks. You can also select mode 2, in which only the neighboring lights are toggled, not the one clicked on; mode 3, where the pattern is an X; or mode 4, X but the center light doesn't toggle. Again, not all of the built-in patterns are solvable in these modes.''&amp;lt;/blockquote&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;blockquote&amp;gt;''There is a 5x5 grid of colored squares; you are trying to make them all green. You move the cursor around and push down to toggle the current square as well as the neighbors above, below, left and right. There are 64 patterns included, and after they are all played in random order, I invert red/green so that there are 64 more. I also added a few variations- game 2 uses a wrap-around grid, so that if you click on a square on the edge, the light on the opposite side will toggle as if you were playing on a torus. Note: not all of the 64 puzzles are solvable in this mode! Game 3 only lets you click on lights that are red. All the patterns are still solvable, but they usually take more clicks. You can also select mode 2, in which only the neighboring lights are toggled, not the one clicked on; mode 3, where the pattern is an X; or mode 4, X but the center light doesn't toggle. Again, not all of the built-in patterns are solvable in these modes.''&amp;lt;/blockquote&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== See Also ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== See Also ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;http://&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;members&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;cox.net/seanriddle&lt;/del&gt;/chanf.html&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;http://&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;seanriddle&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;com&lt;/ins&gt;/chanf.html&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here you can get the game as of 6/16/2004: [http://&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;members&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;cox.net/seanriddle&lt;/del&gt;/lights.bin Download binary.]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here you can get the game as of 6/16/2004: [http://&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;seanriddle&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;com&lt;/ins&gt;/lights.bin Download binary.]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>E5frog</name></author>	</entry>

	<entry>
		<id>http://channelf.se/veswiki/index.php?title=Homebrew:Lights_Out&amp;diff=93&amp;oldid=prev</id>
		<title>E5frog: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://channelf.se/veswiki/index.php?title=Homebrew:Lights_Out&amp;diff=93&amp;oldid=prev"/>
				<updated>2012-11-16T21:23:13Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:23, 16 November 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;' lang='en'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>E5frog</name></author>	</entry>

	<entry>
		<id>http://channelf.se/veswiki/index.php?title=Homebrew:Lights_Out&amp;diff=92&amp;oldid=prev</id>
		<title>83.233.129.35 at 20:13, 14 August 2007</title>
		<link rel="alternate" type="text/html" href="http://channelf.se/veswiki/index.php?title=Homebrew:Lights_Out&amp;diff=92&amp;oldid=prev"/>
				<updated>2007-08-14T20:13:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''[http://members.cox.net/seanriddle/chanf.html Lights Out]''' is a homebrew game written by Sean Riddle. From the website:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''There is a 5x5 grid of colored squares; you are trying to make them all green. You move the cursor around and push down to toggle the current square as well as the neighbors above, below, left and right. There are 64 patterns included, and after they are all played in random order, I invert red/green so that there are 64 more. I also added a few variations- game 2 uses a wrap-around grid, so that if you click on a square on the edge, the light on the opposite side will toggle as if you were playing on a torus. Note: not all of the 64 puzzles are solvable in this mode! Game 3 only lets you click on lights that are red. All the patterns are still solvable, but they usually take more clicks. You can also select mode 2, in which only the neighboring lights are toggled, not the one clicked on; mode 3, where the pattern is an X; or mode 4, X but the center light doesn't toggle. Again, not all of the built-in patterns are solvable in these modes.''&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
http://members.cox.net/seanriddle/chanf.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here you can get the game as of 6/16/2004: [http://members.cox.net/seanriddle/lights.bin Download binary.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;lights out&lt;br /&gt;
;by Sean Riddle&lt;br /&gt;
;6/2004&lt;br /&gt;
;members.cox.net/seanriddle&lt;br /&gt;
&lt;br /&gt;
;for the Channel F multigame&lt;br /&gt;
;it will play in MESS&lt;br /&gt;
;it requires MG RAM at $2800 (could be rewritten to use regs only)&lt;br /&gt;
&lt;br /&gt;
;instructions:&lt;br /&gt;
;make all lights green&lt;br /&gt;
;l/r/u/d moves cursor&lt;br /&gt;
;push down toggles lights&lt;br /&gt;
;pull up replays current pattern&lt;br /&gt;
;when complete, the count of moves is shown&lt;br /&gt;
;then up replays pattern, down goes to next random&lt;br /&gt;
;after all 64 patterns are played randomly, the complements (red&amp;lt;-&amp;gt;green) are played&lt;br /&gt;
&lt;br /&gt;
;game 1 is normal - all included patterns are solvable&lt;br /&gt;
;game 2 is on a torus (wrap-around) !!! not all included patterns are solvable on a torus&lt;br /&gt;
;game 3 is lit-only (only lit buttons can be pressed)&lt;br /&gt;
&lt;br /&gt;
;mode 1 toggles self and u/d/l/r neighbors - + pattern&lt;br /&gt;
;mode 2 only toggles u/d/l/r neighbors !!! not all included patterns are solvable in this mode&lt;br /&gt;
;mode 3 toggles self and nw/ne/sw/se neighbors - X pattern&lt;br /&gt;
;mode 4 toggles nw/ne/sw/ne - X not self &lt;br /&gt;
&lt;br /&gt;
;todo:&lt;br /&gt;
;build game 2 or mode 2 patterns from random legal moves&lt;br /&gt;
;add random legal moves to patterns to create more&lt;br /&gt;
;rotate, invert patterns randomly for more variation&lt;br /&gt;
;three-state red, green, gray&lt;br /&gt;
;L modes&lt;br /&gt;
;more symbols-greek, smilies, arcade, &lt;br /&gt;
;currently 12 bytes short of 2K, but there's lots more room&lt;br /&gt;
&lt;br /&gt;
;egg - certain game/mode combo, solve certain pattern in minimum moves&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;BIOS calls&lt;br /&gt;
clrscrn: equ $00d0							;uses r31&lt;br /&gt;
delay: equ $008f&lt;br /&gt;
pushk: equ $0107							;used to allow more subroutine stack space&lt;br /&gt;
popk: equ $011e&lt;br /&gt;
drawchar: equ $0679&lt;br /&gt;
&lt;br /&gt;
array: 			equ $2800					;use Schach RAM to hold current state of 25 lights&lt;br /&gt;
history: 		equ $2900					;patterns we have already used, so we don't repeat&lt;br /&gt;
temp4: 			equ $2a00					;temp storage of 4 bytes&lt;br /&gt;
&lt;br /&gt;
org	$800&lt;br /&gt;
CartridgeStart: db		$55	                ; valid cart indicator&lt;br /&gt;
                NOP                      	; unused byte&lt;br /&gt;
&lt;br /&gt;
CartridgeEntry:&lt;br /&gt;
				LIS		$0                  ; init the h/w&lt;br /&gt;
                OUTS	1&lt;br /&gt;
                OUTS	4&lt;br /&gt;
                OUTS	5&lt;br /&gt;
                OUTS	0&lt;br /&gt;
                &lt;br /&gt;
                lisu	4					;r32=complement flag&lt;br /&gt;
                lisl	0&lt;br /&gt;
                lr		(IS),a&lt;br /&gt;
                &lt;br /&gt;
		        LI		$d6                 ; &lt;br /&gt;
                LR		$3,A                ; clear screen to gray&lt;br /&gt;
                PI		clrscrn             ; &lt;br /&gt;
&lt;br /&gt;
				li $11&lt;br /&gt;
				lisu 3						;init R30 game 1, mode 1&lt;br /&gt;
                lisl 6&lt;br /&gt;
                lr (IS),a&lt;br /&gt;
&lt;br /&gt;
				li $4a						;display G? prompt&lt;br /&gt;
				lr 0,a&lt;br /&gt;
				pi prompt&lt;br /&gt;
				lr a,4&lt;br /&gt;
				sl 4&lt;br /&gt;
				lisu 3						;r30 low nibble = game&lt;br /&gt;
				lisl 6&lt;br /&gt;
				lr (IS),a					;game 1 - normal, game 2 - wraparound; game 3 - lit only&lt;br /&gt;
				&lt;br /&gt;
				pi prompts					;display S?/M? ; mode 1 normal, mode 2 no center toggle&lt;br /&gt;
						&lt;br /&gt;
clrhist:									;clear history of patterns presented&lt;br /&gt;
				dci history&lt;br /&gt;
				li $41						; # of patterns +1&lt;br /&gt;
				lr 0,a&lt;br /&gt;
clrhist2:&lt;br /&gt;
				lis 0&lt;br /&gt;
				st&lt;br /&gt;
				ds 0&lt;br /&gt;
				bf 4,clrhist2&lt;br /&gt;
				&lt;br /&gt;
nextpat:&lt;br /&gt;
				lisu 2						;random #&lt;br /&gt;
				lisl 5&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 5&lt;br /&gt;
				as (IS)						;add to current pattern...&lt;br /&gt;
				ni $3f						;...mod 64...&lt;br /&gt;
				lr (IS),a					;...to get next pattern&lt;br /&gt;
				&lt;br /&gt;
				dci history					;check to see if we've already done this one&lt;br /&gt;
				adc&lt;br /&gt;
				lr q,dc&lt;br /&gt;
				lm&lt;br /&gt;
				ni $ff&lt;br /&gt;
				bt 4,unusedpat				;not yet used, display it&lt;br /&gt;
				&lt;br /&gt;
				;pattern already used, check for unused from top&lt;br /&gt;
				;if not found, clear array and start over&lt;br /&gt;
				&lt;br /&gt;
				dci history&lt;br /&gt;
checknext:&lt;br /&gt;
				lm&lt;br /&gt;
				ni $ff&lt;br /&gt;
				bf 4,checknext				;will always complete because we zeroed 1 extra byte in clrhist&lt;br /&gt;
				lr q,dc&lt;br /&gt;
				lr a,ql&lt;br /&gt;
				ai $ff						;lm moved us 1 past&lt;br /&gt;
				lr ql,a&lt;br /&gt;
				ci $40						;all done?&lt;br /&gt;
				bf 4,foundone				&lt;br /&gt;
				li $ff&lt;br /&gt;
				lisu 4						; set flag to start complements (random/rotations later)&lt;br /&gt;
				lisl 0&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				bf 0,clrhist				;no empty slots, start over&lt;br /&gt;
foundone:&lt;br /&gt;
				lr (IS),a					;update the current pattern&lt;br /&gt;
				&lt;br /&gt;
unusedpat:		&lt;br /&gt;
				lr dc,q						;mark it used&lt;br /&gt;
				li $ff&lt;br /&gt;
				st&lt;br /&gt;
				&lt;br /&gt;
replay:&lt;br /&gt;
				lisu 3						;current pattern # in r29&lt;br /&gt;
				lisl 5&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				&lt;br /&gt;
				dci pats&lt;br /&gt;
				adc							; add cur pat to data pointer 5 times to get to the pat data&lt;br /&gt;
				adc&lt;br /&gt;
				adc&lt;br /&gt;
				adc&lt;br /&gt;
				adc&lt;br /&gt;
				&lt;br /&gt;
getpat:			lisu 2						;read bit pattern into regs 16-20&lt;br /&gt;
				lisl 0&lt;br /&gt;
				lis 5&lt;br /&gt;
				lr 1,a&lt;br /&gt;
getpatloop:&lt;br /&gt;
				lm&lt;br /&gt;
				lr (is)+,a&lt;br /&gt;
				ds 1&lt;br /&gt;
				bf 4,getpatloop&lt;br /&gt;
				&lt;br /&gt;
				dci array					;put byte pattern into RAM&lt;br /&gt;
				lis 5&lt;br /&gt;
				lr 2,a&lt;br /&gt;
&lt;br /&gt;
				lisu 4						;first time through 0, next time FF&lt;br /&gt;
				lisl 0&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				lr 3,a						;temp&lt;br /&gt;
&lt;br /&gt;
				lisu 2&lt;br /&gt;
				lisl 0&lt;br /&gt;
storepatloop2:&lt;br /&gt;
				lis 5&lt;br /&gt;
				lr 1,a&lt;br /&gt;
				lr a,(is)+&lt;br /&gt;
storepatloop:&lt;br /&gt;
				lr 0,a&lt;br /&gt;
				ni $ff&lt;br /&gt;
				&lt;br /&gt;
				lr a,3&lt;br /&gt;
				&lt;br /&gt;
				bf 1,onebit&lt;br /&gt;
				bf 0,storepat&lt;br /&gt;
onebit:&lt;br /&gt;
				com&lt;br /&gt;
storepat:&lt;br /&gt;
				st&lt;br /&gt;
				lr a,0&lt;br /&gt;
				sl 1&lt;br /&gt;
				lr 0,a&lt;br /&gt;
				ds 1&lt;br /&gt;
				bf 4,storepatloop&lt;br /&gt;
				ds 2&lt;br /&gt;
				bf 4,storepatloop2&lt;br /&gt;
&lt;br /&gt;
				lis 0						;init variables to 0&lt;br /&gt;
                lisu 3&lt;br /&gt;
                lisl 0&lt;br /&gt;
                lr (IS)+,a					;r24=row (3:0)&lt;br /&gt;
                lr (IS)+,a					;r25=col (3:1)&lt;br /&gt;
                lr (IS)+,a             		;r26=cursor (3:2)&lt;br /&gt;
                lr (IS)+,a					;r27=array index (3:3)&lt;br /&gt;
                lr (IS)+,a					;r28=parameter to toggle sub (3:4)&lt;br /&gt;
                lisu 2&lt;br /&gt;
                lisl 6&lt;br /&gt;
                lr (IS)+,a					;r22=press counter lo (2:6)&lt;br /&gt;
                lr (IS)+,a					;r23=press counter hi (2:7)&lt;br /&gt;
&lt;br /&gt;
				dci grid					;draw the grid&lt;br /&gt;
				pi	drawlines&lt;br /&gt;
			&lt;br /&gt;
;draw lights&lt;br /&gt;
				li 24						;array index&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 3&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
sqloop:&lt;br /&gt;
				pi drawlight&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 3&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				ai $ff&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				bt 2,sqloop					;branch if &amp;gt;= 0&lt;br /&gt;
&lt;br /&gt;
				dci currows&lt;br /&gt;
				lm&lt;br /&gt;
				lr	5,a						;upper row&lt;br /&gt;
				dci curcols&lt;br /&gt;
				lm&lt;br /&gt;
				lr	4,a						;left col&lt;br /&gt;
				dci	cursor					;start with the cursor in light 0&lt;br /&gt;
				pi square&lt;br /&gt;
				&lt;br /&gt;
mainloop:&lt;br /&gt;
				pi readhc&lt;br /&gt;
				lr 0,a						;save controller input&lt;br /&gt;
				lisu 2                		;inc random seed&lt;br /&gt;
				lisl 5&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				inc&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
&lt;br /&gt;
; redraw current square without cursor&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 2&lt;br /&gt;
				lr a,(IS)+&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				pi drawlight&lt;br /&gt;
&lt;br /&gt;
				lr a,0&lt;br /&gt;
				ni $0c&lt;br /&gt;
				bt 4,notupdn&lt;br /&gt;
				ci $08&lt;br /&gt;
				bf 4,down&lt;br /&gt;
				lisu 3						;up&lt;br /&gt;
				lisl 0						;r24 is row&lt;br /&gt;
				ds (IS)						;prev row&lt;br /&gt;
				bf 2,minrow					;&amp;gt;=0?&lt;br /&gt;
updcurx:&lt;br /&gt;
				jmp updcur&lt;br /&gt;
minrow:&lt;br /&gt;
				lis 4&lt;br /&gt;
				lr (IS),a	&lt;br /&gt;
				bf 0,updcurx&lt;br /&gt;
down:&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 0&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				inc							;next row&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				ci 5						;too far?&lt;br /&gt;
				bt 4,maxrow&lt;br /&gt;
				bf 0,updcurx&lt;br /&gt;
maxrow:&lt;br /&gt;
				lis 0&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				bf 0,updcurx&lt;br /&gt;
notupdn:&lt;br /&gt;
				lr a,0&lt;br /&gt;
				ni $03&lt;br /&gt;
				bt 4,notlfrt&lt;br /&gt;
				ci $02&lt;br /&gt;
				bf 4,right&lt;br /&gt;
				lisu 3						;left&lt;br /&gt;
				lisl 1						;r25 is col&lt;br /&gt;
				ds (IS)						;prev col&lt;br /&gt;
				bf 2,prevcol				;&amp;gt;=0?&lt;br /&gt;
				bf 0,updcurx&lt;br /&gt;
prevcol:&lt;br /&gt;
				lis 4&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				bf 0,updcurx&lt;br /&gt;
right:&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 1&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				inc							;next col&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				ci 5						;too far?&lt;br /&gt;
				bf 4,updcurx&lt;br /&gt;
				lis 0&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				bf 0,updcurx&lt;br /&gt;
notlfrt:&lt;br /&gt;
				lr a,0&lt;br /&gt;
				ni $c0&lt;br /&gt;
				bt 4,mainloop&lt;br /&gt;
				ci $80&lt;br /&gt;
				bt 4,pushdown&lt;br /&gt;
				jmp replay					;pull up replays current pattern&lt;br /&gt;
&lt;br /&gt;
pushdown:&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 6&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				ni $f0&lt;br /&gt;
				ci $40						;if game=3, can only press lit buttons&lt;br /&gt;
				bf 4,allowpress&lt;br /&gt;
&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 2						; get cursor loc&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				&lt;br /&gt;
				dci array&lt;br /&gt;
				adc&lt;br /&gt;
				lm&lt;br /&gt;
				ni $ff&lt;br /&gt;
				bf 4,allowpress&lt;br /&gt;
				&lt;br /&gt;
				;make a bad sound&lt;br /&gt;
				li		$3f&lt;br /&gt;
				lr		1,a&lt;br /&gt;
sndloop:&lt;br /&gt;
				li		$80&lt;br /&gt;
				outs	5&lt;br /&gt;
				lis		1&lt;br /&gt;
				lr		5,a&lt;br /&gt;
				pi		delay&lt;br /&gt;
				lis		0&lt;br /&gt;
				outs	5&lt;br /&gt;
				ds		1&lt;br /&gt;
				bf		4,sndloop&lt;br /&gt;
				&lt;br /&gt;
				jmp		updcur&lt;br /&gt;
				&lt;br /&gt;
allowpress:&lt;br /&gt;
				lisu 2						;inc press counter&lt;br /&gt;
				lisl 6		&lt;br /&gt;
				lis 1&lt;br /&gt;
				ai $66&lt;br /&gt;
				asd (IS)					;thanks Fredric!&lt;br /&gt;
				lr (IS)+,a&lt;br /&gt;
				bf 2,nocarry&lt;br /&gt;
				lis 1&lt;br /&gt;
				ai $66&lt;br /&gt;
				asd (IS)&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
nocarry:&lt;br /&gt;
				lisu 3&lt;br /&gt;
                lisl 6						;if mode=2 or 4, no center toggle&lt;br /&gt;
                lr a,(IS)&lt;br /&gt;
                ni $f						;mode in low nibble&lt;br /&gt;
                ci $2&lt;br /&gt;
                bt 4,nocenter&lt;br /&gt;
                ci $8&lt;br /&gt;
                bt 4,nocenter&lt;br /&gt;
				&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 2						; get cursor loc&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				&lt;br /&gt;
				lisl 4&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				pi toggle					;toggle center light&lt;br /&gt;
&lt;br /&gt;
nocenter:&lt;br /&gt;
				dci plustable&lt;br /&gt;
				lisu 3&lt;br /&gt;
                lisl 6						;if mode=3 or 4, X toggle&lt;br /&gt;
                lr a,(IS)&lt;br /&gt;
                ni $f						;mode in low nibble&lt;br /&gt;
                ci $4&lt;br /&gt;
                bt 4,xtoggle				;mode 3, X toggle&lt;br /&gt;
                ci $8&lt;br /&gt;
                bt 4,xtoggle				;mode 4, X toggle&lt;br /&gt;
                bf 0,dotoggle&lt;br /&gt;
                &lt;br /&gt;
xtoggle:&lt;br /&gt;
				dci xtable&lt;br /&gt;
dotoggle:&lt;br /&gt;
                lisl 2&lt;br /&gt;
                lr a,(IS)					;get cursor loc&lt;br /&gt;
                as (IS)&lt;br /&gt;
                as (IS)&lt;br /&gt;
                as (IS)						;*4 for table offset&lt;br /&gt;
                adc&lt;br /&gt;
                lm							;get 4 neighbors&lt;br /&gt;
                lr 0,a&lt;br /&gt;
                lm&lt;br /&gt;
                lr 1,a&lt;br /&gt;
                lm&lt;br /&gt;
                lr 2,a&lt;br /&gt;
                lm&lt;br /&gt;
                &lt;br /&gt;
                dci temp4					;store them temporarily&lt;br /&gt;
                st			;t4&lt;br /&gt;
                lr a,2&lt;br /&gt;
                st			;t3&lt;br /&gt;
                lr a,1&lt;br /&gt;
                st			;t2&lt;br /&gt;
                lr a,0&lt;br /&gt;
                st			;t1&lt;br /&gt;
&lt;br /&gt;
				dci temp4                	;toggle each neighbor&lt;br /&gt;
				li 3&lt;br /&gt;
				adc&lt;br /&gt;
                pi togglem	;t1&lt;br /&gt;
                &lt;br /&gt;
                dci temp4&lt;br /&gt;
                lm&lt;br /&gt;
                lm&lt;br /&gt;
                pi togglem	;t2&lt;br /&gt;
                &lt;br /&gt;
                dci temp4&lt;br /&gt;
                lm&lt;br /&gt;
                pi togglem	;t3&lt;br /&gt;
                &lt;br /&gt;
                dci temp4&lt;br /&gt;
                pi togglem	;t4&lt;br /&gt;
                &lt;br /&gt;
updcur:&lt;br /&gt;
				lisu 3						;calc index from row and col&lt;br /&gt;
				lisl 0&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				as (IS)&lt;br /&gt;
				as (IS)&lt;br /&gt;
				as (IS)&lt;br /&gt;
				as (IS)						;row * 5&lt;br /&gt;
&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 1&lt;br /&gt;
				as (IS)+					;add in col&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
&lt;br /&gt;
				dci currows					;get row and column to draw cursor&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 0&lt;br /&gt;
				lr a,(IS)+&lt;br /&gt;
				adc&lt;br /&gt;
				lm&lt;br /&gt;
				lr 5,a&lt;br /&gt;
				&lt;br /&gt;
				dci curcols&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				adc&lt;br /&gt;
				lm&lt;br /&gt;
				lr 4,a&lt;br /&gt;
				&lt;br /&gt;
				dci	cursor					;draw the cursor&lt;br /&gt;
				pi square&lt;br /&gt;
				&lt;br /&gt;
				LI $3F						;debounce by pausing a while&lt;br /&gt;
				LR 5,A&lt;br /&gt;
                pi delay&lt;br /&gt;
				&lt;br /&gt;
				;check for all green (win)&lt;br /&gt;
				dci array&lt;br /&gt;
				li 24						;array index&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 3&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
chkloop:&lt;br /&gt;
				lm&lt;br /&gt;
				ni $ff&lt;br /&gt;
				bt 4,lighton&lt;br /&gt;
				jmp mainloop				;not a win&lt;br /&gt;
lighton:&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 3&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				ai $ff&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				bt 2,chkloop&lt;br /&gt;
&lt;br /&gt;
				;made it here, all off&lt;br /&gt;
				;make a winning sound&lt;br /&gt;
				li		$3f&lt;br /&gt;
				lr		1,a&lt;br /&gt;
snd2loop:&lt;br /&gt;
				li		$40&lt;br /&gt;
				outs	5&lt;br /&gt;
				&lt;br /&gt;
				lr		a,1&lt;br /&gt;
snd2loopa:&lt;br /&gt;
				inc&lt;br /&gt;
				bf		4,snd2loopa&lt;br /&gt;
				&lt;br /&gt;
				lis		0&lt;br /&gt;
				outs	5&lt;br /&gt;
				ds		1&lt;br /&gt;
				bf		4,snd2loop&lt;br /&gt;
						&lt;br /&gt;
                li 32				;draw 2 concentric squares&lt;br /&gt;
                lr 4,a&lt;br /&gt;
                li 18&lt;br /&gt;
                lr 5,a&lt;br /&gt;
                dci winsq1&lt;br /&gt;
                pi square&lt;br /&gt;
                li 34&lt;br /&gt;
                lr 4,a&lt;br /&gt;
                li 20&lt;br /&gt;
                lr 5,a&lt;br /&gt;
                dci winsq2&lt;br /&gt;
                pi square&lt;br /&gt;
                &lt;br /&gt;
                ;print # of moves from r23/22 (2:7/6)&lt;br /&gt;
                li $1e				;row&lt;br /&gt;
                lr 2,a&lt;br /&gt;
                lisu 2				;1000s digit&lt;br /&gt;
                lisl 7&lt;br /&gt;
                lr a,(IS)&lt;br /&gt;
                sr 4&lt;br /&gt;
                bt 4,lt1000&lt;br /&gt;
                oi $40&lt;br /&gt;
                lr 0,a&lt;br /&gt;
                li $2a&lt;br /&gt;
                lr 1,a&lt;br /&gt;
                pi drawchar&lt;br /&gt;
                bf 0,d100&lt;br /&gt;
&lt;br /&gt;
lt1000:&lt;br /&gt;
				li $2c&lt;br /&gt;
				lr 1,a&lt;br /&gt;
d100:				&lt;br /&gt;
				lr a,1&lt;br /&gt;
				inc&lt;br /&gt;
				lr 1,a&lt;br /&gt;
                lisu 2				;100s digit&lt;br /&gt;
                lisl 7&lt;br /&gt;
                lr a,(IS)&lt;br /&gt;
                ni $f&lt;br /&gt;
                bf 4,gt100&lt;br /&gt;
                lr a,(IS)			;print 0 if x0yz where x &amp;gt; 0&lt;br /&gt;
                ni $ff&lt;br /&gt;
                bt 4,lt100&lt;br /&gt;
                lis 0&lt;br /&gt;
                &lt;br /&gt;
gt100:&lt;br /&gt;
                oi $40&lt;br /&gt;
                lr 0,a&lt;br /&gt;
                pi drawchar&lt;br /&gt;
                bf 0,d10&lt;br /&gt;
&lt;br /&gt;
lt100:&lt;br /&gt;
				li $30&lt;br /&gt;
				lr 1,a&lt;br /&gt;
d10:&lt;br /&gt;
				lr a,1&lt;br /&gt;
				inc&lt;br /&gt;
				lr 1,a&lt;br /&gt;
                lisu 2				;10s digit&lt;br /&gt;
                lisl 6&lt;br /&gt;
                lr a,(IS)&lt;br /&gt;
                sr 4&lt;br /&gt;
                bf 4,gt10&lt;br /&gt;
                lisl 7				;print 0 if xy0z where x or y &amp;gt; 0&lt;br /&gt;
                lr a,(IS)&lt;br /&gt;
                ni $ff&lt;br /&gt;
                bt 4,lt10&lt;br /&gt;
                lis 0&lt;br /&gt;
gt10:&lt;br /&gt;
                oi $40&lt;br /&gt;
                lr 0,a&lt;br /&gt;
                pi drawchar&lt;br /&gt;
                bf 0,d1&lt;br /&gt;
&lt;br /&gt;
lt10:&lt;br /&gt;
				li $34&lt;br /&gt;
				lr 1,a&lt;br /&gt;
d1:&lt;br /&gt;
				lr a,1&lt;br /&gt;
				inc&lt;br /&gt;
				lr 1,a&lt;br /&gt;
                lisu 2				;1s digit&lt;br /&gt;
                lisl 6&lt;br /&gt;
                lr a,(IS)&lt;br /&gt;
                ni $f&lt;br /&gt;
                oi $40&lt;br /&gt;
                lr 0,a&lt;br /&gt;
                pi drawchar&lt;br /&gt;
                &lt;br /&gt;
waitupdn:&lt;br /&gt;
                pi readhc			;wait for hc up/down&lt;br /&gt;
                ni $c0&lt;br /&gt;
                bt 4,waitupdn&lt;br /&gt;
                ni $80&lt;br /&gt;
                bt 4,redo&lt;br /&gt;
                jmp nextpat			;down - get next random pattern&lt;br /&gt;
                &lt;br /&gt;
redo:&lt;br /&gt;
				lisu 3&lt;br /&gt;
                lisl 6&lt;br /&gt;
                lr a,(IS)&lt;br /&gt;
                ci $41&lt;br /&gt;
                bf 4,replay2&lt;br /&gt;
                &lt;br /&gt;
                lisl 5&lt;br /&gt;
                lr a,(IS)&lt;br /&gt;
                ci 51&lt;br /&gt;
                bf 4,replay2&lt;br /&gt;
                &lt;br /&gt;
				lisu 2&lt;br /&gt;
				lisl 7&lt;br /&gt;
				lr a,(IS)-&lt;br /&gt;
				ci 0&lt;br /&gt;
				bf 4,replay2&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				ci $18&lt;br /&gt;
				bf 4,replay2&lt;br /&gt;
&lt;br /&gt;
		        LI		$d6&lt;br /&gt;
                LR		$3,A&lt;br /&gt;
                PI		clrscrn&lt;br /&gt;
                		              &lt;br /&gt;
                dci blitparm&lt;br /&gt;
                pi blit&lt;br /&gt;
                &lt;br /&gt;
				li $3f&lt;br /&gt;
				lr 1,a&lt;br /&gt;
snd3loop:&lt;br /&gt;
				li $40&lt;br /&gt;
				outs 5&lt;br /&gt;
				li $1&lt;br /&gt;
				lr 5,a&lt;br /&gt;
				pi delay&lt;br /&gt;
				lis 0&lt;br /&gt;
				outs 5&lt;br /&gt;
				ds 1&lt;br /&gt;
				bf 4,snd3loop&lt;br /&gt;
&lt;br /&gt;
				pi readhc&lt;br /&gt;
		        LI		$d6&lt;br /&gt;
                LR		$3,A&lt;br /&gt;
                PI		clrscrn&lt;br /&gt;
				&lt;br /&gt;
				jmp nextpat			&lt;br /&gt;
replay2:&lt;br /&gt;
				jmp replay			;up - replay current pattern&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
readhc:								;wait until one of the hand controllers is moved&lt;br /&gt;
				lis 0&lt;br /&gt;
				outs 0&lt;br /&gt;
				lis 0&lt;br /&gt;
				outs 4&lt;br /&gt;
				ins 4&lt;br /&gt;
				com					;un-invert port data&lt;br /&gt;
				ni $cf				;mask off twists, since we don't use them&lt;br /&gt;
				bf 4,gothc&lt;br /&gt;
				outs 1&lt;br /&gt;
				ins 1&lt;br /&gt;
				com&lt;br /&gt;
				ni $cf&lt;br /&gt;
				bt 4,readhc&lt;br /&gt;
gothc:			pop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
togglem:							;change a square (index in memory) from red to green or vice versa&lt;br /&gt;
				lr k,p&lt;br /&gt;
				pi pushk&lt;br /&gt;
				&lt;br /&gt;
				lm&lt;br /&gt;
				lr 0,a&lt;br /&gt;
				ni $80				;if high bit set, then this was a wrap&lt;br /&gt;
				bt 4,notwrapped&lt;br /&gt;
				&lt;br /&gt;
				lisu 3&lt;br /&gt;
                lisl 6				;if game=$2x, allow wrap-around&lt;br /&gt;
                lr a,(IS)&lt;br /&gt;
                ni $f0				;mode in low nibble&lt;br /&gt;
                ci $20&lt;br /&gt;
				bf 4,toggleexit2	;no wrap allowed&lt;br /&gt;
				&lt;br /&gt;
notwrapped:&lt;br /&gt;
				lr a,0&lt;br /&gt;
				ni $7f				;strip off &amp;quot;wrapped&amp;quot; bit&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 4&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				bf 0,toggle2&lt;br /&gt;
				&lt;br /&gt;
toggle:								;change a square (index in r28) from red to green or vice versa&lt;br /&gt;
				lr k,p&lt;br /&gt;
				pi pushk&lt;br /&gt;
&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 4&lt;br /&gt;
				lr a,(IS)		&lt;br /&gt;
toggle2:&lt;br /&gt;
				dci array&lt;br /&gt;
				adc&lt;br /&gt;
				lm&lt;br /&gt;
				ni $ff&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				dci array&lt;br /&gt;
				adc&lt;br /&gt;
				bt 4,notset&lt;br /&gt;
				lis 0&lt;br /&gt;
				bf 0,toggleexit&lt;br /&gt;
notset:&lt;br /&gt;
				li $ff&lt;br /&gt;
&lt;br /&gt;
toggleexit:&lt;br /&gt;
				st&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 4&lt;br /&gt;
				lr a,(IS)-&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				pi drawlight&lt;br /&gt;
toggleexit2:&lt;br /&gt;
				pi popk&lt;br /&gt;
				pk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
square:							;draw a square&lt;br /&gt;
		; dci to color,width,height&lt;br /&gt;
		;r5=upper row&lt;br /&gt;
		;r4=left col&lt;br /&gt;
		; uses r2,r3,r6&lt;br /&gt;
				lr k,p&lt;br /&gt;
				pi pushk&lt;br /&gt;
				lm&lt;br /&gt;
				outs	1		;set the color&lt;br /&gt;
				&lt;br /&gt;
				lr a,5&lt;br /&gt;
				com&lt;br /&gt;
				outs 5			;set the row&lt;br /&gt;
				&lt;br /&gt;
				lm				;&lt;br /&gt;
				lr 5,a			;save the width&lt;br /&gt;
				&lt;br /&gt;
				lm&lt;br /&gt;
				lr 3,a			;store the height&lt;br /&gt;
&lt;br /&gt;
squarev:&lt;br /&gt;
				lr a,4&lt;br /&gt;
				lr 2,a			;save col&lt;br /&gt;
				lr a,5			;get width&lt;br /&gt;
squareh:		lr 6,a			;save temp&lt;br /&gt;
				&lt;br /&gt;
				lr a,2&lt;br /&gt;
				com&lt;br /&gt;
				outs	4		;set the col&lt;br /&gt;
				lr a,2&lt;br /&gt;
				inc				;next col&lt;br /&gt;
				lr 2,a&lt;br /&gt;
				&lt;br /&gt;
				pi plot&lt;br /&gt;
							&lt;br /&gt;
				lr a,6&lt;br /&gt;
				ai $ff&lt;br /&gt;
				bf 4,squareh	;all done w/row&lt;br /&gt;
				&lt;br /&gt;
				ins 5			;next row&lt;br /&gt;
				ai $ff			;complement, so subtract 1&lt;br /&gt;
				outs 5&lt;br /&gt;
				&lt;br /&gt;
				lr a,3			&lt;br /&gt;
				ai $ff&lt;br /&gt;
				lr 3,a&lt;br /&gt;
				bf 4,squarev	;done full height?&lt;br /&gt;
				pi popk&lt;br /&gt;
				pk&lt;br /&gt;
				&lt;br /&gt;
				&lt;br /&gt;
drawlines:		; dci to table of 	color,len,row,start col (horiz if len&amp;lt;$80)&lt;br /&gt;
				;					color,len,col,start row (vert if len&amp;gt;$80)&lt;br /&gt;
				;					repeat until $FF&lt;br /&gt;
				;uses r5&lt;br /&gt;
				lr	k,p&lt;br /&gt;
line2:&lt;br /&gt;
				lm&lt;br /&gt;
				ci $ff&lt;br /&gt;
				bt 4,lineexit	;ff means done&lt;br /&gt;
				outs	1		;set the color&lt;br /&gt;
&lt;br /&gt;
				lm				;get len&lt;br /&gt;
				ni $ff			;lm doesn't set status flags&lt;br /&gt;
				bf 1,vline		;vertical lines are negative (and sign bit backwards)&lt;br /&gt;
				lr 5,a			;horiz-save len&lt;br /&gt;
				lm&lt;br /&gt;
				com&lt;br /&gt;
				outs 5			;set the row&lt;br /&gt;
				lm				;get starting column&lt;br /&gt;
hline2:&lt;br /&gt;
				com&lt;br /&gt;
				outs 4			;set the column&lt;br /&gt;
				pi plot&lt;br /&gt;
				ds 5								&lt;br /&gt;
				bt 4,line2&lt;br /&gt;
				ins 4			; &lt;br /&gt;
				com&lt;br /&gt;
				inc&lt;br /&gt;
				bf  0,hline2&lt;br /&gt;
lineexit:&lt;br /&gt;
				pk&lt;br /&gt;
&lt;br /&gt;
vline:&lt;br /&gt;
				ni $3f			;mask off sign bit, limit len to 63 (height of screen)&lt;br /&gt;
				lr 5,a			;save it&lt;br /&gt;
				lm&lt;br /&gt;
				com&lt;br /&gt;
				outs 4			;set the column&lt;br /&gt;
				lm				;get starting row&lt;br /&gt;
vline2:&lt;br /&gt;
				com&lt;br /&gt;
				outs 5			;set the row&lt;br /&gt;
				pi plot		&lt;br /&gt;
				ds 5								&lt;br /&gt;
				bt 4,line2&lt;br /&gt;
				ins 5&lt;br /&gt;
				com&lt;br /&gt;
				inc&lt;br /&gt;
				bf  0,vline2&lt;br /&gt;
				&lt;br /&gt;
				&lt;br /&gt;
plot:							;this is what you have to do to transfer data to the screen memory&lt;br /&gt;
								;after setting row, column and color&lt;br /&gt;
				li	$60&lt;br /&gt;
				outs	0&lt;br /&gt;
				li	$50&lt;br /&gt;
				outs	0&lt;br /&gt;
				lis	6	; little delay&lt;br /&gt;
pdelay:			ai $ff&lt;br /&gt;
				bf	4,pdelay&lt;br /&gt;
				pop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
drawlight:						;draws a red or green square based off value passed in r27&lt;br /&gt;
				lr k,p&lt;br /&gt;
				pi pushk&lt;br /&gt;
&lt;br /&gt;
				lisu 3&lt;br /&gt;
				lisl 3&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				dci sqrows&lt;br /&gt;
				adc&lt;br /&gt;
				lm		&lt;br /&gt;
				lr 5,a&lt;br /&gt;
				&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				dci sqcols&lt;br /&gt;
				adc&lt;br /&gt;
				lm&lt;br /&gt;
				lr 4,a&lt;br /&gt;
				&lt;br /&gt;
				lr a,(IS)					; read color from array&lt;br /&gt;
				dci array&lt;br /&gt;
				adc&lt;br /&gt;
				lm&lt;br /&gt;
				ni $ff&lt;br /&gt;
				bt 4,dogreen&lt;br /&gt;
				dci redsq&lt;br /&gt;
				bf 0,dosq&lt;br /&gt;
dogreen:&lt;br /&gt;
				dci greensq&lt;br /&gt;
dosq:&lt;br /&gt;
				pi square&lt;br /&gt;
				pi popk&lt;br /&gt;
				pk&lt;br /&gt;
&lt;br /&gt;
;blit code from cart 26&lt;br /&gt;
blit:&lt;br /&gt;
         		LR      K,P &lt;br /&gt;
         		pi pushk&lt;br /&gt;
         		LISU    0&lt;br /&gt;
blitloop:&lt;br /&gt;
				LISL    4&lt;br /&gt;
getparms:&lt;br /&gt;
				LM          &lt;br /&gt;
				LR      (IS)-,A&lt;br /&gt;
				BR7     getparms&lt;br /&gt;
				LM          &lt;br /&gt;
				LR      H,DC&lt;br /&gt;
				DCI     blitparm&lt;br /&gt;
				ADC         &lt;br /&gt;
				&lt;br /&gt;
				LIS     1&lt;br /&gt;
				LR      $7,A&lt;br /&gt;
				INS     5  &lt;br /&gt;
				COM         &lt;br /&gt;
				NI      $c0&lt;br /&gt;
				AS      $1&lt;br /&gt;
				COM         &lt;br /&gt;
blit2z:&lt;br /&gt;
				OUTS    5  &lt;br /&gt;
				DS      $3&lt;br /&gt;
				BF      2,blitexit&lt;br /&gt;
				LR      A,$2&lt;br /&gt;
				LR      $5,A&lt;br /&gt;
				LR      A,$0&lt;br /&gt;
				COM         &lt;br /&gt;
blit2a:&lt;br /&gt;
				OUTS    4  &lt;br /&gt;
				DS      $7&lt;br /&gt;
				BF      4,blit2c&lt;br /&gt;
				LIS     8&lt;br /&gt;
				LR      $7,A&lt;br /&gt;
				LM          &lt;br /&gt;
				LR      $6,A&lt;br /&gt;
				LIS     1&lt;br /&gt;
				NS      $4&lt;br /&gt;
				BT      4,blit2b&lt;br /&gt;
				LIS     0&lt;br /&gt;
				COM         &lt;br /&gt;
blit2b:&lt;br /&gt;
				ADC         &lt;br /&gt;
blit2c:&lt;br /&gt;
				LR      A,$6&lt;br /&gt;
				AS      $6&lt;br /&gt;
				LR      $6,A&lt;br /&gt;
				LR      A,$4&lt;br /&gt;
				BT      2,blit2d&lt;br /&gt;
				LIS     0&lt;br /&gt;
blit2d:&lt;br /&gt;
				COM         &lt;br /&gt;
				OUTS    1  &lt;br /&gt;
				LIS     6&lt;br /&gt;
				SL      4   &lt;br /&gt;
				OUTS    0  &lt;br /&gt;
				SL      1   &lt;br /&gt;
				OUTS    0  &lt;br /&gt;
				BF      0,blit2e&lt;br /&gt;
blit2e:&lt;br /&gt;
				AI      $60&lt;br /&gt;
				BF      4,blit2e&lt;br /&gt;
				DS      $5&lt;br /&gt;
				BT      4,blit2f&lt;br /&gt;
				INS     4  &lt;br /&gt;
				AI      $ff&lt;br /&gt;
				BF      0,blit2a&lt;br /&gt;
blit2f:&lt;br /&gt;
				INS     5  &lt;br /&gt;
				AI      $ff&lt;br /&gt;
				BF      0,blit2z&lt;br /&gt;
blitexit:&lt;br /&gt;
&lt;br /&gt;
				LR      DC,H&lt;br /&gt;
				LIS     2&lt;br /&gt;
				NS      $4&lt;br /&gt;
				BT      4,blitloop&lt;br /&gt;
				pi 		popk&lt;br /&gt;
				PK          &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;from the BIOS, but I removed T? (time) prompt&lt;br /&gt;
prompts:        LR   K,P                 ; &lt;br /&gt;
                PI   pushk               ; &lt;br /&gt;
prompts2:       LI   $85                 ; red 5 (S)&lt;br /&gt;
                LR   $0,A                ; &lt;br /&gt;
                PI   prompt              ; &lt;br /&gt;
                LR   A,$4                ; &lt;br /&gt;
                CI   $08                 ; is it button 4, Start?&lt;br /&gt;
                BF   $4,notbut4          ; no, check others&lt;br /&gt;
notbut2:&lt;br /&gt;
                PI   popk                ; yes, return&lt;br /&gt;
                PK                       ; &lt;br /&gt;
                &lt;br /&gt;
notbut4:        CI   $02                 ; is it button 2, Mode?&lt;br /&gt;
                BF   $4,notbut2          ; &lt;br /&gt;
                LI   $8e                 ; red M&lt;br /&gt;
                LR   $0,A                ; &lt;br /&gt;
                PI   prompt              ; &lt;br /&gt;
                LISU 3                   ; &lt;br /&gt;
                LISL 6                   ; &lt;br /&gt;
                LR   A,(IS)                ; &lt;br /&gt;
                as	4					;add the mode to the game #&lt;br /&gt;
                LR   (IS),A              ; &lt;br /&gt;
                BF   $0,prompts2         ; &lt;br /&gt;
                &lt;br /&gt;
                &lt;br /&gt;
;from the BIOS, but I added random # seed to readbuts&lt;br /&gt;
prompt:         LR   K,P                 ; $0099 - prints char r0 at row r1, col r2, waits for button&lt;br /&gt;
                PI   pushk               ; &lt;br /&gt;
                LI   $33                 ; r1=$33&lt;br /&gt;
                LR   $1,A                ; &lt;br /&gt;
                LI   $13                 ; r2=$13&lt;br /&gt;
                LR   $2,A                ; &lt;br /&gt;
                PI   drawchar            ; &lt;br /&gt;
                &lt;br /&gt;
                LI   $8b                 ; r0=8b	red ?&lt;br /&gt;
                LR   $0,A                ; &lt;br /&gt;
                PI   drawchar            ; &lt;br /&gt;
                &lt;br /&gt;
                PI   readbuts            ; &lt;br /&gt;
                LI   $33                 ; r1=$33&lt;br /&gt;
                LR   $1,A                ; &lt;br /&gt;
                LI   $13                 ; r2=$13&lt;br /&gt;
                LR   $2,A                ; &lt;br /&gt;
                LIS  $d                  ; r0=$d&lt;br /&gt;
                LR   $0,A                ; &lt;br /&gt;
                PI   drawchar            ; &lt;br /&gt;
                PI   drawchar            ; &lt;br /&gt;
                PI   popk                ; &lt;br /&gt;
                PK                       ; &lt;br /&gt;
                &lt;br /&gt;
readbuts:&lt;br /&gt;
				lisu 2                	;inc random seed&lt;br /&gt;
				lisl 5&lt;br /&gt;
				lr a,(IS)&lt;br /&gt;
				inc&lt;br /&gt;
				lr (IS),a&lt;br /&gt;
				&lt;br /&gt;
		        INS  0                   ; $00c1 - read buttons&lt;br /&gt;
                COM                      ; &lt;br /&gt;
                NI   $0f                 ; &lt;br /&gt;
                BT   4,readbuts          ; &lt;br /&gt;
                LR   $4,A                ; &lt;br /&gt;
                LI   $ff                 ; &lt;br /&gt;
                LR   $5,A                ; &lt;br /&gt;
dbounce:        DS   $5                  ; &lt;br /&gt;
                BF   $4,dbounce         ; &lt;br /&gt;
                jmp delay            ; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;colors: $40-red, $80=blue, $0=green, $c0=bkg&lt;br /&gt;
&lt;br /&gt;
;data to draw lines for grid&lt;br /&gt;
grid:				;horiz-color,len,row,start col&lt;br /&gt;
				db $80,66,7,18&lt;br /&gt;
				db $80,66,17,18&lt;br /&gt;
				db $80,66,27,18&lt;br /&gt;
				db $80,66,37,18&lt;br /&gt;
				db $80,66,47,18&lt;br /&gt;
				db $80,66,57,18&lt;br /&gt;
					;vert-color,$80+len,col,start row&lt;br /&gt;
				db $80,179,18,7	;179=128+51&lt;br /&gt;
				db $80,179,31,7&lt;br /&gt;
				db $80,179,44,7&lt;br /&gt;
				db $80,179,57,7&lt;br /&gt;
				db $80,179,70,7&lt;br /&gt;
				db $80,179,83,7&lt;br /&gt;
				db $ff&lt;br /&gt;
&lt;br /&gt;
;data to draw squares&lt;br /&gt;
redsq:				;color,width,height&lt;br /&gt;
				db $40,12,9&lt;br /&gt;
greensq:			;color,width,height&lt;br /&gt;
				db $0,12,9&lt;br /&gt;
cursor:				;color,width,height&lt;br /&gt;
				db $c0,4,3&lt;br /&gt;
winsq1:&lt;br /&gt;
				db $40,38,29	;red&lt;br /&gt;
winsq2:&lt;br /&gt;
				db $c0,34,25	;bkg&lt;br /&gt;
&lt;br /&gt;
;locations to draw each light, based on index (0-24)&lt;br /&gt;
sqrows:			&lt;br /&gt;
				db   8, 8, 8, 8, 8,18,18,18,18,18,28,28,28,28,28,38,38,38,38,38,48,48,48,48,48&lt;br /&gt;
sqcols:			&lt;br /&gt;
				db  19,32,45,58,71,19,32,45,58,71,19,32,45,58,71,19,32,45,58,71,19,32,45,58,71&lt;br /&gt;
				&lt;br /&gt;
;locations to draw cursor, based on row/column&lt;br /&gt;
currows:&lt;br /&gt;
				db	11,21,31,41,51&lt;br /&gt;
curcols:&lt;br /&gt;
				db	23,36,49,62,75&lt;br /&gt;
&lt;br /&gt;
plustable:		;squares to toggle based on cursor N E W S +128 means wrapped&lt;br /&gt;
				db 148,  1,132,  5&lt;br /&gt;
				db 149,  2,  0,  6&lt;br /&gt;
				db 150,  3,  1,  7&lt;br /&gt;
				db 151,  4,  2,  8  &lt;br /&gt;
				db 152,128,  3,  9&lt;br /&gt;
				&lt;br /&gt;
				db   0,  6,137, 10&lt;br /&gt;
				db   1,  7,  5, 11&lt;br /&gt;
				db   2,  8,  6, 12&lt;br /&gt;
				db   3,  9,  7, 13&lt;br /&gt;
				db   4,133,  8, 14&lt;br /&gt;
				&lt;br /&gt;
				db   5, 11,142, 15&lt;br /&gt;
				db   6, 12, 10, 16&lt;br /&gt;
				db   7, 13, 11, 17&lt;br /&gt;
				db   8, 14, 12, 18&lt;br /&gt;
				db   9,138, 13, 19&lt;br /&gt;
				&lt;br /&gt;
				db  10, 16,147, 20&lt;br /&gt;
				db  11, 17, 15, 21&lt;br /&gt;
				db  12, 18, 16, 22&lt;br /&gt;
				db  13, 19, 17, 23&lt;br /&gt;
				db  14,143, 18, 24&lt;br /&gt;
				&lt;br /&gt;
				db  15, 21,152,128&lt;br /&gt;
				db  16, 22, 20,129&lt;br /&gt;
				db  17, 23, 21,130&lt;br /&gt;
				db  18, 24, 22,131&lt;br /&gt;
				db  19,148, 23,132&lt;br /&gt;
				&lt;br /&gt;
xtable:		;squares to toggle based on cursor NW NE SW SE +128 means wrapped&lt;br /&gt;
				db 152,149,137,  6&lt;br /&gt;
				db 148,150,  5,  7&lt;br /&gt;
				db 149,151,  6,  8&lt;br /&gt;
				db 150,152,  7,  9&lt;br /&gt;
				db 151,148,  8,133&lt;br /&gt;
				&lt;br /&gt;
				db 132,  1,142, 11&lt;br /&gt;
				db   0,  2, 10, 12&lt;br /&gt;
				db   1,  3, 11, 13&lt;br /&gt;
				db   2,  4, 12, 14&lt;br /&gt;
				db   3,128, 13,138&lt;br /&gt;
				&lt;br /&gt;
				db 137,  6,147, 16&lt;br /&gt;
				db   5,  7, 15, 17&lt;br /&gt;
				db   6,  8, 16, 18&lt;br /&gt;
				db   7,  9, 17, 19&lt;br /&gt;
				db   8,133, 18,143&lt;br /&gt;
				&lt;br /&gt;
				db 142, 11,152, 21&lt;br /&gt;
				db  10, 12, 20, 22&lt;br /&gt;
				db  11, 13, 21, 23&lt;br /&gt;
				db  12, 14, 22, 24&lt;br /&gt;
				db  13,138, 23,148&lt;br /&gt;
				&lt;br /&gt;
				db 147, 16,132,129&lt;br /&gt;
				db  15, 17,128,130&lt;br /&gt;
				db  16, 18,129,131&lt;br /&gt;
				db  17, 19,130,132&lt;br /&gt;
				db  18,143,132,128 &lt;br /&gt;
&lt;br /&gt;
;the patterns - 1 bit is red, 0 is green&lt;br /&gt;
;other code has to be adjusted to use more or less than 64 patterns&lt;br /&gt;
;not all of these are solvable on a torus or if only the neighbors toggle&lt;br /&gt;
pats:&lt;br /&gt;
;				db 		$00,$00,$00,$80,$c0		; easy one for test&lt;br /&gt;
&lt;br /&gt;
                db      $20,$50,$88,$F8,$88&lt;br /&gt;
                db      $F0,$88,$88,$88,$F0&lt;br /&gt;
                db      $F8,$80,$F8,$80,$F8&lt;br /&gt;
                db      $F8,$80,$F0,$80,$80&lt;br /&gt;
                db      $88,$88,$F8,$88,$88&lt;br /&gt;
                db      $F8,$20,$20,$20,$F8&lt;br /&gt;
                db      $90,$A0,$C0,$A0,$90&lt;br /&gt;
                db      $80,$80,$80,$80,$F8&lt;br /&gt;
                db      $88,$D8,$A8,$88,$88&lt;br /&gt;
                db      $88,$C8,$A8,$98,$88&lt;br /&gt;
                db      $70,$88,$88,$88,$70&lt;br /&gt;
                db      $70,$88,$A8,$90,$68&lt;br /&gt;
                db      $70,$80,$70,$08,$70&lt;br /&gt;
                db      $F8,$20,$20,$20,$20&lt;br /&gt;
                db      $88,$88,$A8,$D8,$88&lt;br /&gt;
                db      $88,$50,$20,$50,$88&lt;br /&gt;
                db      $88,$50,$20,$20,$20&lt;br /&gt;
                db      $F8,$10,$20,$40,$F8&lt;br /&gt;
                db      $50,$50,$00,$70,$20&lt;br /&gt;
                db      $20,$70,$F8,$70,$20&lt;br /&gt;
                db      $D8,$20,$20,$20,$D8&lt;br /&gt;
                db      $00,$00,$20,$00,$00&lt;br /&gt;
                db      $00,$20,$50,$20,$00&lt;br /&gt;
                db      $20,$00,$88,$00,$20&lt;br /&gt;
                db      $50,$A8,$50,$A8,$50&lt;br /&gt;
                db      $A8,$70,$F8,$70,$A8&lt;br /&gt;
                db      $00,$D8,$50,$D8,$00&lt;br /&gt;
                db      $20,$88,$20,$88,$20&lt;br /&gt;
                db      $F8,$A8,$88,$A8,$F8&lt;br /&gt;
                db      $20,$60,$20,$20,$70&lt;br /&gt;
                db      $70,$08,$70,$80,$F8&lt;br /&gt;
                db      $70,$08,$70,$08,$70&lt;br /&gt;
                db      $F8,$00,$70,$00,$F8&lt;br /&gt;
                db      $70,$88,$70,$88,$70&lt;br /&gt;
                db      $F8,$88,$50,$70,$00&lt;br /&gt;
                db      $F8,$70,$20,$00,$00&lt;br /&gt;
                db      $20,$20,$F8,$20,$20&lt;br /&gt;
                db      $A8,$88,$F8,$88,$A8&lt;br /&gt;
                db      $C0,$A0,$A8,$28,$18&lt;br /&gt;
                db      $18,$08,$20,$80,$C0&lt;br /&gt;
                db      $D8,$88,$50,$88,$D8&lt;br /&gt;
                db      $18,$C0,$18,$C0,$18&lt;br /&gt;
                db      $A8,$A8,$A8,$A8,$A8&lt;br /&gt;
                db      $00,$F8,$00,$F8,$00&lt;br /&gt;
                db      $10,$78,$50,$F0,$40&lt;br /&gt;
                db      $C0,$E0,$70,$38,$18&lt;br /&gt;
                db      $60,$90,$70,$48,$30&lt;br /&gt;
                db      $A8,$A8,$50,$A8,$A8&lt;br /&gt;
                db      $98,$F0,$50,$78,$C8&lt;br /&gt;
                db      $70,$A8,$F8,$F8,$A8&lt;br /&gt;
                db      $A0,$E0,$B8,$10,$38&lt;br /&gt;
                db      $00,$00,$F8,$50,$50	; pi pattern&lt;br /&gt;
                db      $00,$40,$00,$10,$00&lt;br /&gt;
                db      $00,$50,$00,$50,$00&lt;br /&gt;
                db      $10,$48,$20,$90,$40&lt;br /&gt;
                db      $78,$E8,$F8,$B8,$F0&lt;br /&gt;
                db      $E0,$90,$E0,$90,$E0&lt;br /&gt;
                db      $30,$48,$C0,$48,$30&lt;br /&gt;
                db      $38,$48,$20,$90,$E0&lt;br /&gt;
                db      $00,$38,$00,$E0,$00&lt;br /&gt;
                db      $20,$20,$D8,$20,$20&lt;br /&gt;
                db      $20,$70,$A8,$20,$20&lt;br /&gt;
                db      $C8,$D0,$20,$58,$98&lt;br /&gt;
                db      $00,$70,$50,$70,$00&lt;br /&gt;
                &lt;br /&gt;
;8 bytes available here&lt;br /&gt;
&lt;br /&gt;
org $f00&lt;br /&gt;
blitparm:				&lt;br /&gt;
				db $82,19,96,$16,$8,$08,00,00&lt;br /&gt;
blitdata:&lt;br /&gt;
				db $00,$45,$F0,$41,$E1,$01,$F7,$80,$44,$20,$40,$00&lt;br /&gt;
				db $00,$45,$00,$41,$13,$81,$04,$40,$A4,$20,$A0,$00&lt;br /&gt;
				db $00,$7D,$E0,$41,$E4,$41,$E7,$81,$14,$21,$10,$00&lt;br /&gt;
				db $00,$45,$04,$41,$07,$C1,$04,$41,$F4,$21,$F0,$00&lt;br /&gt;
				db $00,$45,$f3,$81,$04,$41,$F4,$41,$17,$BD,$10,$00&lt;br /&gt;
				db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
				db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
				db $F8,$8E,$F1,$C8,$BA,$1E,$04,$50,$72,$22,$3C,$F8&lt;br /&gt;
				db $81,$44,$8A,$28,$92,$11,$03,$90,$82,$45,$22,$80&lt;br /&gt;
				db $F2,$24,$F2,$0F,$92,$11,$74,$50,$73,$88,$BC,$F0&lt;br /&gt;
				db $83,$E4,$8A,$28,$92,$11,$07,$D0,$0A,$4F,$A2,$80&lt;br /&gt;
				db $82,$2E,$89,$C8,$BB,$DE,$04,$5E,$72,$28,$A2,$F8&lt;br /&gt;
				db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
				db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00&lt;br /&gt;
				db $00,$00,$00,$79,$17,$81,$17,$DF,$20,$00,$00,$00&lt;br /&gt;
				db $00,$00,$00,$44,$E4,$41,$11,$10,$20,$00,$00,$00&lt;br /&gt;
				db $00,$00,$00,$45,$17,$81,$11,$1E,$20,$00,$00,$00&lt;br /&gt;
				db $00,$00,$00,$45,$F4,$41,$11,$10,$00,$00,$00,$00&lt;br /&gt;
				db $00,$00,$00,$79,$14,$40,$E1,$1F,$20,$00,$00,$00&lt;br /&gt;
&lt;br /&gt;
;4 bytes available here&lt;br /&gt;
&lt;br /&gt;
org $ff0&lt;br /&gt;
				db	$53,$65,$61,$6e,$20,$52,$69,$64,$64,$6c,$65,$20,$32,$30,$30,$34&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>83.233.129.35</name></author>	</entry>

	</feed>