<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"
>

<channel>
	<title>KwartzLab Makerspace &#187; vintage computing</title>
	<atom:link href="http://www.kwartzlab.ca/tag/vintage_computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kwartzlab.ca</link>
	<description>Home of Kwartzlab Makerspace in Kitchener/Waterloo, Ontario</description>
	<lastBuildDate>Tue, 14 May 2013 18:32:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
<!-- podcast_generator="Blubrry PowerPress/4.0.7" -->
	<itunes:summary>Regular discussions with hackers, makers and artists at the Kwartzlab Makerspace. We talk about what projects people are working on, what events are coming up and how you can get involved.</itunes:summary>
	<itunes:author>kwartzlab</itunes:author>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://www.kwartzlab.ca/wp-content/uploads/powerpress/light_box_logo.jpg" />
	<itunes:owner>
		<itunes:name>kwartzlab</itunes:name>
		<itunes:email>podcast@kwartzlab.ca</itunes:email>
	</itunes:owner>
	<managingEditor>podcast@kwartzlab.ca (kwartzlab)</managingEditor>
	<itunes:subtitle>A hackerspace radio show</itunes:subtitle>
	<itunes:keywords>kwartzlab, hackerspace, makerspace, diy, hardware, software, maker, hacker, artist, roundtable</itunes:keywords>
	<image>
		<title>KwartzLab Makerspace &#187; vintage computing</title>
		<url>http://www.kwartzlab.ca/wp-content/uploads/powerpress/light_box_logo.jpg</url>
		<link>http://www.kwartzlab.ca</link>
	</image>
	<itunes:category text="Technology" />
	<itunes:category text="Arts" />
	<itunes:category text="Games &amp; Hobbies">
		<itunes:category text="Hobbies" />
	</itunes:category>
		<rawvoice:location>Kitchener, ON</rawvoice:location>
		<item>
		<title>Resurrecting Moria</title>
		<link>http://www.kwartzlab.ca/2011/01/resurrecting-moria/</link>
		<comments>http://www.kwartzlab.ca/2011/01/resurrecting-moria/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 07:03:00 +0000</pubDate>
		<dc:creator>Alex W</dc:creator>
				<category><![CDATA[Member Blogs]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[vintage computing]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<p>Roguelike games are a venerable genre of computer games that have entertained hackers for roughly 30 years, and had a major influence on gaming classics like <em>Diablo</em> and <em>Torchlight</em>. Roguelikes followed a somewhat unique evolutionary path in the world of computer games. Unlike commercial games that strive to be unique in a very large ocean of predatory competitors, roguelikes are more a labour of love. Each new generation was based on the games that came before, adding a handful (or more) of features that the author felt was missing from the generation before. This layering of new features is much like the way ancient cities such as Rome have built upon themselves, century after century. In a way, playing these earlier games is like an archaeological dig, giving us a peek at the evolution of the genre.</p>

<p>It was in this spirit that I sought to compile <em>Moria</em>, one of the most popular games that made up the second generation of roguelikes.</p>

<!--more-->

<p>This is a hands-on blog posting. I will be walking through the steps I took to compile umoria 4.8.7, a Unix port of the original <em>Moria</em> from 1987. The instructions should be valid for virtually any Linux installation. You will need a copy of the <a href="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/moria487.tar.Z">source code for umoria 4.8.7</a>, which I have mirrored here.</p>

<p>First, consult the INSTALL file for the original compilation instructions. The INSTALL file indicates that config.h needs to have a line uncommented to define the system being built for, and the path to a handful of game files needs to be updated. The original file paths are</p>

<pre><code>#define MORIA_HOU  "/usrb/vopata/mm/Moria_hours"
#define MORIA_MOR  "/usrb/vopata/mm/Moria_news"
#define MORIA_MAS  "/usrb/vopata/mm/Character"
#define MORIA_TOP  "/usrb/vopata/mm/Highscores"
#define MORIA_HLP  "/usrb/vopata/mm/Helpfile"
</code></pre>

<p>I changed these, for the purposes of quickly making things work, to</p>

<pre><code>#define MORIA_HOU  "Moria_hours"
#define MORIA_MOR  "Moria_news"
#define MORIA_MAS  "Character"
#define MORIA_TOP  "Highscores"
#define MORIA_HLP  "Helpfile"

</code></pre>

<p>When it comes to uncommenting the line for the appropriate system, there obviously isn't one for Linux. The closest match would be Unix System V, so uncomment the define for SYS_V</p>

<pre><code>&#60; /* #define SYS_V */
---
&#62; #define SYS_V
</code></pre>

<p>As per the INSTALL file, run make, and check the results so far. Everything goes fine until the signals.c file.</p>

<pre><code>$ make
...
cc -O   -c -o signals.o signals.c
signals.c:32: error: conflicting types for ‘signal’
/usr/include/signal.h:101: note: previous declaration of ‘signal’ was here
signals.c: In function ‘init_signals’:
signals.c:55: error: ‘SIGEMT’ undeclared (first use in this function)
signals.c:55: error: (Each undeclared identifier is reported only once
signals.c:55: error: for each function it appears in.)
make: *** [signals.o] Error 1
</code></pre>

<p>The first error points to line 32, and a conflicting type for 'signal'. My best guess is that signal.h on old Unix systems did not actually declare a type called 'signal', leaving it up to the developers. On a Linux system, however, signal.h does have a declaration for 'signal', making this one a duplicate.</p>

<p>The second error here is that Linux doesn't have a signal for emulator trap, SIGEMT. The easiest course of action is to just comment out the whole line that refers to it. Looking at the nearby lines, there's also a reference to SIGSYS, which also doesn't exist in Linux. That line can be commented out too.</p>

<pre><code>$ make
cc -O   -c -o signals.o signals.c
signals.c: In function ‘init_signals’:
signals.c:49: warning: passing argument 2 of ‘signal’ from incompatible pointer type
/usr/include/signal.h:101: note: expected ‘__sighandler_t’ but argument is of type ‘int (*)()’
...
</code></pre>

<p>There's still something wrong in signals.c. The issue would likely be obvious to someone familiar with the differences with signal handling between Unix and Linux, but luckily for the rest of us, the comment on line 29 sheds some light on the issue. In modern (all?) Linux, signal and suspend_handler need to be declared as void instead of int. The three declarations on lines 33 to 35 need to be changed, and the three definitions on lines 67, 140, and 174 also need to be changed (And while you're here, marvel at the archaic way the return types for these functions are specified). signals.c should finally compile.</p>

