<?xml version="1.0"?>

<rss version="2.0">
  <channel>
    <title>The Gentleman Loser</title>
    <link>http://www.vitaphone.net/weblog/geek/hpc/</link>
    <description>Nothing here.</description>
    <language>en</language>

    <lastBuildDate>Wed, 21 May 2008 00:55:00 -0500</lastBuildDate>

    <item>
      <title>Path Change</title>
      <link>http://www.vitaphone.net/weblog/geek/hpc/path-change.html</link>
      <description>&lt;p&gt;The path to the HTML and RSS versions of the weblog has changed.
Any URLs like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;www.vitaphone.net/weblog/geek/retro2007/foo...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Are now:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;www.vitaphone.net/weblog/geek/hpc/foo...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Everything should re-direct automatically, but if anyone's still reading
this, you might want to change your bookmarks or feed URLs.&lt;/p&gt;
</description>
      <author>Aaron Hall &lt;ahall@vitaphone.net&gt;</author>
      <category>/geek/hpc</category>
      <pubDate>Wed, 21 May 2008 00:55:00 -0500</pubDate>
      <guid isPermaLink="false">/geek/hpc/path-change</guid>
    </item>

    <item>
      <title>Progress (or lack thereof)</title>
      <link>http://www.vitaphone.net/weblog/geek/hpc/progress_2008-05-21.html</link>
      <description>&lt;p&gt;The last update to &lt;a href=&quot;/hpc/&quot;&gt;HappyPlusClock&lt;/a&gt; was in January, and the last
