Apple II-style audio on the Replica-1
I thought it would be cool to get the Apple II music program "Electric Duet" running on my Replica-1. The only problem was that the
Replica does not have any sort of sound capabilitiy, so I decided to build an Apple II style speaker circuit and connect it to the
Replica's expansion header. Most of the circuit is borrowed directly from the Apple II.
I was able to get the "Electric Duet" player running on it with only minor modification. Sending songs to the Replica over the
serial port takes about 5 minutes, but loading them from a CFFA-1 compact flash card is nice and speedy.
Modifying "Electric Duet"
I built my circuit with DIP switches that allow me to select the address which toggles the speaker, so I have selected
location $C030, which is the speaker location in the Apple II. The only modification needed to the Electric Duet code is the
location of the keyboard, which is $C000 on the Apple II but $D011 on the Apple-1/Replica-1. This is used by the program to
detect a keystroke which causes the music playback to stop.
Here's my modified version of Electric Duet along with one song, both in Woz monitor hex format, suitable for dumping into the
Replica via a serial link.
Electric Duet for the Replica-1 (hex code)
"Sonata" song for Electric Duet (hex code)
** NEW! ** More songs available in binary and hex formats here.
Running It
I find it easiest to run Electric Duet from BASIC, since it can be CALLed and nicely return. To execute it directly from
the Woz monitor would need a bit of additional programming or modification to return you to the monitor when the program stops.
To execute with BASIC:
1. While in the monitor, send both files to the Replica using Hyperterminal or similar. Loading from a CFFA-1 would be even
better.
2. Jump into BASIC by entering E000R in the monitor.
3. POKE the song start address into zero page locations 30 ($1E) and 31 ($1F): POKE 30,0, then POKE 31,32
4. CALL the Electric Duet code: CALL 768
Schematic

Last Updated: 19-May-2010