Apple II Projects

Michael J. Mahon
Portland, Oregon

Hobbies and Interests:
Digital Photography, Computers, Electronics, Sailing, and Flying

For many years I designed server systems for Hewlett-Packard—but for fun, Apple II's remain my all-time favorite computers! Some of my projects are described below.

Helix Labs Bubble Memory Card

Several years ago I purchased a few Helix Labs Bubble Memory Cards for the Apple II. These were the first non-volatile solid state "disk drives" for the Apple, and they emulated a 128KB floppy drive under a special version of DOS 3.3 that they termed "BUBDOS", as well as a Pascal 1.1 driver. Its only adaptation was to the lower capacity of the bubble memory chip, 128KB instead of 140KB. Documentation has been hard to find, and the various ROM revisions complicate matters further. Later firmware versions supported ProDOS and CP/M. For your enjoyment, here are scans of the Bubble Memory Card manual, for ROM v1.2, the CP/M driver for ROM v3.00, and the ProDOS adaptation for ROM v3.40. I've also included a .dsk image of v1.2 software, containing BUBDOS, a patched FID, a card diagnostic, and an image of the v1.2 ROM.

Burroughs 220 Simulator, v1.1

If my enthusiasm for the Apple II can be chalked up to nostalgia, then this Apple II project must be nostalgia squared! I previewed B220SIM at KFest 2016, and decided to make it more widely available, just in case there are others who are similarly afflicted. ;-)

The Burroughs 220 was the last commercial vacuum tube computer, and the first machine I programmed to do interactive graphics. The B220 I used had 5000 words of 11 BCD digits each, and a rather elaborate instruction set. After numerous past musings about simulating it on my Apple II, I finally had an epiphany (all too obvious in hindsight) that made an efficient simulation feasible.

This new version of B220SIM, version 1.1, adds an I/O Configuration screen that allows the user to map simulated B220 I/O devices to ProDOS file names. This eliminates the file renaming tedium that made using the simulator difficult. Now it's much easier to use B220SIM to assemble and run B220 programs.

Information about the B220 is available in B220 Operational Characteristics, An Introduction to Coding the B220, and Operating Procedures for the B220.

The simulator and its use is described in this paper.

You can also peruse the B220SIM listing, or you can download the ShrinkIt archive and use it yourself, or even modify it, since the source is included. I've also included a small sample program and the SNAP assembler which I wrote in 1964 and is currently the largest B220 program I have in machine-readable form. And here is the SNAP manual, a relic of the computer industry's upper-case-only days that I OCRed from an IBM 1403 listing (not recommended!). I've fixed all the misrecognitions/typos I could find, and I think I succeeded. ;-)

25-Machine AppleCrate Demo

I finally got around to daisy-chaining the AppleCrate I to the AppleCrate II, creating a 25-machine "AppleCrate". I made a video of this system running RatRace, which you can view here.

DMS Drummer: A Percussion Sequencer for the Apple II

With inspiration and musical mentoring provided by Seth Sternberger of 8-Bit Weapon, I've impemented a percussion sequencer/synthesizer for the Apple II. It allows a user to create sequences as long as 255 patterns, where each pattern is one of a set of 16 musical measures. Within each of these patterns, any one of 8 percussive voices can be played at each 1/16th note boundary. In addition, the "pitch" for playing back the percussion sample can be specified, which is useful for pitched drums, like tom-toms.

DMS Drummer Version II offers the option of playing the percussion instruments directly from the Apple II keyboard or via serial input from slot 2, In addition, the pitch resampling of percussion sounds is much improved.

Like RT.SYNTH (which Seth also offers as DMS Synthesizer) DMS Drummer uses the DAC522 5-bit 22kHz pulse-width-modulation wavetable synthesizer engine, driven by a sequencer that runs in real time. DAC522 represents "silence" as pairs of 6 cycle pulses spaced 46 cycles apart, regardless of whatever the code is doing--which subroutine it's calling or which branch path it's taking. Doing "general purpose" code while maintaining a constant stream of evenly spaced pulses is pretty tricky, but it must be done if the sequencer is to keep quiet except for the desired sounds.

Seth is offering the full version on his website for $15, but the demo version is free for you to play with! It is limited to 8 distinct programmable patterns and the Save function is disabled.

