Unimplemented Trap
Adventures in hardware and software

SB-A1: My Apple 1 clone with printer and SD Card storage

This project is my own implementation and extension of Ruud van Falier’s excellent Apple 1 Mini project: a way of building your very own Apple 1 clone using only a few modern parts. My own customisations to the code are available on GitHub (shared with permission).

Rather than getting a PCB made, I chose a more organic approach of building in wire wrap mainly as I was unsure exactly what features I would be building into my version. For expandability this uses an RC2014 backplane, although the pinout is not compatible with RC6502.

Terminal

Ruud’s Apple 1 Mini uses an Arduino Nano to provide a serial interface to the Apple 1 which works by simulating Woz’s original video display and keyboard interface circuits. I’ve been using a FabGL board as a video terminal built into a custom case with a small LCD monitor and PS/2 keyboard, although a USB-serial adapter could instead be used on any other modern computer.

I had also made some modifications to Ruud’s Arduino code: removing the delays which simulated the correct speed of the machine, and code which correctly used the flashing @ symbol for the cursor (the terminal app I used during development didn’t support hiding the default cursor which resulted in a duplicated cursor on the screen).

Reducing the delays in the code also made my implementation for storage a lot faster than it would have been otherwise.

Printer

Next on the list of customisations is the addition of an Adafruit thermal printer. Very useful when needing a hard copy of anything that’s printed to the screen for debugging or future reference.

The printer is connected to the same Arduino that handles the serial interface. To enable this, the Apple 1 just needs to send the ASCII control code DC1 ($11), and disable it by sending DC3 ($13). I came across these control codes in an Epson dot matrix printer manual so I liked the ideal of following a convention if not a standard.

There was space in the Apple 1 ROM to include subroutines I could quickly call to send these characters. When the Arduino receives the control code to enable the printer, then as well as sending the character to the video terminal, it also sends out the same character over a second serial connection to the printer. So after enabling, any text that is displayed by the Apple 1 will also be printed.

Storage

Cassette tape was the original Apple 1’s approach to permanent storage but I wanted something a little more 21st century. I landed on a technique that avoided any need for software to be running on the Apple 1 itself: instead of a disk operating system of sorts, I again repurposed the Arduino in a similar way to the printer by saving and loading information as ASCII text. This is very similar to using paper tape on a teletype.

Since the Arduino is also the keyboard interface, pressing Control + A stops the Arduino from sending any typed text to the Apple and instead presents it’s own terminal-level interface. Type SAVE <FILENAME> and press return, and it will start to save text received from the Apple into a file on the SD card. Press Control + A again to stop “recording”. The idea is you can queue up a listing of a BASIC program, or use the Woz monitor to output hex values from a memory range.

Loading data is the opposite: press Control + A again to trigger the Arduino’s command interpreter and type LOAD <FILENAME> and it replays the text as if it had been typed on the keyboard.

The Arduino also supports a DELETE command for removing files, and in the tradition of Apple ][ DOS CAT displays a catalogue of the files on the SD card. The LED next to the card slot shows when either store or loading activities are in progress.

It’s a deliberately simple way of handling storage but has worked well enough for my needs.

Why did I make one?

I was wanting a simple 6502-based system to learn a bit of assembly language programming, with the goal of being able to interface this with external circuits.

A 6522 PIA chip was added to one of the backplane. Most recently I’ve been using that in some experiments around making paper tape punches/perforators and readers. (In which I discovered the machining tolerances of this type of equipment is verging on watchmakers skills…)

The main build was completed 2 years ago, but now that I’ve been using it for its intended purpose it seems overdue to add this writeup.

Blog home