close-circle
Close
0%
0%

Apple II AVR/SPI Disk Emulator

Another Disk Emulator for an Apple II, using the native SPI port of an ATmega micro-controller and a few ICs.

Similar projects worth following
close
I previously made USB/SPI Apple II disk emulator based on the FTDI UM232H.
Finally, I am going to make stand-alone disk emulator using commodity hardware and a few supplemental ICs. The dev board I decided to use is an LC Tech AVR ATmega128 board which is available on ebay for about $18. It is relatively cheap, and is one of the few reasonably priced ATmega dev boards that I could find with an SD card reader and RS232 DB9 port.

This project is an extension of my previous proof of concept "AII-SPI-DSK"  which used a slightly modified SPI serial stream from a FTDI UM232H to communicate with an Apple Disk II controller card.  In my previous version, a host computer was necessary.  This project is a stand-alone version.

The basic concept is that the SPI clock runs the 74LS193 counter which sequentially activates a line on the 74LS251 mux.  Each line from the Apple Disk Controller card is multiplexed into a byte with bits representing: PHASE0-3 which select the appropriate disk track; WRITE_REQ which indicates a request to write from the computer; ENABLE1-2 indicating which drive should be enabled; and WRITE_SIG which is the data being written to the disk. This data is transferred over the MISO SPI line to the micro-controller. 

The micro-controller sends disk data over the MOSI SPI line.  This data only needs to be modified slightly to create the READ_PULSE required by the Apple Disk Controller card.  Previously, I used an AND gate to AND the MOSI data with the SPI clock to make a READ_PULSE.

The benefit of using the native SPI port is to avoid processor intensive bit-banging which is used by other Apple Disk Emulators.

  • 1 × LC Tech AVR ATmega128 board LC Tech AVR ATmega128 board with SD card
  • 1 × 9x7 cm proto-board 9x7 cm proto-board
  • 1 × 74LS251N 1-of-8 Line Data Selector/Multiplexer
  • 1 × 74LS193N PRESETTABLE 4-BIT BINARY UP/DOWN COUNTER
  • 1 × 74LS08N Quad 2-Input AND Gate

View all 6 components

  • Placing Parts

    epooch03/30/2014 at 02:18 0 comments

    While placing parts on the protoboard, I noticed an error in the layout image.  It shows a 74LS192N which should be a 74LS193N (it isn't included in the eagle libraries).  I fixed and uploaded a new layout image. I also needed to modify my 20 pin header to accept the disk cable upside-down.  I need to fill in the key on top now so it can't go in the wrong way.  Lots of soldering in my future.

  • Placing Parts

    epooch03/30/2014 at 02:17 0 comments

    While placing parts on the protoboard, I noticed an error in the layout image.  It shows a 74LS192N which should be a 74LS193N (it isn't included in the eagle libraries).  I fixed and uploaded a new layout image. I also needed to modify my 20 pin header to accept the disk cable upside-down.  I need to fill in the key on top now so it can't go in the wrong way.  Lots of soldering in my future.

  • Design Problem

    epooch03/27/2014 at 04:03 0 comments

    There is one major problem with my design that I am working on fixing, but I probably would need another logic chip.  The issue is that the write signal is multiplexed with the other signals from the Apple Disk controller card, so I only get one write bit every 8 cycles.  This is too slow. I either need to select just the write signal to input when the write select is enabled, or speed up the SPI clock.  Selecting just the write signal at the appropriate time would require another logic chip while speeding up the SPI clock would allow me to get rid of the AND gate, but would require a lot more data processing to emulate the read pulse.  I think I will make it read only for now, and go for read/write in version 2.

  • Initial Protoboard Layout

    epooch03/17/2014 at 05:23 0 comments

    I uploaded a layout for hand-soldering a protoboard.  If anybody has good settings to get eagle to autoroute a protoboard, I would like to see it.  I spent a lot of time with the settings and still had to manually route a lot of it. 

  • Collecting Parts

    epooch03/15/2014 at 22:16 0 comments

    I have purchased most of the necessary components, and I am working on software using CrossPack AVR. The original development software for the LC AVR ATmega 128 SD board is available here: LC-ATmega128.zip. I am currently editing it to handle Apple Disk Images and to output the required data stream.

View all 5 project logs

Enjoy this project?

Share

Discussions

Barry Nelson wrote 09/19/2016 at 19:02 point

Again, someone please post a link to the ATmega source code.

  Are you sure? yes | no

Barry Nelson wrote 12/02/2015 at 22:24 point

Where is the ATmega128 source code?

  Are you sure? yes | no

johnhomes wrote 03/04/2015 at 10:43 point

I also needed to modify my 20 pin header to accept the disk cable
upside-down.  I need to fill in the key on top now so it can't go in the
wrong way.  Lots of soldering in my future.

Thanks,

My project: http://www.fixithere.net/sky-customer-service/

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates