apple2.ca - Terence J. Boldt's Apple II Site

Welcome
My ProDOS ROM-Drive
Serial Drive
/b>
 

ProDOS ROM-Drive

ROM-Drive for Apple ][

ProDOS ROMDrive (essentially a read-only SSD although in 1998 nobody heard of SSDs)

My first Apple computer was an Apple IIe that my brother bought in early 1984. Countless hours were spent playing games which developed my interest in building games. This also led to the creation of various utilities to help organize disks or just to see what could be done while programming.

As time passed, I obtained other machines far more powerful and eventually my once loved Apple IIe got used less and less. I did still pull it out of storage every few months to play some classic games or see what I could accomplish with greater programming skills. The problem was connecting up disk drives, looking for disks and hoping that the disks still worked. To make life simpler, I decided I needed to come up with some way to permanently store the files inside the computer without needing to plug in anything but the power and video connectors. This is where the idea for a solid-state drive began.

In the summer of 1998 I did some research in my own Apple II library for information on building peripheral cards. I drew up some designs in September 1998 and started building a prototype on a solderless breadboard with the wires jumpered over from a dead parallel card which I had cut the traces on. The rough idea at the time was to have two EPROMs. One would hold the 256 bytes of code in the $Cs00 - $CsFF space (where s is the slot number) and the second EPROM would get accessed through the 16 byte port space for the slot. To access more than 16 bytes, I would have a couple latch chips where you could program in the address of the disk EPROM and then read it one byte at a time through the ports. Originally I was going to make my own modified version of DOS 3.3 but before I got too far, David Wilson from Australia convinced me that it was much easier to build it for ProDOS since it supported many types of drives natively.

By November 1998 I had a prototype on the solderless breadboard that could read data from the EPROM but it had no driver code, didn't boot and was very unreliable. In December I managed to have the two EPROM based system running but it would fail to boot about 80% of the time with various read errors. Shortening the length of wires, cleaning up the layout and a new design helped but it was still unreliable. I finally gave up on the second design but as it turns out, it could have been fixed quite easily.

By mid-May of 1999 I finally got around to building a third design. This time I reduced the chip count and made the firmware for the drive reside in the top two blocks of the virtual disk EPROM. It still was somewhat unreliable in slot one but it was progressively worse as it was placed into higher slot numbers. By slot seven the card was completely unuseable. I then discovered that adding a 104 ceramic capacitor to each chip made the problem disappear. It was suddenly fully reliable.

To build actual circuit boards, I tried making some by hand with marker, etching solution and copper on fibreglass boards but this proved to be far too difficult. I then learned the wonders of gerber files which can be created with a variety of PCB layout software. The files were emailed to a company in Alberta, Canada and three days later in July of 1999 I received a batch of 10 blank boards. These boards did not have the familiar green board look to them, nor were they pre-cut. I had to cut and file them to fit an Apple II slot by hand. Apparently it's prohitively expensive to make less than 20 or 30 boards with the full solder-masking process due to the set-up fees.

If you're planning on designing you own card, I highly recommend reading "Interfacing & Digital Experiments with your Apple" by Charles J. Engelisher and Apple's "Apple II Reference Manual" as well as "ProDOS Technical Reference Manual" if you want to build a drive. You also need an EPROM programmer, some chips and a prototyping board. My designs used simple logic gates to decode addresses but if you want to reduce chip count, you'll also need a PAL/GAL logic programmer (which some EPROM programmers can do).



Additional info

This is a peripheral card for the Apple ][ series computers that acts as a disk drive all in ROM. Although it won't run DOS, it is fully ProDOS compatible and will appear as a read-only hard drive even when booting from another drive. It holds 1022 KB of disk data and 2 KB of controlling code making a full megabyte. The drive boots ProDOS and into BASIC in under 1.5 seconds.

2018-Jun-06 Gerber, drill and PDF files now available

Top layer
Bottom layer
Drill file
Both sides as a PDF


2018-Jun-06 Updated license agreement in source code

;This is 6502 assembler code for a ProDOS compatible
;Apple II bootable ROM drive.
;
;Hardware/Software (c)1998-1999 Terence J. Boldt
;You may freely copy and modify this source
;as well as the hardware, providing you give
;me credit for the original design.
;
;mailto:terence@apple2.ca
;http://apple2.ca

;Please note this code is assembled seven times,
;once for each slot in the Apple II.
;This allows the card to work in any slot without
;having to write space consuming relocatable code.


;Determine which slot we want by command-line define
	if SLOT1
slot    equ     $01
	endif
	if SLOT2
slot    equ     $02
	endif
	if SLOT3
slot    equ     $03
	endif
	if SLOT4
slot    equ     $04
	endif
	if SLOT5
slot    equ     $05
	endif
	if SLOT6
slot    equ     $06
	endif
	if SLOT7
slot    equ     $07
	endif
	
;Calculate I/O addresses for this slot

slotwh  equ     $C081+slot*$10
slotwl  equ     $C080+slot*$10
slotrd  equ     $C080+slot*$10
sdrive  equ     slot*$10

sram0   equ     $478+slot
sram1   equ     $4F8+slot
sram2   equ     $578+slot
sram3   equ     $5F8+slot
sram4   equ     $678+slot
sram5   equ     $6F8+slot
sram6   equ     $778+slot
sram7   equ     $7F8+slot

;ProDOS defines

command equ     $42     ;ProDOS command
unit    equ     $43     ;7=drive 6-4=slot 3-0=not used
buflo   equ     $44     ;low address of buffer
bufhi   equ     $45     ;hi address of buffer
blklo   equ     $46     ;low block
blkhi   equ     $47     ;hi block
ioerr   equ     $27     ;I/O error code
nodev   equ     $28     ;no device connected
wperr   equ     $2B     ;write protect error

	org     $C000+slot*$100
			;code is non-relocatable
			; but duplicated seven times,
			; once for each slot

;ID bytes for booting and drive detection
	cpx     #$20    ;ID bytes for ProDOS and the
	cpx     #$00    ; Apple Autostart ROM
	cpx     #$03    ;
	cpx     #$3C    ;this one for older II's

;display copyright message
	ldy     #$00
drawtxt lda     text,y
	beq     boot    ;check for NULL
	ora     #$80    ;make it visible to the Apple
	sta     $07D0,y ;put text on last line
	iny
	bpl     drawtxt

;load first two blocks and execute to boot
boot    lda     #$01    ;set read command
	sta     command
	lda     #sdrive ;set slot and unit
	sta     unit

	lda     #$00    ;block 0
	sta     blklo
	sta     blkhi
	sta     buflo   ;buffer at $800
	lda     #$08
	sta     bufhi
	jsr     entry   ;get the block

	lda     #$00    ;block 1
	sta     blklo
	sta     blkhi
	sta     buflo   ;buffer at $A00
	lda     #$0A
	sta     bufhi
	jsr     entry   ;get the block

	ldx     #sdrive ;set up for slot n
	jmp     $801    ;execute the block

;This is the ProDOS entry point for this card
entry   lda     #sdrive ;unit number is $n0 - n = slot
	cmp     unit    ;make sure same as ProDOS
	beq     docmd   ;yep, do command
	sec             ;nope, set device not connected
	lda     #nodev
	rts             ;go back to ProDOS

docmd   lda     command ;get ProDOS command
	beq     getstat ;command 0 is GetStatus
	cmp     #$01    ;
	beq     readblk ;command 1 is ReadBlock
	sec             ;Format/Write not permitted
	lda     #wperr  ;write protect error
	rts             ;go back to ProDOS

getstat clc             ;send back status
	lda     #$00    ;good status
	ldx     #$00    ;1024 blocks
	ldy     #$04    ;
	rts

readblk lda     blkhi   ;get hi block
	asl     a       ;shift up to top 3 bits
	asl     a       ;since that's all the high
	asl     a       ;blocks we can handle
	asl     a       ;
	asl     a       ;
	sta     sram0   ;save it in scratch ram 0
			;so we can stuff it in the
			;high latch later
	lda     blklo   ;get low block
	lsr     a       ;shift so we get the top 5
	lsr     a       ;bits - this also goes in
	lsr     a       ;the high latch
	ora     sram0   ;add it to those top 3 bits
	sta     sram0   ;save it back in scratch ram

	lda     blklo   ;get low block
	asl     a       ;shift it to top 3 bits
	asl     a       ;
	asl     a       ;
	asl     a       ;
	asl     a       ;
	sta     sram1   ;save it in scratch ram

	jsr     get256  ;get first half of block

	lda     sram1   ;get low latch
	and     #$F0    ;clear bottom 4 bits
	ora     #$10    ;set bit 5 for second half
			;of 512 byte block
	sta     sram1   ;save it back in scratch

	inc     bufhi   ;write 2nd block up 256 bytes
	jsr     get256  ;get second half of block
	dec     bufhi   ;put ProDOS buffer back

	clc             ;clear error code for success
	lda     #$00
	rts             ;return to ProDOS

;This gets 256 bytes from the ROM card
;assuming high latch value is in sram0
;and low latch value is in sram1
get256  ldy     #$00    ;clear buffer counter
	lda     sram0   ;get high latch value
	sta     slotwh  ;set high latch for card

loop256 ldx     #$00    ;clear port counter
	lda     sram1   ;get low latch value
	sta     slotwl  ;set low latch

loop16  lda     slotrd,x        ;get a byte
	sta     (buflo),y       ;write into the buffer
	iny
	inx
	cpx     #$10
	bne     loop16          ;go until 16 bytes read

	inc     sram1           ;next 16 bytes
	cpy     #$00
	bne     loop256         ;go until 256 total

	rts

text    db      "ROM-Drive (c)1998-1999 Terence J. Boldt", 0

	org     $C0FC+slot*$100
	db      0,0     ;0000 blocks = check status
	db      3       ;bit 0=read 1=status
	db      entry&$00FF ;low byte of entry



2011-Feb-14

Josef Huber sent me an a nice schematic of the drive since my schematics were hand drawn. I fixed the one mistake on it and sent it back with some annotations in red.


2002-Jun-20 Discontinued (sort-of)

I no longer have any boards left but if someone *really* wanted one, I could have more produced. This was a very fun project to work on and I got to share it with other people. It was also a learning experience on many levels. I now know that a simple idea for hardware project can take years to get around to starting and a year of free time to produce. I also learned lots about how the Apple II works so if you're building a hardware project and have some questions, feel free to email me.

1999-Aug-23 No more waiting list, buy one today!

Go ahead and order a drive if you want one. No waiting list! Also feel free to email me with ideas for the 'next' Apple II project. I think I'll start another project shortly... Don't worry, I plan to keep on selling these ROM-Drives for a while.

To get your ROM-Drive customized with your choice of software on it, you will need to have a disk image (or disk images). The best way to do this is with an emulator running on a PC or Mac. To be sure you get exactly what you're expecting, it's best to use Apple II Oasis which allows you to create a 1022 KB hard disk image. Optionally, you can put 1022 KB of ProDOS files contained within several standard 140 KB .DSK or .PO disk images. Fill the drive with your choice of ProDOS compatible files and then email me for further instructions. Pricing is $80 Canadian including shipping in Canada, $60 U.S. including shipping to the U.S. and $55 U.S. + shipping for international orders. This pricing is just slightly above my costs and the boards are available in limited quantities. Also available as an option is a ZIF socket and extra ROMs so you can easily swap disk images for more space.

1999-Jul-19 Sold Out (first batch of PCB's)!

It only took 4 days to sell out of the first round of 6 PCB's. If you're interested in purchasing a ROM-Drive, email me so I can put your name in on the waiting list. Once I have at least 5 orders I will have more boards made up. It only takes 2 to 3 days to have the boards made.

1999-Jul-15 Final Product Finished!

Nearly a year after I first decided to build a card for the Apple II, I finally have a finished product. The board is only tin plated copper without any 'green' solder mask or white silk screening, but it works and works well. Here is a B&W scan of the front and the back.
ROM-Drive Finished Product (July 15, 1999)
ROM-Drive Finished Product (July 15, 1999)
ROM-Drive Finished Product (July 15, 1999)
ROM-Drive Finished Product (July 15, 1999)

As announced on comp.sys.apple2, I will be selling six boards and keeping two for myself. This is a non-profit hobby but I will be charging slightly above my cost in order to cover the price of materials used for development. The pricing is as follows:

$80.00 Canadian funds (includes shipping to anywhere in Canada)
$60.00 U.S. funds (includes shipping to anywhere in the United States)
$55.00 U.S. funds (shipping extra for any other country)

Included in the price is a 4 Mb EPROM (512KB) unless I can find some 27C080's for a decent price. I will burn the EPROM with whatever programs you send me (that will fit of course). If all six sell out before you get a chance to buy one, I will entertain the possibility of having more PCB's made up.

Thank-you everyone who has shown an interest in this project. If you have suggestions for the next project, email me with your ideas.

1999-Jul-06 Third Design PCB Layout

I bet you're wondering why I haven't had an update in almost two months (or maybe not). To cut the sob story short, my PC died and I lost the work I was doing on the PCB layout. For those who know that I write backup software for a living might ask why I didn't have a backup but I have no answer. Anyway, after I got back from vacation, I got a new computer and I'm proud to say that I have started and finished the PCB layout for this final design. I will be ordering 8 prototype boards later this week. If all goes well, I will have a finished product sometime in August. That's not quite one full year from the time I orginally thought of making this ROM-Drive. I've learned a lot by doing this project and the next project will take much less time.

1999-May-18 Third Design Schematics

I scanned in my schematics for the address/data bus as well as the enable/clock/direction lines. This is my third and last design for the card. Hopefully I'll have the PCB layout by next week. So far I've booted the prototype well over 100 times and it has never failed (since the capacitors were added). The 512K drive currently has about a dozen games, ProDOS and a couple utilities on it. It should be a decent size. It would be nice to find some 27C080's to bump that up to 1 MB, but this is ok for now.



1999-May-15 Third Design Prototype

The first prototype of the latest design didn't work. I tore it apart and when I had about 3 or 4 wires left to rip out, I noticed one was broken. So after three hours of building it again, it sort of worked. Oddly enough it worked 47 of 50 boots in slot one but as I moved it up slots it became less reliable until in slot seven it booted once in about 30 tries. Once again I checked and shortened wires to improve reliability. Finally I got that brilliant idea to add a 104 capacitor to each chip (like every other PCB on the planet has) and suddenly it works fine in any slot. This new design uses only one EPROM by putting the boot code in the top 2K of the ROM. It now uses 3 octal buffers (74LS245), 2 octal latches (74LS374), 1 NAND (74LS00), 1 OR (74LS32) and any 28 or 32 pin 27 series EPROM (2764 - 27C080). It could use less chips by accessing the disk image through the same 256 bytes as the boot code, but then I'd have to have a custom version of ProDOS or DOS to support it. As it stands it appears as a regular ProDOS compatible disk drive.


1999-May-05 Third Design

I will be slightly changing the format of this web site soon. I want to put up designs from other people. Leslie Ayling and David Wilson have both created flash ROM-drives. I'm always interested to see what people have done in the way of Apple II hardware.
As for my project, I was ready to have the boards printed. After seeing a flash ROM-drive with only one ROM on it, I felt the need to improve my ROM-drive. Last night I came up with a new design (last time - I promise!) that uses a single 27C080 EPROM for both the ProDOS code as well as the disk image. I'll build the prototype in the next week or so and for sure have the boards made up by June. I think it's worth the redesign since it has one less chip and may take up slightly less space. For now I will be sticking with a straight EPROM design instead of flash-ROM since it's easier to make it a full megabyte.

1999-Apr-12 Tested Second Design Prototype

I tested the design with a 27C010 (128Kx8) chip now and it works perfectly. I think it is safe to say that it will work with any chip from 2764 (8K x 8) up to a 27C080 (1M x 8). I discovered that my programmer does support those 1 MB EPROM's so I'm ordering a few this week. I also found a cheap 512 KB Flash RAM chip, so there is potential for a new design on the horizon. I should be able to finish the PCB design for the current 1 MB drive by next weekend. It would be nice to have a finished product before starting with a new one.

1999-Apr-07 Second Design Prototype

Whoa! After redoing the PCB layout to make the board neater and smaller, I decided to start the complete design from scratch. Last night I built the new prototype and it works flawlessly. I booted it many times and it hasn't messed up a single byte yet. I even played a game of H.E.R.O. off of it running under ProDOS. Again, PRODOS and BASIC.SYSTEM boot and load in under 1.5 seconds on a 1 MHz IIe. As a bonus, the new design uses only one disk image ROM of just about any size up to 1 MB instead of using 4 ROMs of 64 KB each. I still use NAND and AND gates for decoding because I don't have a PAL/GAL programmer. A couple more chips could be cut from the new design which currently includes one firmware ROM (2716), one disk image ROM (2732 - 27040), two latches for addressing (74LS374), one line buffer (74LS245), one AND chip (74LS08) and two NAND chips (74LS00).

1999-Mar-09 Useless Update

I'm still waiting for price quotes. Also, since I just wasted all my money on a brand new Yamaha scooter, I'll have to wait a couple pay checks before I can purchase anything. Check back in April some time. I should have some good news by then.

Thanks to Mike and a couple other people for pointing out some alternate PCB manufacturers.

1999-Feb-01 Schematic for First Design Prototype rev B

The latest schematic is now available.


1999-Jan-30 First Design - Second PCB Layout

Don't you hate waiting for people to update their web pages? It's been over a month now. I finally drew up a schematic (no pin numbers, but it's easy to figure out). I will scan it in and post it Monday. I finished the PCB layout and got a price on having a couple test boards made. After I put my jaw back in place, I asked for a quote on a more plain single prototype. I'm still waiting for a response.

1998-Dec-21 First Design - First Prototype

I'm currently re-doing the PCB layout by hand instead of auto-routing it. There's nothing to show yet, however to keep everyone interested I've put up a picture of the solderless breadboard prototype.


1998-Dec-14 First Design - First PCB Layout

What's up? I've been working on the PCB layout. I started just soldering wires into a little project board, but it's far too tedious. I may etch my own prototype onto a PCB, but there's a chance I'll have one made up for me. Also, yesterday my wife took a picture of the solderless breadboard prototype, so you can expect a scan of the project next week when I visit my parents (who have a scanner).


1998-Dec-02 First Design - Application Launched

It plays games! I shortened the wires to cut down on noise. In a test of 25 boots, it worked 20 times. I have H.E.R.O on the drive now and it works as well. It does still lose a byte here or there which caused some interesting anomalies. The game gave me infinite lives one time, another the start sound kept playing, another I had the wrong character, but for the most part this thing is working. It's assembled on a solderless breadboard which allows easy changing of the design, but this causes the problems I have with reliability. I will build a soldered prototype soon. BTW, for those wanting a schematic, I have one from September when it wasn't working. I'll have a good one before Christmas.


1998-Dec-01 First Design - Second ProDOS Firmware

It boots! Well, sort of. I fixed up the code so it should work with any ROM-drive size up to 512K and fixed the bug in the startup. Apparently the ProDOS code does run if you execute it at $801 and not $800. Also, I had trouble losing bytes once the address was higher. It turns out that it was drawing too much power causing the high outputs of the latches to appear low to the ROM sometimes. I jumpered the output enable and chip enable together so that it will only turn on the ROM when it needs to. This fixed lots and suddenly it booted ProDOS 2.0.3 with BASIC 1.5. It only boots about 1 in 5 times. It usually crashes after the ProDOS startup screen or sometimes when starting BASIC.SYSTEM. It only takes one wrong byte to make it crash. Reliability will be improved soon. At least it's on the right track.

1998-Nov-27 First Design - First ProDOS Firmware

It lives! I finally got a 'cat' command to work on the ROM disk. I need to write the code for first two blocks of the disk in ROM so it can boot ProDOS. Also, the 256 byte I/O code only allows for a 64K (128 block) disk. This needs to be written still. I would have been up to this point a week ago had I not forgotten to increment the hi-byte of the buffer when getting the second half of the block. It read both halves of the block and wrote them both to the same 256 bytes of RAM. Sorry that I have no schematics up yet. I've been too busy to do any scanning etc. BTW, thanks for the three people who offered to purchase the ROM disk cards when they become available. At this time I am still planning on having 10 cards made up some time around spring 1999. The cards will cost about me $40 ~ $50 Canadian each to have the boards made. Then there's the components that either I can solder on or you can do as a kit. I don't mind selling the cards at my cost since this is a strictly non-profit hobby. Estimated cost about $70/card? I'll keep you posted as always...

1998-Nov-18 First Design Prototype rev B

Following advice of those on comp.sys.apple2, I made the 256 byte code non-relocatable and just made 8 slightly different copies in the ROM. A quick addition of three wires and this part works. I also wrote preliminary code for ProDOS support and it now shows up as a single drive in the slot that the card is in. Writing to it gives a write protect error, but unfortunately reading from it gives an I/O error. Also, since my prototype only has 64K I wrote this code to only support that one bank for now. Sorry, no photos or schematics yet, check back soon. Also, the e-mail address at the bottom of this page was incorrect until now.

1998-Nov-12 First Design Prototype rev A

I am currently working on a bootable ROM drive that is ProDOS compatible. So far I have a prototype built on a solderless breadboard that can have data sucessfully read off it into RAM. The boot ROM and ProDOS compatiblity are not implemented yet but I have a good idea how to make it work. I know there's not much info here, but check back in a couple weeks and I'll have pictures, schematics and such up. E-mail for more info if you'd like.

   
All content Copyright ©1984-2003, Terence J. Boldt, unless noted otherwise.