update to this blog was in November. I &lt;em&gt;have&lt;/em&gt; been working since then,
however, and I hope to have version 1.0 out before long. Why am I not done
yet?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;I re-wrote the compositor code (that is, the code that makes sure all the
bits (clock, toolbar, date, etc.) get drawn in the correct order at the
correct time. It's much cleaner now, but a little slower than it should
be. Once it's up to speed, I'm practically done with 1.0.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;My dev box (a platinum Power Mac G3 desktop) is being cranky and hasn't
powered on in two weeks. It's been flaky ever since I put a USB card in
it, but I still hope to bring it around.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I broke off for a while and wrote a video test pattern utility
because my Plus's video wasn't square, so the analog clock was stretched
vertically. Once I get HappyPlusClock 1.0 out, I'll turn my attention to
cleaning up and release the test pattern program.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://www.washburn.edu/&quot;&gt;Work&lt;/a&gt; has been busy, and we're entering the &lt;em&gt;very&lt;/em&gt; busy summer
months. But I'm taking time off around Memorial Day, and I'll see if I
can get the G3 going again.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
      <author>Aaron Hall &lt;ahall@vitaphone.net&gt;</author>
      <category>/geek/hpc</category>
      <pubDate>Wed, 21 May 2008 00:09:00 -0500</pubDate>
      <guid isPermaLink="false">/geek/hpc/progress_2008-05-21</guid>
    </item>

    <item>
      <title>Compatibility</title>
      <link>http://www.vitaphone.net/weblog/geek/hpc/compatibility.html</link>
      <description>&lt;p&gt;I found this entry that I'd written 3 Aug. 2007, but never pressed the
button to post for some reason.&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;And one other note on writing retro Mac programs in general. You have a
lot of freedom working on a dead system, because Apple isn't going to
update Classic Mac OS any more. For example, hiding the menu bar
involves fiddling with the &lt;code&gt;GrayRgn&lt;/code&gt; and &lt;code&gt;MBarHeight&lt;/code&gt;, both low-memory
global variables. (Both of which I accessed through accessors, but
they're still lowmem globals.) Apple finally, round about Mac OS 8.5,
introduced &lt;code&gt;HideMenuBar&lt;/code&gt; and &lt;code&gt;ShowMenuBar&lt;/code&gt; system routines. I could test
for their availability and use them if so, but why bother? The old way
works on 9.2.2, the last verion of Classic Mac OS, and the unnecessary
test just adds complexity.&lt;/p&gt;

&lt;p&gt;You shouldn't take that approach on a live system (the old way, of
course, stopped working entirely on OS X), but on a dead system, you can
bend the rules a little more because you &lt;em&gt;know&lt;/em&gt; things won't change.&lt;/p&gt;

&lt;p&gt;Of course, you still need to look at the circumstances your program will
be used in and be a good citizen. Classic Mac OS is dead in that there's
no further development from Apple, but it's still very much alive in
that it's being used by many people. On a Plus, I basically try to get
as much CPU time as I can because the routines to draw the clock 
&lt;a href=&quot;/weblog/geek/retro2007/speed.html&quot;&gt;take a while on a 68000&lt;/a&gt; and I want to
be sure that updates are smooth. And on a 68000 system, you typically
aren't going to have any other processes going while the clock is up, so
it's not unfriendly.&lt;/p&gt;

&lt;p&gt;That approach on a modern system just hordes the CPU unnecessarily, and,
on a G4 or G5 (especially in Classic mode), probably wastes energy by
defeating some of the power-saving measures built into those systems. So
I do check for the 68000 case specially, and only run flat-out on a real
68000, allowing the program to sleep for split-second chunks of time on
faster processors.&lt;/p&gt;

&lt;p&gt;This project has been a wonderful opportunity to geek out in the magical
land of Classic Mac OS. &lt;/p&gt;
</description>
      <author>Aaron Hall &lt;ahall@vitaphone.net&gt;</author>
      <category>/geek/hpc</category>
      <pubDate>Tue, 13 Nov 2007 20:19:00 -0500</pubDate>
      <guid isPermaLink="false">/geek/hpc/compatibility</guid>
    </item>

    <item>
      <title>HappyPlusClock 0.84</title>
      <link>http://www.vitaphone.net/weblog/geek/hpc/hpc-v0.84.html</link>
      <description>&lt;p&gt;Version 0.84 &lt;a href=&quot;http://www.vitaphone.net/hpc/&quot;&gt;is now available&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;This fixes &lt;em&gt;another&lt;/em&gt; stupid clock drawing bug, which I introduced with
0.83, because I based 0.83 on my development branch rather than directly
off of 0.82. I happened to be in the middle of re-factoring the analog
clock drawing code, and forgot I wasn't finished. :(&lt;/p&gt;

&lt;p&gt;In my present-day development, I'm used to working with version control:
RCS, CVS, Git, and so on, and I know enough not to make stupid mistakes
like that. (That's what branches are for.) But on this retro program and
this retro development environment, I completely forgot all those advances.&lt;/p&gt;

&lt;p&gt;I think I have MPW SourceServer laying around someplace. &lt;em&gt;That's&lt;/em&gt; going to
be a switch from Git...&lt;/p&gt;
</description>
      <author>Aaron Hall &lt;ahall@vitaphone.net&gt;</author>
      <category>/geek/hpc</category>
      <pubDate>Wed, 15 Aug 2007 22:07:00 -0500</pubDate>
      <guid isPermaLink="false">/geek/hpc/hpc-v0.84</guid>
    </item>

    <item>
      <title>HappyPlusClock 0.83</title>
      <link>http://www.vitaphone.net/weblog/geek/hpc/hpc-v0.83.html</link>
      <description>&lt;p&gt;Another bug fix: another stupid display bug in the digital clock. Nice
little off-by-one error. Please, &lt;a href=&quot;http://www.vitaphone.net/hpc/&quot;&gt;go download version
0.83&lt;/a&gt; before you discover why I feel as
silly as I do.&lt;/p&gt;

&lt;p&gt;(Part of the code cleanup is adding better testing mechanisms, BTW.)&lt;/p&gt;
</description>
      <author>Aaron Hall &lt;ahall@vitaphone.net&gt;</author>
      <category>/geek/hpc</category>
      <pubDate>Wed, 08 Aug 2007 23:01:00 -0500</pubDate>
      <guid isPermaLink="false">/geek/hpc/hpc-v0.83</guid>
    </item>

    <item>
      <title>Assertions</title>
      <link>http://www.vitaphone.net/weblog/geek/hpc/assertions.html</link>
      <description>&lt;p&gt;Okay, so one night I was &lt;a href=&quot;/weblog/geek/retro2007/buggy-compiler.html&quot;&gt;complaining about the Pascal compiler&lt;/a&gt;,
and I complained that macros didn't work. To my embarrassment and pleasure,
I found that's not true. They work on CW Pro 4; I just wasn't using them
correctly.&lt;/p&gt;

&lt;p&gt;For the record, here's my (working) assertion macros:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{&amp;#036;IFC APH_DEBUG}

{&amp;#036;definec Assert(assertion) begin if not (assertion) then
    DebugStr('assertion failed;hc;sc') end}
{&amp;#036;definec AssertStr(assertion, str) begin if not (assertion) then
    DebugStr(str + ';hc;sc') end}

{&amp;#036;ELSEC}

{&amp;#036;definec Assert(assertion)}
{&amp;#036;definec AssertStr(assertion, str)}

{&amp;#036;ENDC}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I stumbled across an example of doing it correctly inside some Apple sample
code, in the MoreSetup.p file of the MoreIsBetter package, still available
at &lt;a href=&quot;http://developer.apple.com&quot;&gt;http://developer.apple.com&lt;/a&gt;.&lt;/p&gt;
</description>
      <author>Aaron Hall &lt;ahall@vitaphone.net&gt;</author>
      <category>/geek/hpc</category>
      <pubDate>Mon, 06 Aug 2007 21:51:00 -0500</pubDate>
      <guid isPermaLink="false">/geek/hpc/assertions</guid>
    </item>

    <item>
      <title>Holy Cripe! And Thanks!</title>
      <link>http://www.vitaphone.net/weblog/geek/hpc/holy-cripe.html</link>
      <description>&lt;p&gt;&lt;a class=&quot;autoimg&quot; href=&quot;/images/weblog/plus-n-clock.jpg&quot;&gt;&lt;img class=&quot;blog&quot; src=&quot;/images/weblog/plus-n-clock.thumbnail.jpg&quot; align=&quot;right&quot; alt=&quot;[plus-n-clock]&quot;/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wow, you guys liked the clock! &lt;a href=&quot;http://www.vitaphone.net/hpc/&quot;&gt;HappyPlusClock&lt;/a&gt; was named the best
creation of &lt;a href=&quot;http://retrochallenge.net/&quot;&gt;Retro Challenge 2007&lt;/a&gt;! &lt;/p&gt;

&lt;p&gt;As I mentioned, I'm going to continue to improve HappyPlusClock, and as
soon as I get a couple bits of code in presentable shape, I'll release the
Pascal source as well. I wrote it so I could put this great old Mac back
into service doing something useful. As you can see, it's happily running
on my Plus.&lt;/p&gt;

&lt;p&gt;Thanks again, and I hope I can come up with something worthwhile for next
year!&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;Congratulations to &lt;a href=&quot;http://myoldmac.net/share/RetroChallenge2007.php&quot;&gt;Oliver&lt;/a&gt; for winning for the best blog. I'm ashamed to
say that I missed his site for most of the month, but it's no wonder he
won... a IIgs, a Classic II with grayscale and a logic board transplant,
and a &quot;PIKO dat&quot; electronic computer from 1969! And movies for everything.&lt;/p&gt;
</description>
      <author>Aaron Hall &lt;ahall@vitaphone.net&gt;</author>
      <category>/geek/hpc</category>
      <pubDate>Mon, 06 Aug 2007 01:36:00 -0500</pubDate>
      <guid isPermaLink="false">/geek/hpc/holy-cripe</guid>
    </item>

    <item>
      <title>Things I've learned while writing HappyPlusClock</title>
      <link>http://www.vitaphone.net/weblog/geek/hpc/things-i-learned.html</link>
      <description>&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In the immortal words of &lt;a href=&quot;http://developer.apple.com/technotes/me/me_14.html&quot;&gt;Technote ME 14&lt;/a&gt;: &quot;We all know what
&lt;code&gt;_DisposeHandle&lt;/code&gt; does to your data by now; data integrity was not in
the list.&quot;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CW Pascal's &lt;code&gt;StringOf&lt;/code&gt; library routine can't handle unsigned values.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don't bother with CW's MacOS.lib on 68K, go find MPW's Interface.o
and use it instead. As long as you have the Universal Interfaces,
everything will be fine, and you'll get access to a bunch more
libraries and routines via glue code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; this is bunk. 
MacOS.lib &lt;em&gt;does&lt;/em&gt; include all the same glue that Interface.o does.
Sorry 'bout that, MetroWerks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Via the magic of said glue code, you can call &lt;code&gt;BitMapToRegion&lt;/code&gt; on
machines without Color QuickDraw, even on System 4.2!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Less magical but perhaps even more helpful, &lt;code&gt;HOpenResFile&lt;/code&gt; is available
in glue, too, even if you aren't on System 7.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;CopyRgn&lt;/code&gt; is defined as possibly moving memory, meaning it can call
the Memory Manager to allocate memory. (Looks like &lt;code&gt;SetHandleSize&lt;/code&gt;, in
case you're wondering.) &lt;code&gt;CopyRgn&lt;/code&gt; is not defined as returning an
error, so heaven only knows what happens if the Memory Manager fails
for some reason.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;QuickDraw on Mac OS 9 is remarkably tolerant of programmers
doing stupid things like passing invalid pointers to &lt;code&gt;CopyBits&lt;/code&gt; (or
invalid handles to &lt;code&gt;CopyRgn&lt;/code&gt;). QuickDraw in ROM on a Mac Plus isn't so
tolerant. &lt;em&gt;(Side note: I actually made my Mac snap, crackle, and pop
entirely through software this way. And the display started wigging out
-- not just the displayed bits, but the monitor itself was getting fuzzy
and jumping a bit! My guess was that QD had scribbled over some
memory-mapped IO addresses. At that point, I shut the thing off before
smoke started coming out.)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;DateString&lt;/code&gt; bad; &lt;code&gt;IUDateString&lt;/code&gt; good. I don't know why.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;{&amp;#036;IFC POWERPC}&lt;/code&gt; and &lt;code&gt;{&amp;#036;IFC DEFINED POWERPC}&lt;/code&gt; are &lt;strong&gt;not&lt;/strong&gt; testing the
same thing. I actually knew this already, but it took a couple of
hours to figure out why some 68K code was using a PowerPC record
layout.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
      <author>Aaron Hall &lt;ahall@vitaphone.net&gt;</author>
      <category>/geek/hpc</category>
      <pubDate>Fri, 03 Aug 2007 14:38:00 -0500</pubDate>
      <guid isPermaLink="false">/geek/hpc/things-i-learned</guid>
    </item>

    <item>
      <title>End of RetroChallenge 2007</title>
      <link>http://www.vitaphone.net/weblog/geek/hpc/end-of-challenge.html</link>
      <description>&lt;p&gt;Well, July is over and the Retro Challenge 2007 ended with it. But it won't
be the end of &lt;a href=&quot;http://www.vitaphone.net/hpc/&quot;&gt;HappyPlusClock&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Since some of the code was rather rushed, I think what the program needs
now is some clean-up. After that, I'll look at new features.&lt;/p&gt;

&lt;p&gt;Thanks to everyone who wrote me about HappyPlusClock -- I really appreciate
it and your messages have made the challenge fun.&lt;/p&gt;
</description>
      <author>Aaron Hall &lt;ahall@vitaphone.net&gt;</author>
      <category>/geek/hpc</category>
      <pubDate>Fri, 03 Aug 2007 13:35:00 -0500</pubDate>
      <guid isPermaLink="false">/geek/hpc/end-of-challenge</guid>
    </item>

    <item>
      <title>HappyPlusClock 0.82</title>
      <link>http://www.vitaphone.net/weblog/geek/hpc/hpc-v0.82.html</link>
      <description>&lt;p&gt;A bug-fix release is now &lt;a href=&quot;http://www.vitaphone.net/hpc/&quot;&gt;available for download&lt;/a&gt;. Somehow, I'd never
noticed the display was incorrect from 12pm to 1pm. Sheesh.&lt;/p&gt;
</description>
      <author>Aaron Hall &lt;ahall@vitaphone.net&gt;</author>
      <category>/geek/hpc</category>
      <pubDate>Sun, 29 Jul 2007 17:33:00 -0500</pubDate>
      <guid isPermaLink="false">/geek/hpc/hpc-v0.82</guid>
    </item>


  </channel>
</rss>