Listen to this sample, created by Seth, to hear the realistic rhythm line that an 8-bit Apple II can produce! The melody and bass lines are being played on RT.SYNTH, so the only non-Apple II-produced sounds are the "explosions" (which could also have been played by SOUND.EDITOR on an Apple II!).

Apple II Networking and Parallel Computing—NadaNet 3.1

Do you have more than one Apple II computer? Have you ever thought about what you could do if they were networked together? In the early 1990s I began thinking about this, and envisioned being able to send data easily from one machine to another and being able to run programs on other Apples while sitting at my main machine.

I knew that there were networking cards available for the Apple II machines, but they were all some combination of rare, expensive, or unsupported by software—and they were all designed to support the Apple II as a client machine, not as a full peer-to-peer network participant. And none of them was usable from BASIC, the premier Apple II language for experimentation and prototyping. So I considered how one might network Apple II computers using only the I/O capabilities built onto the main board, and wondered what might be done with such a network.

I have worked on this project over the intervening years, and the latest version, NadaNet 3.1, offers a new level of usability, reliability, and performance for experiments in Apple II networking, client-server computing, and parallel computing.

NadaNet 3.1 is now available for the Apple II platform. All related articles on this site have been updated to reflect the changes in version 3.1 if they are affected. Most changes are minor (like using the new &PEEKPOKE command to lock a control block on a remote machine instead of &PEEKINC).

The biggest change for me was updating the boot ROMs on the AppleCrate II to use the NadaNet 3.x message formats—that was like the electronic equivalent of brain surgery. Since it would be quite difficult to disassemble the AppleCrate II, the sixteen ROMs were replaced in situ, about four inches in from the edge of the board, and with the "neighbor" board only 3/4" above—talk about working in close quarters!

Fast Square Root Routine for Applesoft

After spending too long putting up with the terribly slow Applesoft SQR function, I finally decided to write a faster one. USR.SQR installs as a USR function and computes square roots more than nine times faster than SQR. If you have any Applesoft programs that take a lot of square roots, this can really make them fly!

AppleCrate II: A New Apple II-Based Parallel Computer

The 17-board AppleCrate II was first shown publicly at KansasFest 2008, and now it is documented here, along with some examples of what it can do—like play "When I'm 64" in 16-voice glory!

AppleCrate Polyphonic Music Synthesizer

I have developed a 16-voice polyphonic synthesizer using the AppleCrate and a highly modified version of SOUND.EDITOR's DAC522. For details, check out SYNTH documentation, the MIDI converter program, and source.

Here's a nice 8-voice example, a rendition of In My Life by The Beatles. It stretches the 8-processor AppleCrate I to its limits, since it actually would like to play ten voices simultaneously. I implemented a "scavenging" algorithm that reassigns the oscillator that has been playing a note the longest when I need an oscillator and all are busy. It usually works, but it occasionally overrides an audible note when a lot of notes are hit together (as you can hear in this piece if you listen closely). When the music is compiled for the AppleCrate II, with 16 oscillators available, no oscillator "stealing" is required.

Here is an earlier rendition of Eric Satie's Gymnopedie for your enjoyment.

NADA.PONG: A Graphic Demo of Apple II Network Gaming

At KansasFest 2007, in response to a challenging lunchtime question, I wrote a graphic demo of the use of NadaNet to support multi-Apple II gaming. It shows a simple Pong-like game animation with the "ball" (a bouncing Apple) being passed between machines via NadaNet. This demo won the HackFest contest that year! A short video of the demo is included for your amusement. ;-)

ProDOS File Server for NadaNet

In order to support more complex applications running on the AppleCrate, and to support a shared ProDOS file system for general NadaNet use, I have written a File Server. It can be accessed by any machine on the NadaNet, regardless of whether it is running ProDOS, DOS, or no OS at all. This provides a convenient way to gain access to common files as well as a way to publish large volumes of data to other machines on the network.

The file server handles the ProDOS BSAVE, BLOAD, BRUN, SAVE, RUN, CREATE, DELETE, LOCK, UNLOCK, RENAME, and VERIFY commands, with their parameters. There are also two supervisory commands: MON, to control monitoring of requests on the server’s display, and STATS, to read various statistical counters kept by the file server.

Sudoku Solver for the Apple II

Scott Hemphill and I collaborated to create a Sudoku puzzle solver for Apple II computers. The machine language solver is Scott's, with some adaptations by me, and I wrote the interactive Applesoft front-end.