<pre><code>$ make
cc -O   -c -o signals.o signals.c
cc -O   -c -o moria1.o moria1.c
moria1.c: In function ‘remove’:
moria1.c:389: error: argument ‘item_val’ doesn’t match prototype
/usr/include/stdio.h:155: error: prototype declaration
moria1.c: In function ‘unwear’:
moria1.c:498: warning: passing argument 1 of ‘remove’ makes pointer from integer without a cast
/usr/include/stdio.h:155: note: expected ‘const char *’ but argument is of type ‘int’
moria1.c: In function ‘wear’:
moria1.c:652: warning: passing argument 1 of ‘remove’ makes pointer from integer without a cast
/usr/include/stdio.h:155: note: expected ‘const char *’ but argument is of type ‘int’
make: *** [moria1.o] Error 1

</code></pre>

<p>The errors show that there's a function 'remove' defined in moria1.c. The issue is that remove is also defined in later versions of stdio.h. Since there's no namespace support in C, the fix is to rename 'remove' in moria1.c to something like 'remove_item'. There's only two calls to that function in the code (lines 498 and 652), making it a pretty quick fix.</p>

<p>And that's it. One last call to make, then the shiny new old executable can be run:</p>

<p><code>$ ./moria</code></p>

<p><img src="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/moria.png" alt="Moria, resurrected" /></p>

