<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss">
 	<channel>
		<title>the blog | 65816 dot com</title>
		<link>http://65816.com/</link>
		<description></description>
		<language>en</language>
		<lastBuildDate>Tue, 08 Apr 2008 21:45:45 -0400</lastBuildDate>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<generator>Sandvox Pro 1.2.7</generator>
		<item>
			<title>Downgrade</title>
			<link>http://65816.com/downgrade.html</link>
			<description>
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://65816.com/_Media/rom01_textmedium.gif&quot; alt=&quot;rom01&quot; /&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;So I finally decided that since I had both motherboards laying around, perhaps it was time to revert to ROM 01, and at least evaluate its merits. I think I'm going to stick with it. I'm not sure that the performance difference from running tools out of ROM, or not loading them from mass storage, is subjectively all that great, and yeah I really did miss the Sales Demo, Shufflepuck Cafe, and Alien Mind. Yes, sound artifacts seem to be increased somewhat, the old familiar cadence of ROM 01 at idle in Finder was frighteningly recognizable from childhood, versus the quieter ROM 03. But that's the biggest difference. Nothing broke. And on a platform where nostalgia clearly matters, I felt it was prudent to aim for maximum compatibility.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;To be honest, I tried it the other way, at first. I began stepping through the IIGS Sales Demo and finding out exactly what was breaking on ROM 03. The first hitch was easy enough to see: A BRK crash into E1/00A8, the inline-based GS/OS or ProDOS 16 dispatch vector. But the Sales Demo was written for ProDOS 8. The explanation is that in ROM 03, one of the tool startup calls (I didn't look far enough to see which, I hope it wasn't _QDStartUp) actually makes a GS/OS (or ProDOS 16) stack-based call, thus dispatched via E1/00B0, to open FastFont. E1/00B0 is set up at cold boot, to jump to a ROM-based subroutine that pulls the parameters off of the stack, and allocates new space on the stack to store a dynamically-generated subroutine to make a class-0 (inline) translation of the same OS call (presumably for greater compatibility), and dispatch that via E1/00A8.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Without commenting too deeply on the merits of that decision, I have to say that must have been a tough call for the firmware engineers to make, coupling the ROM tools that closely with the operating system. In the past, I've seen tool calls made from ProDOS 8 very often, and this appears to break them.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;But it's an easy fix, right? Change E1/00A8 to something like 5C 00 00 30 6B, to JML to 30/0000, and at 30/0000, add something like:&lt;/p&gt;
&lt;p&gt;Â Â PLA&lt;/p&gt;
&lt;p&gt;Â Â CLC&lt;/p&gt;
&lt;p&gt;Â Â ADC #0006&lt;/p&gt;
&lt;p&gt;Â Â PHA&lt;/p&gt;
&lt;p&gt;Â Â SEC&lt;/p&gt;
&lt;p&gt;Â Â LDA #0046&lt;/p&gt;
&lt;p&gt;Â Â RTL&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Pull the return address off the stack, increment it so the RTL will return to the address after the inline parameters, set carry to indicate error, and set A to $0046 (File Not Found). Fixes everything, right?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Nope. Things do get a few seconds farther, but it only leads up to another crash. But after pondering the number of patches I'd end up doing to make everything run, as well as the nature of ROM changes such as this, I decided to give downgrading a shot.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Oh, and the silly stuff I wrote back in high school that uses $C4xx on the mouse instead of _ReadMouse, magically works again. Ha.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Tue, 08 Apr 2008 20:36:00 -0400</pubDate>
			<guid>http://65816.com/downgrade.html</guid>
		</item>
		<item>
			<title>February Update</title>
			<link>http://65816.com/february_update.html</link>
			<description>
&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;Lately I've gone through another one of my phases where the IIGS gets a lot of attention. I started by checking out the new &lt;a href=&quot;http://www.cirruscomms.com.au/~mike_stephens/apple2/Pascal_Programming/DoraColour/DoraColour.html&quot;&gt;Dora the Explorer Coloring application&lt;/a&gt; for the IIGS, and then I was simply blown away by all the goodies on the new &lt;a href=&quot;http://www.brutal-deluxe.fr/&quot;&gt;Brutal Deluxe website&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;After that, I checked out the new &lt;a href=&quot;http://www.reactivemicro.com/&quot;&gt;Reactive Micro&lt;/a&gt; site, and got myself a LittlePower adapter and one of the recommended external ATX PSU's. The externalization of the power supply is always a good thing. I also threw a fan inside the IIGS, thanks to &lt;a href=&quot;http://www.mcpb.com/&quot;&gt;MC Price Breakers&lt;/a&gt;. The resulting airflow (and lack of hot noisy internal brick) was enough to make the GS more stable at 12MHz, although 16 is still too hot. Oh well, all TWGS'es (and GS logic boards) are not created equal.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;I'm migrating away from using USB/PS2 devices for keyboard and mouse, in favor of an authentic IIGS keyboard and a (super cheap on eBay) ADB Alps Glidepoint. Also picked up a Sirius RAM card, although it has a couple hiccups and will need a bit more TLC before I can make oh-so-important leap from 5MB to 8MB of RAM.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;When I'm not playing old Apple II games from &lt;a href=&quot;http://www.apple2.org.za/gswv/a2zine/Sel/The202collection.html#000&quot;&gt;The 202 Collection&lt;/a&gt;, or coaxing nice IIGS games into installing onto CompactFlash, I'm even working on my game, which is very close to finally hitting Milestone 1, which is to say that I've got a tiled world scrolling while fully digitized music plays through my Oversampler ripoff sound engine. If I ever ship my game, or even show it off at KansasFest, I promise we'll both be surprised.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;Anyhow, I just wanted to drop a line and say that work has been hell, but I've still found time to use and enhance my favorite computer of all time, and that we're a lot closer to the day I'll pull back the cover and show you the secret game I've been working on. Till then, what's most important to both you and I, is that this 22 year old computer continues to surprise us.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;I've also been collecting a ton of software in anticipation of collecting our old arch-rivals the Commodore 128 and Amiga 1200. These machines have a lot in common with our IIGS, except of course the IIGS's crippling graphics IO bottleneck (and its comparably gorgeous desktop environment).&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Sat, 23 Feb 2008 20:38:48 -0500</pubDate>
			<guid>http://65816.com/february_update.html</guid>
		</item>
		<item>
			<title>Eureka</title>
			<link>http://65816.com/eureka.html</link>
			<description>
&lt;p&gt;I've received all the development tools I needed, plus a copy of the incomparable Spectrum. Recently, I also yanked the Video Overlay and Superdrive cards out of the IIGS on the suspicion that the machine would behave itself better without them. I wasn't wrong. This probably has nothing to do with those cards themselves, but rather the amount of amperage being pulled through the traces of the board and subsequently converted to heat. Interestingly, without those two cards, I have zero stability problems now, which, when combined with the new software (and all the games I've painstakingly and individually tricked into running from the CF card) makes the IIGS a much more appealing computer to use regularly.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;So did I get anywhere with the new stuff? Yes.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;For the first time ever, I've seen the tiled world of the game I've been working on, scrolling on a IIGS screen in both axes. I'll be working all weekend to combine this with my sound driver into a fun little demo to show off. We're cookin with gas now. I just can't wait to show you what I've been working on all this time.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Thu, 13 Dec 2007 20:14:27 -0500</pubDate>
			<guid>http://65816.com/eureka.html</guid>
		</item>
		<item>
			<title>Winter Update</title>
			<link>http://65816.com/winter_update.html</link>
			<description>
&lt;p&gt;&lt;img src=&quot;http://65816.com/_Media/hardball_textmedium.jpeg&quot; alt=&quot;hardball&quot; /&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic;&quot;&gt;Hardball! (Screen grab not mine)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;The IIGS Project did sit idle for a few weeks, no doubt about that, but primarily because I've worked so much. Tonight I got the inspiration to tear the IIGS open and remove a couple cards (VOC and Superdrive), which ironed out a few problems I was having. Now that everything except the ROM 03 incompatible stuff is running, and I'm not having any heat issues, the IIGS is looking welcoming again.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;What about your game, Chris?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;Yes, that. Well, I'm still waiting on the delivery of some development tools I ordered back in July, honest injun, and I believe they'll be here soon finally. But it isn't all because of that. There's also plenty of work for me to do without that stuff, and it's still getting done. Sorry! Did I mention I hold two full-time jobs? How did you think I managed to afford that eBay IIGS shopping spree?&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;What I did tonight, was spend a few early morning hours playing all the fun IIGS games and rediscovering, for the umpteenth time this year, the joy of computing. And nothing's going to be me back in the thick of things faster than that, I promise you.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Sat, 01 Dec 2007 04:34:42 -0500</pubDate>
			<guid>http://65816.com/winter_update.html</guid>
		</item>
		<item>
			<title>Atari 130XE</title>
			<link>http://65816.com/atari_130xe.html</link>
			<description>
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://65816.com/_Media/atari_800_textmedium.jpeg&quot; alt=&quot;atari_800&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;(Atari 800, my first computer)&lt;/i&gt;&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://65816.com/_Media/xe130_textmedium.jpeg&quot; alt=&quot;xe130&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;(My stylin' 130XE)&lt;/i&gt;&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;I know I have this general rule against collecting even more old computers, but I feel sort of an obligation to make sure I have operational Atari 8-bit hardware. An Atari 800 was my first computer, and in December of 1981 (I would have been 4 and a half, roughly), I began programming it in BASIC. It got an almost-daily workout by me until it was replaced in approximately October 1986, by the Apple IIGS (yeah I know that's an early date to have an Apple IIGS at retail, but it was a dealer demo, a ROM 00 without a Woz signature. But let's leave Apples alone for just one blog entry here).&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;So in 2003, I'd added an XE Game System to my collection, choosing it for its detachable keyboard. A little while ago, I went to boot it up, and found that its ROM was bad. Now, I'm fully aware that I could fix this problem with the soldering iron I love so much, and a $12 order from Best Electronics, and I probably will someday, but at this point I'd also had enough of the XEGS' enormous footprint for the device + keyboard. I decided to get a 130XE as my new &quot;main&quot; Atari8, because it has that amazing 128K of RAM and FREDDIE memory management chip, and because I think many enthusiasts had also chosen it as the modern jumping-off point. A few clicks on eBay, and a week of waiting, and I had a 130XE in mint condition (the cellophane hasn't even been pulled off label) in its retail box.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;I already had an RS232-SIO cable that I had used on the XEGS, but the SIO host back then was a Windows machine running APE, and this time it would have to be the Intel Mac Mini running SIO2OSX. So I also had to order the specific USB-RS232 cable they recommend, because (and I know this from experience attempting to write SIO hosts on the Mac before) the hardware-handshake lines, which are pretty important on SIO, are unreliable on nearly all USB-RS232 cables.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;Anyway, after all that, my Atari stuff is working again and I'm pretty happy about that. I have grander plans for it, like installing the 30-in-1 OS ROM switcher, and experimenting with MyIDE and flash carts. But for now, I'm just happy to blast away on some of the first videogames I enjoyed.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;When I'm not working on the IIGS game project, of course.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Thu, 06 Sep 2007 17:03:17 -0400</pubDate>
			<guid>http://65816.com/atari_130xe.html</guid>
		</item>
		<item>
			<title>Making Moves</title>
			<link>http://65816.com/making_moves.html</link>
			<description>
&lt;p&gt;Hello, I haven't forgotten about this project in the least. Since last update, I've...&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;- Sold the RAMFast-D and PC Transporter back to the community via eBay because they weren't going to get used&lt;/p&gt;
&lt;p&gt;- Replaced S5,D1 with a 1.4M Superdrive, which makes absolutely no difference&lt;/p&gt;
&lt;p&gt;- Passed on several opportunities to replace the TWGS with a Zip GSX, because it would make absolutely no practical difference, other than the much smaller current draw, which isn't enough to convince me yet. The mess stays relatively cool and my power bill isn't outrageous.&lt;/p&gt;
&lt;p&gt;- Replaced the RAMFast-D with an Apple High Speed SCSI card, with which I am much more pleased.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;And perhaps more importantly, I've...&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;- Gotten ORCA/C set up and started to adjust to programming the IIGS in a higher-level language (I think I said I was going to do this back in the beginning, it just took me awhile)&lt;/p&gt;
&lt;p&gt;- Set up a Generic Tile Engine development environment&lt;/p&gt;
&lt;p&gt;- Poured a few more hours of work into making tile maps&lt;/p&gt;
&lt;p&gt;- Made image dumps of the CompactFlash partitions and begun more rapid development in emulators (freeing up the actual IIGS for more important stuff like Task Force)&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;... Also considering putting this old Quantum Fireball to good use by building an experimental GNO HFS development system on it.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;Frankly, this part of the project is where it gets boring to you, because I don't have a lot to say until a demo is released, which will be as soon as possible, as long as the 60+ hour work week cooperates. But progress is happening quickly, so who knows...&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Wed, 22 Aug 2007 19:55:10 -0400</pubDate>
			<guid>http://65816.com/making_moves.html</guid>
		</item>
		<item>
			<title>SuperGS Complete</title>
			<link>http://65816.com/supergs_complete.html</link>
			<description>
&lt;p&gt;... Or at least mostly so. Whatever modifications I make from here on out, will probably be relatively minor. It took roughly 4 months to acquire and build.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://65816.com/_Media/finished_textmedium.jpeg&quot; alt=&quot;finished&quot; style=&quot;outline:none;&quot; /&gt;&lt;/div&gt;
&lt;p /&gt;
&lt;p&gt;The final allocation of slots:&lt;/p&gt;
&lt;p&gt;1. Apple Rev-C SCSI (maybe HS SCSI someday, didn't like RAMFast)&lt;/p&gt;
&lt;p&gt;2. Uthernet&lt;/p&gt;
&lt;p&gt;3. TransWarp GS / 32K Cache / new GALS / 12MHz&lt;/p&gt;
&lt;p&gt;4. MDIDeas Supersonic&lt;/p&gt;
&lt;p&gt;5. Apple 3.5&quot; Disk Controller (&quot;Superdrive Card&quot;)&lt;/p&gt;
&lt;p&gt;6. Apple Video Overlay Card&lt;/p&gt;
&lt;p&gt;7. //SHH Systeme Microdrive Turbo, 256M CF card&lt;/p&gt;
&lt;p&gt;Memory: Harris Labs GS Sauce, 4MB&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;The motherboard is still ROM 03 with the prototype ROMs that contain a QuickDraw II bug that is unlikely to bother me. The CDROM drive is an AppleCD 300e, now containing the Golden Orchard CDROM, which is a seemingly-infinite collection of applications, games, information, and even .MODs.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;There may be some more minor changes (replace 800K disks with Superdrives, swap some cards around for better circulation, etc), but for the most part, this is it. And I got Toolbox Reference 3 and GS/OS Reference in the mail, so I've got to do some more reading and step into the world of resources. I suspect my game could benefit greatly from a good knowledge of resources. I'm sure I'll dive into it and post something here about the results. Till then.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Sat, 04 Aug 2007 10:12:21 -0400</pubDate>
			<guid>http://65816.com/supergs_complete.html</guid>
		</item>
		<item>
			<title>Updates</title>
			<link>http://65816.com/updates.html</link>
			<description>
&lt;p&gt;Sorry, no new code, but as always, some work on the IIGS and NeXT hardware.&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://65816.com/_Media/moregs_textmedium.jpeg&quot; alt=&quot;moregs&quot; /&gt;&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;The IIGS got a System Saver and a brand new CH Mach III. That's a RAMFast-D with 1MB cache sitting next to the monitor too. The more I mess with it, the less SCSI seems worth the hassle on the IIGS, with the Microdrive Turbo CF setup in place. But I'm not done playing with it yet. Also the System Saver IIGS allows the machine to be stable with the case on at 12MHz, so I think the whole setup looks a bit nicer. Oh and yeah, I might have some Superdrive hardware on the way after all. I've no idea why. But then why do I do any of this...&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://65816.com/_Media/nextscreen_textmedium.jpeg&quot; alt=&quot;nextscreen&quot; /&gt;&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;That's a screen shot from the nearly-revived NeXT Turbo Dimension cube. The monitor's really LCD, the fisheye effect is from the Nikon lens. I'm almost done installing and patching OpenStep 4.2 onto a 4GB 50-pin IBM disk I found today, and then I have to tidy up the setup a bit more, and it'll be done. I'm not sure how often it will be running, but I'm glad it will be able to do something again. These two machines are my only &quot;vintage&quot; computers and they should at least be operational if they're going to be worth more than scrap metal.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://65816.com/_Media/fullnext1_textmedium.jpeg&quot; alt=&quot;fullnext1&quot; /&gt;&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;Here it is, booted up and awaiting the login...
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://65816.com/_Media/fullnext2_textmedium.jpeg&quot; alt=&quot;fullnext2&quot; /&gt;&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;And here we are all nice and logged in...
&lt;/p&gt;
&lt;p /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://65816.com/_Media/next3_textmedium.jpeg&quot; alt=&quot;next3&quot; /&gt;&lt;/div&gt;
&lt;p /&gt;
&lt;p&gt;And another shot of the Workspace Manager.
&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;I can't imagine there are very many Cubes like this one in operation today. This one has 128M of system RAM and 128M of Dimension RAM (only 64 of which it will actually use), the v74 ROM upgrade, and a Turbo CPU. I have the 90-pound Hitachi CRT that sold with it but I refuse to trot it out and thereby admit that I own a CRT. I also have an ADB soundbox, but never got into NeXT ADB peripherals. This computer was built by me in 1999 from parts dating back to 1991 or so, and for some time in 2000 actually served as a work desktop. Glad to see it alive again.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Thu, 02 Aug 2007 01:03:47 -0400</pubDate>
			<guid>http://65816.com/updates.html</guid>
		</item>
		<item>
			<title>Libsound Beta</title>
			<link>http://65816.com/libsound_beta/</link>
			<description>
&lt;p&gt;Wow wow wow. This is the sound driver I always wanted to write as a kid, but somehow I just couldn't hack it. Today, after a conversation with Lucas, I sat down and wrote it in a roughly 10-hour stretch. I just couldn't believe it, when everything started passing testing.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New Stuff!&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This is the same library as before, it will play an infinitely long sound with its Oversampler-ripoff engine. But now it manages and plays one-shot sounds for you, with the following new and exciting C calls:&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;int loadOneSound( char *path );&lt;/p&gt;
&lt;p&gt;Whereas *path is a GS/OS path and not really a c-string again. The int returned, is a libsound Sound ID number that you will use to refer to the sample later in soundPlayShort(). Libsound takes care of allocating RAM for the sample with the Memory Manager handle you gave it during soundInit(), and of course it uses GS/OS to load the sample into that allocated memory.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;int soundPlayShort( int soundid, int rate );&lt;/p&gt;
&lt;p&gt;soundid is the Sound ID number that loadOneSound() gave you earlier, rate is the Ensoniq DOC playback rate, (32 * sample rate in hz) / 1645. You do not have to worry about DOC RAM position or generator number. Libsound manages a pool of 8 generators and 32K of DOC RAM for you. When asked to play a sound, an unused generator is found, and DOC RAM is allocated with a granularity of $100 (one page). When the sample finishes playing, you don't have to do anything -- the sound MIRQ handler will automatically deallocate the generator and the pages of DOC RAM for you. Hell yes.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Limitations&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;There are some completely arbitrary limits. They are:&lt;/p&gt;
&lt;p&gt;- Only 32 one-shot sounds may be managed. This isn't a design limitation, it is completely arbitrary and can be bumped up (to 64?) if need be.&lt;/p&gt;
&lt;p&gt;- Only 8 sound generators are used to play one-shot sounds. This really shouldn't be a problem, as games generally do not play 8 one-shot sounds at a time. But it also is not a design limitation and could easily come up to 16 or more.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Changes&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;I don't do any error handling anymore. If I get a carry bit set on return from GSOS or the Toolbox, I do my very best to return to you immediately with the error number still in A, and the carry bit set. If a GSOS error occurs during long-sound playback, the file is closed and the DOC voices are halted. I promise I don't dump you to the rolling-apple anymore.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;Also, the soundPlayStart function has added more parameters. The prototype is now thus:&lt;/p&gt;
&lt;p&gt;int soundPlayStart( char *path, int rate, int oversample, int echodelay );&lt;/p&gt;
&lt;p&gt;Whereas oversample = 0 is what you may call 'normal' operation,&lt;/p&gt;
&lt;p&gt;oversample = 1 is &quot;2X oversampling&quot;, where the sound data is double through interpolation (every other byte is an average of the two around it). In this case, double 'rate' as well.&lt;/p&gt;
&lt;p&gt;oversample = 2 is &quot;4X oversampling&quot;, which quadruples the size of the sound data, so you should quadruple the playback rate as well.&lt;/p&gt;
&lt;p&gt;Oversampling can sometimes add perceived fidelity to the song being played, but you're more likely to just ignore it.&lt;/p&gt;
&lt;p&gt;'echodelay' is the delay (in VBL intervals of 1/60th of a sec) between starting playback on L and R channels, to create a faux stereo effect.&lt;/p&gt;
&lt;p&gt;These two effects were present in the Oversampler program when I reverse-engineered it and when I refactored it, so I'm putting them in your hands too.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Future Directions&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;soundPlayShort() will probably get more parameters in the next revision, to allow playback to occur on L, R, or both channels, per sound. There may also be a volume parameter to allow samples to play more softly or loudly.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;b&gt;In Other News&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;A RAMFast-D and AppleCD 300e are arriving within the next few days (where do I get all these toys!), and I'll be running some tests on the AppleCD 300e with both RAMFast and Apple non-highspeed SCSI cards, to see how well a SCSI CDROM works with the Oversampler engine. If it works well even without a fancy RAMFast, I'm more likely to consider mastering my finished product as an HFS CDROM, as well as .hdv image and/or CF card images.
&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;Click the title for the download link.&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Sat, 21 Jul 2007 22:12:43 -0400</pubDate>
			<guid>http://65816.com/libsound_beta/</guid>
		</item>
		<item>
			<title>The Switch</title>
			<link>http://65816.com/the_switch.html</link>
			<description>
&lt;p&gt;Everything is hosted in ORCA now, and the switch was somewhat pleasant. It took about 4 hours to reformat the source and get used to the new assembler directives and such, but I have a working version of snddemo that launches from the ORCA shell now. This is significant as it clears the way for me to put together my test program that will scroll tiles while playing music. With just a few days left before you-know-what.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Fri, 13 Jul 2007 18:26:18 -0400</pubDate>
			<guid>http://65816.com/the_switch.html</guid>
		</item>
		<item>
			<title>Turbo Cube Restoration Begins</title>
			<link>http://65816.com/turbo_cube_restoration_begi.html</link>
			<description>
				&lt;div class="article-thumbnail"&gt;
					&lt;img id="k-Page-image-243"
						src="http://65816.com/_Media/nextrevival_thumbnail.jpeg"
						alt="Turbo Cube Restoration Begins"
						width="128"
						height="74" /&gt;
				&lt;/div&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;(Click title for larger picture)&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;Since the new Apple IIGS building project went so well, I decided to clean up and restore the NeXT cube as well. I did not want to use the 90-pound Hitachi CRT (although I do still have it, sadly enough), but the Samsung Syncmaster 712N LCD supposedly does Sync-on-Green. The Cube has a full 128M of RAM and 128M of NeXTDimension RAM, as well as the Turbo CPU board with the last firmware revision (which allows use of ADB peripherals, although I do not use them, as well as SCSI CDROM booting). The project currently awaits an SVGA-to-13W3 cable and a new root disk (the current one is kaput) in order to be operational. Those should be in place soon. I also have tons more NeXT loot to add to this display, so I'll get more pictures up soon.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Thu, 12 Jul 2007 17:29:30 -0400</pubDate>
			<guid>http://65816.com/turbo_cube_restoration_begi.html</guid>
			<enclosure url="http://65816.com/_Media/nextrevival_large.jpeg" length="89004" type="public.jpeg" />
        <media:thumbnail url="_Media/nextrevival_thumbnail.jpeg" />
        <media:content url="_Media/nextrevival_large.jpeg" type="public.jpeg" />
		</item>
		<item>
			<title>Another Weekend</title>
			<link>http://65816.com/another_weekend.html</link>
			<description>
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://65816.com/_Media/dscn2286_textmedium.jpeg&quot; alt=&quot;DSCN2286&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS; font-size: 9px;&quot;&gt;(Above: The IIGS corner, which due to square-footage restrictions, is not permitted to exceed this cart. In this case, Disk IIc fits where Apple 5.25&quot; Drive would not.)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/i&gt;&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;Just an update. I've primarily been working on my tiles and maps. I'm really excited about what I have and soon we'll see it on a IIGS (or emulator) near you. I hadn't realized that Generic Tile Engine is presently an ORCA-only affair, which would not be a problem ideally, but since ORCA is still being sold and its only fulfiller is quite a busy man, my options are somewhat limited. But Lucas S is more than helpful and the project will easily make it around this corner.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;text-decoration: line-through;&quot;&gt;(Aside, I'm not sure how ethical you think this is, but it passes my test. I'll be very happy to buy ORCA and hope that it gets fulfilled before Christmas, and forward you a copy of the receipt email, if you'll... you know. Just a thought. I only need the assembler. If you're still listening, I also need Spectrum...)&lt;/span&gt;Â I got everything and more, and legally licensed at that. Thanks everyone.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;And before I forget, please join me in welcoming Haloscan comments to 65816.com. I'd love to hear all your thoughts on this stuff.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img src=&quot;http://65816.com/_Media/dscn2287_textmedium.jpeg&quot; alt=&quot;DSCN2287&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS; font-size: 9px;&quot;&gt;(Above: Super-GS current configuration, with VOC, but PCTransporter yanked. Reactive Heavy Duty Power Supply also installed. Various GALs and crystals laying around. K-rad Megademo disks handy too.)&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;I spent a lot of time today attempting to stabilize the Super-GS too, mainly because I'd fiddled with crystals so much, I'd broken the fragile legs off of the 25MHz full-can (yes full, so two legs were oddly bent to fit in the half-can socket) oscillator that came with the TWGS when I'd purchased it. This left me with a 55MHz oscillator (for a 13.75MHz system) from my experimental oscillator collection, as a minimum to start from. At 13.75, I managed to get the machine to be stable for 10 entire minutes, which was a new record, but then came the crashes, as always.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;I tried pushing the slot sprongers back out, cleaning card edges with eraser, swapping in different GALs, filtered power, a Reactive 200W Heavy Duty Power Supply... all with very little luck. I even tried different chassis/motherboards and ended up getting the same crashes. This says to me then, that my limitations lie with the TWGS card itself. Tomorrow I believe I'll have oscillators for more sane speeds like 8, 10, and 12MHz. Since 13.75 is just barely on the wrong side of stable (I can clear several levels of Wolf3D before it crashes), I think 12 will probably do fine, 10 will be stable if 12 ain't, and 8 will be unnecessarily slow. But I've been wrong about these things before. TWGS experimentation and stabilization is apparently a very slow and personal process for every IIGS nerd, due partly to the tolerances and margins-of-error of equipment that was manufactured 20 years ago. I mean we are talking about freakin antiques here.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;In other news, during all this experimentation, I yanked the PC Transporter, again. And realized just how much better the video output looks without that nasty Colorswitch card, again. If it stays yanked for very long, I promise I'll sell it back to the community, because it's one of the more useless cards I have right now.
&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;Am I going to KansasFest? I haven't been to the actual event, seminars and all, since 1993. And this might be the last one. And I actually have some amazing stuff to share. All this is weighing on me towards 'yes', but I have to make the decision this week, so you'll know soon. Everyone else who has played a part in my little year-2007 IIGS adventure will probably be there, so perhaps I should be too. And of course my family is in Kansas City also.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;So that's it for now, just another progress report to show you I've been working. And it doesn't even feel like work, because this is among the more gratifying hobbies/money pits I've ever had. The IIGS remains now, as then, a teacher of programatic lessons as well as of the self.
&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Sun, 08 Jul 2007 22:10:02 -0400</pubDate>
			<guid>http://65816.com/another_weekend.html</guid>
		</item>
		<item>
			<title>Whoops</title>
			<link>http://65816.com/whoops.html</link>
			<description>
&lt;p&gt;If you actually tried the Oversampler Sound Driver Demo and the sound skipped on you, it's because DOC registers $A0, $A8, and $B0 should have been initialized to $02 (one shot) instead of $00 (free run). It cost me about 6 hours to track that down. You can patch it yourself or await the next release of stuff here.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;Excellent progress with GTE too. I should have something else to share soon.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Sun, 01 Jul 2007 01:32:19 -0400</pubDate>
			<guid>http://65816.com/whoops.html</guid>
		</item>
		<item>
			<title>Oversampler Sound Driver Demo</title>
			<link>http://65816.com/oversampler_sound_driver_de/</link>
			<description>
&lt;p&gt;Today, I took advantage of a marvellous rain shower to integrate my basic GS/OS &quot;shell&quot; program that draws a basic menu bar and goes into a TaskMaster event loop, with a sound player that, although recoded by hand, is still a shameless ripoff of Oversampler technology. The end result, though, is to demonstrate a version of this technology that works well and can be integrated into a TaskMaster-style event loop. This fulfills the first milestone of my upcoming product's development. The next milestone involves getting familiar with Lucas' Generic Tile Engine and adding a scrolling tiled map into the mix. At that point, the results will begin to get progressively more exciting, I hope.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;The Merlin 16+ Source link, will display the source to the GS/OS program, while the &quot;ShrinkIt Demo Archive&quot; link contains an actual playable music file as well as the built GS/OS program that plays it. It's a little over 900 lines of source, and is probably the nicest thing I've ever done on the GS so far. It works perfectly on Super-GS.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;Just something to show you I've been working. :)&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;(Click entry title for links)&lt;/p&gt;
			</description>
			<pubDate>Sun, 24 Jun 2007 22:10:09 -0400</pubDate>
			<guid>http://65816.com/oversampler_sound_driver_de/</guid>
		</item>
		<item>
			<title>Just Another Update...</title>
			<link>http://65816.com/just_another_update.html</link>
			<description>
&lt;p&gt;Haven't gotten a new power supply yet, or finished upgrading one by myself, however I did put the VOC and PC Transporter and SCSI card back into the machine, thus occupying all 7 slots as well as the memory slot (with planning and careful management of card protrusions to prevent shorts, this is possible). With the TransWarp GS at just 7MHz and the new low-power components installed on that board, the machine will run with all 7 cards inserted and the case lid on, indefinitely. Those TWGS upgrades help so much even if you don't swap crystals.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;(&lt;span style=&quot;padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;&quot;&gt;&lt;i&gt;For the interested, that's 1:Uthernet 2:PCTransporter 3:TransWarpGS 4:MicroDrive Turbo 5:VOC 6:MDIDeas SuperSonic 7:SCSI MM:GS Sauce 4MB. I'll get pictures soon.)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div&gt;&lt;img src=&quot;http://65816.com/_Media/joysticks2_textmedium.jpeg&quot; alt=&quot;joysticks2&quot; /&gt;&lt;/div&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;Also, I'd like to tell you that the 8x2 internal joystick pin header shouldn't be used due to logistical inconvenience as well as the idea that a good yank would stress your 20-year-old logic board. But none of those reasons applied to me, I just snipped that pin header off of my Kraft joystick (same model pictured above) when I got tired of trying to argue it through the GS back ports. A few weeks later, I picked up the wreckage, identified the wires in the cord, and put a nice Radio Shack DB9 metal plug on it and screwed it to the back of the GS. It works wonderfully, and my countless games of Task Force and Xenocide are testament to that fact.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;Oh, and the &lt;a href=&quot;http://www.a2retrosystems.com/&quot;&gt;Uthernet card&lt;/a&gt; is working great. I was able to configure it and use the textmode telnet program that comes with Marinetti. I've yet to more fully explore it, but now that I've got a joystick and a pretty stable system, I've got a million things I wanna try when I get time.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;There aren't many hardware improvements and tinkerings left to do at this point, so I promise I'll get back to programming.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Wed, 13 Jun 2007 21:46:21 -0400</pubDate>
			<guid>http://65816.com/just_another_update.html</guid>
		</item>
		<item>
			<title>IIGS on 42&quot; Westinghouse LCD</title>
			<link>http://65816.com/iigs_on_42_westinghouse_lcd/</link>
			<description>
				&lt;div class="article-thumbnail"&gt;
					&lt;img id="k-Page-image-210"
						src="http://65816.com/_Media/gsbigscreen1_thumbnail.jpeg"
						alt="IIGS on 42&quot; Westinghouse LCD"
						width="128"
						height="85" /&gt;
				&lt;/div&gt;
			</description>
			<pubDate>Sat, 09 Jun 2007 21:34:08 -0400</pubDate>
			<guid>http://65816.com/iigs_on_42_westinghouse_lcd/</guid>
		</item>
		<item>
			<title>TWGS Upgrades</title>
			<link>http://65816.com/twgs_upgrades.html</link>
			<description>
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p /&gt;
&lt;div&gt;&lt;img src=&quot;http://65816.com/_Media/weekend1_textmedium.jpeg&quot; alt=&quot;weekend1&quot; /&gt;&lt;/div&gt;
&lt;div&gt;I received a mega-order from GSE-Reactive today and immediately put it to use. The TWGS board got a new set of GALs, the 32KB cache board with 1.8S firmware, a new 65816, and various crystals. Â You might also see that I pulled the VOC for now and put the Uthernet in Slot 1 (with which I have not yet had time to mess).&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;So far it's very stable at 7MHz, but temperamental even at 13.75MHz, and will crash before it even boots at 18MHz. Changing out the PSU with another (curiously differently-labelled) one seemed to help somewhat. Other factors that are known to help are reseating the oscillator, cold air, and reseating the CPU cable and ZIF socket. Yeah, I know filtered power and a heavy duty power supply will help tons as well, that's on my list.&lt;/div&gt;
&lt;p /&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;There are many more variables I can play with. I have a few ROM 01 and ROM 03 boards here, each with its own tolerances and quirks, and one will probably clearly prove itself to be more stable than others. Also note that the board I've been using was never intended to be sold to customers in the first place. So I'm not worried, but it's going to take me a few days to get it up to rip-roaring speed along with everything else.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;So give me another GS-messin session or two, and I'll post about my stable IIGS and give my impressions of the Uthernet card too.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;-Chris&lt;/p&gt;
			</description>
			<pubDate>Sat, 09 Jun 2007 21:17:03 -0400</pubDate>
			<guid>http://65816.com/twgs_upgrades.html</guid>
		</item>
		<item>
			<title>More Setup Photos</title>
			<link>http://65816.com/more_setup_photos/</link>
			<description>
				&lt;div class="article-thumbnail"&gt;
					&lt;img id="k-Page-image-188"
						src="http://65816.com/_Media/iigs4_thumbnail.jpeg"
						alt="More Setup Photos"
						width="128"
						height="63" /&gt;
				&lt;/div&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;Memory Expansion - Fully-populated Harris Labs GS Sauce&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;Slot 7 - Microdrive Turbo IDE/CF Adapter, 256M CF Card&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;Slot 5 - MDIDeas Supersonic&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;Slot 3 - TransWarp GS&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;Slot 1 - Video Overlay Card&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;(Cards spaced a slot apart to try and permit some sort of airflow)&lt;/p&gt;
			</description>
			<pubDate>Fri, 01 Jun 2007 21:35:19 -0400</pubDate>
			<guid>http://65816.com/more_setup_photos/</guid>
		</item>
		<item>
			<title>Oversampler Commentary</title>
			<link>http://65816.com/oversampler_commentary.html</link>
			<description>
&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Times; font-size: 16px;&quot;&gt;&lt;img src=&quot;http://65816.com/_Media/overlogo3_textmedium.gif&quot; alt=&quot;overlogo3&quot; style=&quot;padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-color: rgb(0, 0, 0); border-right-color: rgb(0, 0, 0); border-bottom-color: rgb(0, 0, 0); border-left-color: rgb(0, 0, 0); border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; color: rgb(68, 0, 17); font-family: 'Trebuchet MS'; font-size: 12px;&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;Equally as important as writing new code, is reading old code. Sunday, I picked apart the venerable Oversampler, because I'd been considering using its technology in something I'm developing. I don't really want to say what I'm developing yet, but I figured that the remaining GS users have either an emulator or a CF card (or other huge mass-storage), so I could use 5-megabyte sound files instead of MOD/Soundsmith for a background track, to provide a really stunning soundtrack for a year-2007 IIGS product.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Disassembling IIGS OMF-linked files is easier than ever, you just double-click on them in CiderPress. In the space of about 8 hours, I managed to completely understand Oversampler, and I want to share a bit about its technology with you.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;You may know that Oversampler loads up to 16KBytes of data from the disk at a time, and if you request, performs &quot;oversampling,&quot; or averages the values of every two bytes and inserts the average between them, thus doubling the resolution of a file from say, 23khz to 46khz, for example, for &quot;2x oversampling.&quot; It also has a &quot;4x&quot; mode for even greater resolution.&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;Most of Oversampler is actually desktop interface and windows, so let's dive right into the player code...&lt;/p&gt;
&lt;p&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; init player&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/03E3: A2 12 0AÂ  Â  Â  LDX #0A12&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/03E6: 22 00 00 E1 Â  JSL E10000Â  WaitCursor()&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/03EA: 20 7E 09Â  Â  Â  JSR 097E&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; init DOC RAM and registers&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/03ED: 20 4E 0AÂ  Â  Â  JSR 0A4E&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; read from disk and stash to DOC (2x$4000)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/03F0: 90 08 Â  Â  Â  Â  BCC 03FA {+08}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; skip to player if no problems&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/03F2: A2 04 CAÂ  Â  Â  LDX #CA04&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; else set cursor back to error and stop&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/03F5: 22 00 00 E1 Â  JSL E10000Â  InitCursor()&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/03F9: 60Â  Â  Â  Â  Â  Â  RTS&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;Nothing too fancy here, except that I should show you what's done to init the DOC RAM and registers, and load the first chunks from disk.&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;The routine below is responsible for setting all the registers of the DOC to default values as specified in the table after it, as well as filling up the DOC RAM with a value of $80, or silence. Note the construction of LDA E100CA / AND #0F / ORA #60 / STA E1C03C. If you've programmed the DOC before, you know that this is because the system volume is at E1/00CA, and when we ask the DOC for access to its registers, we must preserve the bits for system volume. 00 is stored in C03E/C03F to indicate the beginning of the DOC's 64K RAM, and then $80 is slammed into C03D 65,535 times. Then, the table at 09C5 in the program code is read, and for each value in the table, a subroutine is called to set the given DOC register to the particular value.&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; clear out the DOC RAM to all $80 (baseline)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/097E: E2 20 Â  Â  Â  Â  SEP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0980: AF CA 00 E1 Â  LDA E100CA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0984: 29 0F Â  Â  Â  Â  AND #0F&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0986: 09 60 Â  Â  Â  Â  ORA #60&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0988: 8F 3C C0 E1 Â  STA E1C03C	; select DOC RAM, auto-increment&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/098C: A9 00 Â  Â  Â  Â  LDA #00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/098E: 8F 3E C0 E1 Â  STA E1C03E&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0992: 8F 3F C0 E1 Â  STA E1C03F	; zero it out high and low&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0996: A0 00 Â  Â  Â  Â  LDY #00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0999: A9 80 8DÂ  Â  Â  LDA #8D80	; LDA #80&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/099C: 23 0B Â  Â  Â  Â  AND 0B,S		; STA 0B23&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/099E: 8F 3D C0 E1 Â  STA E1C03D	; store data into the doc&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09A2: C8Â  Â  Â  Â  Â  Â  INY&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09A3: D0 F9 Â  Â  Â  Â  BNE 099E {-07}&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09A5: C2 20 Â  Â  Â  Â  REP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09A7: A0 00 00Â  Â  Â  LDY #0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09AA: B9 C5 09Â  Â  Â  LDA 09C5,Y&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09AD: C9 FF FFÂ  Â  Â  CMP #FFFF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09B0: F0 12 Â  Â  Â  Â  BEQ 09C4 {+12}&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09B2: 29 FF 00Â  Â  Â  AND #00FF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09B5: AAÂ  Â  Â  Â  Â  Â  TAX&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09B6: B9 C5 09Â  Â  Â  LDA 09C5,Y&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09B9: EBÂ  Â  Â  Â  Â  Â  XBA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09BA: 29 FF 00Â  Â  Â  AND #00FF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09BD: 20 3C 09Â  Â  Â  JSR 093C		; set DOC register&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09C0: C8Â  Â  Â  Â  Â  Â  INY&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09C1: C8Â  Â  Â  Â  Â  Â  INY&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09C2: 80 E6 Â  Â  Â  Â  BRA 09AA {-1A}&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09C4: 60Â  Â  Â  Â  Â  Â  RTS&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; default DOC register settings&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09C5: 00 00 Â  Â  Â  Â  BRK 00		; register 00 (freq low0) = 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09C7: 20 08 10Â  Â  Â  JSR 1008		; register 20 (freq high0) = 08&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09CA: 00 30 Â  Â  Â  Â  BRK 30		; register 10 (freq low16) = 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09CC: 08Â  Â  Â  Â  Â  Â  PHP		; register 30 (freq high16) = 08&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09CD: 08Â  Â  Â  Â  Â  Â  PHP		; register 08 (freq low8) = 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09CE: 00 28 Â  Â  Â  Â  BRK 28		; register 28 (freq high16) = 08&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09D0: 08Â  Â  Â  Â  Â  Â  PHP&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09D1: 40Â  Â  Â  Â  Â  Â  RTI		; register 40 (volume 0) = 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09D2: 00 50 Â  Â  Â  Â  BRK 50		; register 50 (volume 16) = 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09D4: 00 48 Â  Â  Â  Â  BRK 48		; register 48 (volume 8) = 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09D6: 00 80 Â  Â  Â  Â  BRK 80		; register 80 (address low0) = 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09D8: 00 88 Â  Â  Â  Â  BRK 88		; register 88 (address low8) = 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09DA: 00 90 Â  Â  Â  Â  BRK 90		; register 90 (address low16) = 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09DC: 00 C0 Â  Â  Â  Â  BRK C0		; register C0 (wavetable info0) = 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09DE: 00 C8 Â  Â  Â  Â  BRK C8		; register C8 (wavetable info8) = 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09E0: 00 D0 Â  Â  Â  Â  BRK D0		; register D0 (wavetable info16) = 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09E2: 00 A0 Â  Â  Â  Â  BRK A0		; register A0 (control 0) = 02 one shot, no int&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09E4: 02 A8 Â  Â  Â  Â  COP A8		; register A8 (control 8) = 02 one shot, no int&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09E6: 02 B0 Â  Â  Â  Â  COP B0		; register B0 (control 16) = 02 one shot, no int&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09E8: 02 FF Â  Â  Â  Â  COP FF		; FFFF - end of register defaults&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/09EA: FF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Let me show you that DOC register-setting routine too, while I'm at it. Notice that Ciderpress' disassembler choked a bit after SEP #20, but I was able to fill in. The LDA E1C03C/BMI loop just waits till the DOC isn't busy, and then of course the LDA E100CA / AND #0F / STA E1C03C construction again. Note that we store $0 into the upper part of C03C this time whereas above we stored $6 there. That's because $6 means, access the DOC RAM in auto-increment mode (where each successive write will write to the next address in DOC RAM), whereas $0 means we want access to the DOC's registers.&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; subroutine to set a doc register&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; a = data&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; x = register number&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/093C: E2 20 Â  Â  Â  Â  SEP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/093E: 48Â  Â  Â  Â  Â  Â  PHA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/093F: AF 3C C0 E1 Â  LDA E1C03C&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; sound control register&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0943: 30 FA Â  Â  Â  Â  BMI 093F {-06}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; loop till it isn't busy&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0945: AF CA 00 E1 Â  LDA E100CA&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; get system volume&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; * disassembler error: should be&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;					&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; * AND #0F Â  - select DOC registers&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;					&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; * STA E1C03C&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/094F: 8AÂ  Â  Â  Â  Â  Â  TXA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0950: 8F 3E C0 E1 Â  STA E1C03E&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; doc register number&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0954: 68Â  Â  Â  Â  Â  Â  PLA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0955: 8F 3D C0 E1 Â  STA E1C03D&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; doc register data&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0959: C2 20 Â  Â  Â  Â  REP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/095B: 60Â  Â  Â  Â  Â  Â  RTS&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; read a doc register&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; a = data&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; x = register number&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/095C: E2 20 Â  Â  Â  Â  SEP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/095E: AF 3C C0 E1 Â  LDA E1C03C&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0962: 30 FA Â  Â  Â  Â  BMI 095E {-06}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; wait till sound controller not busy&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;tt&gt;00/0964: AF CA 00 E1 Â  LDA E100CA&lt;/tt&gt;&lt;/div&gt;
&lt;div&gt;&lt;tt&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;div style=&quot;padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(68, 0, 17);&quot;&gt;; * disassembler error: should be&lt;/div&gt;
&lt;div style=&quot;padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(68, 0, 17);&quot;&gt;; * AND #0F Â  - select DOC registers&lt;/div&gt;
&lt;div style=&quot;padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(68, 0, 17);&quot;&gt;; * STA E1C03C&lt;/div&gt;
&lt;/span&gt;&lt;/tt&gt;&lt;/div&gt;
&lt;div&gt;&lt;tt&gt;00/096E: 8AÂ  Â  Â  Â  Â  Â  TXA&lt;/tt&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/096F: 8F 3E C0 E1 Â  STA E1C03E&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0973: AF 3D C0 E1 Â  LDA E1C03D&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0977: AF 3D C0 E1 Â  LDA E1C03D&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/097B: C2 20 Â  Â  Â  Â  REP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/097D: 60Â  Â  Â  Â  Â  Â  RTS&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Courier;&quot;&gt;&lt;tt&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/span&gt;So now that the DOC RAM and registers are initialized, let's continue with the player. Next is a call to a routine at 0A4E, which loads chunks from disk and shoves them into the DOC RAM. As you might imagine, there's a lot of magic here, so let's take a closer look.&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; read up to 16 kbytes from disk and stash to DOC, twice&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; fills DOC RAM from $0000-$8000 (32k) with or without oversampling&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A4E: A9 00 00Â  Â  Â  LDA #0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A51: 8D DD 0EÂ  Â  Â  STA 0EDD&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A54: 8D DF 0EÂ  Â  Â  STA 0EDF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A57: 20 3C 0EÂ  Â  Â  JSR 0E3C&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; seek to file position&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A5A: B0 33 Â  Â  Â  Â  BCS 0A8F {+33}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; return if error?&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A5C: A6 88 Â  Â  Â  Â  LDX 88&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A5E: A4 8A Â  Â  Â  Â  LDY 8A&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A60: 8E C3 0EÂ  Â  Â  STX 0EC3&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A63: 8C C5 0EÂ  Â  Â  STY 0EC5&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; give GSOS the pointer to our $4000 bytes&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A66: A9 00 40Â  Â  Â  LDA #4000&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; start with 4000 bytes but scale down if&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A69: AE 26 05Â  Â  Â  LDX 0526&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; oversampling&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A6C: F0 04 Â  Â  Â  Â  BEQ 0A72 {+04}&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A6E: 4AÂ  Â  Â  Â  Â  Â  LSR&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; $2000 bytes if 2x, $1000 bytes if 4x, etc&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A6F: CAÂ  Â  Â  Â  Â  Â  DEX&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A70: D0 FC Â  Â  Â  Â  BNE 0A6E {-04}&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A72: 8D C7 0EÂ  Â  Â  STA 0EC7&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A75: 9C C9 0EÂ  Â  Â  STZ 0EC9&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; EC7/EC9 contains bytes to read, 4000/2000/1000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A78: 20 4F 0EÂ  Â  Â  JSR 0E4F&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; do GSOS read&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A7B: B0 12 Â  Â  Â  Â  BCS 0A8F {+12}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; return if error&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A7D: A2 00 00Â  Â  Â  LDX #0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A80: 20 90 0AÂ  Â  Â  JSR 0A90&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; stash data to DOC (x=0)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A83: 20 4F 0EÂ  Â  Â  JSR 0E4F&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; do GSOS read&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A86: B0 07 Â  Â  Â  Â  BCS 0A8F {+07}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; return if error&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A88: A2 01 00Â  Â  Â  LDX #0001&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A8B: 20 90 0AÂ  Â  Â  JSR 0A90&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; stash data to DOC (x=1)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A8E: 18Â  Â  Â  Â  Â  Â  CLC&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A8F: 60Â  Â  Â  Â  Â  Â  RTS&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; this is where we stash data to the DOC&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; a, y - trashed&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; $88 - pointer to the data&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; x=0 - stash data at $0000 in DOC RAM&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; x=1 - stash data at $4000 in DOC RAM&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A90: E2 20 Â  Â  Â  Â  SEP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A92: AF CA 00 E1 Â  LDA E100CA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A96: 29 0F Â  Â  Â  Â  AND #0F&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A98: 09 60 Â  Â  Â  Â  ORA #60&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A9A: 8F 3C C0 E1 Â  STA E1C03C&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; select DOC RAM, auto-increment&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0A9E: A9 00 Â  Â  Â  Â  LDA #00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AA0: 8F 3E C0 E1 Â  STA E1C03E&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; address low word: $0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AA4: E0 00 00Â  Â  Â  CPX #0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AA7: F0 02 Â  Â  Â  Â  BEQ 0AAB {+02}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; if x=0, do low 16K, else set up for high 16K&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AA9: A9 40 8FÂ  Â  Â  LDA #8F40&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; LDA #40&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AAC: 3F C0 E1 A0 Â  AND A0E1C0,X&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; STA E1C03F for addr high word&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AAF: A0 00 Â  Â  Â  Â  LDY #00&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; LDY #0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AB1: 00 B7 Â  Â  Â  Â  BRK B7&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; LDA [88],Y - $88 is pointer to the $4000 bytes&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AB3: 88Â  Â  Â  Â  Â  Â  DEY&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;;&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AB4: D0 01 Â  Â  Â  Â  BNE 0AB7 {+01}&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AB6: 1AÂ  Â  Â  Â  Â  Â  INC&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; INC if zero so sound doesn't break&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AB7: AE 26 05Â  Â  Â  LDX 0526&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0ABA: F0 03 Â  Â  Â  Â  BEQ 0ABF {+03}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; skip oversampling if it's not on?&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0ABC: 20 D7 0AÂ  Â  Â  JSR 0AD7&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; else perform oversampling&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0ABF: 8F 3D C0 E1 Â  STA E1C03D&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; stash data to DOC&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AC3: C8Â  Â  Â  Â  Â  Â  INY&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AC4: CC CB 0EÂ  Â  Â  CPY 0ECB&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AC7: 90 E9 Â  Â  Â  Â  BCC 0AB2 {-17}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; keep looping till y=0ECB&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AC9: CC C7 0EÂ  Â  Â  CPY 0EC7&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0ACC: F0 06 Â  Â  Â  Â  BEQ 0AD4 {+06}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; just return if not end of file?&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0ACE: A9 00 Â  Â  Â  Â  LDA #00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AD0: 8F 3D C0 E1 Â  STA E1C03D&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; store final zero for end of sound&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AD4: C2 20 Â  Â  Â  Â  REP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AD6: 60Â  Â  Â  Â  Â  Â  RTS&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 2x oversampling&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AD7: E0 02 00Â  Â  Â  CPX #0002&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0ADA: F0 13 Â  Â  Â  Â  BEQ 0AEF {+13}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; do 4x oversampling if it's on&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0ADC: 48Â  Â  Â  Â  Â  Â  PHA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0ADD: C2 20 Â  Â  Â  Â  REP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0ADF: 18Â  Â  Â  Â  Â  Â  CLC&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AE0: 6D 23 0BÂ  Â  Â  ADC 0B23&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AE3: 4AÂ  Â  Â  Â  Â  Â  LSR&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; (ByteA + ByteB) / 2&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AE4: E2 20 Â  Â  Â  Â  SEP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AE6: 8F 3D C0 E1 Â  STA E1C03D&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; stash data to DOC&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AEA: 68Â  Â  Â  Â  Â  Â  PLA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AEB: 8D 23 0BÂ  Â  Â  STA 0B23&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AEE: 60Â  Â  Â  Â  Â  Â  RTS&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 4x oversampling&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AEF: 48Â  Â  Â  Â  Â  Â  PHA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AF0: C2 20 Â  Â  Â  Â  REP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AF2: 18Â  Â  Â  Â  Â  Â  CLC&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AF3: 6D 23 0BÂ  Â  Â  ADC 0B23&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AF6: 4AÂ  Â  Â  Â  Â  Â  LSR&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AF7: 8D 21 0BÂ  Â  Â  STA 0B21&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; (ByteA + ByteB) / 2&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AFA: 18Â  Â  Â  Â  Â  Â  CLC&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AFB: 6D 23 0BÂ  Â  Â  ADC 0B23&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AFE: 4AÂ  Â  Â  Â  Â  Â  LSR&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; Point halfway between oversample byte and ByteA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0AFF: E2 20 Â  Â  Â  Â  SEP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B01: 8F 3D C0 E1 Â  STA E1C03D&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; ... to DOC&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B05: AD 21 0BÂ  Â  Â  LDA 0B21&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B08: 8F 3D C0 E1 Â  STA E1C03D&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; Byte A to DOC&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B0C: 68Â  Â  Â  Â  Â  Â  PLA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B0D: 8D 23 0BÂ  Â  Â  STA 0B23&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B10: C2 20 Â  Â  Â  Â  REP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B12: 18Â  Â  Â  Â  Â  Â  CLC&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B13: 6D 21 0BÂ  Â  Â  ADC 0B21&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B16: 4AÂ  Â  Â  Â  Â  Â  LSR&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; Point halfway between oversample byte and ByteB&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B17: E2 20 Â  Â  Â  Â  SEP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B19: 8F 3D C0 E1 Â  STA E1C03D&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; ... to DOC&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B1D: AD 23 0BÂ  Â  Â  LDA 0B23&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; and get ByteB ready to slam in there next&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0B20: 60Â  Â  Â  Â  Â  Â  RTS&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;Notice there isn't a lot there that you haven't already seen. We call a subroutine (that isn't listed here) to do the GSOS seek and read into a $4000 (16k) byte buffer that was allocated earlier with _NewHandle. If we're doing 2x oversampling, we tell GSOS to only read $2000 bytes because the sample size will be doubled in DOC RAM. Similarly, only read $1000 bytes for 4x oversampling. Then, the data is written to the DOC, and as we do so, the oversampling calculations are performed, if enabled, and $00 bytes are transformed to $01 bytes to keep the oscillator from halting when they are encountered. The other thing to notice is that it happens twice. Once, DOC RAM is filled from $0000 to $3FFF, and the second time it is filled from $4000 to $7FFF, so now we've got 32K (half) of DOC RAM full of sound data.&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;And we return to the main player...&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; open player window, draw controls&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/03FA: 48Â  Â  Â  Â  Â  Â  PHA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/03FB: 48Â  Â  Â  Â  Â  Â  PHA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/03FC: F4 00 00Â  Â  Â  PEA 0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/03FF: F4 00 00Â  Â  Â  PEA 0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0402: F4 00 00Â  Â  Â  PEA 0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0405: F4 00 00Â  Â  Â  PEA 0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0408: F4 00 00Â  Â  Â  PEA 0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/040B: F4 77 0BÂ  Â  Â  PEA 0B77		; 0B77 = window redraw callback&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/040E: F4 00 00Â  Â  Â  PEA 0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0411: F4 00 00Â  Â  Â  PEA 0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0414: F4 02 00Â  Â  Â  PEA 0002&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0417: F4 00 00Â  Â  Â  PEA 0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/041A: F4 F8 0FÂ  Â  Â  PEA 0FF8&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/041D: F4 0E 80Â  Â  Â  PEA 800E&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0420: A2 0E 61Â  Â  Â  LDX #610E&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0423: 22 00 00 E1 Â  JSL E10000 NewWindow2(@T,RC/4,@draw,@def,pDesc,pRef/4,rType):@W&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0427: 68Â  Â  Â  Â  Â  Â  PLA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0428: 8D 14 05Â  Â  Â  STA 0514&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/042B: 68Â  Â  Â  Â  Â  Â  PLA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/042C: 8D 16 05Â  Â  Â  STA 0516&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/042F: 20 EB 09Â  Â  Â  JSR 09EB		; set up keyboard interrupts&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;Nothing fancy about that, just a call to NewWindow2... except for the last part there. Keyboard interrupts? Yeah, Oversampler uses its own keyboard interrupt handler to tell if you pressed ESC so it can stop playing. That handler is nothing fancy, and it doesn't provide insight on Oversampler technology though, so I'm skipping it. Let's continue...&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0432: A9 FF FFÂ  Â  Â  LDA #FFFF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0435: 8D 18 05Â  Â  Â  STA 0518&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0438: AD 16 05Â  Â  Â  LDA 0516&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/043B: 48Â  Â  Â  Â  Â  Â  PHA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/043C: AD 14 05Â  Â  Â  LDA 0514&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/043F: 48Â  Â  Â  Â  Â  Â  PHA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0440: A2 10 10Â  Â  Â  LDX #1010&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0443: 22 00 00 E1 Â  JSL E10000Â  DrawControls(@Wind)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0447: A0 00 00Â  Â  Â  LDY #0000&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/044A: B9 28 05Â  Â  Â  LDA 0528,Y	; set up DOC registers to default&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/044D: C9 FF FFÂ  Â  Â  CMP #FFFF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0450: F0 12 Â  Â  Â  Â  BEQ 0464 {+12}&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0452: 29 FF 00Â  Â  Â  AND #00FF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0455: AAÂ  Â  Â  Â  Â  Â  TAX&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0456: B9 28 05Â  Â  Â  LDA 0528,Y&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0459: EBÂ  Â  Â  Â  Â  Â  XBA&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/045A: 29 FF 00Â  Â  Â  AND #00FF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/045D: 20 3C 09Â  Â  Â  JSR 093C		; set DOC register&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0460: C8Â  Â  Â  Â  Â  Â  INY&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0461: C8Â  Â  Â  Â  Â  Â  INY&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0462: 80 E6 Â  Â  Â  Â  BRA 044A {-1A}	; loop till we're done setting them&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;					; at this point, 0 is stopped, 8 and 16 are playing?&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;					; oscillator 0 - echo-delayed channel if any&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;					;Â  Â  Â  Â  Â  Â  Â  Â  (otherwise it plays same as 16)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;					; oscillator 8 - quiet, used as timer for irqs&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;					; oscillator 16 - &quot;main&quot; channel&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;I'm not interested in the call to _DrawControls, but you see there at 44A, we start setting up DOC registers from a table again, and that table is:&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; DOC register defaults for player&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0528: 00 E3 Â  Â  Â  Â  BRK E3&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 00 (freq0lo) - E3&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/052A: 20 01 10Â  Â  Â  JSR 1001&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 20 (freq0hi) - 01 - 483 for freq0?&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/052D: E3 30 Â  Â  Â  Â  SBC 30,S&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 10 (freq16lo) - E3&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/052F: 01 08 Â  Â  Â  Â  ORA (08,X)&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 30 (freq16hi) - 01 - 483 for freq16&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0531: E3 28 Â  Â  Â  Â  SBC 28,S&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 08 (freq8lo) - E3&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0533: 01 40 Â  Â  Â  Â  ORA (40,X)&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 28 (freq8hi) - 01 - 483 for freq8&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;					&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 40 (volume0) - FF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0535: FF 50 FF 48 Â  SBC 48FF50,X&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 50 (volume16) - FF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;					&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 48 (volume8) - 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0539: 00 80 Â  Â  Â  Â  BRK 80&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 80 (addr0) - 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/053B: 00 88 Â  Â  Â  Â  BRK 88&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 88 (addr8) - 80&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/053D: 80 90 Â  Â  Â  Â  BRA 04CF {-70}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; 90 (addr16) - 00&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/053F: 00 C0 Â  Â  Â  Â  BRK C0&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; C0 (multi0) - 3F (play 32k sound)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0541: 3F C8 3E D0 Â  AND D03EC8,X&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; C8 (multi8) - 3E (32k sound, different resolution)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0545: 3F A0 01 A8 Â  AND A801A0,X&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; D0 (multi16) - 3F (play 32k sound)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;					&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; A0 (control0) - 01 (free run, halt, no int)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0549: 08Â  Â  Â  Â  Â  Â  PHP&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; A8 (control8) - 08 (free run, no halt, int)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/054A: B0 10 Â  Â  Â  Â  BCS 055C {+10}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; B0 (control16) - 10 (free run, no halt, no int)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/054C: FF FF A9 FF Â  SBC FFA9FF,X&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; FFFF - end of table&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;Note that the frequency doesn't have to be 483, that is a default that's changed by the slider bars elsewhere. Same for frequency. But the biggest thing is the last three registers changed: Oscillator 1 is set up so that it would run in free-run mode with no interrupts, as soon as the halt bit is taken off. This is because it's the &quot;echo delay&quot; channel and starts after the other two. Oscillator 16 plays the same sound and starts immediately, because its halt bit isn't set. Oscillator 8 had its volume set to 0, because Oversampler uses it as a timer of sorts. Note that interrupts are enabled on it, meaning that when it gets to the end of sound data, it is going to throw a Sound IRQ, which is going to be very important soon. Note also that timer Oscillator 8 is missing a resolution bit, causing it to &quot;play&quot; every other byte and thus throw IRQ in half the time as the other oscillators take to play the sample. This is very helpful for the &quot;refilling&quot; process as you may imagine, so that when the two &quot;live&quot; oscillators are playing sound from the upper part, we can refill the lower, and vice-versa.&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0464: AE 22 05Â  Â  Â  LDX 0522		; echo delay&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0467: F0 13 Â  Â  Â  Â  BEQ 047C {+13}	; wait a certain number of vblanks&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0469: E2 20 Â  Â  Â  Â  SEP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/046B: AF 19 C0 00 Â  LDA 00C019Â  r:RDVBLBAR&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/046F: 10 FA Â  Â  Â  Â  BPL 046B {-06}&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0471: AF 19 C0 00 Â  LDA 00C019Â  r:RDVBLBAR&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0475: 30 FA Â  Â  Â  Â  BMI 0471 {-06}	; wait for vblank(s?)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0477: C2 20 Â  Â  Â  Â  REP #20&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0479: CAÂ  Â  Â  Â  Â  Â  DEX&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/047A: D0 ED Â  Â  Â  Â  BNE 0469 {-13}&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/047C: A2 A0 00Â  Â  Â  LDX #00A0	; register $A0 - Control 0&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/047F: A9 00 00Â  Â  Â  LDA #0000	; value $00 - free run, no interrupt, not halt&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0482: 20 3C 09Â  Â  Â  JSR 093C		; set DOC register&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;					; at this point 0 is playing first chunk from disk&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;					; (delayed if applicable)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;All we did here was read the value of the echo delay, and wait a few vblanks, then turn Oscillator 1 loose. So at this point, 1 is playing delayed if asked, 16 is playing non-delayed, and 8 is the timer.&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0485: 9C 1A 05Â  Â  Â  STZ 051A&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0488: 9C 8C 05Â  Â  Â  STZ 058C&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/048B: 9C 8E 05Â  Â  Â  STZ 058E&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/048E: A9 FF FFÂ  Â  Â  LDA #FFFF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0491: 8D 1C 05Â  Â  Â  STA 051C		; init the high/low flipflop variable&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; main player loop?&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0494: AD 8C 05Â  Â  Â  LDA 058C&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0497: D0 36 Â  Â  Â  Â  BNE 04CF {+36}	; branch to stop/return if we hit the end&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0499: AD AB 05Â  Â  Â  LDA 05AB		; read keypress register&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/049C: C9 1B 00Â  Â  Â  CMP #001B	; if ESC&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/049F: F0 2E Â  Â  Â  Â  BEQ 04CF {+2E}	; stop player and quit&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04A1: AD 1C 05Â  Â  Â  LDA 051C&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04A4: D0 EE Â  Â  Â  Â  BNE 0494 {-12}	; keep looping till 051C is zero (int on osc 8)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; interrupt happened (generator finished playing)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04A6: CE 1C 05Â  Â  Â  DEC 051C		; set 051C back to FFFF&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04A9: 20 4F 0EÂ  Â  Â  JSR 0E4F		; read chunk from soundfile&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04AC: B0 21 Â  Â  Â  Â  BCS 04CF {+21}	; stop if error&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04AE: AE 8E 05Â  Â  Â  LDX 058E&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04B1: 20 90 0AÂ  Â  Â  JSR 0A90		; stash data to DOC (high/low $4000 depends on 058e)&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04B4: AD 8E 05Â  Â  Â  LDA 058E&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04B7: 49 01 00Â  Â  Â  EOR #0001&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04BA: 8D 8E 05Â  Â  Â  STA 058E		; flip 058E between 0000 and 0001&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04BD: AD 1C 05Â  Â  Â  LDA 051C&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04C0: D0 D2 Â  Â  Â  Â  BNE 0494 {-2E}	; keep looping if interrupt didn't happen already&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; interrupt happened while we were refilling?&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04C2: EE 1A 05Â  Â  Â  INC 051A&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04C5: AD 1A 05Â  Â  Â  LDA 051A&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04C8: C9 03 00Â  Â  Â  CMP #0003	; got here 3 times? sucks, let's bail&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04CB: F0 06 Â  Â  Â  Â  BEQ 04D3 {+06}	; stop player, draw alert, and exit&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04CD: 80 C5 Â  Â  Â  Â  BRA 0494 {-3B}&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04CF: 20 EF 04Â  Â  Â  JSR 04EF		; stop player&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/04D2: 60Â  Â  Â  Â  Â  Â  RTS&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;Above is the main code of the sound player. A few variables are zeroed out to start. 051A is a counter that keeps track of how many times an interrupt happened while we were refilling the DOC. If that happens 3 times, we throw an alert window (which I imagine says something like &quot;too fast, dude!&quot;) and bail out. 058C is a quit flag set elsewhere, and 058E is flipped back and forth between 01 and 00, and is used to provide the x register for the call to refill the DOC RAM (recall that the x register determines whether high or low 16k is refilled in that subroutine). 051C is set by an interrupt handler that was installed by _SetSoundMIRQV when we started up. Let's have a look at that interrupt handler real quick:&lt;/div&gt;
&lt;div&gt;&lt;br class=&quot;webkit-block-placeholder&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; sound MIRQVector that got installed at startup&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0555: 08Â  Â  Â  Â  Â  Â  PHP&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0556: 8BÂ  Â  Â  Â  Â  Â  PHB&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0557: 0BÂ  Â  Â  Â  Â  Â  PHD&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0558: C2 30 Â  Â  Â  Â  REP #30&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/055A: 4BÂ  Â  Â  Â  Â  Â  PHK&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/055B: ABÂ  Â  Â  Â  Â  Â  PLB&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/055C: AD 9B 00Â  Â  Â  LDA 009B&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; original data bank register&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/055F: 5BÂ  Â  Â  Â  Â  Â  TCD&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0560: A2 E0 00Â  Â  Â  LDX #00E0&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; register #E0: Oscillator Interrupt Register&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0563: 20 5C 09Â  Â  Â  JSR 095C&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; read DOC register&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0566: 89 80 00Â  Â  Â  BIT #0080&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; is an oscillator generating an interrupt?&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0569: F0 0B Â  Â  Â  Â  BEQ 0576 {+0B}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; branch if not&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/056B: 29 3E 00Â  Â  Â  AND #003E&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; mask out all bits except osc number&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/056E: C9 10 00Â  Â  Â  CMP #0010&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; is it oscillator 8?&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0571: D0 03 Â  Â  Â  Â  BNE 0576 {+03}&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; if not, don't zero-out 051C&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0573: 9C 1C 05Â  Â  Â  STZ 051C&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; zero-out 051C to show that an int happened&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0576: A2 A0 00Â  Â  Â  LDX #00A0&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; register #A0: Control Register 0&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/0579: 20 5C 09Â  Â  Â  JSR 095C&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;		&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; read DOC register&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/057C: 29 01 00Â  Â  Â  AND #0001&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;	&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;; is it halted?&lt;/tt&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: Courier; font-size: 10px;&quot;&gt;&lt;tt&gt;00/057F: F0 06 Â  Â