SUDOKU v2.0 now runs on any 64KB or larger Apple II with lower case and Applesoft BASIC.

It is amazingly fast! Many Sudoku solvers run on modern PCs thousands of times faster than a 1MHz Apple II, and take seconds to solve a puzzle, but Scott's solver is so time- and space-efficient that it solves puzzles in seconds running on an Apple II--all while displaying its backtrack progress on-screen in real time!

Click here to read about and download the Sudoku Solver.

RT.SYNTH: Apple II Single-Voice Real-Time Synthesizer

Based on SOUND.EDITOR's DAC522 playback routine, I wrote a single-voice wavetable synthesizer for Apple II machines that can be played in real-time from the Apple keyboard. It can be run on any Apple //e, Apple IIc (or IIc+), or Apple IIgs, and permits not only real-time performance using user-selected instrument sounds, but recording and playback of performances.

For all the details, check out RT.SYNTH documentation and downloads.

Sound Editor

In 1993, I decided to push the limits to discover what could be done with sound on an 8-bit Apple II. I was eventually able to achieve excellent sound quality without the distortion and "screech" typical of SoftDAC sound players. SOUND.EDITOR uses DAC522 for its conversion, which operates at a sample rate of 11.025kHz, and converts with 5-bit precision and 22.05kHz oversampling, so that the "carrier" is ultrasonic (for most people ;-).

If you have any 64KB, lower-case-capable Apple ][ with Applesoft BASIC, you can try it out by downloading my Sound Editor v2.2. I guarantee that you will be amazed at the sound reproduction quality. In fact, you really need headphones or an external speaker to do it justice.

Here is a .zip file containing assembler listings of Sound Editor's 2:1 ADPCM sound compression/decompression routines.

Early (1981) Hex Dump Reader

In the old days, some programs were entered by typing in hex listings from magazines. Then the problem was verifying that what you typed was what was in the listing. The obvious way to do this was to display a hex dump of what you had typed, the compare it, line for line, with the printed listing in the magazine. As you can imagine, this verification step is very error-prone in itself, and quite mind-numbing.

It is possible to do much better if you can recruit someone else to read either the screen display or the magazine listing, so that you can compare what you hear to what you see, without constantly shifting your attention from one listing to another. This was my approach, with my wife as the "willing" volunteer, until it became clear that after ten minutes or so, it was no longer "quality time" spent together. ;-)

So my solution was to write a program to read back the hex dump of Apple memory, which I could then easily compare to the printed listing.

I first wrote a short machine language program to digitize sound (to 1-bit precision) at the cassette input for later playback through the speaker. I recorded the hex digits: "One, Two, Three,..., Able, Baker, Charlie, Dog, Easy, Fox". I then used an Applesoft program with game paddles to locate the beginning and end of each spoken digit in memory, and used that info to create a table with an entry for each hex digit. The rest was easy.

In the process of going through my old data cassettes, I found this program and am putting it online for nostalgia's sake. The program in unusual in two ways: 1) it is tricky to modify, since its ending address has been extended manually to include the digitized voice table, and 2) it contains all the code that was used in its development, including the voice digitization and exploration. Just RUN the program READ.HEX.DUMP and enjoy a blast from the past!

Click here to download a ShrinkIt archive of the Hex Dump Reader.

A note on "1-bit speech":

1-bit, or "infinitely clipped", or "fuzzed" speech sounds pretty harsh to most people, but it is quite familiar to most amateur radio operators. It is common practice to severely compress a speech signal (and then limit its bandwidth to 3.5kHz) before using it to modulate a transmitter, so that the effective energy of the speech modulation is as high as possible. This effectively clips the speech into a 1-bit audio signal. (A similar but more linear compression is used to increase the volume of commercials in broadcast programs. ;-)

Early (1981) N-Body Gravitational Simulation

Here is another fun program I wrote in my cassette days—an N-body gravitational simulation with hi-res plotting of the orbits. And here is a cheat sheet to its controls. It is unusual in that it allows the user to choose a display "point of view" from any of the bodies or from the system's center of mass.

Apple I Integer BASIC Disassembly

Here is a disassembly of Apple I Integer BASIC done on an Apple II. I've attempted to correct some of the typos in the listing, as noted.

Other Links:

Here's a fun source for electronic books!

You can email me by clicking here.

Last updated on March 13, 2017.

Page visits since July 12, 2004: