<?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>Big Mess o&#039; Wires</title>
	<atom:link href="http://www.bigmessowires.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bigmessowires.com</link>
	<description>A home-built CPU, and other messy electronics adventures</description>
	<lastBuildDate>Thu, 06 Jun 2013 14:19:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Backwoods Logger Battery Life</title>
		<link>http://www.bigmessowires.com/2013/06/06/backwoods-logger-battery-life/</link>
		<comments>http://www.bigmessowires.com/2013/06/06/backwoods-logger-battery-life/#comments</comments>
		<pubDate>Thu, 06 Jun 2013 14:19:08 +0000</pubDate>
		<dc:creator>Steve Chamberlin</dc:creator>
				<category><![CDATA[Backwoods Logger]]></category>

		<guid isPermaLink="false">http://www.bigmessowires.com/?p=821</guid>
		<description><![CDATA[I finally had to replace the CR2032 battery in my Backwoods Logger Classic yesterday. The nominal 3.0V voltage had fallen to about 2.7V, and while the software appeared to be functioning, the LCD display no longer worked reliably. The battery was new in June 2011 when I built the first Logger prototype, so that&#8217;s two [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="/logger_langley2.jpg" alt="" width="500" height="365" /></p>
<p>I finally had to replace the CR2032 battery in my Backwoods Logger Classic yesterday. The nominal 3.0V voltage had fallen to about 2.7V, and while the software appeared to be functioning, the LCD display no longer worked reliably. The battery was new in June 2011 when I built the first Logger prototype, so that&#8217;s two years of battery life while doing continuous logging the whole time! In a <a href="http://www.bigmessowires.com/2011/05/20/micropower-data-collection/">post back then</a>, I measured the average current draw at around 20 uA and estimated a battery life of &#8220;more than a year&#8221;, which proved to be pretty accurate.</p>
<p>The Logger Mini is more of a battery hog due to its OLED display &#8211; its AAA battery will last for several months of continuous logging. So the Classic is still king when it comes to long-term data collection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigmessowires.com/2013/06/06/backwoods-logger-battery-life/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>400K Floppy Support</title>
		<link>http://www.bigmessowires.com/2013/01/07/400k-floppy-support/</link>
		<comments>http://www.bigmessowires.com/2013/01/07/400k-floppy-support/#comments</comments>
		<pubDate>Tue, 08 Jan 2013 06:31:27 +0000</pubDate>
		<dc:creator>Steve Chamberlin</dc:creator>
				<category><![CDATA[Macintosh Floppy Emu]]></category>

		<guid isPermaLink="false">http://www.bigmessowires.com/?p=819</guid>
		<description><![CDATA[I&#8217;ve added 400K floppy support to Floppy Emu, so now you can boot up System 1.1. The fix took all of fives minutes, so why didn&#8217;t I do this ages ago? Grab the latest Floppy Emu file archive for the new software.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve added 400K floppy support to Floppy Emu, so now you can boot up System 1.1. The fix took all of fives minutes, so why didn&#8217;t I do this ages ago? Grab the latest <a href="/floppyemu.zip">Floppy Emu file archive</a> for the new software.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigmessowires.com/2013/01/07/400k-floppy-support/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Raspberry Pi</title>
		<link>http://www.bigmessowires.com/2013/01/04/raspberry-pi/</link>
		<comments>http://www.bigmessowires.com/2013/01/04/raspberry-pi/#comments</comments>
		<pubDate>Sat, 05 Jan 2013 05:52:54 +0000</pubDate>
		<dc:creator>Steve Chamberlin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bigmessowires.com/?p=816</guid>
		<description><![CDATA[A friend from work gifted me a Raspberry Pi Model B. I was generally familiar with the RPi, but hadn&#8217;t had a chance to look at it in detail before now. The specs are impressive: a 700MHz 32-bit ARM CPU, 256MB RAM, USB, audio, composite video, HDMI video, and SD card support. It&#8217;s also got [...]]]></description>
			<content:encoded><![CDATA[<p>A friend from work gifted me a Raspberry Pi Model B. I was generally familiar with the RPi, but hadn&#8217;t had a chance to look at it in detail before now. The specs are impressive: a 700MHz 32-bit ARM CPU, 256MB RAM, USB, audio, composite video, HDMI video, and SD card support. It&#8217;s also got GPIO headers as well as headers for I2C and SPI, so you can interface it with various sensors and other external elements.</p>
<p>The Raspberry Pi has proven to be extremely popular since its release, and appears to have made major inroads among the Arduino community. But the further I looked into it, the more confused I became about who this product was intended for. Perhaps the hardware specs are a little <strong>too</strong> good: it&#8217;s nearly the equivalent of a standard Linux PC from 10 years ago. That&#8217;s an amazing thing to fit onto a tiny board that costs $35, but is it fun to use?</p>
<p>What I enjoy most about my projects is interfacing with hardware at a very low-level. I get a kick out of bit-banging video, replicating retro electronics, and interfacing with odd hardware with specific timing requirements. I don&#8217;t really want to run X-Windows on my embedded project, or use it as a development IDE platform. When it comes to digital bit-twiddling, the lowly Arduino still has more GPIOs, and offers real-time control of the IO pins. The RPi can&#8217;t really match that, running garbage-collected Python programs on top of a multi-tasking Linux kernel.</p>
<p>If you&#8217;ve got a Raspberry Pi and found it useful, what kind of projects did you use it for, and how do you see the RPi&#8217;s strengths and weaknesses in comparison to other embedded hardware?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigmessowires.com/2013/01/04/raspberry-pi/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Floppy Emu Disk Menu</title>
		<link>http://www.bigmessowires.com/2012/12/23/floppy-emu-disk-menu/</link>
		<comments>http://www.bigmessowires.com/2012/12/23/floppy-emu-disk-menu/#comments</comments>
		<pubDate>Sun, 23 Dec 2012 20:18:00 +0000</pubDate>
		<dc:creator>Steve Chamberlin</dc:creator>
				<category><![CDATA[Macintosh Floppy Emu]]></category>

		<guid isPermaLink="false">http://www.bigmessowires.com/?p=806</guid>
		<description><![CDATA[I finally got around to building a proper floppy disk image selection menu. Instead of loading a hard-coded rfloppy.dsk disk image file from the SD card, Floppy Emu now scans the SD card for all files with a .dsk extension, and displays a menu of available disk image files. The PREV/NEXT buttons navigate the menu, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="/floppy-selectdisk.jpg" alt="" width="500" height="253" /></p>
<p>I finally got around to building a proper floppy disk image selection menu. Instead of loading a hard-coded <em>rfloppy.dsk </em>disk image file from the SD card, Floppy Emu now scans the SD card for all files with a <em>.dsk</em> extension, and displays a menu of available disk image files. The PREV/NEXT buttons navigate the menu, and the SELECT button inserts the selected disk image into the virtual floppy drive.</p>
<p><img class="alignnone" src="/floppy-diskin.jpg" alt="" width="499" height="225" /></p>
<p>When a disk image is inserted, the LCD displays the name of the Macintosh volume that&#8217;s inside the disk image &#8211; &#8220;System Tools&#8221; in the example above. It also shows the current track and side being accessed. For write operations, the LCD displays the track, side, and sector that was written, as well as the time required for the write.</p>
<p>Download the <a href="/floppyemu.zip">Floppy Emu file archive</a> for the new firmware.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigmessowires.com/2012/12/23/floppy-emu-disk-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build Your Own Floppy Emu</title>
		<link>http://www.bigmessowires.com/2012/12/15/build-your-own-floppy-emu/</link>
		<comments>http://www.bigmessowires.com/2012/12/15/build-your-own-floppy-emu/#comments</comments>
		<pubDate>Sun, 16 Dec 2012 07:28:01 +0000</pubDate>
		<dc:creator>Steve Chamberlin</dc:creator>
				<category><![CDATA[Macintosh Floppy Emu]]></category>

		<guid isPermaLink="false">http://www.bigmessowires.com/?p=792</guid>
		<description><![CDATA[Over the past several months, many people have written to me about the Macintosh Floppy Emu, asking if they could buy one, or when the project would be finished. Since I haven&#8217;t made any progress on Floppy Emu in ages, I&#8217;m doing the next best thing and releasing the design files and build instructions to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="/flopemu1.jpg" alt="" width="500" height="369" /></p>
<p>Over the past several months, many people have written to me about the Macintosh Floppy Emu, asking if they could buy one, or when the project would be finished. Since I haven&#8217;t made any progress on Floppy Emu in ages, I&#8217;m doing the next best thing and releasing the design files and build instructions to the community. If you&#8217;re skilled with a soldering iron and embedded development tools, you can use these to build your own Floppy Emu, or improve upon its design.</p>
<p>Warning! Building a Floppy Emu requires advanced soldering skills. Almost all the parts are surface mounted, and there are several SMD chips with fine-pitch 0.5 mm pin spacing. These <em>can </em>be soldered by hand, but it&#8217;s tedious, error-prone work. If you&#8217;ve never done this type of soldering before, think hard before starting this project. Now with that out of the way, let&#8217;s get started!</p>
<p>Download the <a href="/floppyemu.zip">Floppy Emu design file archive</a></p>
<p><strong>What You&#8217;ll Need</strong></p>
<ul>
<li>A Windows PC</li>
<li>AVR Studio 5 software from Atmel. This is free software. <a href="http://www.atmel.com/tools/atmelstudio.aspx">AVR Studio 6</a> probably works too, but I haven&#8217;t tried it. <a href="http://www.nongnu.org/avrdude/">AVRDUDE </a>should work as well.</li>
<li>An AVR programmer, such as the AVRISP mkII</li>
<li>A high-speed class 10 SD or SDHC card</li>
<li>Soldering iron</li>
<li>Patience</li>
</ul>
<p><img class="alignnone" src="/floppy-emu-hand.jpg" alt="" width="500" height="375" /></p>
<p><strong>Making a PCB</strong></p>
<p>To begin building your Floppy Emu, you&#8217;ll need a printed circuit board. There are many on-line services that will make these for you, using a set of layout files called Gerbers. You will find the Floppy Emu Gerbers in the file archive, in the directory <em>eagle\floppyemu\gerbers.zip</em>. I recommend using the <a href="http://dorkbotpdx.org/wiki/pcb_order">Dorkbot PDX PCB Order</a> service to get the PCB manufactured. Send them the Gerber files, and they&#8217;ll make three copies of the PCB for about $30, with a turn-around time of a few weeks. The guy who runs the PCB service is very helpful if you have questions.</p>
<p><strong>Getting the Parts</strong></p>
<p>While you&#8217;re waiting for the PCB to be manufactured, you can locate all the other parts you&#8217;ll need to assemble the Floppy Emu. You&#8217;ll find a complete parts list in the file archive. The total parts cost should be about $40, which is dominated by the AVR microcontroller and the Xilinx CPLD.</p>
<p>One of the required parts is a male DB-19 connector, which mates with the Mac&#8217;s external floppy port. These can be very difficult to find, and <a href="http://www.iec-usa.com/cgi-bin/iec/fullpic?G2FS4qvh;DB19MS;41">IEC</a> is the only supplier I know that has them. If you can&#8217;t find a DB-19 solder type connector, you can still use the Floppy Emu with its alternate IDC20 connector, which is readily available from electronics suppliers. With the IDC20, there are several different connection options:</p>
<ul>
<li>Connect the IDC20 to the internal floppy connector inside your Mac (you will need an IDC20 cable)</li>
<li>Connect the IDC20 to the circuitry inside a real external Apple floppy drive enclosure, after removing the drive guts</li>
<li>Use an Apple II <a href="http://www.iec-usa.com/cgi-bin/iec/fullpic?ezV2CFGH;L1561;6">DB-19 to IDC20 cable</a></li>
</ul>
<p>If you don&#8217;t already have them, you&#8217;ll also need a high speed class 10 SD or SDHC card, and an AVR programmer like the AVRISP mkII.</p>
<p><img class="alignnone" src="/flopemu3.jpg" alt="" width="500" height="375" /></p>
<p><strong>Assembly</strong></p>
<p>Here&#8217;s where things get fun! Refer to the file <em>floppy-emu-layout.png</em> for placement information, or check the schematics.</p>
<p>The first step is to solder and test the AVR.</p>
<ol>
<li>Solder the AVR. Pay attention to the orientation &#8211; the dot in the corner of the chip should match the dot on the silkscreen. I recommend using the drag solder technique. Begin by soldering two pins on opposite corners of the chip to tack it in place. Verify that the pins are perfectly aligned with the pads on the board before proceeding. Now goob an absurd amount of solder onto the remaining pins. You will probably bridge most of the pins together &#8211; that&#8217;s OK. Finally, go back with a solder wick and flux, and wick away all the excess solder. Surface tension will hold the solder onto the pins and pads where it belongs, while the excess is magically wicked away. Use a 10x jeweler&#8217;s loupe to visually inspect the pins for tiny bridges or gaps.</li>
<li>Solder the crystal, the 18pF capacitors C12-C13, the AVR decoupling capacitors C4-C7 (these are on the back of the board), the voltage regulator, and the regulator capacitors C10-C11. Also solder the DB-19 connector. It fits along the edge of the board, with the thickness of the board fitting between the two rows of solder cups.</li>
</ol>
<p>The AVR microcontroller should now be functional. You can use AVR Studio to test it out.</p>
<ol>
<li>Install the AVR Studio 5 software on your PC and run it.</li>
<li>Connect the Floppy Emu board to your Mac, and turn on the Mac.</li>
<li>Connect the AVRISP mkII programmer to your PC.</li>
<li>Press the ISP connector into the board, but do not solder it yet. If it is soldered too soon, it will be in the way of your iron later.</li>
<li>Connect the AVRISP&#8217;s programming cable to the ISP connector on the board.</li>
<li>Click on the AVR Programming button in the toolbar. It looks like a chip with a lightning bolt.</li>
<li>In the programming dialog, set Tool to AVRISP mkII, Device to ATmega1284P, and Interface to ISP</li>
<li>Click the Apply button</li>
<li>Where it says Device ID at the top, click the Read button. Push the ISP connector firmly sideways while you do this, to ensure its pins make electrical contact with the board.</li>
</ol>
<p>If everything is working, the Device ID field should now display 0x1E 0&#215;97 0&#215;05. If it does not, or you encounter an error, review the steps above, then go back and carefully re-check all the solder connections. Do not proceed further until you are able to retrieve the AVR device ID.</p>
<p>The next step is to program the AVR with the Floppy Emu software.</p>
<ol>
<li>Open the AVR Programming dialog again.</li>
<li>From the list at the left, click Fuses to display fuse information.</li>
<li>Set the fuses:
<ul>
<li>BODLEVEL &#8211; disabled</li>
<li>OCDEN &#8211; off</li>
<li>JTAGEN &#8211; off</li>
<li>SPIEN &#8211; on</li>
<li>WDTON &#8211; off</li>
<li>EESAVE &#8211; off</li>
<li>BOOTSZ &#8211; 4096W_F000</li>
<li>BOOTRST &#8211; off</li>
<li>CKDIV8 &#8211; off</li>
<li>CKOUT &#8211; on</li>
<li>SUT_CKSEL &#8211; EXTXOSC_8MHz_XX_16KCK_65MS</li>
</ul>
</li>
<li>Click the Program button in the fuse panel. Push against the ISP connector with your finger while you do this.</li>
<li>From the list at the left, click on Memories to display AVR memory information</li>
<li>Under Flash, verify that &#8220;Erase device before programming&#8221; is checked</li>
<li>For the Flash filename, choose <em>AVR\release\floppyemu.hex</em> from the file archive</li>
<li>Under Flash, click the Program button. Push against the ISP connector with your finger while you do this.</li>
<li>Remove the ISP connector from the board.</li>
</ol>
<p>Congratulations, the AVR setup is now complete! The next step is the Nokia LCD.</p>
<ol>
<li>Solder the level converter (the 74LVC244), its decoupling capacitor C8, and the 10K resistor R4.</li>
<li>Solder the two 8-pin male 0.1 inch headers to the Nokia LCD.</li>
<li>Solder the top 8-pin female 0.1 inch header to the board. Place the bottom header in the board, but do not solder it yet.</li>
<li>Connect the LCD to the Floppy Emu board. The thicker part of the LCD bezel should be at the top.</li>
</ol>
<p>The LCD should now be functional. Connect the Floppy Emu to your Mac, and turn the Mac on. If everything is working, the LCD should show &#8220;SD Card init error&#8221;.</p>
<p>The SD card reader is next.</p>
<ol>
<li>Solder the SD connector, and its decoupling capacitor C9.</li>
<li>Insert the SD card into your PC.</li>
<li>Format the SD card as a FAT32 disk.</li>
<li>Copy all the files from the <em>SD files</em> directory in the file archive onto the SD card. Don&#8217;t copy the directory itself, only the files that are in it.</li>
<li>Put the SD card into the Floppy Emu.</li>
</ol>
<p>Connect the Floppy Emu to you Mac, and turn the Mac on. If everything is working, the LCD should show &#8220;no disk 79/0&#8243;.</p>
<p>The final assembly step is the CPLD.</p>
<ol>
<li>Solder the CPLD. Pay attention to the orientation &#8211; the dot in the corner of the chip should match the dot on the silkscreen. Use the same technique for soldering the CPLD that you used for the AVR.</li>
<li>Solder the CPLD&#8217;s decoupling capacitors, C1-C3. These are on the back of the board.</li>
<li>Solder the LEDs and their resistors, R1-R3. The silkscreen shows the proper orientation for the LEDs.</li>
<li>Solder the four tactile switches.</li>
<li>Solder the remaining connectors into place.</li>
</ol>
<p>Now it&#8217;s time to program the CPLD. The unfilled JTAG header footprint on the board could be used to program it directly with a Xilinx programmer, but it&#8217;s not used by this version of Floppy Emu. Instead, the AVR programs the CPLD indirectly, using a firmware file stored on the SD card.</p>
<ol>
<li>Ensure the file <em>firmware.xvf</em> is on the SD card. This is part of the SD files collection that you should have copied to the card earlier.</li>
<li>Put the SD card into the Floppy Emu.</li>
<li>While your Mac is turned off, connect the Floppy Emu to the Mac.</li>
<li>Hold down both the PREV and NEXT buttons, then turn on the Mac.</li>
<li>Follow the instructions on the LCD to load the firmware file to the CPLD.</li>
</ol>
<p>That&#8217;s it! Turn the Mac off, then on once more, and you&#8217;re done.</p>
<p><img class="alignnone" src="/floppy-diskin.jpg" alt="" width="499" height="225" /></p>
<p><strong>Using the Floppy Emu</strong></p>
<p>When it&#8217;s turned on, the Floppy Emu scans the root of the SD card for files with a<em> .dsk </em>extension, and shows a menu of available disk images. It begins with the disk &#8220;out of the drive&#8221;. Use the PREV/NEXT buttons to select a disk image file, then press the SELECT button to insert it. After the disk is inserted, the LCD display shows the current track number and side of the emulated disk drive head.</p>
<p>You can use other floppy image files in addition to the ones included in the archive &#8211; just copy them onto the SD card. The Floppy Emu expects raw 400K or 800K disk images without any headers or other information, so a disk image file should be exactly 409,600 or 819,200 bytes. If you have some 400K or 800K disk images that you&#8217;ve been using with Mini vMac or another Macintosh emulator, they should work with Floppy Emu as well. Only 400K and 800K disk image files are supported &#8211; 1.4MB images will not work.</p>
<p>With a high-speed class 10 SD card, all your standard read and write operations to the floppy will work, just as if it were a real external floppy disk. You can boot the computer, save documents from MacPaint, or copy files in the Finder. Read operations will also work OK with a slower SD card, but write operations may fail.</p>
<p>Formatting or initializing the floppy in the Finder is<strong> not supported</strong> on any type of SD card, and will fail. If you need a blank disk image file, create one using a Macintosh emulator program and then copy it to the SD card. Certain kinds of bulk transfer write operations are also unsupported, such as using a disk copy program to copy data to the floppy.</p>
<p><img class="alignnone" src="/floppy-emu-layout-500.png" alt="" width="500" height="208" /></p>
<p><strong>Extending Floppy Emu</strong></p>
<p>The C source code for the microcontroller program is provided in the file archive. You can build it with AVR Studio, generate a new <em>floppyemu.hex</em> file, and load it to the microcontroller using the AVRISP mkII.</p>
<p>For the ambitious, the ATMEGA1284P microcontroller that&#8217;s used here has much more RAM than is needed by the current program. It could be used to implement some kind of sector buffering scheme, which could enable slower SD cards to support writes reliably, and all cards to support formatting and disk copying.</p>
<p>The Verilog source code for the CPLD is also provided. You&#8217;ll need Xilinx&#8217;s free <a href="http://www.xilinx.com/products/design-tools/ise-design-suite/ise-webpack.htm">ISE WebPACK</a> to build it. Export an XSVF file, and rename it to <em>firmware.xvf</em>. Then copy the file to the SD card, and load it onto the CPLD as you did before. I&#8217;m not sure why you&#8217;d need to change the CPLD design, but maybe you&#8217;ll find a reason.</p>
<p>The <a href="http://www.cadsoftusa.com/download-eagle/?language=en">CadSoft EAGLE</a> schematics and board files are included in the file archive too, for anyone who wants to experiment with changing the hardware design. You can use the freeware version of EAGLE.</p>
<p>Happy hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigmessowires.com/2012/12/15/build-your-own-floppy-emu/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Plus Too Files</title>
		<link>http://www.bigmessowires.com/2012/12/15/plus-too-files/</link>
		<comments>http://www.bigmessowires.com/2012/12/15/plus-too-files/#comments</comments>
		<pubDate>Sat, 15 Dec 2012 23:28:16 +0000</pubDate>
		<dc:creator>Steve Chamberlin</dc:creator>
				<category><![CDATA[Plus Too]]></category>

		<guid isPermaLink="false">http://www.bigmessowires.com/?p=786</guid>
		<description><![CDATA[Since the Plus Too project hasn&#8217;t seen any progress in a year, I&#8217;m posting all the design files in the hopes that someone else may want to build on what I&#8217;ve done. If you missed the earlier discussions about it, Plus Too is a working replica of a Macintosh Plus, implemented in an FPGA. Download [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="/aboutfinder_sm.jpg" alt="" width="500" height="373" /></p>
<p>Since the Plus Too project hasn&#8217;t seen any progress in a year, I&#8217;m posting all the design files in the hopes that someone else may want to build on what I&#8217;ve done. If you missed the earlier discussions about it, Plus Too is a working replica of a Macintosh Plus, implemented in an FPGA.</p>
<p>Download the <a href="/plustoo.zip">Plus Too file archive</a></p>
<p><strong>What You&#8217;ll Need</strong></p>
<ul>
<li>An <a href="http://www.altera.com/education/univ/materials/boards/de1/unv-de1-board.html">Altera DE1</a> FPGA development board</li>
<li>A Windows-based PC</li>
<li>An old PS/2 mouse from a PC (newer USB-based mice won&#8217;t work)</li>
<li>A VGA monitor capable of displaying 1024 x 768 @ 60Hz</li>
</ul>
<p><img class="alignnone" src="/de1-top.png" alt="" width="276" height="282" /></p>
<p><strong>Setup Instructions</strong></p>
<ol>
<li>Download the Control Panel configuration file <em>DE1_USB_API.sof</em> into the FPGA. This file is included on the CD that comes with the DE1 kit. See sections 3.1 and 4.1 of the DE1 user manual for help.</li>
<li>Run the <em>DE1_Control_Panel.exe</em> program on your PC. This is also included on the DE1 CD.</li>
<li>Click on the Flash tab.</li>
<li>Click the Chip Erase button to clear the DE1 Flash memory.</li>
<li>In the Sequential Write section, enter 0 for the address and click the File Length checkbox.</li>
<li>Click the Write a File to Flash button. When prompted, select the <em>plusrom.bin</em> file from the Plus Too archive, and write the file to the DE1 memory. This is a ROM dump from Macintosh Plus.</li>
<li>In the Sequential Write section, enter 20000 (hex) for the address. Confirm the File Length checkbox is still checked.</li>
<li>Click the Write a File to Flash button. When prompted, select the <em>Disk608-800K.bin</em> file from the Plus Too archive, and write the file to the DE1 memory. This is a System 6.0.8 boot disk image.</li>
<li>Download the Plus Too configuration file <em>plusToo_top.sof</em> into the FPGA. This is included in the Plus Too archive.</li>
</ol>
<p>You should now be up and running! Connect a PS/2 mouse and a VGA monitor for some retro-computing fun.</p>
<p><img class="alignnone" src="/plustoo_sm.jpg" alt="" width="500" height="373" /></p>
<p><strong>Using Plus Too</strong></p>
<p>There&#8217;s no support for the keyboard, sound, or SCSI. The floppy disk is read-only.</p>
<p>Watch out! There&#8217;s a bug somewhere that causes PlusToo to crash or the mouse to stop working (not sure which) if you move the mouse around too much or too fast. I&#8217;m still not sure what the cause is, but I wrote about it more in a <a href="http://www.bigmessowires.com/2012/01/24/mouse-freeze-debugging/">previous post</a>.</p>
<p>Along the bottom of the screen you&#8217;ll see some debug information, shown in green text. From left to right, these are:</p>
<ul>
<li>A &#8211; the current value on the address bus</li>
<li>D1 &#8211; the incoming value from the data bus</li>
<li>D0 &#8211; the outgoing value from the data bus</li>
<li>(not labeled) &#8211; the current interrupt level</li>
<li>AA &#8211; the previous value of the address bus</li>
<li>B &#8211; the breakpoint address</li>
</ul>
<p>You can set the breakpoint address using the DE1 switches. When the current address equals the breakpoint address, Plus Too will halt.</p>
<p>The hardware can be controlled using the four push-button switches on the DE1 board, which are labeled Key0 through Key3, as well as the 10 slide switches labeled SW0 through SW9.</p>
<ul>
<li>Key2 inserts a blank disk into the external drive. Useful for debugging only.</li>
<li>Key1 inserts the System 6.0.8 disk into the internal drive.</li>
<li>Key0+Key1 together perform a reset.</li>
<li>SW0 selects between free-running (switch down) and single-step mode (switch up).</li>
<li>When in single-step mode:
<ul>
<li>Key0 performs a step</li>
<li>Key1, Key2, and Key3 load the low, middle, and high bytes of the breakpoint address from switches SW9-SW2.</li>
</ul>
</li>
</ul>
<p><img class="alignnone" src="/800k-floppies.jpg" alt="" width="318" height="159" /></p>
<p><strong>Making Floppy Disk Images</strong></p>
<p>The <em>Disk608-800.bin</em> file is not a standard floppy disk image file such as you would use with a Mac emulator like Mini vMac or Basilisk II. It&#8217;s an encoded file containing data exactly as it would appear on a real floppy disk, complete with sector markers, checksums, and inter-sector timing gaps.</p>
<p>If you want to take an 800K floppy image from your favorite emulator and use it with Plus Too, you&#8217;ll need to encode it using my <a href="\FloppyEncoder.zip">Floppy Encoder</a> utility. It takes a normal floppy image file as input, which usually has a .dsk filename extension, and generates an encoded image file with a .bin extension. The resulting .bin file can then be substituted in step 8 of the setup instructions to run Plus Too with the new floppy image.</p>
<p><img class="alignnone" src="/via-verilog.png" alt="" width="473" height="201" /></p>
<p><strong>Extending Plus Too</strong></p>
<p>The Verilog source files are included in the file archive, for anyone who wants to try taking the project further. The biggest thing it needs now is for someone to set up proper timing constraints. I played around with it a bit, but I didn&#8217;t really understand the constraint editor and was eager to move on. PlusToo mostly works without specifying any constraints, but sometimes it will randomly fail to boot up, or exhibit bizarre video bugs. I&#8217;ve found that changing the number of signals and sample depth of the Signal Tap logic analyzer setup can fairly predictably make such problems appear and disappear.</p>
<p>The constraints should be:</p>
<ul>
<li>External 50 MHz clock</li>
<li>Internal 32.5 MHz clock synthesized with a PLL. This is the video clock, called clk32 in the Verilog source.</li>
<li>Internal 8.125 MHz clock named clk8, derived from clk32 with a clock divider. (I couldn&#8217;t make this work with a PLL)</li>
<li>Flash ROM has an address-to-data delay of 70ns. The total delay from clk8 to when all the Flash control and address lines are stable, plus 70 ns, plus whatever the setup time is for the FPGA registers that will receive the Flash data (how do you determine this?), must be less than the clock period of 123ns.</li>
<li>Similarly for the SRAM, except I believe its address-to-data delay is 10ns (check datasheet). The SRAM should also have additional constraints for write timing.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigmessowires.com/2012/12/15/plus-too-files/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