<p>If you'd prefer to dive right in, you can <a href="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/moria487-linux.tgz">download the updated source</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Roguelike games are a venerable genre of computer games that have entertained hackers for roughly 30 years, and had a major influence on gaming classics like <em>Diablo</em> and <em>Torchlight</em>. Roguelikes followed a somewhat unique evolutionary path in the world of computer games. Unlike commercial games that strive to be unique in a very large ocean of predatory competitors, roguelikes are more a labour of love. Each new generation was based on the games that came before, adding a handful (or more) of features that the author felt was missing from the generation before. This layering of new features is much like the way ancient cities such as Rome have built upon themselves, century after century. In a way, playing these earlier games is like an archaeological dig, giving us a peek at the evolution of the genre.</p>
<p>It was in this spirit that I sought to compile <em>Moria</em>, one of the most popular games that made up the second generation of roguelikes.</p>
<p><span id="more-472"></span></p>
<p>This is a hands-on blog posting. I will be walking through the steps I took to compile umoria 4.8.7, a Unix port of the original <em>Moria</em> from 1987. The instructions should be valid for virtually any Linux installation. You will need a copy of the <a href="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/moria487.tar.Z">source code for umoria 4.8.7</a>, which I have mirrored here.</p>
<p>First, consult the INSTALL file for the original compilation instructions. The INSTALL file indicates that config.h needs to have a line uncommented to define the system being built for, and the path to a handful of game files needs to be updated. The original file paths are</p>
<pre><code>#define MORIA_HOU  "/usrb/vopata/mm/Moria_hours"
#define MORIA_MOR  "/usrb/vopata/mm/Moria_news"
#define MORIA_MAS  "/usrb/vopata/mm/Character"
#define MORIA_TOP  "/usrb/vopata/mm/Highscores"
#define MORIA_HLP  "/usrb/vopata/mm/Helpfile"
</code></pre>
<p>I changed these, for the purposes of quickly making things work, to</p>
<pre><code>#define MORIA_HOU  "Moria_hours"
#define MORIA_MOR  "Moria_news"
#define MORIA_MAS  "Character"
#define MORIA_TOP  "Highscores"
#define MORIA_HLP  "Helpfile"

</code></pre>
<p>When it comes to uncommenting the line for the appropriate system, there obviously isn&#8217;t one for Linux. The closest match would be Unix System V, so uncomment the define for SYS_V</p>
<pre><code>&lt; /* #define SYS_V */
---
&gt; #define SYS_V
</code></pre>
<p>As per the INSTALL file, run make, and check the results so far. Everything goes fine until the signals.c file.</p>
<pre><code>$ make
...
cc -O   -c -o signals.o signals.c
signals.c:32: error: conflicting types for ‘signal’
/usr/include/signal.h:101: note: previous declaration of ‘signal’ was here
signals.c: In function ‘init_signals’:
signals.c:55: error: ‘SIGEMT’ undeclared (first use in this function)
signals.c:55: error: (Each undeclared identifier is reported only once
signals.c:55: error: for each function it appears in.)
make: *** [signals.o] Error 1
</code></pre>
<p>The first error points to line 32, and a conflicting type for &#8216;signal&#8217;. My best guess is that signal.h on old Unix systems did not actually declare a type called &#8216;signal&#8217;, leaving it up to the developers. On a Linux system, however, signal.h does have a declaration for &#8216;signal&#8217;, making this one a duplicate.</p>
<p>The second error here is that Linux doesn&#8217;t have a signal for emulator trap, SIGEMT. The easiest course of action is to just comment out the whole line that refers to it. Looking at the nearby lines, there&#8217;s also a reference to SIGSYS, which also doesn&#8217;t exist in Linux. That line can be commented out too.</p>
<pre><code>$ make
cc -O   -c -o signals.o signals.c
signals.c: In function ‘init_signals’:
signals.c:49: warning: passing argument 2 of ‘signal’ from incompatible pointer type
/usr/include/signal.h:101: note: expected ‘__sighandler_t’ but argument is of type ‘int (*)()’
...
</code></pre>
<p>There&#8217;s still something wrong in signals.c. The issue would likely be obvious to someone familiar with the differences with signal handling between Unix and Linux, but luckily for the rest of us, the comment on line 29 sheds some light on the issue. In modern (all?) Linux, signal and suspend_handler need to be declared as void instead of int. The three declarations on lines 33 to 35 need to be changed, and the three definitions on lines 67, 140, and 174 also need to be changed (And while you&#8217;re here, marvel at the archaic way the return types for these functions are specified). signals.c should finally compile.</p>
<pre><code>$ make
cc -O   -c -o signals.o signals.c
cc -O   -c -o moria1.o moria1.c
moria1.c: In function ‘remove’:
moria1.c:389: error: argument ‘item_val’ doesn’t match prototype
/usr/include/stdio.h:155: error: prototype declaration
moria1.c: In function ‘unwear’:
moria1.c:498: warning: passing argument 1 of ‘remove’ makes pointer from integer without a cast
/usr/include/stdio.h:155: note: expected ‘const char *’ but argument is of type ‘int’
moria1.c: In function ‘wear’:
moria1.c:652: warning: passing argument 1 of ‘remove’ makes pointer from integer without a cast
/usr/include/stdio.h:155: note: expected ‘const char *’ but argument is of type ‘int’
make: *** [moria1.o] Error 1

</code></pre>
<p>The errors show that there&#8217;s a function &#8216;remove&#8217; defined in moria1.c. The issue is that remove is also defined in later versions of stdio.h. Since there&#8217;s no namespace support in C, the fix is to rename &#8216;remove&#8217; in moria1.c to something like &#8216;remove_item&#8217;. There&#8217;s only two calls to that function in the code (lines 498 and 652), making it a pretty quick fix.</p>
<p>And that&#8217;s it. One last call to make, then the shiny new old executable can be run:</p>
<p><code>$ ./moria</code></p>
<p><img src="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/moria.png" alt="Moria, resurrected" /></p>
<p>If you&#8217;d prefer to dive right in, you can <a href="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/moria487-linux.tgz">download the updated source</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kwartzlab.ca/2011/01/resurrecting-moria/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Turbo OutRun Control Repairs</title>
		<link>http://www.kwartzlab.ca/2010/01/turbo-outrun-control-repairs/</link>
		<comments>http://www.kwartzlab.ca/2010/01/turbo-outrun-control-repairs/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 07:44:28 +0000</pubDate>
		<dc:creator>Alex W</dc:creator>
				<category><![CDATA[Member Blogs]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[vintage computing]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<p><!--more-->
<img src="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/outrun/outrun_off.jpg" alt="Turbo OutRun Cabinet" /></p>

<p>This beautiful arcade cabinet sat exposed to the elements in a back alley in Kitchener for months before being rescued by a team from Kwartzlab. The weather was not kind to this poor machine, and it was clear it would need some love to get it running again.</p>

<p>Surprisingly, all the electronics in the unit are in decent shape. I plugged it in though a <a href="http://www.repairfaq.org/REPAIR/F_tshoot.html#TSHOOT_026">series lightbulb rig</a> (unfortunately we don't have an isolation transformer and variac in the lab) and let it warm up for a few minutes. I plugged it directly into the mains after that and it powered up perfectly.</p>

<p>There were a few problems with the controls on the unit. The steering wheel was "crooked," so that I needed to tilt the wheel 30 degrees clockwise to get the car to travel straight. There also seemed to be a problem with the 2-speed stick shift - it would register being in the high or low position, but it wouldn't lock into low.</p>

<p><img src="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/outrun/controls_rear.jpg" alt="OutRun controls from the inside" /></p>

<p>The game's controls, from behind. The steering wheel drives the two large gears in the middle, with a potentiometer attached to the lower gear and the wheel itself on the upper gear. To the left is the button for the turbo, and the stick shifter.</p>

<p>Straightening out the wheel was a simple matter. Bevan tiled the wheel so that the pot was centred, then I removed the drive gear, straightened the wheel, and replaced the gear. It's not quite perfect, but it's good enough.</p>

<p><img src="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/outrun/shifter.jpg" alt="Turbo OutRun stick shift" /></p>

<p>The shifter unit removed for repair.</p>

<p>It was clear after removal that there was a spring that needed replacing to make the shifter lock into low gear. The tension spring sticking out from the bottom of the shifter unit was a red herring - the real broken spring was inside the shifter, and pushed a metal piston against the metal rocker on the left side of the unit. Thanks to Matt for his keen eye there!</p>

<p>The repair seemed to be stalled there for the night. Without a replacement spring there would be no point reassembling everything. Don the E-Waste Guy came though for us though, and dug out a box of various compression springs. We found one that worked well enough, and reassembled the unit under the watchful supervision of Chris.</p>

<p><img src="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/outrun/outrun_on.jpg" alt="Chris testing the repaired OutRun game" /></p>

<p>Chris took the repaired unit for a spin once it was assembled. The shifter is working great!</p>

<!-- Images -->
]]></description>
				<content:encoded><![CDATA[<p><span id="more-264"></span><br />
<img src="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/outrun/outrun_off.jpg" alt="Turbo OutRun Cabinet" /></p>
<p>This beautiful arcade cabinet sat exposed to the elements in a back alley in Kitchener for months before being rescued by a team from Kwartzlab. The weather was not kind to this poor machine, and it was clear it would need some love to get it running again.</p>
<p>Surprisingly, all the electronics in the unit are in decent shape. I plugged it in though a <a href="http://www.repairfaq.org/REPAIR/F_tshoot.html#TSHOOT_026">series lightbulb rig</a> (unfortunately we don&#8217;t have an isolation transformer and variac in the lab) and let it warm up for a few minutes. I plugged it directly into the mains after that and it powered up perfectly.</p>
<p>There were a few problems with the controls on the unit. The steering wheel was &#8220;crooked,&#8221; so that I needed to tilt the wheel 30 degrees clockwise to get the car to travel straight. There also seemed to be a problem with the 2-speed stick shift &#8211; it would register being in the high or low position, but it wouldn&#8217;t lock into low.</p>
<p><img src="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/outrun/controls_rear.jpg" alt="OutRun controls from the inside" /></p>
<p>The game&#8217;s controls, from behind. The steering wheel drives the two large gears in the middle, with a potentiometer attached to the lower gear and the wheel itself on the upper gear. To the left is the button for the turbo, and the stick shifter.</p>
<p>Straightening out the wheel was a simple matter. Bevan tiled the wheel so that the pot was centred, then I removed the drive gear, straightened the wheel, and replaced the gear. It&#8217;s not quite perfect, but it&#8217;s good enough.</p>
<p><img src="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/outrun/shifter.jpg" alt="Turbo OutRun stick shift" /></p>
<p>The shifter unit removed for repair.</p>
<p>It was clear after removal that there was a spring that needed replacing to make the shifter lock into low gear. The tension spring sticking out from the bottom of the shifter unit was a red herring &#8211; the real broken spring was inside the shifter, and pushed a metal piston against the metal rocker on the left side of the unit. Thanks to Matt for his keen eye there!</p>
<p>The repair seemed to be stalled there for the night. Without a replacement spring there would be no point reassembling everything. Don the E-Waste Guy came though for us though, and dug out a box of various compression springs. We found one that worked well enough, and reassembled the unit under the watchful supervision of Chris.</p>
<p><img src="http://www.eng.uwaterloo.ca/~mawillia/kwartzlab/outrun/outrun_on.jpg" alt="Chris testing the repaired OutRun game" /></p>
<p>Chris took the repaired unit for a spin once it was assembled. The shifter is working great!</p>
<p><!-- Images --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kwartzlab.ca/2010/01/turbo-outrun-control-repairs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
