<?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>Apple II Adventures &#187; Programming</title>
	<atom:link href="http://www.mozomedia.com/apple2/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mozomedia.com/apple2</link>
	<description>Exploring games, music and programming on the 8-bit Apple II computers.</description>
	<lastBuildDate>Tue, 02 Aug 2011 02:00:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Henry Spragens&#8217; Music, The Lost LOST Project</title>
		<link>http://www.mozomedia.com/apple2/2010/12/henry-spragens-music-the-lost-lost-project/</link>
		<comments>http://www.mozomedia.com/apple2/2010/12/henry-spragens-music-the-lost-lost-project/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 21:47:36 +0000</pubDate>
		<dc:creator>JJ Sonick</dc:creator>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[AppleIIGo]]></category>
		<category><![CDATA[Dharma Initiative]]></category>
		<category><![CDATA[Henry Spragens]]></category>
		<category><![CDATA[LOST]]></category>
		<category><![CDATA[sound cards]]></category>

		<guid isPermaLink="false">http://www.mozomedia.com/apple2/?p=181</guid>
		<description><![CDATA[Wow, way too long since I last posted!  I haven&#8217;t been neglecting my Apple II in all the time that&#8217;s past, though &#8211; there&#8217;s a number of Apple II shenanigans I have to report here and in upcoming posts. First, thanks to Henry Spragens for leaving a comment on the Boxy&#8217;s Lament post, pointing to [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, way too long since I last posted!  I haven&#8217;t been neglecting my Apple II in all the time that&#8217;s past, though &#8211; there&#8217;s a number of Apple II shenanigans I have to report here and in upcoming posts.</p>
<p>First, thanks to Henry Spragens for leaving a comment on the Boxy&#8217;s Lament post, pointing to <a href="http://web.me.com/henryspragens/Apple-II/Apple_II_Music/Apple_II_Music.html" target="_blank">his site</a> where he has samples of various fascinating 8-bit Apple II music experiments he did. Lots of pics/info on sound hardware of the time and a bunch of great music demos, be sure to check it out!</p>
<p>Second, I wanted to feature an abandoned Apple II project of mine.  As has been noted in Apple II retro-dom, The TV series LOST featured an Apple II (with the Apple logo replaced by a Dharma one and, apparently, an Apple III monitor being used?) as the &#8220;Dharma Initiative computer&#8221; &#8212; most prominently in Season 2.</p>
<p><img class="alignnone" title="Hatch Computer" src="http://www.mozomedia.com/apple2/media/Hatch_Computer.jpg" alt="" width="500" height="441" /></p>
<p>Between Season 5 &amp; 6, I had an idea to make an actual Apple II program that would simulate connecting to the Dharma Initiative&#8217;s <a href="http://lostpedia.wikia.com/wiki/DharmaTel" target="_blank">DharmaTel network</a>.  After connecting, the user would recieve a report, from the DI&#8217;s perspective, on the cataclysmic Incident that served as the climax of Season 5 and a focal plot point of much of the show.  The user would type out various keywords (highlighted in all caps in the report) to navigate to various parts of the report.  It would include images from the show, translated into Apple II hi-res screens via the <a href="http://www.mozomedia.com/apple2/2009/08/new-apple-ii-song-jpegs-to-hgr-screens/" target="_blank">jpeg-to-HGR-screen routine</a> I posted about earlier, and use the Beagle Brother&#8217;s Pronto DOS to allow somewhat speedy loading of those images.</p>
<p>I made a VERY short demo of the idea, and embedded the disk image in an <a href="http://www-personal.umich.edu/~mressl/appleiigo/" target="_blank">AppleIIGo</a> java applet. Here&#8217;s a screenshot:</p>
<div class="wp-caption alignnone" style="width: 586px"><img class=" " title="Dharmatel Report Demo screenshot" src="http://mozomedia.com/apple2/media/dharmatel.jpg" alt="Dharmatel Report Demo screenshot" width="576" height="398" /><p class="wp-caption-text">Dharmatel Report Demo screenshot</p></div>
<p>You can try it out by clicking the link below.  Enter anything you want as the username.  You may have to click on the applet&#8217;s screen to gain focus before typing.</p>
<p><strong>&gt;&gt;</strong><strong> <a href="http://www.mozomedia.com/apple2/LOSTDEMO/AppleIIGo.html" target="_blank">DharmaTel Report DEMO</a></strong></p>
<p>(Note: the applet seems to hang in Mac Chrome sometimes.  Other browsers seem OK.)</p>
<p>(And really, I should have AppleIIGo set to monochrome monitor mode for more fidelity to the show&#8217;s computer.)</p>
<p>I was going to collaborate on the report entries with a friend of mine who was even more of an obsessed LOST fan, but I wanted to wait to see how Season 6 was going to treat the post-Incident world.  Well, the way Season 6 unfolded made the Dharma Initiative&#8217;s view of the Incident not so very important anymore, at least to my eyes, and I lost enthusiasm for completing the project.</p>
<p>I still enjoy the image of Desmond messing with the Dharma Apple II with the lid off, though.</p>
<p><img class="alignnone" title="Desmond and Comp" src="http://www.mozomedia.com/apple2/media/hatchcomp3.jpg" alt="" width="500" height="276" /></p>
<hr />
<p><small>© JJ Sonick for <a href="http://www.mozomedia.com/apple2">Apple II Adventures</a>, 2010. |
<a href="http://www.mozomedia.com/apple2/2010/12/henry-spragens-music-the-lost-lost-project/">Permalink</a> |
<a href="http://www.mozomedia.com/apple2/2010/12/henry-spragens-music-the-lost-lost-project/#comments">One comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.mozomedia.com/apple2/2010/12/henry-spragens-music-the-lost-lost-project/&title=Henry Spragens&#8217; Music, The Lost LOST Project">del.icio.us</a>
<br/>
Post tags: <a href="http://www.mozomedia.com/apple2/tag/appleiigo/" rel="tag">AppleIIGo</a>, <a href="http://www.mozomedia.com/apple2/tag/dharma-initiative/" rel="tag">Dharma Initiative</a>, <a href="http://www.mozomedia.com/apple2/tag/henry-spragens/" rel="tag">Henry Spragens</a>, <a href="http://www.mozomedia.com/apple2/tag/lost/" rel="tag">LOST</a>, <a href="http://www.mozomedia.com/apple2/tag/music/" rel="tag">Music</a>, <a href="http://www.mozomedia.com/apple2/tag/sound-cards/" rel="tag">sound cards</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mozomedia.com/apple2/2010/12/henry-spragens-music-the-lost-lost-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Improved Game Engine Framework and more&#8230;</title>
		<link>http://www.mozomedia.com/apple2/2009/03/improved-game-engine-framework-and-more/</link>
		<comments>http://www.mozomedia.com/apple2/2009/03/improved-game-engine-framework-and-more/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 15:17:36 +0000</pubDate>
		<dc:creator>JJ Sonick</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[BASIC]]></category>
		<category><![CDATA[Beagle Brothers]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[graphics magician]]></category>

		<guid isPermaLink="false">http://www.mozomedia.com/apple2/?p=113</guid>
		<description><![CDATA[Whoa, it&#8217;s been a while since I last updated!  That&#8217;s partly due to so-called Real Life eating up my time, and partly due to me spending time arranging and launching my first podcast, the Mozomedia Music Podcast.  While that has meant a drought for this blog, the good news is that I want to feature [...]]]></description>
			<content:encoded><![CDATA[<p>Whoa, it&#8217;s been a while since I last updated!  That&#8217;s partly due to so-called Real Life eating up my time, and partly due to me spending time arranging and launching my first podcast, the<a href="http://www.mozomedia.com/music/" target="_blank"> Mozomedia Music Podcast</a>.  While that has meant a drought for this blog, the good news is that I want to feature Apple II-generated original music on that podcast, and that means I&#8217;m motivated to a) make some more <a href="http://www.mozomedia.com/apple2/2008/11/new-8-bit-musical-instruments/" target="_blank">soundsets</a> for Michael J Mahon&#8217;s <a href="http://home.comcast.net/~mjmahon/RTSynth.html" target="_blank">Real Time Synthesizer</a> b) make a &#8216;play the <a href="http://www.mozomedia.com/apple2/2008/11/the-mockingboard-sings/" target="_blank">Mockingboard</a> with your Apple II keyboard&#8217; Applesoft program that&#8217;s hopefully superior to the pathetic &#8216;play with the keyboard&#8217; program that&#8217;s included with the Mockingboard demo disk.</p>
<p><strong>In Search of an Engine&#8230;</strong></p>
<p>Even better news for this blog &#8212; I&#8217;ve been obsessing over, and have successfully cobbled together an Apple II game engine framework recently.  The basic idea was to have the ideal handful of speedy machine language routines handling graphics and sound that would be called when needed from an Applesoft BASIC program &#8211; the BASIC program would handle input and general game logic.  Of course, such a set-up would not work for an action game (because of Applesoft slowness) or for scrolling graphics, etc, but it could be sufficient for an adventure game, simple strategy game, or turn-based, light RPG game.</p>
<p><strong>Out with the old&#8230;</strong></p>
<p>I actually collected such a game framework previously, for my <a href="http://www.mozomedia.com/apple2/2008/10/project-scruffy-sidekick-and-sword-game/" target="_blank">Scruffy and the Sword game idea</a> &#8212; that first framework involved the combo of <a href="http://beagle.applearchives.com/the_software/vintage_beagle_bros_softwar/prontodos.html" target="_blank">ProntoDOS</a> for disk loading speed, <a href="http://beagle.applearchives.com/the_software/vintage_beagle_bros_softwar/beagle_graphics.html" target="_blank">Beagle Graphics</a> routines for images and hi-res text, and a little assembly language program (also by the Beagle Brothers) for simple music.  Well, that will still be a great framework for that game, but I&#8217;ve become unenthused about that implementing that particular game and that previous framework has some problems.  Beagle Graphics is wonderful for making it easy to produce quickly produce nice hi-res pictures thanks to mouse control, various geometric shapes being available, etc.  But the graphics it generated, even when compressed with the nifty program Double.Scrunch, were still fairly hefty in size &#8212; I could hope to maybe get 40 or so of them on a disk that held no other files.</p>
<p>It would be far superior to use a program like Penguin Software&#8217;s <a href="http://graphicsmagician.com/polarware/pengraph.htm" target="_blank">The Graphics Magician</a>, which records the steps used to draw a graphic instead of saving every point on the screen, which allows for amazingly compressed images files (really vector-construction instruction files) that are speedily reconstructed by TGM&#8217;s included assembly routines.  I would be able to get 200 or so such files on a single disk compared to Beagle Graphic&#8217;s 40.  Also TGM allows you to designate certain images as &#8216;objects&#8217; that are to be drawn over other images at chosen x,y locations.   For example you could have a table background and one bottle image, but draw 3 copies of the bottle image on the table at different locations.</p>
<p>The main issue I had with The Graphics Magician was that its controls, esp. compared to Beagle Graphics, were horrible.  Using the joystick to guide the crosshair cursor was too unwieldy, even in its restricted movement &#8216;zoom&#8217; mode.  Fortunately, I found on a disk image of a version of The Graphics Magician released later than the physical copy I own, and this later release has a mouse control mode. This makes all the difference in the world in terms of achieving the desired image!  Unfortunately, I don&#8217;t have a mouse for my actual Apple II&#8217;s, and this mouse mode hangs in the Virtual II emulator, but it does works perfectly in AppleWin, so I&#8217;m fine with booting into my Windows Boot Camp partition to do some Apple II image scrawling.</p>
<p><strong>Memory Wrangling</strong></p>
<p>The other issue with Beagle Graphics is that its machine language routines did not play nice with some sound routines I wanted to use.  I tried the sound routines one-at-a-time in conjunction with Beagle Graphics, but there was always some kind of memory conflict that clobbered the sound routine.  The only one that worked was the most basic of the ones I was contemplating.  Graphics Magician, on the other hand, offers two different versions of its main drawing routine, one that resides in high memory ( 36096 / $8D00 ), one in low (4096 / $1000).   Using the low memory version, I was able to run Joe Strout&#8217;s very versatile Sound Wizard routine with no conflicts!  (Sound Wizard&#8217;s on the 1990 disk from the Sam Stoddard Nibble program collection <a href="http://www.nibblemagazine.net/nibble_disks.htm" target="_blank">available here</a>.)</p>
<p>I didn&#8217;t leave the Beagle Brothers completely behind, though &#8211; I still want to use ProntoDOS for its impressive boost to read/writing from disks.  Also, this time around I&#8217;m utilizing ProntoDOS&#8217;s DOS-Up program which I foolishly overlooked before.  DOS-Up moves DOS into the language card/RAM card area of memory ($D000-$FFFF),  leaving a huge extra swath of high memory (around 10k) available for use.  This solved another problem, because normally the one disadvantage of using the low-memory version of Graphics Magician&#8217;s PICDRAW is that the safe buffer for storing pictures/variables reduces from from around 12k to 3k.  However, with DOS-UP, suddenly there&#8217;s a nice wide expanse of high RAM that can be loaded with many TGM images for swift recall (instead of reading images from a disk each time they need to be displayed, it&#8217;s possible to load multiple images into memory at once at the beginning (or at various transition points) so they can be speedily summoned).</p>
<p>The one remaining snag was The Graphics Magician&#8217;s character generation routine, HPRINT.  The routine itself worked fine, but the process of Applesoft looping through ASCII characters in memory and plugging them into proper locations for HPRINT to work on made the printing of a single line a slowish affair, and the printing of a screen&#8217;s worth of text would be painfuly slow (unless you wanted to always have a &#8216;typing typewriter&#8217; kind of effect).  So this lead me to write my first (!) assembly language program, HPRINTHOOK.  It&#8217;s very simple, but gets the job done.  From BASIC, you poke in the starting address of the ASCII text you want to read (the text has been previously BLOADED into memory), poke the text&#8217;s x and y screen locations for HPRINT, and then call HPRINTHOOK, which handles looping through the ASCII codes in memory and handing them off to HPRINT immensely faster than Applesoft does.  It also handles carriage returns (signified by a $04 byte in the string of ASCII) and returns to the Applesoft program upon hitting a $00 byte (which serves as an &#8216;end of message&#8217; delimiter).</p>
<p>So with those programs, the framework&#8217;s memory usage is lined up like this:</p>
<ul>
<li>39936 to 48815 ($9C00 to $BEAF) &#8212; Space for Graphics Magician images, binary ASCII files loaded into memory for quick access, etc</li>
<li>39600 ($9AB0) &#8212; HPRINTHOOK</li>
<li>39424 ($9A00) &#8212; HPRINT PL</li>
<li>36864 ($9000) &#8212; SOUND WIZARD</li>
<li>16384 &#8211; 36608 ($4000 to $8F00 ) &#8212; BASIC program and variables (HIMEM is set to 36608, BASIC program start has been poked to begin at Hi-Res page 2, $4000)</li>
<li>8192-16384 ($2000 &#8211; $4000) &#8212; Hi Res Page 1</li>
<li>5120 &#8211; 8192 ($1400 &#8211; $2000) &#8212; free space for misc.</li>
<li>2048 &#8211; 5120 &#8211; ($800 &#8211; $1400) &#8212; PICDRAWL</li>
</ul>
<p>So that gives a good amount of room to play, both for the BASIC program, and for big chunks of graphics/ASCII text in high memory &#8212; and Sound Wizard is left unscathed and ready to sound-effect-ize.</p>
<p>Here&#8217;s a screenshot from a test of the framework running on Virtual II (apologies to <a href="http://www.tomwham.com/" target="_blank">Tom Wham</a> for bastardizing one of his wonderful <a href="http://www.tomwham.com/agtfos.html" target="_blank">Awful Green Things</a>):</p>
<p><img class="alignnone" title="Game Engine Framework Test" src="http://www.mozomedia.com/images/GameEngine1.jpg" alt="" width="500" height="343" /></p>
<p>Not the best that&#8217;s achievable with The Graphics Magician, but the test draws the Awful Green Thing, then draws the exclamation point as an Object Image over the Awful Green Thing, then Sound Wizard is called to play two effects to make sure it hasn&#8217;t been clobbered by any other routines, and finally HPRINTHOOK reads some ASCII bloaded into high memory and prints it out near instantly.  All of the routines are happily working together!  And the test also worked in AppleWin and on my actual Apple IIe and IIc.</p>
<p>Now to decide exactly what game to make with the framework (I have several ideas swirling around&#8230;)</p>
<p>***</p>
<p><strong>P.S.</strong> I haven&#8217;t completely neglected my Apple II game-playing during these past months &#8211; I&#8217;ve enjoyed sporadic bouts of Bard&#8217;s Tale III on the Virtual II emulator (an emulator&#8217;s save state can come in handy) and Might and Magic II: Gates to Another World on my real IIe (very entertained by double hi-res graphics the likes of which I never witnessed on the Apple II grew up with).  I find it strangely addicting to level grind in both of them, but I am greatly wary of how vast both of the games are &#8212; the level-grinding/exploration could literally go on for hundreds of hours, so I&#8217;m not sure how long I&#8217;ll stick with them, but they&#8217;re definitely highly playable and refined dungeon/outdoor crawls of their era.  Bard&#8217;s Tale III screenshot:</p>
<p><img class="alignnone" title="Bards Tale III screen" src="http://farm4.static.flickr.com/3088/3127315938_fdfc3a2e4c.jpg" alt="" width="500" height="343" /></p>
<hr />
<p><small>© JJ Sonick for <a href="http://www.mozomedia.com/apple2">Apple II Adventures</a>, 2009. |
<a href="http://www.mozomedia.com/apple2/2009/03/improved-game-engine-framework-and-more/">Permalink</a> |
<a href="http://www.mozomedia.com/apple2/2009/03/improved-game-engine-framework-and-more/#comments">5 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.mozomedia.com/apple2/2009/03/improved-game-engine-framework-and-more/&title=Improved Game Engine Framework and more&#8230;">del.icio.us</a>
<br/>
Post tags: <a href="http://www.mozomedia.com/apple2/tag/assembly/" rel="tag">Assembly</a>, <a href="http://www.mozomedia.com/apple2/tag/basic/" rel="tag">BASIC</a>, <a href="http://www.mozomedia.com/apple2/tag/beagle-brothers/" rel="tag">Beagle Brothers</a>, <a href="http://www.mozomedia.com/apple2/tag/framework/" rel="tag">framework</a>, <a href="http://www.mozomedia.com/apple2/tag/graphics/" rel="tag">Graphics</a>, <a href="http://www.mozomedia.com/apple2/tag/graphics-magician/" rel="tag">graphics magician</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mozomedia.com/apple2/2009/03/improved-game-engine-framework-and-more/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Hi-Res Graphics Mind Meld</title>
		<link>http://www.mozomedia.com/apple2/2008/11/hi-res-graphics-mind-meld/</link>
		<comments>http://www.mozomedia.com/apple2/2008/11/hi-res-graphics-mind-meld/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 19:53:42 +0000</pubDate>
		<dc:creator>JJ Sonick</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[BASIC]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[hi-res]]></category>

		<guid isPermaLink="false">http://www.mozomedia.com/apple2/?p=49</guid>
		<description><![CDATA[I read a description of how memory addressing for the hi-resolution screen works three times, each time from a different source.  The first two times my brain simply melted before such a byzantine structure.  The third time it finally clicked.  Surely this had something to do with it being my third attempt to grasp the [...]]]></description>
			<content:encoded><![CDATA[<p>I read a description of how memory addressing for the hi-resolution screen works three times, each time from a different source.  The first two times my brain simply melted before such a byzantine structure.  The third time it finally clicked.  Surely this had something to do with it being my third attempt to grasp the concept, but I believe even more of it had to do with the third source&#8217;s description being the most clear, well-written and well-illustrated.</p>
<p>That third source is &#8220;Applesoft BASIC Subroutines &amp; Secrets&#8221; by Jeanette Sullivan and David Sullivan. It appears to be an excellent book all around.  Below are scans of the two pages on hi-res memory addressing, to assist anyone else puzzling out the same issue:</p>
<div class="wp-caption alignnone" style="width: 131px"><a href="http://www.mozomedia.com/images/a2hires_mem1.jpg" target="_blank"><img title="Hi Res Memory Addressing 1" src="http://www.mozomedia.com/images/a2hires_mem1_t.jpg" alt="Hi Res Memory Addressing 1" width="121" height="193" /></a><p class="wp-caption-text">Hi Res Memory Addressing 1</p></div>
<div class="wp-caption alignnone" style="width: 138px"><a href="http://www.mozomedia.com/images/a2hires_mem2.jpg" target="_blank"><img title="Hi Res Memory Addressing 2" src="http://www.mozomedia.com/images/a2hires_mem2_t.jpg" alt="Hi Res Memory Addressing 2" width="128" height="193" /></a><p class="wp-caption-text">Hi Res Memory Addressing 2</p></div>
<p>(click on the images above to download full-size scans)</p>
<p>The book also includes a nifty little BASIC program that will compute the address of any particular block, and lays out the formula the program uses, further reinforcing how the addressing works.  Scans of that are below.</p>
<div class="wp-caption alignnone" style="width: 135px"><a href="http://www.mozomedia.com/images/a2hires_mem3.jpg" target="_blank"><img title="Hi Res Memory Addressing Program" src="http://www.mozomedia.com/images/a2hires_mem3_t.jpg" alt="Hi Res Memory Addressing Program" width="125" height="191" /></a><p class="wp-caption-text">Hi Res Memory Addressing Program</p></div>
<div class="wp-caption alignnone" style="width: 133px"><a href="http://www.mozomedia.com/images/a2hires_mem4.jpg" target="_blank"><img title="Hi Res Memory Addressing Program" src="http://www.mozomedia.com/images/a2hires_mem4_t.jpg" alt="Hi Res Memory Addressing Program" width="123" height="193" /></a><p class="wp-caption-text">Hi Res Memory Addressing Program</p></div>
<p>(click on the images above to download full-size scans)</p>
<p>In assembly programming news, &#8220;Assembly Language for the Applesoft Programmer&#8221; continues its traditional of clear writing/explanations and annoying typos in listings.  I&#8217;m also going through Don Lancaster&#8217;s &#8220;Assembly Cookbook for the Apple II/IIe&#8221; &#8212; Lancaster completely skips over the basics (he basically waves his finger at you and says &#8216;Don&#8217;t you dare think of using an assembler until you&#8217;ve learned to code 100s of lines of machine language on your own&#8217;), but has lots of opinionated advice on surrounding aspects of assembly.  I&#8217;m learning, slow but steady.</p>
<hr />
<p><small>© JJ Sonick for <a href="http://www.mozomedia.com/apple2">Apple II Adventures</a>, 2008. |
<a href="http://www.mozomedia.com/apple2/2008/11/hi-res-graphics-mind-meld/">Permalink</a> |
<a href="http://www.mozomedia.com/apple2/2008/11/hi-res-graphics-mind-meld/#comments">2 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.mozomedia.com/apple2/2008/11/hi-res-graphics-mind-meld/&title=Hi-Res Graphics Mind Meld">del.icio.us</a>
<br/>
Post tags: <a href="http://www.mozomedia.com/apple2/tag/assembly/" rel="tag">Assembly</a>, <a href="http://www.mozomedia.com/apple2/tag/basic/" rel="tag">BASIC</a>, <a href="http://www.mozomedia.com/apple2/tag/books/" rel="tag">books</a>, <a href="http://www.mozomedia.com/apple2/tag/graphics/" rel="tag">Graphics</a>, <a href="http://www.mozomedia.com/apple2/tag/hi-res/" rel="tag">hi-res</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mozomedia.com/apple2/2008/11/hi-res-graphics-mind-meld/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hello, Assembly</title>
		<link>http://www.mozomedia.com/apple2/2008/10/hello-assembly/</link>
		<comments>http://www.mozomedia.com/apple2/2008/10/hello-assembly/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 17:18:12 +0000</pubDate>
		<dc:creator>JJ Sonick</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Assembly]]></category>

		<guid isPermaLink="false">http://www.mozomedia.com/apple2/?p=23</guid>
		<description><![CDATA[As well as a attempting a simple RPG in BASIC, I&#8217;m also getting my feet wet with Assembly.  I have two main goals with Assembly, ones that cannot be reasonably achieved with BASIC: Sound creation and manipulation Tile-based graphic scrolling ala the early Ultima games.  Even as I&#8217;m coming to general grips with Apple II [...]]]></description>
			<content:encoded><![CDATA[<p>As well as a attempting a <a href="http://www.mozomedia.com/apple2/?p=15">simple RPG in BASIC</a>, I&#8217;m also getting my feet wet with Assembly.  I have two main goals with Assembly, ones that cannot be reasonably achieved with BASIC:</p>
<ol>
<li>Sound creation and manipulation</li>
<li>Tile-based graphic scrolling ala the early Ultima games.  Even as I&#8217;m coming to general grips with Apple II graphics, I have no idea how this was done, so I&#8217;m curious to explore it.</li>
</ol>
<p>An ultimate goal with tile-based scrolling would be do make some sort of super-simplified <a href="http://www.starflt.com/starflt.php?ID=intro" target="_blank">Starflight</a> clone (I was always jealous that Starflight didn&#8217;t exist for the Apple II) &#8212; but that is <em>REALLY</em> pie-in-the-sky &#8211; I&#8217;d be happy just make a successfully little one-area demo. <img src='http://www.mozomedia.com/apple2/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I&#8217;ve just started &#8220;Assembly Language for the Applesoft Programmer&#8221; by Finley and Myers, and it seems pretty well written.  Despite the title, it&#8217;s not about just getting some binary programs to run from your BASIC programs, it&#8217;s more a full-on assembly tutorial aimed at weaning a programmer away from BASIC and into pure assembly.  Assembly&#8217;s making sense so far, a lot of which is probably due to my working through the wonderful book <a href="http://www.maxmon.com/byteinfo.htm" target="_blank">Bebop Bytes Back</a> 6 years ago or so.</p>
<p>I&#8217;m using the Merlin assembler, which seems to have a very friendly environment, and I&#8217;m delighted it allows the entry of decimal numbers, which I&#8217;ll be using to &#8220;cheat&#8221; as much as possible (sorry, purists).</p>
<p>One alarming thing: there was a typo in one of the early sample programs in the &#8220;Assembly Language for the Applesoft Programmer&#8221; &#8211; a typo that was in fact repeated twice.  The program was simple enough that I was able to spot it immediately, but it makes me worried about the longer, more complicated program listings &#8211; I might not spot the typos so easily there, which could lead to lots of frustration.  If that becomes a problem, I may have to switch to some other book, which would be a shame, because I like the clear writing in this one.</p>
<hr />
<p><small>© JJ Sonick for <a href="http://www.mozomedia.com/apple2">Apple II Adventures</a>, 2008. |
<a href="http://www.mozomedia.com/apple2/2008/10/hello-assembly/">Permalink</a> |
<a href="http://www.mozomedia.com/apple2/2008/10/hello-assembly/#comments">7 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.mozomedia.com/apple2/2008/10/hello-assembly/&title=Hello, Assembly">del.icio.us</a>
<br/>
Post tags: <a href="http://www.mozomedia.com/apple2/tag/assembly/" rel="tag">Assembly</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mozomedia.com/apple2/2008/10/hello-assembly/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Project: Scruffy and the Sword game</title>
		<link>http://www.mozomedia.com/apple2/2008/10/project-scruffy-sidekick-and-sword-game/</link>
		<comments>http://www.mozomedia.com/apple2/2008/10/project-scruffy-sidekick-and-sword-game/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 14:23:56 +0000</pubDate>
		<dc:creator>JJ Sonick</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[BASIC]]></category>
		<category><![CDATA[Beagle Brothers]]></category>
		<category><![CDATA[Beagle Graphics]]></category>
		<category><![CDATA[RPG]]></category>
		<category><![CDATA[Scruffy and Sword]]></category>

		<guid isPermaLink="false">http://www.mozomedia.com/apple2/?p=15</guid>
		<description><![CDATA[One Apple II project I&#8217;d like to pull off would be a very simple rpg game inspired by the skit &#8216;Scruffy and the Sword&#8217; by my comedy group Come On, Scientists!.  In the skit, two rather odd adventurers  are in search of a Vorpal Sword (the bearded adventurer, Scruffy, is played by yours truly).  They [...]]]></description>
			<content:encoded><![CDATA[<p>One Apple II project I&#8217;d like to pull off would be a very simple rpg game inspired by the skit <a href="http://www.youtube.com/watch?v=T2x9-x7n3wg" target="_blank">&#8216;Scruffy and the Sword&#8217;</a> by my comedy group <a href="http://www.mozomedia.com/cos" target="_blank">Come On, Scientists!</a>.  In the skit, two rather odd adventurers  are in search of a Vorpal Sword (the bearded adventurer, Scruffy, is played by yours truly).  They begin they search at a collectibles shop/garage sale, end up traveling through time, and encounter a powerful foe, the Black Spirit of Self-Awareness.  Since the skit goofily deals with rpg goofiness, it seems only natural to base a goofy game on it.</p>
<p>For the game, I&#8217;d stick to the medieval setting &#8211; Scruffy and Sidekick can simply be &#8220;in character&#8221; as adventurers, having come to a little towne where they&#8217;ve heard tale of a Blacksmith who can make a perfect +2 Vorpal Sword.  In the game&#8217;s intro, they would witness the Blacksmith&#8217;s cursing the sword and throwing a mighty far distance &#8211; all the way, in fact, to a nearby orc-infested tower.  To retrieve the sword, they&#8217;ll have to travel to several different locales, bash various monsters, and collect gold to buy better weapons/armor til they&#8217;re finally strong enough to storm the tower.</p>
<p>I&#8217;m planning to program this in Applesoft BASIC, relying on the <a href="http://stevenf.com/beagle/" target="_blank">Beagle Brothers&#8217;</a> tremendous <a href="http://beagle.applearchives.com/the_software/vintage_beagle_bros_softwar/beagle_graphics.html" target="_blank">Beagle Graphics</a> to create hi-res images, and their <a href="http://beagle.applearchives.com/the_software/vintage_beagle_bros_softwar/prontodos.html" target="_blank">ProntoDOS</a> routines to allow speedy loading (for the Apple II) of those images.  The Beagle Graphics program Double Plot has turned out delightful to use, especially in an emulator so I can draw with the mouse (though I do plan to get a mouse for the actual Apple IIs sometime).  Here is the first (and only so far) screen I&#8217;ve done, the &#8216;Presents&#8217; screen that will precede the Title Screen:</p>
<div class="wp-caption alignnone" style="width: 563px"><img title="Scruffy and Sword game Presents screen" src="http://www.mozomedia.com/images/BSOSA_presents_s.jpg" alt="Scruffy and Sword game Presents screen" width="553" height="393" /><p class="wp-caption-text">Scruffy and Sword game Presents screen</p></div>
<p>Since I&#8217;m using BASIC, I think it&#8217;d be best to keep things simple.  They&#8217;re won&#8217;t be any animation or even single frame sprite-shapes moving about the screen &#8212; all graphics will be static screen images and all input will be menu-driven (Beagle Graphic also allows for easy programmatic printing of text to the Hi-Res screen from BASIC).  So for instance, in Town, the top half of the screen will show a picture of the various buildings Scruffy and Sidekick can enter, and on the bottom half will be a simple lettered menu reiterating those choices (Where should we go?  A. Marv Ellis&#8217;s Shoppe B. The Blacksmith C., etc), with one choice being Leave Town. When the player leaves town, a new image is loaded showing the nearby landscape and available place to go, and an appropriate menu.   Likewise, combat will be a similar affair, if a bit more complicated display wise: An image of the enemy on the upper left half of the screen, an image of Scruffy and Sidekick on the upper right half with stats displayed below each (that text would be dynamically added after the picture has loaded), and the bottom half would be used for hi-res text, alternating between menu of choices and displays of battle results.  That kind of display for combat would be similar to, but simpler than, the ones used in Wizardry, The Standing Stones, Wasteland and such. Here&#8217;s a Wasteland combat for example:</p>
<div class="wp-caption alignnone" style="width: 410px"><img title="Wasteland Combat example" src="http://www.mozomedia.com/images/wasteland_wolf.png" alt="Wasteland Combat example" width="400" height="274" /><p class="wp-caption-text">Wasteland Combat example</p></div>
<p>The Double.Scrunch utility provided with Beagle Graphics allows nice compression of hi-res images that must be stored on and loaded from a disk.  Using it, I&#8217;m hoping I can get around 40 hi-res images on a single disk (I&#8217;ll be making hi-res and not double hi-res images to save space).  The game would then consist of two disks.   The first disk would hold the BASIC program, the required Beagle Graphics loaders, and a few introductory images.  After the BASIC program loads, and intro graphics are viewed if the player wishes, the player is asked to insert disk 2 into the drive.  After that, all images needed are loaded from disk 2 as the game unfolds.</p>
<p>With that framework, I&#8217;m hoping I can make an amusing little game.  We shall see&#8230;</p>
<hr />
<p><small>© JJ Sonick for <a href="http://www.mozomedia.com/apple2">Apple II Adventures</a>, 2008. |
<a href="http://www.mozomedia.com/apple2/2008/10/project-scruffy-sidekick-and-sword-game/">Permalink</a> |
<a href="http://www.mozomedia.com/apple2/2008/10/project-scruffy-sidekick-and-sword-game/#comments">4 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.mozomedia.com/apple2/2008/10/project-scruffy-sidekick-and-sword-game/&title=Project: Scruffy and the Sword game">del.icio.us</a>
<br/>
Post tags: <a href="http://www.mozomedia.com/apple2/tag/basic/" rel="tag">BASIC</a>, <a href="http://www.mozomedia.com/apple2/tag/beagle-brothers/" rel="tag">Beagle Brothers</a>, <a href="http://www.mozomedia.com/apple2/tag/beagle-graphics/" rel="tag">Beagle Graphics</a>, <a href="http://www.mozomedia.com/apple2/tag/rpg/" rel="tag">RPG</a>, <a href="http://www.mozomedia.com/apple2/tag/scruffy-and-sword/" rel="tag">Scruffy and Sword</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mozomedia.com/apple2/2008/10/project-scruffy-sidekick-and-sword-game/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

